<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://pickwiki.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Rkgozar</id>
	<title>Pickwiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://pickwiki.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Rkgozar"/>
	<link rel="alternate" type="text/html" href="https://pickwiki.org/index.php/Special:Contributions/Rkgozar"/>
	<updated>2026-04-28T20:21:53Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://pickwiki.org/index.php?title=NotepadPlusPlus&amp;diff=2674</id>
		<title>NotepadPlusPlus</title>
		<link rel="alternate" type="text/html" href="https://pickwiki.org/index.php?title=NotepadPlusPlus&amp;diff=2674"/>
		<updated>2021-10-07T20:43:34Z</updated>

		<summary type="html">&lt;p&gt;Rkgozar: /* Qmbasic = */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;nowiki&amp;gt;Notepad++&amp;lt;/nowiki&amp;gt; can be configured to do syntax highlighting for BASIC programs.&lt;br /&gt;
&lt;br /&gt;
== Setup ==&lt;br /&gt;
&lt;br /&gt;
# Change directory to &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;%APPDATA%\Notepad++&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
# &amp;lt;nowiki&amp;gt;Copy/paste&amp;lt;/nowiki&amp;gt; the xml from the appropriate section below into your &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;userDefineLang.xml&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
# (Optional) You can add/change/remove keywords in the xml file, or use &amp;lt;nowiki&amp;gt;notepad++&#039;s&amp;lt;/nowiki&amp;gt; &amp;lt;i&amp;gt;User Define&amp;lt;/i&amp;gt; dialog to change them (and their respective colors)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Qmbasic ==&lt;br /&gt;
Following is a version for QM basic.  Click &amp;lt;i&amp;gt;Language &amp;gt; qmbasic&amp;lt;/i&amp;gt; to enable syntax highlighting.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;NotepadPlus&amp;gt;&lt;br /&gt;
    &amp;lt;UserLang name=&amp;quot;qmbasic&amp;quot; ext=&amp;quot;qmb&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;Settings&amp;gt;&lt;br /&gt;
            &amp;lt;Global caseIgnored=&amp;quot;yes&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;TreatAsSymbol comment=&amp;quot;no&amp;quot; commentLine=&amp;quot;no&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Prefix words1=&amp;quot;no&amp;quot; words2=&amp;quot;no&amp;quot; words3=&amp;quot;no&amp;quot; words4=&amp;quot;no&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;/Settings&amp;gt;&lt;br /&gt;
        &amp;lt;KeywordLists&amp;gt;&lt;br /&gt;
            &amp;lt;Keywords name=&amp;quot;Delimiters&amp;quot;&amp;gt;&amp;amp;quot;&amp;amp;apos;0&amp;amp;quot;&amp;amp;apos;0&amp;lt;/Keywords&amp;gt;&lt;br /&gt;
            &amp;lt;Keywords name=&amp;quot;Folder+&amp;quot;&amp;gt;&amp;lt;/Keywords&amp;gt;&lt;br /&gt;
            &amp;lt;Keywords name=&amp;quot;Folder-&amp;quot;&amp;gt;&amp;lt;/Keywords&amp;gt;&lt;br /&gt;
            &amp;lt;Keywords name=&amp;quot;Operators&amp;quot;&amp;gt;&amp;amp;apos; - ! &amp;amp;quot; # % &amp;amp;amp; ( ) , . / : ; ? @ [ \ ] ^ ` { | } ~ + &amp;amp;lt; = &amp;amp;gt;&amp;lt;/Keywords&amp;gt;&lt;br /&gt;
            &amp;lt;Keywords name=&amp;quot;Comment&amp;quot;&amp;gt;1 1 2 2 0! 0* 0REM 0!* 0*!&amp;lt;/Keywords&amp;gt;&lt;br /&gt;
            &amp;lt;Keywords name=&amp;quot;Words1&amp;quot;&amp;gt;$CATALOG $CATALOGUE $DEBUG $DEFINE $EXECUTE $IFDEF $IFNDEF $ELSE $ENDIF $INCLUDE $INSERT $LIST $MODE $NO.CATALOGUE $NO.XREF $NOCASE.STRINGS $PAGE $QMCALL $STOP #CATALOG #CATALOGUE #DEBUG #DEFINE #EXECUTE #IFDEF #IFNDEF #ELSE #ENDIF #INCLUDE #INSERT #LIST #MODE #NO.CATALOGUE #NO.XREF #NOCASE.STRINGS #PAGE #QMCALL #STOP&amp;lt;/Keywords&amp;gt;&lt;br /&gt;
            &amp;lt;Keywords name=&amp;quot;Words2&amp;quot;&amp;gt;ABORT ABORTE ABORTM BEGIN BREAK CALL CASE CHAIN CLASS CLEAR CLEARCOMMON CLEARDATA CLEARFILE CLEARINPUT CLEARSELECT CLOSE CLOSE.SOCKET CLOSESEQ COMMIT COMMON CONTINUE CONVERT CREATE CREATE.FILE CRT DATA DEBUG DEFFUN DEL DELETE DELETELIST DELETESEQ DELETEU DIM DIMENSION DISINHERIT DISPLAY DPARSE DPARSE.CSV ECHO ELSE END ENTER EQU EQUATE ERRMSG EXECUTE EXIT FILE FILELOCK FILEUNLOCK FIND FINDSTR FLUSH FLUSH.DH.CACHE FOOTING FOR FORMLIST FORMLISTV FUNCTION GET GETLIST GO GOSUB GOTO HEADING HUSH IF IN INHERIT INPUT INPUT INPUTCLEAR INPUTCSV INPUTERR INPUTFIELD INS KEYEDIT KEYEXIT KEYTRAP LOCAL LOCATE LOCK LOGMSG LOOP MARK.MAPPING MAT MATBUILD MATPARSE MATREAD MATREADCSV MATREADL MATREADU MATWRITE MATWRITEU NAP NOBUF NULL OFF ON OPEN OPENPATH OPENSEQ OS.EXECUTE OSDELETE OSREAD OSWRITE PAGE PAUSE PERFORM PRECISION PRINT PRINTCSV PRINTER PRINTERR PRIVATE PROCREAD PROCWRITE PROGRAM PROMPT PUBLIC PUT RANDOMIZE READ READBLK READCSV READL READLIST READNEXT READSEQ READU READV READVL READVU RECORDLOCKL RECORDLOCKU RELEASE REMARK REMOVE REMOVE.BREAK.HANDLER REPEAT RESTORE.SCREEN RETURN ROLLBACK RQM SAVELIST SEEK SELECT SELECTE SELECTINDEX SELECTLEFT SELECTN SELECTRIGHT SELECTV SET.ARG SET.BREAK.HANDLER SET.EXIT.STATUS SET.TIMEZONE SETLEFT SETPU SETREM SETRIGHT SLEEP SSELECT START STATUS STOP STOPE STOPM SUBROUTINE TCLREAD THEN TIMEOUT TO TRANSACTION TTYSET UNLOCK UNTIL VOID WAKE WEOFSEQ WHILE WRITE WRITEBLK WRITECSV WRITESEQ WRITESEQF WRITEU WRITEV WRITEVU&amp;lt;/Keywords&amp;gt;&lt;br /&gt;
            &amp;lt;Keywords name=&amp;quot;Words3&amp;quot;&amp;gt;ABS ABSS ACCEPT.SOCKET.CONNECTION ACOS ALPHA ANDS ARG ARG.COUNT ARG.PRESENT ASCII ASIN ASSIGNED ATAN BINDKEY BITAND BITNOT BITOR BITRESET BITSET BITTEST BITXOR CATALOGUED CATS CHANGE CHAR CHECKSUM CHILD COL1 COL2 COMPARE COMPARES CONFIG CONNECT.PORT CONVERT COS COUNT COUNTS CREATE.SERVER.SOCKET CROP CSVDQ DATE DCOUNT DECRYPT DELETE DFPART DIR DIV DOWNCASE DQUOTE DQUOTES DTX EBCDIC ENCRYPT ENV EPOCH EQS EXP EXTRACT FCONTROL FIELD FIELDS FIELDSTORE FILE.EVENT FILEINFO FMT FMTS FOLD FOLDS GES GETARG.) GET.MESSAGES GET.PORT.PARAMS GETNLS GETPU GETREM GTS ICONV ICONVS IDIV IFS INDEX INDEXS INDICES INMAT INSERT INT ITYPE KEYCODE KEYIN KEYINC KEYINR KEYREADY LEN LENS LES LISTINDEX LN LOCATE LOWER LTS MATCHES MATCHESS MATCHFIELD MAX MAXIMUM MD5 MIN MINIMUM MOD MODS MVDATE MVDATE.TIME MVEPOCH MVTIME NEG NEGS NES NOT NOTS NUM NUMS OBJECT OBJINFO OCONV OCONVS OPEN.SOCKET ORS OS.ERROR OUTERJOIN PRINTER.SETTING PWR QUOTE QUOTES RAISE RDIV READ.SOCKET RECORDLOCKED REM REMOVE REMOVEF REPLACE REUSE RND ROUNDDOWN ROUNDUP RTRANS SAVE.SCREEN SELECTINFO SENTENCE SEQ SERVER.ADDR SET.PORT.PARAMS SET.SOCKET.MODE SETNLS SHIFT SIN SOCKET.INFO SOUNDEX SOUNDEXS SPACE SPACES SPLICE SQRT SQUOTE SQUOTES STATUS STR STRS SUBR SUBSTITUTE SUBSTRINGS SUM SUMMATION SWAP SWAPCASE SYSTEM TAN TERMINFO TESTLOCK TIME TIMEDATE TRANS TRIM TRIMB TRIMBS TRIMF TRIMFS TRIMS TTYGET UNASSIGNED UPCASE VOCPATH VSLICE WAIT.FILE.EVENT WRITE.SOCKET XLATE XTD&amp;lt;/Keywords&amp;gt;&lt;br /&gt;
            &amp;lt;Keywords name=&amp;quot;Words4&amp;quot;&amp;gt;@ABORT.CODE @ABORT.MESSAGE @ACCOUNT @AM @ANS @COMMAND @COMMAND.STACK @CONV @CRTHIGH @CRTWIDE @DATA @DATA.PENDING @DATE @DAY @DICTRECS @DS @FALSE @FILE.NAME @FILENAME @FM @FMT @GID @HOSTNAME @ID @IM @IP.ADDR @ITYPE.MODE @LEVEL @LOGNAME @LPTRHIGH @LPTRWIDE @MONTH @NB @NI @OPTION @PARASENTENCE @PATH @PIB @POB @QMSYS @RECORD @SELECTED @SENTENCE @SEQNO @SIB @SM @SOB @STDFIL @SVM @SYS.BELL @SYSTEM.RETURN.CODE @TERM.TYPE @TIME @TM @TRANSACTION.ID @TRANSACTION.LEVEL @TRIGGER.RETURN.CODE @TRUE @TTY @UID @USER @USER.NO @USER.RETURN.CODE @USER0 @USER1 @USER2 @USER3 @USER4 @USERNO @VM @VOC @WHO @YEAR @YEAR4&amp;lt;/Keywords&amp;gt;&lt;br /&gt;
        &amp;lt;/KeywordLists&amp;gt;&lt;br /&gt;
        &amp;lt;Styles&amp;gt;&lt;br /&gt;
            &amp;lt;WordsStyle name=&amp;quot;DEFAULT&amp;quot; styleID=&amp;quot;11&amp;quot; fgColor=&amp;quot;000000&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;WordsStyle name=&amp;quot;FOLDEROPEN&amp;quot; styleID=&amp;quot;12&amp;quot; fgColor=&amp;quot;000000&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;WordsStyle name=&amp;quot;FOLDERCLOSE&amp;quot; styleID=&amp;quot;13&amp;quot; fgColor=&amp;quot;000000&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;WordsStyle name=&amp;quot;KEYWORD1&amp;quot; styleID=&amp;quot;5&amp;quot; fgColor=&amp;quot;FF00FF&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;WordsStyle name=&amp;quot;KEYWORD2&amp;quot; styleID=&amp;quot;6&amp;quot; fgColor=&amp;quot;FF0000&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;WordsStyle name=&amp;quot;KEYWORD3&amp;quot; styleID=&amp;quot;7&amp;quot; fgColor=&amp;quot;0000FF&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;WordsStyle name=&amp;quot;KEYWORD4&amp;quot; styleID=&amp;quot;8&amp;quot; fgColor=&amp;quot;800000&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;WordsStyle name=&amp;quot;COMMENT&amp;quot; styleID=&amp;quot;1&amp;quot; fgColor=&amp;quot;000000&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;WordsStyle name=&amp;quot;COMMENT LINE&amp;quot; styleID=&amp;quot;2&amp;quot; fgColor=&amp;quot;00BF00&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;WordsStyle name=&amp;quot;NUMBER&amp;quot; styleID=&amp;quot;4&amp;quot; fgColor=&amp;quot;000000&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;WordsStyle name=&amp;quot;OPERATOR&amp;quot; styleID=&amp;quot;10&amp;quot; fgColor=&amp;quot;000000&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;WordsStyle name=&amp;quot;DELIMINER1&amp;quot; styleID=&amp;quot;14&amp;quot; fgColor=&amp;quot;804000&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;WordsStyle name=&amp;quot;DELIMINER2&amp;quot; styleID=&amp;quot;15&amp;quot; fgColor=&amp;quot;804000&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;WordsStyle name=&amp;quot;DELIMINER3&amp;quot; styleID=&amp;quot;16&amp;quot; fgColor=&amp;quot;000000&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;/Styles&amp;gt;&lt;br /&gt;
    &amp;lt;/UserLang&amp;gt;&lt;br /&gt;
&amp;lt;/NotepadPlus&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Universe ==&lt;br /&gt;
Following is a version for Universe basic.  Click &amp;lt;i&amp;gt;Language &amp;gt; basic&amp;lt;/i&amp;gt; to enable syntax highlighting.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;NotepadPlus&amp;gt;&lt;br /&gt;
    &amp;lt;UserLang name=&amp;quot;basic&amp;quot; ext=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;Settings&amp;gt;&lt;br /&gt;
            &amp;lt;Global caseIgnored=&amp;quot;yes&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;TreatAsSymbol comment=&amp;quot;no&amp;quot; commentLine=&amp;quot;yes&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Prefix words1=&amp;quot;no&amp;quot; words2=&amp;quot;no&amp;quot; words3=&amp;quot;no&amp;quot; words4=&amp;quot;no&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;/Settings&amp;gt;&lt;br /&gt;
        &amp;lt;KeywordLists&amp;gt;&lt;br /&gt;
            &amp;lt;Keywords name=&amp;quot;Delimiters&amp;quot;&amp;gt;&amp;amp;quot;&amp;amp;apos;0&amp;amp;quot;&amp;amp;apos;0&amp;lt;/Keywords&amp;gt;&lt;br /&gt;
            &amp;lt;Keywords name=&amp;quot;Folder+&amp;quot;&amp;gt;&amp;lt;/Keywords&amp;gt;&lt;br /&gt;
            &amp;lt;Keywords name=&amp;quot;Folder-&amp;quot;&amp;gt;&amp;lt;/Keywords&amp;gt;&lt;br /&gt;
            &amp;lt;Keywords name=&amp;quot;Operators&amp;quot;&amp;gt;&amp;amp;apos; - ! &amp;amp;quot; # ( ) , / : ; [ ] ^ + &amp;amp;lt; = &amp;amp;gt;&amp;lt;/Keywords&amp;gt;&lt;br /&gt;
            &amp;lt;Keywords name=&amp;quot;Comment&amp;quot;&amp;gt;1 1 2 2 0* 0!&amp;lt;/Keywords&amp;gt;&lt;br /&gt;
            &amp;lt;Keywords name=&amp;quot;Words1&amp;quot;&amp;gt;$CHAIN $COPYRIGHT $DEFINE $EJECT $IFDEF $IFNDEF $INCLUDE $INSERT $MAP $OPTIONS $PAGE $UNDEFINE ABORT ABORTM ACTIVATEKEY AND AUTHORIZATION AUXMAP BEFORE BEGIN CASE TRANSACTION BREAK BSCAN CLEAR CLEARDATA CLEARFILE CLEARPROMPTS CLEARSELECT CLOSE CLOSESEQ COMMIT COMMON CONTINUE CONVERT CREATE CRT DATA DEACTIVATEKEY DEBUG DEFFUN DEL DELETE DELETELIST DIMENSION DIM DISABLEDEC DISPLAY DO ECHO ENABLEDEC END EOF ELSE EQUATE EQU ERRMSG EXIT FILELOCK FILEUNLOCK FIND FINDSTR FLUSH FOOTING FOR FORMLIST FROM FUNCTION GET GETX GETLIST GOSUB GOTO GO GROUPSTORE HEADING HUSH IF INCLUDE INPUT INPUTCLEAR INPUTDISP INPUTDP INPUTERR INPUTIF INPUTNULL INPUTTRAP INS ISOLATION KEYEDIT KEYEXIT KEYTRAP LET LIT LOCATE LOCK LOCKED LOOP MAT MATBUILD MATCH MATCHES MATPARSE MATREAD MATREADL MATREADU MATWRITE MATWRITEU NAP NEXT NOBUF NULL ON OPEN OPENCHECK OPENDEV OPENSEQ OR PAGE PRECISION PRINT PRINTER PRINTERR PROCREAD PROCWRITE PROGRAM PROMPT RANDOMIZE READ READBLK READL READLIST READNEXT READSEQ READT READU READV READVL READVU RECORDLOCK RELEASE REMOVE REPEAT RETURN REVREMOVE REWIND ROLLBACK SEEK SELECT SELECTE SELECTINDEX SEND SETREM SETTING SLEEP SSELECT STOP STOPM STORAGE SUBROUTINE SWAP TABSTOP THEN TIMEOUT TO TPRINT TTYCTL TTYGET TTYSET UNLOCK UPRINT UNTIL WAITING WEOF WEOFSEQ WHILE WRITE WRITEBLK WRITELIST WRITESEQ WRITESEQF WRITET WRITEU WRITEV WRITEVU LT LE EQ GE GT NE&amp;lt;/Keywords&amp;gt;&lt;br /&gt;
            &amp;lt;Keywords name=&amp;quot;Words2&amp;quot;&amp;gt;$FALSE $TRUE CALL CAPTURING CHAIN ENTER EXECUTE PERFORM RETURNING&amp;lt;/Keywords&amp;gt;&lt;br /&gt;
            &amp;lt;Keywords name=&amp;quot;Words3&amp;quot;&amp;gt;ABS ABSS acceptConnection ACOS addAuthenticationRule addCertificate addRequestParameter ADDS ALPHA amInitialize amReceiveMsg amReceiveRequest amSendMsg amSendRequest amSendResponse amTerminate analyzeCertificate ANDS ASCII ASIN ASSIGNED ATAN BITAND BITNOT BITOR BITRESET BITSET BITTEST BITXOR BYTE BYTELEN BYTETYPE BYTEVAL CATS CENTURY.PIVOT CHANGE CHAR CHARS CHECKSUM closeSocket CloseXMLData COL1 COL2 COMPARE COS COSH COUNT COUNTS createCertification createCertRequest createRequest createSecureRequest createSecurityContext DATE DBTOXML DCOUNT DESCRINFO DIGEST DIV DIVS DOWNCASE DQUOTE DTX EBCDIC ENCODE ENCRYPT EQS EREPLACE EXCHANGE EXP EXTRACT FADD FDIV FFIX FFLT FIELD FIELDS FIELDSTORE FILEINFO FIX FMT FMTDP FMTS FMTSDP FMUL FOLD FOLDDP FSUB generateKey GES getCipherSuite getSocketErrorMessage getSocketErrorMessage getSocketOptions getHTTPDefault GETLOCALE GETREM getSocketInformation GROUP GTS ICHECK ICONV ICONVS IFS ILPROMPT INDEX INDEXS INDICES initSecureServerSocket initSecureSocket INMAT INSERT INT ISNULL ISNULLS ITYPE KEYIN LEFT LEN LENDP LENS LENSDP LN loadSecurityContext LOCALEINFO LOWER LTS MATCHFIELD MAXIMUM MINIMUM MOD MODS MULS NEG NEGS NES NOT NOTS NUM NUMS OCONV OCONVS openSecureSocket openSocket OpenXMLData ORS PrePareXML protocolLogging PWR QUOTE RAISE readSocket ReadXMLData REAL RECORDLOCKED ReleaseXML REM REPLACE REUSE RIGHT RND RPC.CALL RPC.CONNECT RPC.DISCONNECT saveSecurityContext SADD SCMP SDIV SELECTINFO SENTENCE SEQ SEQS setAuthenticationDepth setCipherSuite setClientAuthentication setPrivateKey setRandomSeed setHTTPDefault setRequestHeader SETLOCALE setSocketOptions showSecurityContext SIGNATURE SIN SINH SMUL SOAPCreateRequest SOAPGetDefault SOAPGetFault SOAPGetResponseHeader SOAPSetRequestBody SOAPSetRequestContent SOAPSetRequestHeader SOAPRequestWrite SOAPSetDefault SOAPSetParameters SOAPSubmitRequest SOUNDEX SPACE SPACES SPLICE SQRT SQUOTE SSUB STATUS STR STRS submitRequest SUBR SUBS SUBSTRS SUM SUMMATION SYSTEM TAN TANH TERMINFO TIME TIMEDATE TPARM TRANS TRIM TRIMB TRIMBS TRIMF TRIMFS TRIMS UNASSIGNED UNICHAR UNISEQ UNISEQS UPCASE XLATE XTD&amp;lt;/Keywords&amp;gt;&lt;br /&gt;
            &amp;lt;Keywords name=&amp;quot;Words4&amp;quot;&amp;gt;@ABORT.CODE @ACCOUNT @AM @ANS @AUTHORIZARTION @COMMAND @COMMAND.STACK @CONV @CRTHIGH @CRTWIDE @DATA.PENDING @DATE @DAY @DICT @FALSE @FILE.NAME @FILENAME @FM @FORMAT @HDBC @HEADER @HENV @HSTMT @ID @IM @ISOLATION @LEVEL @LOGNAME @LPTRHIGH @LPTRWIDE @MONTH @MV @NB @ND @NEW @NI @NS @NULL @NULL.STR @NV @OLD @OPTION @PARASETENCE @PATH @RECOUNT @RECORD @RECUR0 @RECUR1 @RECUR2 @RECUR3 @RECUR4 @SCHEMA @SELECTED @SM @SQL.CODE @SQL.DATE @SQL.ERROR @SQL.STATE @SQL.TIME @SQL.WARNING @SQLPROC.NAME @SQLPROC.TSLEVEL @STDFIL @SVM @SYS.BELL @SYSTEM.RETURN.CODE @SYSTEM.SET @TERM.TYPE @TIME @TM @TRANSACTION @TRANSACTION.LEVEL @TRUE @TTY @USER0 @USER1 @USER2 @USER3 @USER4 @USERNO @USER.NO @USER.RETURN.CODE @VM @WHO @YEAR @YEAR4&amp;lt;/Keywords&amp;gt;&lt;br /&gt;
        &amp;lt;/KeywordLists&amp;gt;&lt;br /&gt;
        &amp;lt;Styles&amp;gt;&lt;br /&gt;
            &amp;lt;WordsStyle name=&amp;quot;DEFAULT&amp;quot; styleID=&amp;quot;11&amp;quot; fgColor=&amp;quot;000000&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; fontSize=&amp;quot;10&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;WordsStyle name=&amp;quot;FOLDEROPEN&amp;quot; styleID=&amp;quot;12&amp;quot; fgColor=&amp;quot;0000FF&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;WordsStyle name=&amp;quot;FOLDERCLOSE&amp;quot; styleID=&amp;quot;13&amp;quot; fgColor=&amp;quot;0000FF&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;WordsStyle name=&amp;quot;KEYWORD1&amp;quot; styleID=&amp;quot;5&amp;quot; fgColor=&amp;quot;0000FF&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;WordsStyle name=&amp;quot;KEYWORD2&amp;quot; styleID=&amp;quot;6&amp;quot; fgColor=&amp;quot;FF0080&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;WordsStyle name=&amp;quot;KEYWORD3&amp;quot; styleID=&amp;quot;7&amp;quot; fgColor=&amp;quot;0000FF&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; fontSize=&amp;quot;10&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;WordsStyle name=&amp;quot;KEYWORD4&amp;quot; styleID=&amp;quot;8&amp;quot; fgColor=&amp;quot;FF0000&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;WordsStyle name=&amp;quot;COMMENT&amp;quot; styleID=&amp;quot;1&amp;quot; fgColor=&amp;quot;008040&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;WordsStyle name=&amp;quot;COMMENT LINE&amp;quot; styleID=&amp;quot;2&amp;quot; fgColor=&amp;quot;008000&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;WordsStyle name=&amp;quot;NUMBER&amp;quot; styleID=&amp;quot;4&amp;quot; fgColor=&amp;quot;FF0000&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;WordsStyle name=&amp;quot;OPERATOR&amp;quot; styleID=&amp;quot;10&amp;quot; fgColor=&amp;quot;000080&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;WordsStyle name=&amp;quot;DELIMINER1&amp;quot; styleID=&amp;quot;14&amp;quot; fgColor=&amp;quot;800080&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;WordsStyle name=&amp;quot;DELIMINER2&amp;quot; styleID=&amp;quot;15&amp;quot; fgColor=&amp;quot;800080&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;WordsStyle name=&amp;quot;DELIMINER3&amp;quot; styleID=&amp;quot;16&amp;quot; fgColor=&amp;quot;000000&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;/Styles&amp;gt;&lt;br /&gt;
    &amp;lt;/UserLang&amp;gt;&lt;br /&gt;
&amp;lt;/NotepadPlus&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rkgozar</name></author>
	</entry>
	<entry>
		<id>https://pickwiki.org/index.php?title=NotepadPlusPlus&amp;diff=2673</id>
		<title>NotepadPlusPlus</title>
		<link rel="alternate" type="text/html" href="https://pickwiki.org/index.php?title=NotepadPlusPlus&amp;diff=2673"/>
		<updated>2021-10-07T20:42:02Z</updated>

		<summary type="html">&lt;p&gt;Rkgozar: /* Universe */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;nowiki&amp;gt;Notepad++&amp;lt;/nowiki&amp;gt; can be configured to do syntax highlighting for BASIC programs.&lt;br /&gt;
&lt;br /&gt;
== Setup ==&lt;br /&gt;
&lt;br /&gt;
# Change directory to &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;%APPDATA%\Notepad++&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
# &amp;lt;nowiki&amp;gt;Copy/paste&amp;lt;/nowiki&amp;gt; the xml from the appropriate section below into your &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;userDefineLang.xml&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
# (Optional) You can add/change/remove keywords in the xml file, or use &amp;lt;nowiki&amp;gt;notepad++&#039;s&amp;lt;/nowiki&amp;gt; &amp;lt;i&amp;gt;User Define&amp;lt;/i&amp;gt; dialog to change them (and their respective colors)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Qmbasic ===&lt;br /&gt;
Following is a version for QM basic.  Click &amp;lt;i&amp;gt;Language &amp;gt; qmbasic&amp;lt;/i&amp;gt; to enable syntax highlighting.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;NotepadPlus&amp;gt;&lt;br /&gt;
    &amp;lt;[[UserLang]] name=&amp;quot;qmbasic&amp;quot; ext=&amp;quot;qmb&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;Settings&amp;gt;&lt;br /&gt;
            &amp;lt;Global caseIgnored=&amp;quot;yes&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;[[TreatAsSymbol]] comment=&amp;quot;no&amp;quot; commentLine=&amp;quot;no&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Prefix words1=&amp;quot;no&amp;quot; words2=&amp;quot;no&amp;quot; words3=&amp;quot;no&amp;quot; words4=&amp;quot;no&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;/Settings&amp;gt;&lt;br /&gt;
        &amp;lt;KeywordLists&amp;gt;&lt;br /&gt;
            &amp;lt;Keywords name=&amp;quot;Delimiters&amp;quot;&amp;gt;&amp;amp;quot;&amp;amp;apos;0&amp;amp;quot;&amp;amp;apos;0&amp;lt;/Keywords&amp;gt;&lt;br /&gt;
            &amp;lt;Keywords name=&amp;quot;Folder+&amp;quot;&amp;gt;&amp;lt;/Keywords&amp;gt;&lt;br /&gt;
            &amp;lt;Keywords name=&amp;quot;Folder-&amp;quot;&amp;gt;&amp;lt;/Keywords&amp;gt;&lt;br /&gt;
            &amp;lt;Keywords name=&amp;quot;Operators&amp;quot;&amp;gt;&amp;amp;apos; - ! &amp;amp;quot; # % &amp;amp;amp; ( ) , . / : ; ? @ [ \ ] ^ ` { | } ~ + &amp;amp;lt; = &amp;amp;gt;&amp;lt;/Keywords&amp;gt;&lt;br /&gt;
            &amp;lt;Keywords name=&amp;quot;Comment&amp;quot;&amp;gt;1 1 2 2 0! 0* 0REM 0!* 0*!&amp;lt;/Keywords&amp;gt;&lt;br /&gt;
            &amp;lt;Keywords name=&amp;quot;Words1&amp;quot;&amp;gt;$CATALOG $CATALOGUE $DEBUG $DEFINE $EXECUTE $IFDEF $IFNDEF $ELSE $ENDIF $INCLUDE $INSERT $LIST $MODE $NO.CATALOGUE $NO.XREF $NOCASE.STRINGS $PAGE $QMCALL $STOP #CATALOG #CATALOGUE #DEBUG #DEFINE #EXECUTE #IFDEF #IFNDEF #ELSE #ENDIF #INCLUDE #INSERT #LIST #MODE #NO.CATALOGUE #NO.XREF #NOCASE.STRINGS #PAGE #QMCALL #STOP&amp;lt;/Keywords&amp;gt;&lt;br /&gt;
            &amp;lt;Keywords name=&amp;quot;Words2&amp;quot;&amp;gt;ABORT ABORTE ABORTM BEGIN BREAK CALL CASE CHAIN CLASS CLEAR CLEARCOMMON CLEARDATA CLEARFILE CLEARINPUT CLEARSELECT CLOSE CLOSE.SOCKET CLOSESEQ COMMIT COMMON CONTINUE CONVERT CREATE CREATE.FILE CRT DATA DEBUG DEFFUN DEL DELETE DELETELIST DELETESEQ DELETEU DIM DIMENSION DISINHERIT DISPLAY DPARSE DPARSE.CSV ECHO ELSE END ENTER EQU EQUATE ERRMSG EXECUTE EXIT FILE FILELOCK FILEUNLOCK FIND FINDSTR FLUSH FLUSH.DH.CACHE FOOTING FOR FORMLIST FORMLISTV FUNCTION GET GETLIST GO GOSUB GOTO HEADING HUSH IF IN INHERIT INPUT INPUT INPUTCLEAR INPUTCSV INPUTERR INPUTFIELD INS KEYEDIT KEYEXIT KEYTRAP LOCAL LOCATE LOCK LOGMSG LOOP MARK.MAPPING MAT MATBUILD MATPARSE MATREAD MATREADCSV MATREADL MATREADU MATWRITE MATWRITEU NAP NOBUF NULL OFF ON OPEN OPENPATH OPENSEQ OS.EXECUTE OSDELETE OSREAD OSWRITE PAGE PAUSE PERFORM PRECISION PRINT PRINTCSV PRINTER PRINTERR PRIVATE PROCREAD PROCWRITE PROGRAM PROMPT PUBLIC PUT RANDOMIZE READ READBLK READCSV READL READLIST READNEXT READSEQ READU READV READVL READVU RECORDLOCKL RECORDLOCKU RELEASE REMARK REMOVE REMOVE.BREAK.HANDLER REPEAT RESTORE.SCREEN RETURN ROLLBACK RQM SAVELIST SEEK SELECT SELECTE SELECTINDEX SELECTLEFT SELECTN SELECTRIGHT SELECTV SET.ARG SET.BREAK.HANDLER SET.EXIT.STATUS SET.TIMEZONE SETLEFT SETPU SETREM SETRIGHT SLEEP SSELECT START STATUS STOP STOPE STOPM SUBROUTINE TCLREAD THEN TIMEOUT TO TRANSACTION TTYSET UNLOCK UNTIL VOID WAKE WEOFSEQ WHILE WRITE WRITEBLK WRITECSV WRITESEQ WRITESEQF WRITEU WRITEV WRITEVU&amp;lt;/Keywords&amp;gt;&lt;br /&gt;
            &amp;lt;Keywords name=&amp;quot;Words3&amp;quot;&amp;gt;ABS ABSS ACCEPT.SOCKET.CONNECTION ACOS ALPHA ANDS ARG ARG.COUNT ARG.PRESENT ASCII ASIN ASSIGNED ATAN BINDKEY BITAND BITNOT BITOR BITRESET BITSET BITTEST BITXOR CATALOGUED CATS CHANGE CHAR CHECKSUM CHILD COL1 COL2 COMPARE COMPARES CONFIG CONNECT.PORT CONVERT COS COUNT COUNTS CREATE.SERVER.SOCKET CROP CSVDQ DATE DCOUNT DECRYPT DELETE DFPART DIR DIV DOWNCASE DQUOTE DQUOTES DTX EBCDIC ENCRYPT ENV EPOCH EQS EXP EXTRACT FCONTROL FIELD FIELDS FIELDSTORE FILE.EVENT FILEINFO FMT FMTS FOLD FOLDS GES GETARG.) GET.MESSAGES GET.PORT.PARAMS GETNLS GETPU GETREM GTS ICONV ICONVS IDIV IFS INDEX INDEXS INDICES INMAT INSERT INT ITYPE KEYCODE KEYIN KEYINC KEYINR KEYREADY LEN LENS LES LISTINDEX LN LOCATE LOWER LTS MATCHES MATCHESS MATCHFIELD MAX MAXIMUM MD5 MIN MINIMUM MOD MODS MVDATE MVDATE.TIME MVEPOCH MVTIME NEG NEGS NES NOT NOTS NUM NUMS OBJECT OBJINFO OCONV OCONVS OPEN.SOCKET ORS OS.ERROR OUTERJOIN PRINTER.SETTING PWR QUOTE QUOTES RAISE RDIV READ.SOCKET RECORDLOCKED REM REMOVE REMOVEF REPLACE REUSE RND ROUNDDOWN ROUNDUP RTRANS SAVE.SCREEN SELECTINFO SENTENCE SEQ SERVER.ADDR SET.PORT.PARAMS SET.SOCKET.MODE SETNLS SHIFT SIN SOCKET.INFO SOUNDEX SOUNDEXS SPACE SPACES SPLICE SQRT SQUOTE SQUOTES STATUS STR STRS SUBR SUBSTITUTE SUBSTRINGS SUM SUMMATION SWAP SWAPCASE SYSTEM TAN TERMINFO TESTLOCK TIME TIMEDATE TRANS TRIM TRIMB TRIMBS TRIMF TRIMFS TRIMS TTYGET UNASSIGNED UPCASE VOCPATH VSLICE WAIT.FILE.EVENT WRITE.SOCKET XLATE XTD&amp;lt;/Keywords&amp;gt;&lt;br /&gt;
            &amp;lt;Keywords name=&amp;quot;Words4&amp;quot;&amp;gt;@ABORT.CODE @ABORT.MESSAGE @ACCOUNT @AM @ANS @COMMAND @COMMAND.STACK @CONV @CRTHIGH @CRTWIDE @DATA @DATA.PENDING @DATE @DAY @DICTRECS @DS @FALSE @FILE.NAME @FILENAME @FM @FMT @GID @HOSTNAME @ID @IM @IP.ADDR @ITYPE.MODE @LEVEL @LOGNAME @LPTRHIGH @LPTRWIDE @MONTH @NB @NI @OPTION @PARASENTENCE @PATH @PIB @POB @QMSYS @RECORD @SELECTED @SENTENCE @SEQNO @SIB @SM @SOB @STDFIL @SVM @SYS.BELL @SYSTEM.RETURN.CODE @TERM.TYPE @TIME @TM @TRANSACTION.ID @TRANSACTION.LEVEL @TRIGGER.RETURN.CODE @TRUE @TTY @UID @USER @USER.NO @USER.RETURN.CODE @USER0 @USER1 @USER2 @USER3 @USER4 @USERNO @VM @VOC @WHO @YEAR @YEAR4&amp;lt;/Keywords&amp;gt;&lt;br /&gt;
        &amp;lt;/KeywordLists&amp;gt;&lt;br /&gt;
        &amp;lt;Styles&amp;gt;&lt;br /&gt;
            &amp;lt;[[WordsStyle]] name=&amp;quot;DEFAULT&amp;quot; styleID=&amp;quot;11&amp;quot; fgColor=&amp;quot;000000&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;[[WordsStyle]] name=&amp;quot;FOLDEROPEN&amp;quot; styleID=&amp;quot;12&amp;quot; fgColor=&amp;quot;000000&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;[[WordsStyle]] name=&amp;quot;FOLDERCLOSE&amp;quot; styleID=&amp;quot;13&amp;quot; fgColor=&amp;quot;000000&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;[[WordsStyle]] name=&amp;quot;KEYWORD1&amp;quot; styleID=&amp;quot;5&amp;quot; fgColor=&amp;quot;[[FF00FF]]&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;[[WordsStyle]] name=&amp;quot;KEYWORD2&amp;quot; styleID=&amp;quot;6&amp;quot; fgColor=&amp;quot;FF0000&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;[[WordsStyle]] name=&amp;quot;KEYWORD3&amp;quot; styleID=&amp;quot;7&amp;quot; fgColor=&amp;quot;0000FF&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;[[WordsStyle]] name=&amp;quot;KEYWORD4&amp;quot; styleID=&amp;quot;8&amp;quot; fgColor=&amp;quot;800000&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;[[WordsStyle]] name=&amp;quot;COMMENT&amp;quot; styleID=&amp;quot;1&amp;quot; fgColor=&amp;quot;000000&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;[[WordsStyle]] name=&amp;quot;COMMENT LINE&amp;quot; styleID=&amp;quot;2&amp;quot; fgColor=&amp;quot;00BF00&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;[[WordsStyle]] name=&amp;quot;NUMBER&amp;quot; styleID=&amp;quot;4&amp;quot; fgColor=&amp;quot;000000&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;[[WordsStyle]] name=&amp;quot;OPERATOR&amp;quot; styleID=&amp;quot;10&amp;quot; fgColor=&amp;quot;000000&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;[[WordsStyle]] name=&amp;quot;DELIMINER1&amp;quot; styleID=&amp;quot;14&amp;quot; fgColor=&amp;quot;804000&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;[[WordsStyle]] name=&amp;quot;DELIMINER2&amp;quot; styleID=&amp;quot;15&amp;quot; fgColor=&amp;quot;804000&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;[[WordsStyle]] name=&amp;quot;DELIMINER3&amp;quot; styleID=&amp;quot;16&amp;quot; fgColor=&amp;quot;000000&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;/Styles&amp;gt;&lt;br /&gt;
    &amp;lt;/UserLang&amp;gt;&lt;br /&gt;
&amp;lt;/NotepadPlus&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Universe ==&lt;br /&gt;
Following is a version for Universe basic.  Click &amp;lt;i&amp;gt;Language &amp;gt; basic&amp;lt;/i&amp;gt; to enable syntax highlighting.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;NotepadPlus&amp;gt;&lt;br /&gt;
    &amp;lt;UserLang name=&amp;quot;basic&amp;quot; ext=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;Settings&amp;gt;&lt;br /&gt;
            &amp;lt;Global caseIgnored=&amp;quot;yes&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;TreatAsSymbol comment=&amp;quot;no&amp;quot; commentLine=&amp;quot;yes&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Prefix words1=&amp;quot;no&amp;quot; words2=&amp;quot;no&amp;quot; words3=&amp;quot;no&amp;quot; words4=&amp;quot;no&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;/Settings&amp;gt;&lt;br /&gt;
        &amp;lt;KeywordLists&amp;gt;&lt;br /&gt;
            &amp;lt;Keywords name=&amp;quot;Delimiters&amp;quot;&amp;gt;&amp;amp;quot;&amp;amp;apos;0&amp;amp;quot;&amp;amp;apos;0&amp;lt;/Keywords&amp;gt;&lt;br /&gt;
            &amp;lt;Keywords name=&amp;quot;Folder+&amp;quot;&amp;gt;&amp;lt;/Keywords&amp;gt;&lt;br /&gt;
            &amp;lt;Keywords name=&amp;quot;Folder-&amp;quot;&amp;gt;&amp;lt;/Keywords&amp;gt;&lt;br /&gt;
            &amp;lt;Keywords name=&amp;quot;Operators&amp;quot;&amp;gt;&amp;amp;apos; - ! &amp;amp;quot; # ( ) , / : ; [ ] ^ + &amp;amp;lt; = &amp;amp;gt;&amp;lt;/Keywords&amp;gt;&lt;br /&gt;
            &amp;lt;Keywords name=&amp;quot;Comment&amp;quot;&amp;gt;1 1 2 2 0* 0!&amp;lt;/Keywords&amp;gt;&lt;br /&gt;
            &amp;lt;Keywords name=&amp;quot;Words1&amp;quot;&amp;gt;$CHAIN $COPYRIGHT $DEFINE $EJECT $IFDEF $IFNDEF $INCLUDE $INSERT $MAP $OPTIONS $PAGE $UNDEFINE ABORT ABORTM ACTIVATEKEY AND AUTHORIZATION AUXMAP BEFORE BEGIN CASE TRANSACTION BREAK BSCAN CLEAR CLEARDATA CLEARFILE CLEARPROMPTS CLEARSELECT CLOSE CLOSESEQ COMMIT COMMON CONTINUE CONVERT CREATE CRT DATA DEACTIVATEKEY DEBUG DEFFUN DEL DELETE DELETELIST DIMENSION DIM DISABLEDEC DISPLAY DO ECHO ENABLEDEC END EOF ELSE EQUATE EQU ERRMSG EXIT FILELOCK FILEUNLOCK FIND FINDSTR FLUSH FOOTING FOR FORMLIST FROM FUNCTION GET GETX GETLIST GOSUB GOTO GO GROUPSTORE HEADING HUSH IF INCLUDE INPUT INPUTCLEAR INPUTDISP INPUTDP INPUTERR INPUTIF INPUTNULL INPUTTRAP INS ISOLATION KEYEDIT KEYEXIT KEYTRAP LET LIT LOCATE LOCK LOCKED LOOP MAT MATBUILD MATCH MATCHES MATPARSE MATREAD MATREADL MATREADU MATWRITE MATWRITEU NAP NEXT NOBUF NULL ON OPEN OPENCHECK OPENDEV OPENSEQ OR PAGE PRECISION PRINT PRINTER PRINTERR PROCREAD PROCWRITE PROGRAM PROMPT RANDOMIZE READ READBLK READL READLIST READNEXT READSEQ READT READU READV READVL READVU RECORDLOCK RELEASE REMOVE REPEAT RETURN REVREMOVE REWIND ROLLBACK SEEK SELECT SELECTE SELECTINDEX SEND SETREM SETTING SLEEP SSELECT STOP STOPM STORAGE SUBROUTINE SWAP TABSTOP THEN TIMEOUT TO TPRINT TTYCTL TTYGET TTYSET UNLOCK UPRINT UNTIL WAITING WEOF WEOFSEQ WHILE WRITE WRITEBLK WRITELIST WRITESEQ WRITESEQF WRITET WRITEU WRITEV WRITEVU LT LE EQ GE GT NE&amp;lt;/Keywords&amp;gt;&lt;br /&gt;
            &amp;lt;Keywords name=&amp;quot;Words2&amp;quot;&amp;gt;$FALSE $TRUE CALL CAPTURING CHAIN ENTER EXECUTE PERFORM RETURNING&amp;lt;/Keywords&amp;gt;&lt;br /&gt;
            &amp;lt;Keywords name=&amp;quot;Words3&amp;quot;&amp;gt;ABS ABSS acceptConnection ACOS addAuthenticationRule addCertificate addRequestParameter ADDS ALPHA amInitialize amReceiveMsg amReceiveRequest amSendMsg amSendRequest amSendResponse amTerminate analyzeCertificate ANDS ASCII ASIN ASSIGNED ATAN BITAND BITNOT BITOR BITRESET BITSET BITTEST BITXOR BYTE BYTELEN BYTETYPE BYTEVAL CATS CENTURY.PIVOT CHANGE CHAR CHARS CHECKSUM closeSocket CloseXMLData COL1 COL2 COMPARE COS COSH COUNT COUNTS createCertification createCertRequest createRequest createSecureRequest createSecurityContext DATE DBTOXML DCOUNT DESCRINFO DIGEST DIV DIVS DOWNCASE DQUOTE DTX EBCDIC ENCODE ENCRYPT EQS EREPLACE EXCHANGE EXP EXTRACT FADD FDIV FFIX FFLT FIELD FIELDS FIELDSTORE FILEINFO FIX FMT FMTDP FMTS FMTSDP FMUL FOLD FOLDDP FSUB generateKey GES getCipherSuite getSocketErrorMessage getSocketErrorMessage getSocketOptions getHTTPDefault GETLOCALE GETREM getSocketInformation GROUP GTS ICHECK ICONV ICONVS IFS ILPROMPT INDEX INDEXS INDICES initSecureServerSocket initSecureSocket INMAT INSERT INT ISNULL ISNULLS ITYPE KEYIN LEFT LEN LENDP LENS LENSDP LN loadSecurityContext LOCALEINFO LOWER LTS MATCHFIELD MAXIMUM MINIMUM MOD MODS MULS NEG NEGS NES NOT NOTS NUM NUMS OCONV OCONVS openSecureSocket openSocket OpenXMLData ORS PrePareXML protocolLogging PWR QUOTE RAISE readSocket ReadXMLData REAL RECORDLOCKED ReleaseXML REM REPLACE REUSE RIGHT RND RPC.CALL RPC.CONNECT RPC.DISCONNECT saveSecurityContext SADD SCMP SDIV SELECTINFO SENTENCE SEQ SEQS setAuthenticationDepth setCipherSuite setClientAuthentication setPrivateKey setRandomSeed setHTTPDefault setRequestHeader SETLOCALE setSocketOptions showSecurityContext SIGNATURE SIN SINH SMUL SOAPCreateRequest SOAPGetDefault SOAPGetFault SOAPGetResponseHeader SOAPSetRequestBody SOAPSetRequestContent SOAPSetRequestHeader SOAPRequestWrite SOAPSetDefault SOAPSetParameters SOAPSubmitRequest SOUNDEX SPACE SPACES SPLICE SQRT SQUOTE SSUB STATUS STR STRS submitRequest SUBR SUBS SUBSTRS SUM SUMMATION SYSTEM TAN TANH TERMINFO TIME TIMEDATE TPARM TRANS TRIM TRIMB TRIMBS TRIMF TRIMFS TRIMS UNASSIGNED UNICHAR UNISEQ UNISEQS UPCASE XLATE XTD&amp;lt;/Keywords&amp;gt;&lt;br /&gt;
            &amp;lt;Keywords name=&amp;quot;Words4&amp;quot;&amp;gt;@ABORT.CODE @ACCOUNT @AM @ANS @AUTHORIZARTION @COMMAND @COMMAND.STACK @CONV @CRTHIGH @CRTWIDE @DATA.PENDING @DATE @DAY @DICT @FALSE @FILE.NAME @FILENAME @FM @FORMAT @HDBC @HEADER @HENV @HSTMT @ID @IM @ISOLATION @LEVEL @LOGNAME @LPTRHIGH @LPTRWIDE @MONTH @MV @NB @ND @NEW @NI @NS @NULL @NULL.STR @NV @OLD @OPTION @PARASETENCE @PATH @RECOUNT @RECORD @RECUR0 @RECUR1 @RECUR2 @RECUR3 @RECUR4 @SCHEMA @SELECTED @SM @SQL.CODE @SQL.DATE @SQL.ERROR @SQL.STATE @SQL.TIME @SQL.WARNING @SQLPROC.NAME @SQLPROC.TSLEVEL @STDFIL @SVM @SYS.BELL @SYSTEM.RETURN.CODE @SYSTEM.SET @TERM.TYPE @TIME @TM @TRANSACTION @TRANSACTION.LEVEL @TRUE @TTY @USER0 @USER1 @USER2 @USER3 @USER4 @USERNO @USER.NO @USER.RETURN.CODE @VM @WHO @YEAR @YEAR4&amp;lt;/Keywords&amp;gt;&lt;br /&gt;
        &amp;lt;/KeywordLists&amp;gt;&lt;br /&gt;
        &amp;lt;Styles&amp;gt;&lt;br /&gt;
            &amp;lt;WordsStyle name=&amp;quot;DEFAULT&amp;quot; styleID=&amp;quot;11&amp;quot; fgColor=&amp;quot;000000&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; fontSize=&amp;quot;10&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;WordsStyle name=&amp;quot;FOLDEROPEN&amp;quot; styleID=&amp;quot;12&amp;quot; fgColor=&amp;quot;0000FF&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;WordsStyle name=&amp;quot;FOLDERCLOSE&amp;quot; styleID=&amp;quot;13&amp;quot; fgColor=&amp;quot;0000FF&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;WordsStyle name=&amp;quot;KEYWORD1&amp;quot; styleID=&amp;quot;5&amp;quot; fgColor=&amp;quot;0000FF&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;WordsStyle name=&amp;quot;KEYWORD2&amp;quot; styleID=&amp;quot;6&amp;quot; fgColor=&amp;quot;FF0080&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;WordsStyle name=&amp;quot;KEYWORD3&amp;quot; styleID=&amp;quot;7&amp;quot; fgColor=&amp;quot;0000FF&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; fontSize=&amp;quot;10&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;WordsStyle name=&amp;quot;KEYWORD4&amp;quot; styleID=&amp;quot;8&amp;quot; fgColor=&amp;quot;FF0000&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;WordsStyle name=&amp;quot;COMMENT&amp;quot; styleID=&amp;quot;1&amp;quot; fgColor=&amp;quot;008040&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;WordsStyle name=&amp;quot;COMMENT LINE&amp;quot; styleID=&amp;quot;2&amp;quot; fgColor=&amp;quot;008000&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;WordsStyle name=&amp;quot;NUMBER&amp;quot; styleID=&amp;quot;4&amp;quot; fgColor=&amp;quot;FF0000&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;WordsStyle name=&amp;quot;OPERATOR&amp;quot; styleID=&amp;quot;10&amp;quot; fgColor=&amp;quot;000080&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;WordsStyle name=&amp;quot;DELIMINER1&amp;quot; styleID=&amp;quot;14&amp;quot; fgColor=&amp;quot;800080&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;WordsStyle name=&amp;quot;DELIMINER2&amp;quot; styleID=&amp;quot;15&amp;quot; fgColor=&amp;quot;800080&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;WordsStyle name=&amp;quot;DELIMINER3&amp;quot; styleID=&amp;quot;16&amp;quot; fgColor=&amp;quot;000000&amp;quot; bgColor=&amp;quot;FFFFFF&amp;quot; fontName=&amp;quot;&amp;quot; fontStyle=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;/Styles&amp;gt;&lt;br /&gt;
    &amp;lt;/UserLang&amp;gt;&lt;br /&gt;
&amp;lt;/NotepadPlus&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rkgozar</name></author>
	</entry>
	<entry>
		<id>https://pickwiki.org/index.php?title=How-To_Improve_Large_String_Performance_Using_Buffers&amp;diff=2670</id>
		<title>How-To Improve Large String Performance Using Buffers</title>
		<link rel="alternate" type="text/html" href="https://pickwiki.org/index.php?title=How-To_Improve_Large_String_Performance_Using_Buffers&amp;diff=2670"/>
		<updated>2020-09-26T14:32:30Z</updated>

		<summary type="html">&lt;p&gt;Rkgozar: /* Discussion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Users]] &amp;gt;&amp;gt; [[Rex_Gozar]] &amp;gt;&amp;gt; How-To Improve Large String Performance Using Buffers&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= How-To Improve Large String Performance Using Buffers =&lt;br /&gt;
2007-11-16 by Rex Gozar&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Brief ==&lt;br /&gt;
Processes that create or manipulate large amounts of data (over 1MB) may be slow, impacting user response time and system performance.  This performance degradation can be traced to Universe needing to reallocate and copy memory repeatedly as the amount of data grows.  If you can allocate all the memory that you&#039;ll need up front, you can eliminate this bottleneck.  This document discusses a coding strategy for doing this.&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
In processing a 12MB text file, execution time went from 83 seconds to 4 seconds by simply replacing VAR&amp;lt;-1&amp;gt; &amp;quot;append field&amp;quot; syntax with VAR[PTR,LENGTH] &amp;quot;substring assignment&amp;quot; syntax.  Your mileage may vary.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
*** Using VAR&amp;lt;-1&amp;gt; &amp;quot;append field&amp;quot; syntax ***&lt;br /&gt;
ITEM = &amp;quot;&amp;quot;&lt;br /&gt;
LOOP&lt;br /&gt;
   VALUE = some large amount of data&lt;br /&gt;
   ITEM&amp;lt;-1&amp;gt; = VALUE&lt;br /&gt;
WHILE (SOME.CONDITION) REPEAT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
*** Preallocating memory and using VAR[PTR,LENGTH] &amp;quot;substring assignment&amp;quot; syntax ***&lt;br /&gt;
MAXBYTES = some calculated value&lt;br /&gt;
BUFFER = SPACE(MAXBYTES)            ;* allocates memory in one shot&lt;br /&gt;
BUFPTR = 0                          ;* always points to last byte in buffer&lt;br /&gt;
LOOP&lt;br /&gt;
   VALUE = some large amount of data&lt;br /&gt;
   BUFFER[(1 + BUFPTR), (1 + LEN(VALUE))] = @FM:VALUE&lt;br /&gt;
   BUFPTR += (1 + LEN(VALUE))&lt;br /&gt;
WHILE (SOME.CONDITION) REPEAT&lt;br /&gt;
BUFFER = BUFFER[2, (BUFPTR - 1)]    ;* strip first @FM&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Discussion ==&lt;br /&gt;
In my business application, I work with vendor-supplied text files that contain fixed-width fields.  These files can be several megabytes in size.  I created a subroutine to convert the fixed-widths fields for each row to tab separated values.&lt;br /&gt;
&lt;br /&gt;
Initially, I used &amp;quot;append field&amp;quot; syntax (i.e. VAR&amp;lt;-1&amp;gt; = VALUE) to build the resulting TSV file.  Running it took over 83 seconds -- ouch!  I put in display statements to see what was going on, and I noticed that as more rows were processed, the slower and slower it got.&lt;br /&gt;
&lt;br /&gt;
Now for the theoretical stuff: When we create a variable within a program, Universe has to allocate memory to hold the contents of the variable. When we append data to the variable, Universe has to see if the new data will exceed the amount of memory that it allocated.  When it does, it has to ask the system for a new chunk of memory, then copy the contents of the old chunk to the new plus the new data.  Large character strings tend to trigger this memory reallocation and copy over and over, slowing down the entire process.  To keep this from happening, we need to allocate all the memory we need when we first initialize the variable.&lt;br /&gt;
&lt;br /&gt;
The revised program is shown below.  I create a NEWBUF that is twice the size of the original ITEM.  In my case, I figured that would be big enough to prevent memory reallocation.  Elapsed run time went from 83 seconds to 4, over 20 times faster.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0001:       SUBROUTINE FIXED.TO.TSV(ITEM, TABMAP)&lt;br /&gt;
0002: * Take a flat file of fixed-width values and insert&lt;br /&gt;
0003: * tabs so we don&#039;t have to code field widths in all&lt;br /&gt;
0004: * the other programs.&lt;br /&gt;
0005: ******&lt;br /&gt;
0006: ***&lt;br /&gt;
0007: * Set up a &amp;quot;macro&amp;quot; to get the system seconds&lt;br /&gt;
0008: * and milliseconds for performance timing.&lt;br /&gt;
0009: ***&lt;br /&gt;
0010:       EQU GET$TICKS LIT &#039;(SYSTEM(99):((SYSTEM(12) * 1000) &amp;quot;R%3&amp;quot;))&#039;&lt;br /&gt;
0011: ***&lt;br /&gt;
0012: * Our TABMAP contains the field lengths (widths)&lt;br /&gt;
0013: * for each tab delimited field.  Set the maximum&lt;br /&gt;
0014: * attribute mark count (MAXAMC).&lt;br /&gt;
0015: ***&lt;br /&gt;
0016:       MAXAMC = DCOUNT(TABMAP, @FM)&lt;br /&gt;
0017: ***&lt;br /&gt;
0018: * Get the starting ticks, since we also want to&lt;br /&gt;
0019: * include memory allocation in our timings.&lt;br /&gt;
0020: ***&lt;br /&gt;
0021:       START.TICKS = GET$TICKS&lt;br /&gt;
0022: ***&lt;br /&gt;
0023: * Initialize a variable in memory that&#039;s large enough&lt;br /&gt;
0024: * hold the existing data and the new tabs we&#039;ll be adding.&lt;br /&gt;
0025: ***&lt;br /&gt;
0026:       NEWBUF = ITEM:ITEM&lt;br /&gt;
0027:       NEWPTR = 0&lt;br /&gt;
0028: ***&lt;br /&gt;
0029: * Loop to remove each line for processing.&lt;br /&gt;
0030: ***&lt;br /&gt;
0031:       ITEM = ITEM&lt;br /&gt;
0032:       LOOP&lt;br /&gt;
0033:          LINE = REMOVE(ITEM, MORE.LINES)&lt;br /&gt;
0034:          GOSUB CONVERT.LINE&lt;br /&gt;
0035:          ***&lt;br /&gt;
0036:          * Note that the @FM is prepended to the&lt;br /&gt;
0037:          * line, since we are not using &amp;lt;-1&amp;gt;&lt;br /&gt;
0038:          * notation.&lt;br /&gt;
0039:          ***&lt;br /&gt;
0040:          NEWBUF[1+NEWPTR,1+LEN(LINE)] = @FM:LINE&lt;br /&gt;
0041:          NEWPTR += (1 + LEN(LINE))&lt;br /&gt;
0042:       WHILE MORE.LINES REPEAT&lt;br /&gt;
0043: ***&lt;br /&gt;
0044: * Strip off the leading @FM.&lt;br /&gt;
0045: ***&lt;br /&gt;
0046:       ITEM = NEWBUF[2,NEWPTR-1]&lt;br /&gt;
0047: ***&lt;br /&gt;
0048: * Show the elapsed time in milliseconds.&lt;br /&gt;
0049: ***&lt;br /&gt;
0050:       ELAPSED = GET$TICKS - START.TICKS&lt;br /&gt;
0051:       DISPLAY ELAPSED&lt;br /&gt;
0052:       RETURN&lt;br /&gt;
0053: *&lt;br /&gt;
0054: *&lt;br /&gt;
0055: CONVERT.LINE:&lt;br /&gt;
0056:       WORKBUF = &amp;quot;&amp;quot;&lt;br /&gt;
0057:       WORKPTR = 1&lt;br /&gt;
0058:       FOR AMC = 1 TO MAXAMC&lt;br /&gt;
0059:          FIELDLEN = TABMAP&amp;lt;AMC&amp;gt;&lt;br /&gt;
0060:          WORKBUF&amp;lt;AMC&amp;gt; = LINE[WORKPTR, FIELDLEN]&lt;br /&gt;
0061:          WORKPTR += FIELDLEN&lt;br /&gt;
0062:       NEXT AMC&lt;br /&gt;
0063:       LINE = CONVERT(@FM, CHAR(9), WORKBUF)&lt;br /&gt;
0064:       RETURN&lt;br /&gt;
0065:    END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Could this subroutine be faster?  Sure it can, but the point is all I did was one change and now it runs in 1/20th of the time.&lt;br /&gt;
&lt;br /&gt;
== Recommendations ==&lt;br /&gt;
I only use this technique when performance can be noticeably increased.  For example, building a savelist in a program may only be a few milliseconds faster using this technique, but who&#039;s going to notice? In many cases, readability and maintainability should take precedence over performance.&lt;br /&gt;
&lt;br /&gt;
Always measure performance before and after optimizing your code.  And only optimize the parts that take the longest to perform.&lt;br /&gt;
&lt;br /&gt;
http://www.autopower.com/rgozar/pixel.gif&lt;/div&gt;</summary>
		<author><name>Rkgozar</name></author>
	</entry>
	<entry>
		<id>https://pickwiki.org/index.php?title=Talk:CodingStandards&amp;diff=2657</id>
		<title>Talk:CodingStandards</title>
		<link rel="alternate" type="text/html" href="https://pickwiki.org/index.php?title=Talk:CodingStandards&amp;diff=2657"/>
		<updated>2020-05-22T15:12:01Z</updated>

		<summary type="html">&lt;p&gt;Rkgozar: wrapped code in code tag&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Ternary assignment preferred ==&lt;br /&gt;
&lt;br /&gt;
Regarding 2.10 &amp;quot;Avoid using obscure and unfamiliar coding styles&amp;quot;, the example shows ternary assignment as &amp;quot;BAD&amp;quot;; that is, obscure and unfamiliar to most PICK programmers. I actually prefer to use ternary assignment instead of multi-line IF-THEN-ELSE logic. Ternary assignment helps to avoid the error where the variable name is mis-typed in the ELSE clause.&lt;br /&gt;
&lt;br /&gt;
== Passing an argument by value ==&lt;br /&gt;
&lt;br /&gt;
Regarding 5.7 &amp;quot;Variables passed to subroutines can be passed by value&amp;quot;, scalar variables can be wrapped in parentheses to pass by value, but an array element cannot. Calling &amp;lt;code&amp;gt;FMTPHONE((CM.REC(CM$PHONE)))&amp;lt;/code&amp;gt; will pass a pointer reference to the array element, not a copy of its value, so the array element&#039;s value may be changed by the subroutine/function.&lt;br /&gt;
&lt;br /&gt;
A better way to ensure an argument is passed by value is to prepend or append an empty string.&lt;br /&gt;
&lt;br /&gt;
  CALL FMTPHONE(&amp;quot;&amp;quot;:CM.REC(CM$PHONE))&lt;br /&gt;
&lt;br /&gt;
This can be made more explicit with an equate:&lt;br /&gt;
&lt;br /&gt;
  EQU BYVAL LIT \ &amp;quot;&amp;quot;: \&lt;br /&gt;
  CALL FMTPHONE(BYVAL CM.REC(CM$PHONE))&lt;/div&gt;</summary>
		<author><name>Rkgozar</name></author>
	</entry>
	<entry>
		<id>https://pickwiki.org/index.php?title=Talk:CodingStandards&amp;diff=2655</id>
		<title>Talk:CodingStandards</title>
		<link rel="alternate" type="text/html" href="https://pickwiki.org/index.php?title=Talk:CodingStandards&amp;diff=2655"/>
		<updated>2020-05-15T14:20:12Z</updated>

		<summary type="html">&lt;p&gt;Rkgozar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Ternary assignment preferred ==&lt;br /&gt;
&lt;br /&gt;
Regarding 2.10 &amp;quot;Avoid using obscure and unfamiliar coding styles&amp;quot;, the example shows ternary assignment as &amp;quot;BAD&amp;quot;; that is, obscure and unfamiliar to most PICK programmers. I actually prefer to use ternary assignment instead of multi-line IF-THEN-ELSE logic. Ternary assignment helps to avoid the error where the variable name is mis-typed in the ELSE clause.&lt;br /&gt;
&lt;br /&gt;
== Passing an argument by value ==&lt;br /&gt;
&lt;br /&gt;
Regarding 5.7 &amp;quot;Variables passed to subroutines can be passed by value&amp;quot;, scalar variables can be wrapped in parentheses to pass by value, but an array element cannot. Calling FMTPHONE((CM.REC(CM$PHONE))) will pass a pointer reference to the array element, not a copy of its value, so the array element&#039;s value may be changed by the subroutine/function.&lt;br /&gt;
&lt;br /&gt;
A better way to ensure an argument is passed by value is to prepend or append an empty string.&lt;br /&gt;
&lt;br /&gt;
  CALL FMTPHONE(&amp;quot;&amp;quot;:CM.REC(CM$PHONE))&lt;br /&gt;
&lt;br /&gt;
This can be made more explicit with an equate:&lt;br /&gt;
&lt;br /&gt;
  EQU BYVAL LIT \ &amp;quot;&amp;quot;: \&lt;br /&gt;
  CALL FMTPHONE(BYVAL CM.REC(CM$PHONE))&lt;/div&gt;</summary>
		<author><name>Rkgozar</name></author>
	</entry>
	<entry>
		<id>https://pickwiki.org/index.php?title=Talk:CodingStandards&amp;diff=2654</id>
		<title>Talk:CodingStandards</title>
		<link rel="alternate" type="text/html" href="https://pickwiki.org/index.php?title=Talk:CodingStandards&amp;diff=2654"/>
		<updated>2020-05-15T14:19:23Z</updated>

		<summary type="html">&lt;p&gt;Rkgozar: /* Passing an argument by value */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Regarding 2.10 &amp;quot;Avoid using obscure and unfamiliar coding styles&amp;quot;, the example shows ternary assignment as &amp;quot;BAD&amp;quot;; that is, obscure and unfamiliar to most PICK programmers. I actually prefer to use ternary assignment instead of multi-line IF-THEN-ELSE logic. Ternary assignment helps to avoid the error where the variable name is mis-typed in the ELSE clause.&lt;br /&gt;
&lt;br /&gt;
== Passing an argument by value ==&lt;br /&gt;
&lt;br /&gt;
Regarding 5.7 &amp;quot;Variables passed to subroutines can be passed by value&amp;quot;, scalar variables can be wrapped in parentheses to pass by value, but an array element cannot. Calling FMTPHONE((CM.REC(CM$PHONE))) will pass a pointer reference to the array element, not a copy of its value, so the array element&#039;s value may be changed by the subroutine/function.&lt;br /&gt;
&lt;br /&gt;
A better way to ensure an argument is passed by value is to prepend or append an empty string.&lt;br /&gt;
&lt;br /&gt;
  CALL FMTPHONE(&amp;quot;&amp;quot;:CM.REC(CM$PHONE))&lt;br /&gt;
&lt;br /&gt;
This can be made more explicit with an equate:&lt;br /&gt;
&lt;br /&gt;
  EQU BYVAL LIT \ &amp;quot;&amp;quot;: \&lt;br /&gt;
  CALL FMTPHONE(BYVAL CM.REC(CM$PHONE))&lt;/div&gt;</summary>
		<author><name>Rkgozar</name></author>
	</entry>
	<entry>
		<id>https://pickwiki.org/index.php?title=Talk:CodingStandards&amp;diff=2653</id>
		<title>Talk:CodingStandards</title>
		<link rel="alternate" type="text/html" href="https://pickwiki.org/index.php?title=Talk:CodingStandards&amp;diff=2653"/>
		<updated>2020-05-15T14:07:28Z</updated>

		<summary type="html">&lt;p&gt;Rkgozar: Ternary assignment preferred&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Regarding 2.10 &amp;quot;Avoid using obscure and unfamiliar coding styles&amp;quot;, the example shows ternary assignment as &amp;quot;BAD&amp;quot;; that is, obscure and unfamiliar to most PICK programmers. I actually prefer to use ternary assignment instead of multi-line IF-THEN-ELSE logic. Ternary assignment helps to avoid the error where the variable name is mis-typed in the ELSE clause.&lt;/div&gt;</summary>
		<author><name>Rkgozar</name></author>
	</entry>
	<entry>
		<id>https://pickwiki.org/index.php?title=Rex_Gozar&amp;diff=2621</id>
		<title>Rex Gozar</title>
		<link rel="alternate" type="text/html" href="https://pickwiki.org/index.php?title=Rex_Gozar&amp;diff=2621"/>
		<updated>2019-04-05T14:49:53Z</updated>

		<summary type="html">&lt;p&gt;Rkgozar: removed pixel.gif that was used for tracking&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Users]] &amp;gt;&amp;gt; Rex Gozar&lt;br /&gt;
&lt;br /&gt;
&amp;quot;For every complex problem, there is a solution that is simple, neat, and wrong.&amp;quot; &amp;lt;i&amp;gt;H.L. Mencken&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Contact me at [mailto:rgozar@gmail.com rgozar@gmail.com].&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;b&amp;gt;[[QuickSort]]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;Universe BASIC implementation of the quick sort algorithm.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;[[Row2Col]]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;Transpose a variable&#039;s &amp;quot;rows&amp;quot; (fields) into &amp;quot;columns&amp;quot; (values), and back again.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;[[u2pipe]]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;Connect a web server to a Universe or Unidata database via u2pipe and wininetd.  Ported to windows and unix.  AIX, &amp;lt;nowiki&amp;gt;RedHat Linux&amp;lt;/nowiki&amp;gt; and Windows binaries available.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;[[How-To Improve Large String Performance Using Buffers]]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;Processes that create or manipulate large amounts of data (over 1MB) may be slow, impacting user response time and system performance. This performance degradation can be traced to Universe needing to reallocate and copy memory repeatedly as the amount of data grows. If you can allocate all the memory that you&#039;ll need up front, you can eliminate this bottleneck. This document discusses a coding strategy for doing this.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;[[CodingStandards|Coding Standards]]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;Coding standards are basic rules to help us catch bugs and improve the quality of the programs we produce. They help us in all phases of development by giving us stable and time-tested coding structures that work.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;[[Project Cleansweep]]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;I firmly believe that shoddy programming practices have hurt the credibility of Pick applications.  I discuss active steps to conform your legacy application to modern coding standards.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;[[Getting Personal with PickWiki]]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;I&#039;m on a campaign to get every Pick developer to use [[PickWiki]].  Why? Because I know that there&#039;s a wealth of technical knowledge out there that would benefit the entire Pick community.  But it&#039;s stupid for me to think that you brilliant technical innovators would contribute your precious time and effort purely for the betterment of mankind, nor for the sake of promoting the database we all know and love. Then I had a new thought...&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;[[CSV2FIELDS]]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;Convert a single CSV string into a field-delimited dynamic array.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;[[Rex Gozar/Notes]]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;Various programming notes and half-baked ideas. Maybe I&#039;ll formalize them for public consumption (when I get the time -- HA!).&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;[[ENCRYPT64]]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;Sample code using the &amp;lt;tt&amp;gt;ENCRYPT&amp;lt;/tt&amp;gt; function in Universe.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;[[Hexadecimal Conversion]]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;Converting bytes into hexadecimal and back in Universe.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rkgozar</name></author>
	</entry>
	<entry>
		<id>https://pickwiki.org/index.php?title=Accessing_U2_From_PHP&amp;diff=2620</id>
		<title>Accessing U2 From PHP</title>
		<link rel="alternate" type="text/html" href="https://pickwiki.org/index.php?title=Accessing_U2_From_PHP&amp;diff=2620"/>
		<updated>2019-04-05T14:39:58Z</updated>

		<summary type="html">&lt;p&gt;Rkgozar: removed pixel.gif that was used for tracking&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[HowTos]] &amp;gt;&amp;gt; [[CreateWebInterfaces]] &amp;gt;&amp;gt; Accessing U2 from PHP&lt;br /&gt;
&lt;br /&gt;
See also [[AccessFromPhp]] which includes other cross-platform ways to use PHP with MV. The techniques on this U2-specific page, and much of the code, can be used anywhere, and the code on the other page can augment solutions found here.&lt;br /&gt;
&lt;br /&gt;
2008-01-14 from the u2ug users mailing list&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Rocket Articles on U2 and PHP ==&lt;br /&gt;
(from David Wolverton)&lt;br /&gt;
&lt;br /&gt;
Look at this page for several articles on PHP and U2:&lt;br /&gt;
&lt;br /&gt;
* https://u2devzone.rocketsoftware.com/           &lt;br /&gt;
&lt;br /&gt;
== PHP Web Services Strategy ==&lt;br /&gt;
(from Brian Leach)&lt;br /&gt;
&lt;br /&gt;
PHP has good support for Web Services, so you could surface some UDT functionality that way. There was also an article on &amp;lt;nowiki&amp;gt;DeveloperWorks&amp;lt;/nowiki&amp;gt; on&lt;br /&gt;
creating a custom PHP module that exposed some of the [[InterCall]] library, though it was a long way from a complete solution. &lt;br /&gt;
&lt;br /&gt;
I also dimly remember someone writing an article on using a Java bridge to expose either RedBack objects or UOJ to PHP.&lt;br /&gt;
&lt;br /&gt;
Some time ago I asked IBM whether they would be willing to publish the UniObjects protocol so that third parties could write clients for those environments it doesn&#039;t support, like PHP - but that wasn&#039;t too well received and I didn&#039;t follow up on it. Instead, I wrote a web services library (before IBM released theirs) and tested that through with PHP&#039;s SOAP support.&lt;br /&gt;
&lt;br /&gt;
== Using the PHP COM library ==&lt;br /&gt;
(from Tony Gravagno)&lt;br /&gt;
&lt;br /&gt;
With PHP5 you can just use the PHP COM library to access UO or UO.NET from PHP directly.  It should be a LOT easier with PHP5 than PHP4.  Here&#039;s an example that I&#039;ve created after a brief reference to the UO doc (haven&#039;t tried to execute):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
   $UOSession = new COM(&amp;quot;UniObjects.Unioiafctrl&amp;quot;)&lt;br /&gt;
      or die(&amp;quot;Cant instantiate UO&amp;quot;);&lt;br /&gt;
   $UOSession-&amp;gt;HostName = &amp;quot;yourhost&amp;quot;;&lt;br /&gt;
   $UOSession-&amp;gt;AccountPath = &amp;quot;d:\path\acct&amp;quot;;&lt;br /&gt;
   $UOSession-&amp;gt;DatabaseType = 1; // UV here&lt;br /&gt;
   $UOSession-&amp;gt;UserName = &amp;quot;&amp;quot;; // *nix only?&lt;br /&gt;
   $UOSession-&amp;gt;Password = &amp;quot;&amp;quot;; // *nix only?&lt;br /&gt;
   $UOSession-&amp;gt;Connect; // need to check result&lt;br /&gt;
   if ($UOSession-&amp;gt;IsActive) {&lt;br /&gt;
      $UOSession-&amp;gt;Command-&amp;gt;Text = &amp;quot;COUNT VOC&amp;quot;; // whatever&lt;br /&gt;
      $UOSession-&amp;gt;Command-&amp;gt;Exec;&lt;br /&gt;
      $U2Error = $UOSession-&amp;gt;Command-&amp;gt;Error;&lt;br /&gt;
      $U2Status = $UOSession-&amp;gt;Command-&amp;gt;CommandStatus;&lt;br /&gt;
      echo &amp;quot;Result is {$UOSession-&amp;gt;Command-&amp;gt;Response}&amp;quot;;&lt;br /&gt;
      // may need to loop on $UOSession-&amp;gt;Command-&amp;gt;NextBlock&lt;br /&gt;
   }&lt;br /&gt;
   $UOSession-&amp;gt;Disconnect;&lt;br /&gt;
   $UOSession = null;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can do the same with UO.NET, mv.NET, and I&#039;m guessing you can create an ADODB.Connection with a DSN and make SQL queries as well - all of this only over Windows.  I believe FusionWare would have a similar Java-based solution for instantiating an object in PHP and accessing U2 entirely with &amp;lt;nowiki&amp;gt;*nix&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
(from Steve Morley)&lt;br /&gt;
&lt;br /&gt;
I converted our Admin system to work from the web via PHP5.&lt;br /&gt;
&lt;br /&gt;
Install UNIDK on the webserver and put the following code inside a PHP page. This will initiate the connection to the Unidata server and allow you to talk via UniObjects.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
   $Hostname = &amp;quot;192.168.0.1&amp;quot;;&lt;br /&gt;
   $Username = &amp;quot;admin&amp;quot;;&lt;br /&gt;
   $Password = &amp;quot;password&amp;quot;;&lt;br /&gt;
   $Accountpath = &amp;quot;c:\ibm\mydemoaccount&amp;quot;;&lt;br /&gt;
   $UdSession = new COM(&amp;quot;UniObjects.unioaifctrl&amp;quot;);&lt;br /&gt;
   $UdSession-&amp;gt;HostName = $Hostname;&lt;br /&gt;
   $UdSession-&amp;gt;AccountPath = $Accountpath;&lt;br /&gt;
   $UdSession-&amp;gt;UserName = $Username;&lt;br /&gt;
   $UdSession-&amp;gt;Password = $Password;&lt;br /&gt;
   $UdSession-&amp;gt;Connect();&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
(from Brian Leach)&lt;br /&gt;
&lt;br /&gt;
COM is windows-specific (which is why I didn&#039;t think to suggest it for PHP.) If you want to use UniObjects on Linux you&#039;ll need to use UOJ (Java version).&lt;br /&gt;
&lt;br /&gt;
== u2pipe ==&lt;br /&gt;
(from Rex Gozar)&lt;br /&gt;
&lt;br /&gt;
I wrote [[u2pipe]] because I wanted (1) a single set of API subroutines on the U2 backend to handle all the business logic, and (2) to be able to port the API to different GUI clients (currently &amp;lt;nowiki&amp;gt;ColdFusion&amp;lt;/nowiki&amp;gt; and PHP).&lt;br /&gt;
&lt;br /&gt;
For our web application here, I created &amp;quot;web service subroutines&amp;quot; on the U2 backend, and wrote a PHP library of matching functions for the frontend to access them. &lt;br /&gt;
&lt;br /&gt;
== Javascript and UniObjects ==&lt;br /&gt;
(Rick Brown)&lt;br /&gt;
&lt;br /&gt;
We wrote &amp;lt;nowiki&amp;gt;JavaScript&amp;lt;/nowiki&amp;gt; that basically uses &amp;lt;nowiki&amp;gt;UniObjects&amp;lt;/nowiki&amp;gt; to connect to Unidata and run a subroutine. We pass data back to the PHP program in XML format. The &amp;lt;nowiki&amp;gt;JavaScript&amp;lt;/nowiki&amp;gt; is just used as the connector, one input and one output. We have a few different &amp;lt;nowiki&amp;gt;UniBasic&amp;lt;/nowiki&amp;gt; subroutines that can be called, one even allows the PHP developer to send a series of sentences in ECL format and receive the results in XML. The &amp;lt;nowiki&amp;gt;JavaScript&amp;lt;/nowiki&amp;gt; is maybe 18 lines, and we run it on Tomcat.&lt;br /&gt;
&lt;br /&gt;
This works well for getting smaller data sets to the Web, not so great for hundreds of records. Our PHP developer simply takes the returned XML and throws it into an array.  With the same basic &amp;lt;nowiki&amp;gt;JavaScript&amp;lt;/nowiki&amp;gt; we can pass the name of a subroutine to call, and provide input variables from PHP (Or pretty much any language with HTTP access)&lt;br /&gt;
&lt;br /&gt;
Using HTTP as our transport for the XML is kind of a kludge, but has opened a lot of information to our web developers.&lt;br /&gt;
&lt;br /&gt;
== Using U2 Web Development Environment ([[RedBack]]) ==&lt;br /&gt;
&lt;br /&gt;
I wrote an object which allows full access to all the functionality in [[U2WDE]] from within PHP. This is a pure PHP script which requires no additional extensions to use. See https://github.com/gheydon/redback for the download and examples on how to use.&lt;br /&gt;
&lt;br /&gt;
== Getting PHP / Java / Universe (Unidata) to Work Together ==&lt;br /&gt;
&lt;br /&gt;
[[PhpJavaIntegration]]: as PHP does not as of this date support the Universe database, this is one approach to get data into your PHP application.&lt;/div&gt;</summary>
		<author><name>Rkgozar</name></author>
	</entry>
	<entry>
		<id>https://pickwiki.org/index.php?title=U2pipe&amp;diff=2592</id>
		<title>U2pipe</title>
		<link rel="alternate" type="text/html" href="https://pickwiki.org/index.php?title=U2pipe&amp;diff=2592"/>
		<updated>2016-10-10T13:32:00Z</updated>

		<summary type="html">&lt;p&gt;Rkgozar: ini file syntax was escaped; now fixed for MediaWiki&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Users]] &amp;gt;&amp;gt; [[Rex_Gozar]] &amp;gt;&amp;gt; u2pipe&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= u2pipe / wininetd =&lt;br /&gt;
&lt;br /&gt;
Version 1.0.3&lt;br /&gt;
&amp;lt;br&amp;gt;revised 2009-04-17 by Rex Gozar&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Brief ==&lt;br /&gt;
&lt;br /&gt;
You can connect a web server to a Universe database via u2pipe.  Windows platforms use wininetd as the socket listener.  &amp;lt;nowiki&amp;gt;Unix/Linux&amp;lt;/nowiki&amp;gt; platforms can use xinetd or inetd.  This document explains how to do it.&lt;br /&gt;
&lt;br /&gt;
There are better, more sophisticated ways of doing this. You could use &amp;lt;nowiki&amp;gt;RedBack&amp;lt;/nowiki&amp;gt; (or whatever its new name is), &amp;lt;nowiki&amp;gt;UniObjects&amp;lt;/nowiki&amp;gt;, mvNet, or any other commercial solution. But I&#039;m tired of the &amp;quot;barriers to entry&amp;quot; in the PICK programming world, and I wanted to provide a simple open source alternative for connecting web servers to IBM U2 databases.  &lt;br /&gt;
&lt;br /&gt;
== Disclaimer ==&lt;br /&gt;
&lt;br /&gt;
This program 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.&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
* Free (as in &amp;quot;free speech&amp;quot;)&lt;br /&gt;
* Free (as in &amp;quot;free beer&amp;quot;)&lt;br /&gt;
* Runs on Windows and unix.&lt;br /&gt;
* u2pipe - a single purpose utility to get the request from stdin, log into universe, and send the response to stdout.&lt;br /&gt;
* wininetd - an open source socket listening service&lt;br /&gt;
* Independent from web server; use any webserver/language you want -- ASP, JSP, PHP, &amp;lt;nowiki&amp;gt;ColdFusion&amp;lt;/nowiki&amp;gt;, or whatever.&lt;br /&gt;
* Create as many socket ports as you want to access as many accounts as you want.&lt;br /&gt;
* Once a request is received, it can be handled by any Universe machine on your internal network.&lt;br /&gt;
* optional: You can restrict access to a list of &amp;quot;allowed&amp;quot; ip-addresses.&lt;br /&gt;
* optional: You can log every request and response.&lt;br /&gt;
* optional: You can (and should) run a filter program to validate TCL commands to execute.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Non-Features ==&lt;br /&gt;
&lt;br /&gt;
* not tested on Unidata, but uses [[InterCall]] so it should work.&lt;br /&gt;
* no connection pooling, but only eats a user license for the duration of the request processing.&lt;br /&gt;
* no connection limit, but you can create your own (when using xinetd, you can specify the number of instances; pending requests are queued).&lt;br /&gt;
* no encryption, but you can (and should) do your own.&lt;br /&gt;
* no multi-byte character support is built in, but since raw bytes are sent back and forth there&#039;s nothing stopping you from passing multi-byte characters.&lt;br /&gt;
* not responsible for character mangling by transport protocol. For example, HTTP is not guaranteed to transport binary characters as-is, but you can use url encoding, base64, or some other ASCII-armoring techniques for binary data.&lt;br /&gt;
&lt;br /&gt;
== Binaries ==&lt;br /&gt;
&lt;br /&gt;
* AIX: http://www.autopower.com/rgozar/u2pipe-1.0.3-aix.tgz&lt;br /&gt;
* Linux: http://www.autopower.com/rgozar/u2pipe-1.0.3-linux.tgz&lt;br /&gt;
* Windows: http://www.autopower.com/rgozar/u2pipe-1.0.3-setup.exe&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Windows Installation ==&lt;br /&gt;
&lt;br /&gt;
# Download http://www.autopower.com/rgozar/u2pipe-1.0.3-setup.exe&lt;br /&gt;
# Run it.&lt;br /&gt;
&lt;br /&gt;
* Must be logged in as an administrator so the wininetd service can be installed.&lt;br /&gt;
* Requires Windows 2000, or a later version.&lt;br /&gt;
* Requires access to Universe, either on the same machine, or reachable via &amp;lt;nowiki&amp;gt;UniRPC&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
* No reboot required, so you can install anytime.&lt;br /&gt;
* The following files are installed.&lt;br /&gt;
** c:\windows\u2pipe.exe&lt;br /&gt;
** c:\windows\u2pipe.ini&lt;br /&gt;
** c:\windows\wininetd.exe&lt;br /&gt;
** c:\windows\wininetd.conf&lt;br /&gt;
** c:\windows\system32\unirpc32.dll&lt;br /&gt;
** c:\windows\system32\uvclnt32.dll&lt;br /&gt;
** c:\windows\system32\uvic32.dll&lt;br /&gt;
&lt;br /&gt;
== AIX and Linux Installation ==&lt;br /&gt;
# You&#039;ll need to be savvy enough to install a new &amp;lt;nowiki&amp;gt;xinetd/inetd&amp;lt;/nowiki&amp;gt; service (or at least know how to search Google.)&lt;br /&gt;
# Download the binary for your platform and untar it.  Copy (or move) the &amp;lt;tt&amp;gt;u2pipe&amp;lt;/tt&amp;gt; binary into the directory of your choice (typically &amp;lt;tt&amp;gt;/usr/local/bin&amp;lt;/tt&amp;gt;).&lt;br /&gt;
# Edit &amp;lt;tt&amp;gt;/etc/services&amp;lt;/tt&amp;gt; to add &amp;lt;tt&amp;gt;u2pipe&amp;lt;/tt&amp;gt; with the port number of your choice.&amp;lt;br&amp;gt;&amp;lt;pre&amp;gt;u2pipe   6789/tcp   # u2pipe Web Service&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Edit your xinetd (or inetd) configuration file.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;AIX - sample inetd.conf&amp;lt;pre&amp;gt;u2pipe   stream   tcp   nowait   root   /usr/local/bin/u2pipe&amp;lt;/pre&amp;gt;&amp;lt;br&amp;gt;Linux - sample /etc/xinetd.d/u2pipe&amp;lt;pre&amp;gt;service u2pipe&lt;br /&gt;
{&lt;br /&gt;
        instances               = 3&lt;br /&gt;
        socket_type             = stream&lt;br /&gt;
        wait                    = no&lt;br /&gt;
        user                    = root&lt;br /&gt;
        server                  = /usr/local/bin/u2pipe&lt;br /&gt;
        nice                    = 10&lt;br /&gt;
        disable                 = no&lt;br /&gt;
        only_from               = localhost 10.0.0.0 192.168.1.132&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Create the ini file.  Use your favorite editor to create &amp;lt;tt&amp;gt;/etc/u2pipe.ini&amp;lt;/tt&amp;gt; -- the format is described in &amp;quot;Configuring u2pipe.ini&amp;quot; below.&lt;br /&gt;
# Optional: You can configure a specific ini file to use by specifying the the &amp;quot;server_args&amp;quot;.  For example:&amp;lt;br&amp;gt;&amp;lt;pre&amp;gt;  server_args = /etc/sales_account.ini&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Configuring wininetd ==&lt;br /&gt;
&lt;br /&gt;
You typically don&#039;t have to change wininetd.conf, but if you want to the format is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;port user:password full-u2pipe-path [full-inifile-path]&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* space or tab separators&lt;br /&gt;
* comment lines start with any non-numeric character&lt;br /&gt;
* &amp;lt;tt&amp;gt;&amp;lt;b&amp;gt;port&amp;lt;/b&amp;gt;&amp;lt;/tt&amp;gt;&amp;lt;br&amp;gt; Any available port number.&lt;br /&gt;
* &amp;lt;tt&amp;gt;&amp;lt;b&amp;gt;user:password&amp;lt;/b&amp;gt;&amp;lt;/tt&amp;gt;&amp;lt;br&amp;gt; A specific user id and password separated by a colon (:) or the word &amp;lt;tt&amp;gt;&amp;lt;b&amp;gt;none&amp;lt;/b&amp;gt;&amp;lt;/tt&amp;gt; to use the local system account (default).&lt;br /&gt;
* &amp;lt;tt&amp;gt;&amp;lt;b&amp;gt;full-u2pipe-path&amp;lt;/b&amp;gt;&amp;lt;/tt&amp;gt;&amp;lt;br&amp;gt; Typically &#039;&#039;c:\windows\u2pipe.exe&#039;&#039;&lt;br /&gt;
* &amp;lt;tt&amp;gt;&amp;lt;b&amp;gt;full-inifile-path&amp;lt;/b&amp;gt;&amp;lt;/tt&amp;gt;&amp;lt;br&amp;gt; Optional: You can configure several u2pipe processes to run, each with their own ini file.&lt;br /&gt;
* sample: default configuration&amp;lt;br&amp;gt;&amp;lt;tt&amp;gt;6789 none c:\windows\u2pipe.exe&amp;lt;/tt&amp;gt;&lt;br /&gt;
* sample: using a different ini file&amp;lt;br&amp;gt; &amp;lt;tt&amp;gt;9901 none c:\windows\u2pipe.exe c:\other.ini&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In Windows &#039;&#039;Services&#039;&#039;, you must change wininetd properties from &amp;quot;Manual&amp;quot; to &amp;quot;Automatic&amp;quot; for the service to start at reboot.&lt;br /&gt;
&lt;br /&gt;
You must restart the wininetd service for changes to wininetd.conf to take effect.  This is easy to do from the DOS command line by typing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;b&amp;gt;net stop wininetd&amp;lt;/b&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;tt&amp;gt;&amp;lt;b&amp;gt;net start wininetd&amp;lt;/b&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Configuring u2pipe.ini ==&lt;br /&gt;
&lt;br /&gt;
Changes to u2pipe.ini take effect immediately (does not require restart).&lt;br /&gt;
&lt;br /&gt;
You can create different ini files to log into different machines or accounts, and tie them to specific port numbers in wininetd.conf (or inetd.conf, or xinetd.d files -- you get the idea).&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;&amp;lt;b&amp;gt;[U2PIPE]&amp;lt;/b&amp;gt;&amp;lt;/tt&amp;gt;&amp;lt;br&amp;gt; required: section declaration.&lt;br /&gt;
* &amp;lt;tt&amp;gt;&amp;lt;b&amp;gt;HOSTNAME&amp;lt;/b&amp;gt;&amp;lt;/tt&amp;gt;&amp;lt;br&amp;gt; required: The Universe machine&#039;s hostname or ip-address.&lt;br /&gt;
* &amp;lt;tt&amp;gt;&amp;lt;b&amp;gt;USER&amp;lt;/b&amp;gt;&amp;lt;/tt&amp;gt;&amp;lt;br&amp;gt; required: The user id to log into the machine.&lt;br /&gt;
* &amp;lt;tt&amp;gt;&amp;lt;b&amp;gt;PASSWORD&amp;lt;/b&amp;gt;&amp;lt;/tt&amp;gt;&amp;lt;br&amp;gt; required: The user&#039;s password.&lt;br /&gt;
* &amp;lt;tt&amp;gt;&amp;lt;b&amp;gt;ACCOUNT&amp;lt;/b&amp;gt;&amp;lt;/tt&amp;gt;&amp;lt;br&amp;gt; required: The Universe account to log into.&lt;br /&gt;
* &amp;lt;tt&amp;gt;&amp;lt;b&amp;gt;RUN&amp;lt;/b&amp;gt;&amp;lt;/tt&amp;gt;&amp;lt;br&amp;gt; optional: Prefix the request with the specified string.  For example, you may want to run a program named &amp;lt;tt&amp;gt;&amp;quot;MYPROG&amp;quot;&amp;lt;/tt&amp;gt; to parse the request string for processing, so you would set &amp;lt;tt&amp;gt;&amp;quot;RUN=MYPROG&amp;quot;&amp;lt;/tt&amp;gt;.  The TCL command to execute will be &amp;lt;tt&amp;gt;&amp;quot;MYPROG whatever-the-request-string-is&amp;quot;&amp;lt;/tt&amp;gt;.  &amp;lt;b&amp;gt;You should always run your requests through a program to parse arguments and filter out malicious text.&amp;lt;/b&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;&amp;lt;b&amp;gt;ALLOWIP&amp;lt;/b&amp;gt;&amp;lt;/tt&amp;gt;&amp;lt;br&amp;gt; optional: List of allowed client IP-addresses that can make requests, separated by semi-colons (;).  To allow requests from the CMD shell, i.e. &amp;lt;tt&amp;gt;ECH&amp;lt;nowiki&amp;gt;O&amp;lt;/nowiki&amp;gt; 000004DATE|[[U2PIPE]]&amp;lt;/tt&amp;gt;, add an extra semi-colon -- for example, &amp;lt;tt&amp;gt;ALLOWIP=192.168.1.7;&amp;lt;/tt&amp;gt; (note the trailing semi-colon).  &lt;br /&gt;
* &amp;lt;tt&amp;gt;&amp;lt;b&amp;gt;LOGFILE&amp;lt;/b&amp;gt;&amp;lt;/tt&amp;gt;&amp;lt;br&amp;gt; optional: Log the requests and responses to a file.  This file can grow big fast, so it is recommended that you only enable it for debugging.  Also note that the log file is not locked and multiple u2pipe processes may update it simultaneously.&lt;br /&gt;
* &amp;lt;tt&amp;gt;&amp;lt;b&amp;gt;;&amp;lt;/b&amp;gt;&amp;lt;/tt&amp;gt;&amp;lt;br&amp;gt; optional: Comments can be entered, or parameters no-op&#039;ed, using a semicolon.&lt;br /&gt;
&lt;br /&gt;
Sample &amp;lt;tt&amp;gt;u2pipe.ini&amp;lt;/tt&amp;gt; with minimum configuration:&lt;br /&gt;
&amp;lt;pre&amp;gt;[U2PIPE]&lt;br /&gt;
hostname=localhost&lt;br /&gt;
user=bgates&lt;br /&gt;
password=iluvlinux!&lt;br /&gt;
account=SALES&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
Run both of these tests to make sure that u2pipe and wininetd are configured correctly.  Error messages show up in the LOGFILE (specified in the ini file) or the Windows &#039;&#039;Event Viewer&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
* From the DOS command line type: &amp;lt;tt&amp;gt;ECH&amp;lt;nowiki&amp;gt;O&amp;lt;/nowiki&amp;gt; 000004DATE|[[U2PIPE]]&amp;lt;/tt&amp;gt;&lt;br /&gt;
** response: &amp;lt;tt&amp;gt;000037Friday, September 29, 2006  03:18pm&amp;lt;/tt&amp;gt;&lt;br /&gt;
** Note that the response includes trailing CR and LF characters.&lt;br /&gt;
&lt;br /&gt;
* From your browser, enter in the location: &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;http://yourhost:6789/000004DATE&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
** response: &amp;lt;tt&amp;gt;000037Friday, September 29, 2006  03:18pm&amp;lt;/tt&amp;gt;&lt;br /&gt;
** try: &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;http://yourhost:6789/000004TIME&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
** try: &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;http://yourhost:6789/000005USERS&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
** try: &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;http://yourhost:6789/000005LISTU&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Note: Any single word TCL command can be performed.  We&#039;ll need to do more work to allow multi-word commands.&lt;br /&gt;
&lt;br /&gt;
* Note: Multi-line responses may get mangled by HTTP.  We&#039;ll need to use ASCII armoring (i.e. base64 encoding) to reliably pass data back and forth.&lt;br /&gt;
&lt;br /&gt;
* Note: Browsers and web utilities don&#039;t handle spaces very well, so at the very least we should use some kind of URL encoding. Other socket clients don&#039;t have this problem -- we can send and receive binary data without worrying about data corruption or transformation.&lt;br /&gt;
&lt;br /&gt;
== Operation ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;u2pipe&#039;&#039; is designed to take a &amp;lt;b&amp;gt;request&amp;lt;/b&amp;gt; from stdin, process it, and send the &amp;lt;b&amp;gt;response&amp;lt;/b&amp;gt; to stdout.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;REQUEST&amp;lt;/b&amp;gt; format:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;tt&amp;gt;&amp;lt;b&amp;gt;123456command&amp;lt;/b&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
:* &amp;lt;tt&amp;gt;&amp;lt;b&amp;gt;123456&amp;lt;/b&amp;gt;&amp;lt;/tt&amp;gt; is a six-digit request length.  For example, the command &amp;lt;tt&amp;gt;DATE&amp;lt;/tt&amp;gt; contains four characters; the request length is &amp;lt;tt&amp;gt;000004&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
:* &amp;lt;tt&amp;gt;&amp;lt;b&amp;gt;command&amp;lt;/b&amp;gt;&amp;lt;/tt&amp;gt; is the TCL command to run.  Ideally, the command should be encoded or encrypted so you can pass arguments for processing.&lt;br /&gt;
&lt;br /&gt;
:* Example: &amp;lt;tt&amp;gt;&amp;lt;b&amp;gt;000004DATE&amp;lt;/b&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;u2pipe&#039;&#039; reads in the request, strips off the six-digit request length, and prepends the optional RUN parameter (from the ini file above).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;u2pipe&#039;&#039; uses [[InterCall]] functions ic_opensession(), ic_execute(), and ic_quit() to process the command.&lt;br /&gt;
* @TTY is set to &amp;quot;uvcs&amp;quot; (for Universe; probably &amp;quot;udcs&amp;quot; on Unidata).&lt;br /&gt;
* The LOGIN paragraph is not run.&lt;br /&gt;
* Only one command is allowed (no LF or @FM separating commands).&lt;br /&gt;
* All characters are executed -- backspaces and such are not interpreted.&lt;br /&gt;
* Program output to the screen (via DISPLAY or CRT) is captured for the &amp;lt;b&amp;gt;response&amp;lt;/b&amp;gt;.&lt;br /&gt;
* WARNING: CHAR(3) (CTRL-C) output breaks your Universe BASIC program, possibly truncating your output. Binary output should be encoded.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;u2pipe&#039;&#039; returns the length of the output and the output itself in the format of a &amp;lt;b&amp;gt;response&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;RESPONSE&amp;lt;/b&amp;gt; format:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;tt&amp;gt;&amp;lt;b&amp;gt;123456output&amp;lt;/b&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
:* &amp;lt;tt&amp;gt;&amp;lt;b&amp;gt;123456&amp;lt;/b&amp;gt;&amp;lt;/tt&amp;gt; is a six-digit response length.&lt;br /&gt;
&lt;br /&gt;
:* &amp;lt;tt&amp;gt;&amp;lt;b&amp;gt;output&amp;lt;/b&amp;gt;&amp;lt;/tt&amp;gt; is the output from your TCL command, including both printing and non-printing characters.  Ideally, your output should be encoded or encrypted to protect the data from transformations and prying eyes.&lt;br /&gt;
&lt;br /&gt;
:* Example: &amp;lt;tt&amp;gt;&amp;lt;b&amp;gt;000037Friday, September 29, 2006  03:18pm&amp;lt;/b&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
So you got the &amp;quot;DATE&amp;quot; command to work – Yahoo! break out the champagne (or maybe some of that &amp;quot;free beer&amp;quot;)! No, wait a minute – I suppose you want to run something a little more complicated, huh?&lt;br /&gt;
&lt;br /&gt;
* Maybe you want to run a subroutine, or a program that takes command line arguments.&lt;br /&gt;
* Maybe you want to run a TCL command that returns some XML.&lt;br /&gt;
* And some of you more security-minded folks out there want to know how encryption might fit into this.&lt;br /&gt;
&lt;br /&gt;
I&#039;m going to outline a &#039;&#039;simple&#039;&#039; implementation. You&#039;ll need to add your own features, like error return handling, beefier encryption, etc. The purpose of u2pipe is to provide a connection between a webserver and Universe; how to use that connection is up to &#039;&#039;you&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
1. We&#039;ll devise our own data format for exchanging information between the web server and Universe.&lt;br /&gt;
&lt;br /&gt;
2. We&#039;ll write a function on the frontend.&lt;br /&gt;
* to format our request&lt;br /&gt;
* send it to the backend&lt;br /&gt;
* wait for the backend&#039;s response&lt;br /&gt;
* parse the response.&lt;br /&gt;
&lt;br /&gt;
3. We&#039;ll write a Universe BASIC program on the backend&lt;br /&gt;
* to parse the request&lt;br /&gt;
* filter/validate the command&lt;br /&gt;
* run the command&lt;br /&gt;
* format the response&lt;br /&gt;
* return the response&lt;br /&gt;
&lt;br /&gt;
4. We&#039;ll set the RUN parameter in u2pipe.ini to run our backend program.&lt;br /&gt;
&lt;br /&gt;
5. We&#039;ll test it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;nowiki&amp;gt;1. Devising a data exchange format&amp;lt;/nowiki&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a simple implementation, so I&#039;ve decided that the webserver should be able to send TCL command strings with arguments and get the output in return.  With that in mind, I&#039;ve chosen to simply encode my command string and the output returned using base64.  I&#039;ve also decided to wrap the encoded output in parentheses &amp;quot;()&amp;quot; to help me find it in the response.&lt;br /&gt;
&lt;br /&gt;
If I wanted to get fancy, I could encapsulate my request in XML (maybe like SOAP) and then encode, encrypt, or otherwise mangle the request before sending it to the backend.  Conversely, I could also require the response to be XML formatted and encoded. Feel free to make it as simple or complicated as you wish.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;nowiki&amp;gt;2. Writing a frontend function.&amp;lt;/nowiki&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ASP, ASP.NET, JSP, PHP, &amp;lt;nowiki&amp;gt;ColdFusion&amp;lt;/nowiki&amp;gt;... it does not matter what frontend you use.  As long as your frontend can either (a) communicate on a socket, or (b) retrieve the contents of a web page, you can write a function for interacting with u2pipe.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;nowiki&amp;gt;2a. Writing a frontend function: ColdFusion&amp;lt;/nowiki&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I&#039;ve already written a function for you.  Change it as you need to implement your data exchange format.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cffunction name=&amp;quot;decryptString&amp;quot; output=&amp;quot;false&amp;quot; returntype=&amp;quot;any&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfargument name=&amp;quot;text&amp;quot; type=&amp;quot;string&amp;quot; required=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;!--- *TODO* substitute your own encryption ---&amp;gt;&lt;br /&gt;
   &amp;lt;cfreturn toString(toBinary(text))&amp;gt;&lt;br /&gt;
&amp;lt;/cffunction&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cffunction name=&amp;quot;encryptString&amp;quot; output=&amp;quot;false&amp;quot; returntype=&amp;quot;string&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfargument name=&amp;quot;text&amp;quot; type=&amp;quot;any&amp;quot; required=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;!--- *TODO* substitute your own encryption ---&amp;gt;&lt;br /&gt;
   &amp;lt;cfreturn toBase64(text, &amp;quot;us-ascii&amp;quot;)&amp;gt;&lt;br /&gt;
&amp;lt;/cffunction&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cffunction name=&amp;quot;serviceRequest&amp;quot; output=&amp;quot;false&amp;quot; returntype=&amp;quot;string&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfargument name=&amp;quot;myCommand&amp;quot; type=&amp;quot;string&amp;quot; required=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;!--- some constants ---&amp;gt;&lt;br /&gt;
   &amp;lt;cfset var HEADERSZ = 6&amp;gt;&lt;br /&gt;
   &amp;lt;cfset var HOSTURL = &amp;quot;http://yourhost:6789&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;!--- local variables ---&amp;gt;&lt;br /&gt;
   &amp;lt;cfset var myLength = &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;cfset var myRequest = &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;cfset var myResponse = &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;cfset var myOutput = &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;cfset var bptr = 0&amp;gt;&lt;br /&gt;
   &amp;lt;cfset var eptr = 0&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;!--- Encrypt the command ---&amp;gt;&lt;br /&gt;
   &amp;lt;cfset myCommand = encryptString(myCommand)&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;!--- Build the request from the command ---&amp;gt;&lt;br /&gt;
   &amp;lt;cfset myLength = right(repeatString(&amp;quot;0&amp;quot;, HEADERSZ) &amp;amp; len(myCommand), HEADERSZ)&amp;gt;&lt;br /&gt;
   &amp;lt;cfset myRequest = HOSTURL &amp;amp; &amp;quot;/&amp;quot; &amp;amp; myLength &amp;amp; myCommand&amp;gt;&lt;br /&gt;
   &amp;lt;cftry&amp;gt;&lt;br /&gt;
      &amp;lt;cfhttp url=&amp;quot;#myRequest#&amp;quot; timeout=&amp;quot;60&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;!--- Parse the output from the response ---&amp;gt;&lt;br /&gt;
      &amp;lt;cfset myResponse = cfhttp.fileContent&amp;gt;&lt;br /&gt;
      &amp;lt;cfset myLength = mid(myResponse, 1, HEADERSZ)&amp;gt;&lt;br /&gt;
      &amp;lt;cfset myOutput = mid(myResponse, (HEADERSZ + 1), myLength)&amp;gt;&lt;br /&gt;
      &lt;br /&gt;
      &amp;lt;!--- Parse output markers ---&amp;gt;&lt;br /&gt;
      &amp;lt;!--- We&#039;ve decided that output will be formatted: !(base64text) ---&amp;gt;&lt;br /&gt;
      &amp;lt;cfset bptr = find(&amp;quot;(&amp;quot;, myOutput)&amp;gt;&lt;br /&gt;
      &amp;lt;cfset eptr = find(&amp;quot;)&amp;quot;, myOutput)&amp;gt;&lt;br /&gt;
      &amp;lt;cfif bptr lt eptr&amp;gt;&lt;br /&gt;
         &amp;lt;cfset myOutput = mid(myOutput, (bptr+1), (eptr-bptr-1))&amp;gt;&lt;br /&gt;
      &amp;lt;cfelse&amp;gt;&lt;br /&gt;
         &amp;lt;cfthrow message=&amp;quot;missing or invalid markers!&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;/cfif&amp;gt;&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;!--- Decrypt the output ---&amp;gt;&lt;br /&gt;
      &amp;lt;cfset myOutput = decryptString(myOutput)&amp;gt;&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;cfcatch type=&amp;quot;any&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;!--- *TODO* you&#039;ll need some exception handling ---&amp;gt;&lt;br /&gt;
      &amp;lt;/cfcatch&amp;gt;&lt;br /&gt;
   &amp;lt;/cftry&amp;gt;&lt;br /&gt;
   &amp;lt;cfreturn myOutput&amp;gt;&lt;br /&gt;
&amp;lt;/cffunction&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--- now get some data from Universe ---&amp;gt;&lt;br /&gt;
&amp;lt;cfset command = &amp;quot;LIST VOC SAMPLE 3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset output = serviceRequest(command)&amp;gt;&lt;br /&gt;
&amp;lt;cfoutput&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;pre&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
#output#&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/pre&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/cfoutput&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;2b. Writing a frontend function: PHP&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I&#039;ve written a function for you PHP&#039;ers too.  Again, change it as you need to implement your data exchange format.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
   function decryptString($text) {&lt;br /&gt;
      // *TODO* substitute your own encryption&lt;br /&gt;
      return base64_decode($text);&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   function encryptString($text) {&lt;br /&gt;
      // *TODO* substitute your own encryption&lt;br /&gt;
      return base64_encode($text);&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   function serviceRequest($myCommand) {&lt;br /&gt;
&lt;br /&gt;
      // set constants&lt;br /&gt;
      define(&amp;quot;HEADERSZ&amp;quot;, 6);&lt;br /&gt;
      define(&amp;quot;HOSTIP&amp;quot;, &amp;quot;yourhost&amp;quot;);&lt;br /&gt;
      define(&amp;quot;HOSTPORT&amp;quot;, 6789);&lt;br /&gt;
&lt;br /&gt;
      if (($socket = socket_create([[AF_INET]], [[SOCK_STREAM]], [[SOL_TCP]])) &amp;lt; 0 ) {&lt;br /&gt;
         // *TODO* need to handle error&amp;quot;&lt;br /&gt;
         die(&amp;quot;Could not create socket!\n&amp;quot;);&lt;br /&gt;
         exit(1);&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
      socket_set_option($socket, [[SOL_SOCKET]], [[SO_RCVTIMEO]], array(&#039;sec&#039;=&amp;gt;20, &#039;usec&#039;=&amp;gt;0));&lt;br /&gt;
&lt;br /&gt;
      if (!socket_connect($socket, HOSTIP, HOSTPORT)) {&lt;br /&gt;
         // *TODO* need to handle error&amp;quot;&lt;br /&gt;
         die(&amp;quot;Unable to connect!\n&amp;quot;);&lt;br /&gt;
         exit(1);&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
      $myCommand = encryptString($myCommand);&lt;br /&gt;
&lt;br /&gt;
      $myLength = strlen($myCommand);&lt;br /&gt;
      $myRequest = sprintf(&amp;quot;%0&amp;quot;.HEADERSZ.&amp;quot;d%s\n&amp;quot;, $myLength, $myCommand);&lt;br /&gt;
      socket_write($socket, $myRequest);&lt;br /&gt;
&lt;br /&gt;
      $myOutput = &amp;quot;&amp;quot;;&lt;br /&gt;
      $myLength = socket_read($socket, HEADERSZ);&lt;br /&gt;
      while (FALSE != ($line = @socket_read($socket, $myLength, [[PHP_BINARY_READ]]))) {&lt;br /&gt;
         $myOutput = $myOutput . $line;&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
      $bptr = strpos($myOutput, &amp;quot;(&amp;quot;);&lt;br /&gt;
      $eptr = strpos($myOutput, &amp;quot;)&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
      //assert($bptr !=0);&lt;br /&gt;
      //assert($eptr !=0);&lt;br /&gt;
      //assert($bptr &amp;lt; $eptr);&lt;br /&gt;
&lt;br /&gt;
      $myOutput = substr($myOutput, ($bptr+1), ($eptr-$bptr-1));&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
      $myOutput = decryptString($myOutput);&lt;br /&gt;
      return ($myOutput);&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   $command = &amp;quot;LIST VOC SAMPLE 3&amp;quot;;&lt;br /&gt;
   $output = serviceRequest($command);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   //header(&amp;quot;Content-type: text/plain&amp;quot;);&lt;br /&gt;
   ech&amp;lt;nowiki&amp;gt;o &amp;quot;&amp;lt;pre&amp;gt;&amp;quot;.$output.&amp;quot;&amp;lt;/pre&amp;gt;&amp;quot;;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;&amp;lt;nowiki&amp;gt;3. Writing a backend Universe BASIC program&amp;lt;/nowiki&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As I decided above, this backend program only needs to be able to base64 decode the command string and its arguments, and execute it.  The output from the command is captured, cleaned up, and encoded to be returned to the frontend.&lt;br /&gt;
&lt;br /&gt;
Note that all we have to do here is &amp;lt;tt&amp;gt;DISPLAY&amp;lt;/tt&amp;gt; the response; &amp;lt;tt&amp;gt;u2pipe&amp;lt;/tt&amp;gt; does the communication logic for us.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s name this program &amp;lt;b&amp;gt;&amp;lt;tt&amp;gt;[[U2PIPERUN]]&amp;lt;/tt&amp;gt;&amp;lt;/b&amp;gt;.  Make sure you compile and catalog it in the appropriate account.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0001:       DISPLAY &amp;quot;!&amp;quot;:&lt;br /&gt;
0002:&lt;br /&gt;
0003:&lt;br /&gt;
0004:       DEFFUN DECODE64(TEXT)&lt;br /&gt;
0005:       DEFFUN ENCODE64(TEXT)&lt;br /&gt;
0006:       EQU LF TO CHAR(10)&lt;br /&gt;
0007:       EQU FF TO CHAR(12)&lt;br /&gt;
0008:       EQU CR TO CHAR(13)&lt;br /&gt;
0009:&lt;br /&gt;
0010:&lt;br /&gt;
0011:       COMMAND = FIELD(@SENTENCE, &amp;quot; &amp;quot;, 2, LEN(@SENTENCE))&lt;br /&gt;
0012:       COMMAND = DECODE64(COMMAND)&lt;br /&gt;
0013:&lt;br /&gt;
0014:&lt;br /&gt;
0015:       EXECUTE COMMAND CAPTURING OUTPUT RETURNING RETCODE&lt;br /&gt;
0016:&lt;br /&gt;
0017:&lt;br /&gt;
0018:       OUTPUT = CONVERT(@FM, LF, OUTPUT)&lt;br /&gt;
0019:       OUTPUT = CONVERT(CR, &amp;quot;&amp;quot;, OUTPUT)&lt;br /&gt;
0020:       OUTPUT = TRIM(OUTPUT, FF, &amp;quot;B&amp;quot;)&lt;br /&gt;
0021:       OUTPUT = TRIM(OUTPUT, LF, &amp;quot;B&amp;quot;)&lt;br /&gt;
0022:       OUTPUT = ENCODE64(OUTPUT)&lt;br /&gt;
0023:&lt;br /&gt;
0024:&lt;br /&gt;
0025:       DISPLAY &amp;quot;(&amp;quot;:OUTPUT:&amp;quot;)&amp;quot;&lt;br /&gt;
0026:    END&lt;br /&gt;
Bottom at line 26.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;4. Setting the &amp;lt;tt&amp;gt;RUN&amp;lt;/tt&amp;gt; parameter in &amp;lt;tt&amp;gt;u2pipe.ini&amp;lt;/tt&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your &amp;lt;tt&amp;gt;u2pipe.ini&amp;lt;/tt&amp;gt; file should look something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[U2PIPE]&lt;br /&gt;
HOSTNAME=yourhost&lt;br /&gt;
USER=webuser&lt;br /&gt;
PASSWORD=webuser_password&lt;br /&gt;
ACCOUNT=WEBACCOUNT&lt;br /&gt;
RUN=U2PIPERUN&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;5. Testing your implementation&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should be ready to test your implementation.  You may want to turn on the &amp;lt;tt&amp;gt;LOGFILE&amp;lt;/tt&amp;gt; parameter in the &amp;lt;tt&amp;gt;u2pipe.ini&amp;lt;/tt&amp;gt; file to see the data being passed back and forth.  You may also want to add some kind of error logging to your &amp;lt;tt&amp;gt;[[U2PIPERUN]]&amp;lt;/tt&amp;gt; program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;Other uses&amp;lt;/b&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;u2pipe&amp;lt;/tt&amp;gt; could be used in windows BAT files (e.g. for scheduler routines).  You could use bin\uvsh too, but uvsh cannot initiate jobs on other machines.&lt;br /&gt;
&lt;br /&gt;
== Security ==&lt;br /&gt;
&lt;br /&gt;
Obviously, you don&#039;t want just anyone sending TCL commands to your Universe database.&lt;br /&gt;
&lt;br /&gt;
* Configure your firewall to only allow specific machines to access &#039;&#039;yourhost:6789&#039;&#039;&lt;br /&gt;
* Set ALLOWIP in u2pipe.ini to only allow specific client ip-addresses.&lt;br /&gt;
* &amp;lt;b&amp;gt;Encrypt your command in the request, and the output returned in the response.&amp;lt;/b&amp;gt;  Universe has built-in encryption functions that you can use.  You&#039;ll need some kind of encoding/encryption for all but the simplest commands anyway, so build it into your design/code.&lt;br /&gt;
* Create a unique user for logging in via u2pipe to your account, and restrict permissions.&lt;br /&gt;
* Lock down the Universe account accessed via u2pipe by:&lt;br /&gt;
** removing all verbs&lt;br /&gt;
** removing all paragraphs (procs, etc.)&lt;br /&gt;
** removing all file pointers (use OPENPATH)&lt;br /&gt;
** create an execution filter (set RUN in u2pipe.ini)&lt;br /&gt;
** only run subroutines from your execution filter&lt;br /&gt;
&lt;br /&gt;
ALSO, &amp;lt;tt&amp;gt;wininetd&amp;lt;/tt&amp;gt; can be used for evil; googling on it reveals that it can be used as part of a Trojan-virus attack.  Some anti-virus software may report it as such.  Just like &amp;lt;tt&amp;gt;telnet&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;ftp&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;wininetd&amp;lt;/tt&amp;gt; is only as safe as your firewall setup!&lt;br /&gt;
&lt;br /&gt;
== Design Decisions ==&lt;br /&gt;
&lt;br /&gt;
Why write a socket-based solution instead of just using &amp;lt;nowiki&amp;gt;UniObjects&amp;lt;/nowiki&amp;gt;?  In my case, I needed to implement database connectivity for a remotely hosted web site; I couldn&#039;t &amp;quot;wire&amp;quot; &amp;lt;nowiki&amp;gt;UniObjects&amp;lt;/nowiki&amp;gt; directly into the web server. And I really didn&#039;t want to.&lt;br /&gt;
&lt;br /&gt;
Here are some decisions I made when writing this utility.&lt;br /&gt;
* I decided on a simple request/response model. I only wanted to create a pipe (stdin -&amp;gt; processing -&amp;gt; stdout).  This is a requirement for wininetd.&lt;br /&gt;
* By using wininetd, I didn&#039;t have to worry about writing socket listener code, multi-threading, etc.&lt;br /&gt;
* Initially, I did not want a protocol (request and response length) but it made the memory allocation easier.  It also allowed the client to easily check for the end of the response.&lt;br /&gt;
* I felt that encryption/decryption would have made the utility more complicated to write and would limit its flexibility.  Most people have their own favorite crypto utilities anyway.&lt;br /&gt;
* I wanted the simplicity of Universe&#039;s [[InterCall]] API library.  Most of the behavior is documented in the [[InterCall]] guide.&lt;br /&gt;
&lt;br /&gt;
In designing your own web or socket solution, I think it is important to keep all your business logic on the database server.  In some examples of &amp;lt;nowiki&amp;gt;UniObjects&amp;lt;/nowiki&amp;gt; programming, I see business logic migrated or duplicated on the client - bad, bad, bad.&lt;br /&gt;
&lt;br /&gt;
Whether you use &amp;lt;nowiki&amp;gt;UniObjects&amp;lt;/nowiki&amp;gt; or u2pipe (or SQL for that matter), design your user interface to be database independent.  Instead of embedding data access and updates directly in your web page (or GUI screen), put your database access logic in a separate function library.  Then call those functions from your web page.  This way, you&#039;ll be able to easily write test scaffolding to test your web page, then swap in the &amp;quot;real&amp;quot; functions that actually hit your database.&lt;br /&gt;
&lt;br /&gt;
== Possible Enhancements ==&lt;br /&gt;
&lt;br /&gt;
* You could use this as a base for developing an actual web service.&lt;br /&gt;
* Rewrite to use &amp;lt;nowiki&amp;gt;UniObjects&amp;lt;/nowiki&amp;gt; instead of [[InterCall]].&lt;br /&gt;
&lt;br /&gt;
== Downloading wininetd source code ==&lt;br /&gt;
&lt;br /&gt;
You can download source code from http://xmailserver.org/wininetd.html&lt;br /&gt;
&lt;br /&gt;
== u2pipe.c source code ==&lt;br /&gt;
&lt;br /&gt;
* You must have &amp;lt;nowiki&amp;gt;UniDK&amp;lt;/nowiki&amp;gt; installed on your development machine.&lt;br /&gt;
* Compiling notes&lt;br /&gt;
** See the [[InterCall]] guide for the DLL&#039;s you&#039;ll need.&lt;br /&gt;
** VC++ calling conventions need to be changed from __cdecl to __stdcall for the [[InterCall]] routines to link properly.&lt;br /&gt;
** Additional include directories: c:\ibm\unidk\include&lt;br /&gt;
** Additional lib directories: c:\ibm\unidk\lib&lt;br /&gt;
** Additional libraries/modules: uvic32.lib&lt;br /&gt;
* In the process of porting the code to run in unix, I replaced the Windows ini functions with the iniparser.h and iniparser.c source code libraries.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/***&lt;br /&gt;
* u2pipe.c&lt;br /&gt;
* universe request pipe utility&lt;br /&gt;
* CVS $Revision: 1.3 $ $Date: 2007/05/11 19:33:27 $&lt;br /&gt;
*&lt;br /&gt;
* Copyright (C) 2006 Rex Gozar&lt;br /&gt;
*&lt;br /&gt;
* This library is free software; you can redistribute it and/or&lt;br /&gt;
* modify it under the terms of the GNU Lesser General Public&lt;br /&gt;
* License as published by the Free Software Foundation; either&lt;br /&gt;
* version 2.1 of the License, or (at your option) any later version.&lt;br /&gt;
*&lt;br /&gt;
* This library is distributed in the hope that it will be useful,&lt;br /&gt;
* but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU&lt;br /&gt;
* Lesser General Public License for more details.&lt;br /&gt;
*&lt;br /&gt;
* You should have received a copy of the GNU Lesser General Public&lt;br /&gt;
* License along with this library; if not, write to the Free Software&lt;br /&gt;
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA&lt;br /&gt;
* http://www.gnu.org/licenses/lgpl.html&lt;br /&gt;
*&lt;br /&gt;
* Rex Gozar&lt;br /&gt;
* rkgozar@juno.com&lt;br /&gt;
***/&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;time.h&amp;gt;&lt;br /&gt;
#include &amp;lt;intcall.h&amp;gt;&lt;br /&gt;
#include &amp;quot;iniparser.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#define MAXBUF (256)&lt;br /&gt;
#define MAXBIGBUF (8192)&lt;br /&gt;
&lt;br /&gt;
#ifndef TRUE&lt;br /&gt;
   #define TRUE (1)&lt;br /&gt;
#endif&lt;br /&gt;
#ifndef FALSE&lt;br /&gt;
   #define FALSE (0)&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
#define [[APP_NAME]] (&amp;quot;[[U2PIPE]]&amp;quot;)&lt;br /&gt;
#define [[DEFAULT_VALUE]] (&amp;quot;&amp;quot;)&lt;br /&gt;
#define REQUIRED (TRUE)&lt;br /&gt;
#define [[NOT_REQUIRED]] (FALSE)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/***&lt;br /&gt;
* NOTE - GETSLASHSZ must be smaller than REQUESTLENSZ&lt;br /&gt;
* and (GETSLASHSZ + REQUESTLENSZ + 1) must be smaller than MAXBUF!&lt;br /&gt;
***/&lt;br /&gt;
#define GETSLASH (&amp;quot;GET /&amp;quot;)&lt;br /&gt;
#define GETSLASHSZ (5)&lt;br /&gt;
#define REQUESTLENSZ (6)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/***&lt;br /&gt;
* helper functions&lt;br /&gt;
***/&lt;br /&gt;
&lt;br /&gt;
char * get[[TimeStamp]](char *timestamp) {&lt;br /&gt;
   time_t seconds = time(NULL);&lt;br /&gt;
   struct tm *now = localtime(&amp;amp;seconds);&lt;br /&gt;
   strftime(timestamp, MAXBUF, &amp;quot;%Y%m%d %H%M%S&amp;quot;, now);&lt;br /&gt;
   return timestamp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/***&lt;br /&gt;
* main&lt;br /&gt;
*&lt;br /&gt;
* Note that the program should be compiled with __stdcall&lt;br /&gt;
* call convention so the intercall routines will properly link.&lt;br /&gt;
* Use __cdecl here to avoid a compiler warning.&lt;br /&gt;
***/&lt;br /&gt;
&lt;br /&gt;
#ifndef WIN32&lt;br /&gt;
   #define __cdecl&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
int __cdecl main(int argc, char *argv[]) {&lt;br /&gt;
&lt;br /&gt;
   time_t stime = time(NULL);&lt;br /&gt;
   time_t etime = 0;&lt;br /&gt;
&lt;br /&gt;
   #ifdef WIN32&lt;br /&gt;
      const char *WINDIR = getenv(&amp;quot;WINDIR&amp;quot;);&lt;br /&gt;
   #else&lt;br /&gt;
      const char *ETCDIR = &amp;quot;/etc&amp;quot;;&lt;br /&gt;
   #endif&lt;br /&gt;
   const char *[[U2PIPE_INI]] = &amp;quot;u2pipe.ini&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
   long retcode = 0;&lt;br /&gt;
   char buffer[MAXBUF] = &amp;quot;&amp;quot;;&lt;br /&gt;
   char timestamp[MAXBUF] = &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
   const char *[[CLIENT_IP]] = getenv(&amp;quot;[[CLIENT_IP]]&amp;quot;);&lt;br /&gt;
   const char *[[CLIENT_PORT]] = getenv(&amp;quot;[[CLIENT_PORT]]&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
   char ipAddress[MAXBUF] = &amp;quot;&amp;quot;;&lt;br /&gt;
   char ipPort[MAXBUF] = &amp;quot;&amp;quot;;&lt;br /&gt;
   char iniFile[MAXBUF] = &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
   dictionary *ini = NULL;&lt;br /&gt;
   char *iniHostname = NULL;&lt;br /&gt;
   char *iniUser = NULL;&lt;br /&gt;
   char *iniPassword = NULL;&lt;br /&gt;
   char *iniAccount = NULL;&lt;br /&gt;
   char *iniRun = NULL;&lt;br /&gt;
   char *iniLogfile = NULL;&lt;br /&gt;
   char *ini[[AllowIP]] = NULL;&lt;br /&gt;
&lt;br /&gt;
   int logsw = FALSE;&lt;br /&gt;
   FILE *fpLog;&lt;br /&gt;
&lt;br /&gt;
   int j = 0;&lt;br /&gt;
&lt;br /&gt;
   char *request = NULL;&lt;br /&gt;
   long requestLen = 0;&lt;br /&gt;
&lt;br /&gt;
   char *response = NULL;&lt;br /&gt;
   long responseLen = 0;&lt;br /&gt;
   long responseMax = 0;&lt;br /&gt;
&lt;br /&gt;
   long sessionId = 0;&lt;br /&gt;
   long code = 0;&lt;br /&gt;
   long retcode2 = 0;&lt;br /&gt;
&lt;br /&gt;
   char *command = NULL;&lt;br /&gt;
   long commandLen = 0;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   /* check for NULL pointers and initialize ip address and port strings */&lt;br /&gt;
&lt;br /&gt;
   if (NULL != [[CLIENT_IP]]) {&lt;br /&gt;
      strncpy(ipAddress, [[CLIENT_IP]], strlen([[CLIENT_IP]]));&lt;br /&gt;
   }&lt;br /&gt;
   if (NULL != [[CLIENT_PORT]]) {&lt;br /&gt;
      strncpy(ipPort, [[CLIENT_PORT]], strlen([[CLIENT_PORT]]));&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   /* see if the ini file path is on the command line */   &lt;br /&gt;
&lt;br /&gt;
   if (2 &amp;lt;= argc) {&lt;br /&gt;
      if (MAXBUF &amp;lt; ( 1 + strlen(argv[1]) )) {&lt;br /&gt;
         fprintf(stderr, &amp;quot;ini file pathname is longer than %i!\n&amp;quot;, MAXBUF);&lt;br /&gt;
         exit(1);&lt;br /&gt;
      }&lt;br /&gt;
      sprintf(iniFile, &amp;quot;%s&amp;quot;, argv[1]);&lt;br /&gt;
   } else {&lt;br /&gt;
&lt;br /&gt;
      #ifdef WIN32&lt;br /&gt;
&lt;br /&gt;
         if (NULL == WINDIR) {&lt;br /&gt;
            fprintf(stderr, &amp;quot;WINDIR is NULL!\n&amp;quot;);&lt;br /&gt;
            exit(1);&lt;br /&gt;
         }&lt;br /&gt;
&lt;br /&gt;
         /* build the default ini file path %WINDIR%\u2pipe.ini */&lt;br /&gt;
         if (MAXBUF &amp;lt; ( 1 + strlen(WINDIR) + 1 + strlen([[U2PIPE_INI]]) )) {&lt;br /&gt;
            fprintf(stderr, &amp;quot;%%WINDIR%%\\%s is longer than %i!\n&amp;quot;, [[U2PIPE_INI]], MAXBUF);&lt;br /&gt;
            exit(1);&lt;br /&gt;
         }&lt;br /&gt;
         sprintf(iniFile, &amp;quot;%s\\%s&amp;quot;, WINDIR, [[U2PIPE_INI]]);&lt;br /&gt;
&lt;br /&gt;
      #else&lt;br /&gt;
&lt;br /&gt;
         if (MAXBUF &amp;lt; ( 1 + strlen(ETCDIR) + 1 + strlen([[U2PIPE_INI]]) )) {&lt;br /&gt;
            fprintf(stderr, &amp;quot;%s/%s is longer than %i!\n&amp;quot;, ETCDIR, [[U2PIPE_INI]], MAXBUF);&lt;br /&gt;
            exit(1);&lt;br /&gt;
         }&lt;br /&gt;
         sprintf(iniFile, &amp;quot;%s/%s&amp;quot;, ETCDIR, [[U2PIPE_INI]]);&lt;br /&gt;
&lt;br /&gt;
      #endif&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
   /* parse config for user, password, account, etc */&lt;br /&gt;
   ini = iniparser_new(iniFile);&lt;br /&gt;
   iniHostname = iniparser_getstring(ini, &amp;quot;u2pipe:hostname&amp;quot;, &amp;quot;&amp;quot;);&lt;br /&gt;
   iniUser = iniparser_getstring(ini, &amp;quot;u2pipe:user&amp;quot;, &amp;quot;&amp;quot;);&lt;br /&gt;
   iniPassword = iniparser_getstring(ini, &amp;quot;u2pipe:password&amp;quot;, &amp;quot;&amp;quot;);&lt;br /&gt;
   iniAccount = iniparser_getstring(ini, &amp;quot;u2pipe:account&amp;quot;, &amp;quot;&amp;quot;);&lt;br /&gt;
   iniRun = iniparser_getstring(ini, &amp;quot;u2pipe:run&amp;quot;, &amp;quot;&amp;quot;);&lt;br /&gt;
   iniLogfile = iniparser_getstring(ini, &amp;quot;u2pipe:logfile&amp;quot;, &amp;quot;&amp;quot;);&lt;br /&gt;
   ini[[AllowIP]] = iniparser_getstring(ini, &amp;quot;u2pipe:allowIP&amp;quot;, &amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
   #ifdef _DEBUG&lt;br /&gt;
      fprintf(stderr, &amp;quot;iniFile=%s\n&amp;quot;, iniFile);&lt;br /&gt;
      fprintf(stderr, &amp;quot;ipAddress=%s\n&amp;quot;, ipAddress);&lt;br /&gt;
      fprintf(stderr, &amp;quot;ipPort=%s\n&amp;quot;, ipPort);&lt;br /&gt;
      fprintf(stderr, &amp;quot;iniFile=%s\n&amp;quot;, iniFile);&lt;br /&gt;
      fprintf(stderr, &amp;quot;iniHostname=%s\n&amp;quot;, iniHostname);&lt;br /&gt;
      fprintf(stderr, &amp;quot;iniUser=%s\n&amp;quot;, iniUser);&lt;br /&gt;
      fprintf(stderr, &amp;quot;iniPassword=%s\n&amp;quot;, iniPassword);&lt;br /&gt;
      fprintf(stderr, &amp;quot;iniAccount=%s\n&amp;quot;, iniAccount);&lt;br /&gt;
      fprintf(stderr, &amp;quot;iniRun=%s\n&amp;quot;, iniRun);&lt;br /&gt;
      fprintf(stderr, &amp;quot;iniLogfile=%s\n&amp;quot;, iniLogfile);&lt;br /&gt;
      fprintf(stderr, &amp;quot;ini[[AllowIP]]=%s\n&amp;quot;, ini[[AllowIP]]);&lt;br /&gt;
   #endif&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
   /* open the log file */&lt;br /&gt;
&lt;br /&gt;
   logsw = (0 != strlen(iniLogfile));&lt;br /&gt;
   if (logsw) {&lt;br /&gt;
      fpLog = fopen(iniLogfile, &amp;quot;a+&amp;quot;);&lt;br /&gt;
      if (NULL == fpLog) {&lt;br /&gt;
         fprintf(stderr, &amp;quot;unable to open log file %s\n&amp;quot;, iniLogfile);&lt;br /&gt;
         exit(1);&lt;br /&gt;
      }&lt;br /&gt;
      /* print a separator line for each request */&lt;br /&gt;
      fprintf(fpLog, &amp;quot;****************************************\n&amp;quot;);&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   /* log the requester */&lt;br /&gt;
&lt;br /&gt;
   if (logsw) {&lt;br /&gt;
      fprintf(fpLog, &amp;quot;%s ipAddress=%s\n&amp;quot;, get[[TimeStamp]](timestamp), ipAddress);&lt;br /&gt;
      fprintf(fpLog, &amp;quot;%s ipPort=%s\n&amp;quot;, get[[TimeStamp]](timestamp), ipPort);&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
   /* check allowed ip-addresses */&lt;br /&gt;
&lt;br /&gt;
   if (0 != strlen(ini[[AllowIP]])) {&lt;br /&gt;
&lt;br /&gt;
      /* sandwich the list between semi-colons */&lt;br /&gt;
      if (MAXBUF &amp;lt; 3 + strlen(ini[[AllowIP]])) {&lt;br /&gt;
         if (logsw) {&lt;br /&gt;
            fprintf(fpLog, &amp;quot;%s ALLOWIP list is too long!\n&amp;quot;, get[[TimeStamp]](timestamp));&lt;br /&gt;
         }&lt;br /&gt;
         exit(1);&lt;br /&gt;
      }&lt;br /&gt;
      sprintf(buffer, &amp;quot;;%s;&amp;quot;, ini[[AllowIP]]);&lt;br /&gt;
      memset(ini[[AllowIP]], 0, MAXBUF);&lt;br /&gt;
      strncpy(ini[[AllowIP]], buffer, strlen(buffer));&lt;br /&gt;
&lt;br /&gt;
      /* do the same to the ip address */&lt;br /&gt;
      if (MAXBUF &amp;lt; 3 + strlen(ipAddress)) {&lt;br /&gt;
         if (logsw) {&lt;br /&gt;
            fprintf(fpLog, &amp;quot;%s ipAddress is too long!\n&amp;quot;, get[[TimeStamp]](timestamp));&lt;br /&gt;
         }&lt;br /&gt;
         exit(1);&lt;br /&gt;
      }&lt;br /&gt;
      sprintf(buffer, &amp;quot;;%s;&amp;quot;, ipAddress);&lt;br /&gt;
&lt;br /&gt;
      /* now look for the ipAddress within the allowed IP&#039;s */&lt;br /&gt;
      if (NULL == strstr(ini[[AllowIP]], buffer)) {&lt;br /&gt;
         if (logsw) {&lt;br /&gt;
            fprintf(fpLog, &amp;quot;%s ipAddress is not allowed!\n&amp;quot;, get[[TimeStamp]](timestamp));&lt;br /&gt;
         }&lt;br /&gt;
         exit(1);&lt;br /&gt;
      }&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   /****&lt;br /&gt;
   *&lt;br /&gt;
   * requests are piped in via stdin, and must be formatted:&lt;br /&gt;
   *&lt;br /&gt;
   *    GET /000009something&lt;br /&gt;
   * or&lt;br /&gt;
   *    000009something&lt;br /&gt;
   *&lt;br /&gt;
   * where:&lt;br /&gt;
   *    &amp;quot;GET /&amp;quot; is an optional literal string (typically passed by a web request.)&lt;br /&gt;
   *    &amp;quot;000009&amp;quot; is a six-digit request length.&lt;br /&gt;
   *    &amp;quot;something&amp;quot; is the actual request.&lt;br /&gt;
   ***/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   /* look for &amp;quot;GET /&amp;quot; */&lt;br /&gt;
&lt;br /&gt;
   memset(buffer, 0, MAXBUF);&lt;br /&gt;
   fread(buffer, sizeof(char), GETSLASHSZ, stdin);&lt;br /&gt;
   if (0 == strncmp(buffer, GETSLASH, GETSLASHSZ)) {&lt;br /&gt;
      /* discard the buffer contents and get REQUESTLENSZ more characters */&lt;br /&gt;
      memset(buffer, 0, MAXBUF);&lt;br /&gt;
      fread(buffer, sizeof(char), REQUESTLENSZ, stdin);&lt;br /&gt;
   } else {&lt;br /&gt;
      /* read in more characters to fill in the request length */&lt;br /&gt;
      j = GETSLASHSZ;&lt;br /&gt;
      while (j &amp;lt; REQUESTLENSZ) {&lt;br /&gt;
         int c = fgetc(stdin);&lt;br /&gt;
         if (EOF == c) {&lt;br /&gt;
            if (logsw) {&lt;br /&gt;
               fprintf(fpLog, &amp;quot;%s not enough characters in stdin!\n&amp;quot;, get[[TimeStamp]](timestamp));&lt;br /&gt;
            }&lt;br /&gt;
            exit(1);&lt;br /&gt;
         }&lt;br /&gt;
         buffer[j] = c;&lt;br /&gt;
         j++;&lt;br /&gt;
      }&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   /* check the request length string */&lt;br /&gt;
&lt;br /&gt;
   if (REQUESTLENSZ != strlen(buffer)) {&lt;br /&gt;
      if (logsw) {&lt;br /&gt;
         fprintf(fpLog, &amp;quot;%s request length is not %i characters!\n&amp;quot;, get[[TimeStamp]](timestamp), REQUESTLENSZ);&lt;br /&gt;
      }&lt;br /&gt;
      exit(1);&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
   for (j = 0; j &amp;lt; REQUESTLENSZ; j++) {&lt;br /&gt;
      if (!isdigit(buffer[j])) {&lt;br /&gt;
         if (logsw) {&lt;br /&gt;
            fprintf(fpLog, &amp;quot;%s request length is non-numeric!\n&amp;quot;, get[[TimeStamp]](timestamp));&lt;br /&gt;
         }&lt;br /&gt;
         exit(1);&lt;br /&gt;
      }&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
   requestLen = atoi(buffer);&lt;br /&gt;
   if (0 == requestLen) {&lt;br /&gt;
      if (logsw) {&lt;br /&gt;
         fprintf(fpLog, &amp;quot;%s request length is zero!\n&amp;quot;, get[[TimeStamp]](timestamp));&lt;br /&gt;
      }&lt;br /&gt;
      exit(1);&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   /* get the memory to read in the rest of the request */&lt;br /&gt;
&lt;br /&gt;
   request = (char *) malloc(1 + requestLen);&lt;br /&gt;
   if (NULL == request) {&lt;br /&gt;
      if (logsw) {&lt;br /&gt;
         fprintf(fpLog, &amp;quot;%s request malloc failed!\n&amp;quot;, get[[TimeStamp]](timestamp));&lt;br /&gt;
      }&lt;br /&gt;
      exit(1);&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   /* read in the request */&lt;br /&gt;
&lt;br /&gt;
   memset(request, 0, 1+requestLen);&lt;br /&gt;
   fread(request, sizeof(char), requestLen, stdin);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   /* log the request */&lt;br /&gt;
&lt;br /&gt;
   if (logsw) {&lt;br /&gt;
      fprintf(fpLog, &amp;quot;%s REQUEST=%s\n&amp;quot;, get[[TimeStamp]](timestamp), request);&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   /*********************&lt;br /&gt;
   * process the request&lt;br /&gt;
   **********************/&lt;br /&gt;
&lt;br /&gt;
   sessionId = ic_opensession(iniHostname, iniUser, iniPassword, iniAccount, &amp;amp;code, NULL);&lt;br /&gt;
   if (0 != code) {&lt;br /&gt;
      if (logsw) {&lt;br /&gt;
         fprintf(fpLog, &amp;quot;%s ic_opensession failed! %i\n&amp;quot;, get[[TimeStamp]](timestamp), code);&lt;br /&gt;
      }&lt;br /&gt;
      exit(1);&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
   if (0 != strlen(iniRun)) {&lt;br /&gt;
      /* add one to the command length for the space between */&lt;br /&gt;
      commandLen = strlen(iniRun) + 1 + requestLen;&lt;br /&gt;
      command = (char *) malloc(1+commandLen);&lt;br /&gt;
      memset(command, 0, commandLen);&lt;br /&gt;
      sprintf(command, &amp;quot;%s %s&amp;quot;, iniRun, request);&lt;br /&gt;
   } else {&lt;br /&gt;
      commandLen = requestLen;&lt;br /&gt;
      command = (char *) malloc(1+commandLen);&lt;br /&gt;
      memset(command, 0, commandLen);&lt;br /&gt;
      sprintf(command, &amp;quot;%s&amp;quot;, request);&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
   responseMax = MAXBIGBUF;&lt;br /&gt;
   response = (char *) malloc(responseMax);&lt;br /&gt;
   memset(response, 0, responseMax);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   ic_execute(command, &amp;amp;commandLen, response, &amp;amp;responseMax,&lt;br /&gt;
      &amp;amp;responseLen, &amp;amp;retcode, &amp;amp;retcode2, &amp;amp;code);&lt;br /&gt;
&lt;br /&gt;
   if (logsw) {&lt;br /&gt;
      fprintf(fpLog, &amp;quot;%s [[IC_EXECUTE]]=%i\n&amp;quot;, get[[TimeStamp]](timestamp), code);&lt;br /&gt;
      fprintf(fpLog, &amp;quot;%s responseLen=%i\n&amp;quot;, get[[TimeStamp]](timestamp), responseLen);&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
   /* see if we need to expand the response buffer to hold all the data */&lt;br /&gt;
   &lt;br /&gt;
   while ([[IE_BTS]] == code) {&lt;br /&gt;
&lt;br /&gt;
      char *tmpbuf = NULL;&lt;br /&gt;
      long tmpmax = 0;&lt;br /&gt;
      long tmplen = 0;&lt;br /&gt;
&lt;br /&gt;
      char *newbuf = NULL;&lt;br /&gt;
      long newmax = 0;&lt;br /&gt;
&lt;br /&gt;
      /* create a temporary buffer to hold the next block of data */&lt;br /&gt;
      tmpmax = responseMax;&lt;br /&gt;
      tmpbuf = (char *) malloc(tmpmax);&lt;br /&gt;
      if (NULL == tmpbuf) {&lt;br /&gt;
         fprintf(stderr, &amp;quot;malloc failed when creating tmpbuf!\n&amp;quot;);&lt;br /&gt;
      }&lt;br /&gt;
      memset(tmpbuf, 0, tmpmax);&lt;br /&gt;
      tmplen = 0;&lt;br /&gt;
&lt;br /&gt;
      /* get the next block of data */&lt;br /&gt;
      ic_executecontinue(tmpbuf, &amp;amp;tmpmax, &amp;amp;tmplen, &amp;amp;retcode, &amp;amp;retcode2, &amp;amp;code);&lt;br /&gt;
      if (logsw) {&lt;br /&gt;
         fprintf(fpLog, &amp;quot;%s [[IC_EXECUTECONTINUE]]=%i\n&amp;quot;, get[[TimeStamp]](timestamp), code);&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
      /* create a new buffer to hold both the response and tmp buffers */&lt;br /&gt;
      /* note that the new buffer is double the size of the previous iteration */&lt;br /&gt;
      newmax = responseMax + tmpmax;&lt;br /&gt;
      newbuf = (char *) malloc(newmax);&lt;br /&gt;
      if (NULL == newbuf) {&lt;br /&gt;
         fprintf(stderr, &amp;quot;malloc failed when creating newbuf!\n&amp;quot;);&lt;br /&gt;
         exit(1);&lt;br /&gt;
      }&lt;br /&gt;
      memset(newbuf, 0, newmax);&lt;br /&gt;
&lt;br /&gt;
      /* copy both the response and tmpbuf into the new buffer */&lt;br /&gt;
      memcpy(newbuf, response, responseLen);&lt;br /&gt;
      memcpy(newbuf + responseLen, tmpbuf, tmpmax);&lt;br /&gt;
&lt;br /&gt;
      /* release the memory for old data buffers and point response to the new data */&lt;br /&gt;
      free(tmpbuf);&lt;br /&gt;
      free(response);&lt;br /&gt;
      response = newbuf;&lt;br /&gt;
      responseMax = newmax;&lt;br /&gt;
      responseLen = responseLen + tmplen;&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   ic_quit(&amp;amp;code);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   /* log the response */&lt;br /&gt;
   if (logsw) {&lt;br /&gt;
      fprintf(fpLog, &amp;quot;%s RESPONSE=%s\n&amp;quot;, get[[TimeStamp]](timestamp), response);&lt;br /&gt;
      fprintf(fpLog, &amp;quot;%s responseLen=%i\n&amp;quot;, get[[TimeStamp]](timestamp), responseLen);&lt;br /&gt;
      fprintf(fpLog, &amp;quot;%s strlen(response)=%i\n&amp;quot;, get[[TimeStamp]](timestamp), strlen(response));&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
   /* return the response on stdout */&lt;br /&gt;
&lt;br /&gt;
   fprintf(stdout, &amp;quot;%06i%s\n&amp;quot;, responseLen, response);&lt;br /&gt;
   fflush(stdout);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   /* done */&lt;br /&gt;
   if (logsw) {&lt;br /&gt;
      etime = time(NULL) - stime;&lt;br /&gt;
      fprintf(fpLog, &amp;quot;%s COMPLETED (%lu)\n&amp;quot;, get[[TimeStamp]](timestamp), etime);&lt;br /&gt;
      fflush(fpLog);&lt;br /&gt;
      fclose(fpLog);&lt;br /&gt;
   }&lt;br /&gt;
   exit(0);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 Based upon libiniparser, by Nicolas Devillard&lt;br /&gt;
 Hacked into 1 file (m-iniparser) by Freek/2005&lt;br /&gt;
 Original terms following:&lt;br /&gt;
&lt;br /&gt;
 -- -&lt;br /&gt;
&lt;br /&gt;
 Copyright (c) 2000 by Nicolas Devillard (ndevilla AT free DOT fr).&lt;br /&gt;
&lt;br /&gt;
 Written by Nicolas Devillard. Not derived from licensed software.&lt;br /&gt;
&lt;br /&gt;
 Permission is granted to anyone to use this software for any&lt;br /&gt;
 purpose on any computer system, and to redistribute it freely,&lt;br /&gt;
 subject to the following restrictions:&lt;br /&gt;
&lt;br /&gt;
 1. The author is not responsible for the consequences of use of&lt;br /&gt;
 this software, no matter how awful, even if they arise&lt;br /&gt;
 from defects in it.&lt;br /&gt;
&lt;br /&gt;
 2. The origin of this software must not be misrepresented, either&lt;br /&gt;
 by explicit claim or by omission.&lt;br /&gt;
&lt;br /&gt;
 3. Altered versions must be plainly marked as such, and must not&lt;br /&gt;
 be misrepresented as being the original software.&lt;br /&gt;
&lt;br /&gt;
 4. This notice may not be removed or altered.&lt;br /&gt;
&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#ifndef _[[INIPARSER_H_]]&lt;br /&gt;
#define _[[INIPARSER_H_]]&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;string.h&amp;gt;&lt;br /&gt;
/* #include &amp;lt;unistd.h&amp;gt; */&lt;br /&gt;
#include &amp;lt;ctype.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#ifdef __cplusplus&lt;br /&gt;
extern &amp;quot;C&amp;quot; {&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
typedef struct _dictionary_ {&lt;br /&gt;
   /** Number of entries in dictionary */&lt;br /&gt;
   int n;&lt;br /&gt;
   /** Storage size */&lt;br /&gt;
   int size;&lt;br /&gt;
   /** List of string values */&lt;br /&gt;
   char **val;&lt;br /&gt;
   /** List of string keys */&lt;br /&gt;
   char **key ;&lt;br /&gt;
   /** List of hash values for keys */&lt;br /&gt;
   unsigned *hash;&lt;br /&gt;
} dictionary ;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/* generated by genproto */&lt;br /&gt;
&lt;br /&gt;
dictionary * iniparser_new(char *ininame);&lt;br /&gt;
void iniparser_free(dictionary *d);&lt;br /&gt;
&lt;br /&gt;
int iniparser_getnsec(dictionary *d);&lt;br /&gt;
char * iniparser_getsecname(dictionary *d, int n);&lt;br /&gt;
void iniparser_dump(dictionary *d, FILE *f);&lt;br /&gt;
void iniparser_dump_ini(dictionary *d, FILE *f);&lt;br /&gt;
char * iniparser_getkey(dictionary *d, char *section, char *key);&lt;br /&gt;
char * iniparser_getstr(dictionary *d, char *key);&lt;br /&gt;
char * iniparser_getstring(dictionary *d, char *key, char *def);&lt;br /&gt;
int iniparser_getint(dictionary *d, char *key, int notfound);&lt;br /&gt;
double iniparser_getdouble(dictionary *d, char *key, double notfound);&lt;br /&gt;
int iniparser_getboolean(dictionary *d, char *key, int notfound);&lt;br /&gt;
int iniparser_find_entry(dictionary  *ini, char *entry);&lt;br /&gt;
int iniparser_setstr(dictionary *ini, char *entry, char *val);&lt;br /&gt;
void iniparser_unset(dictionary *ini, char *entry);&lt;br /&gt;
&lt;br /&gt;
#ifdef __cplusplus&lt;br /&gt;
}&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
 Based upon libiniparser, by Nicolas Devillard&lt;br /&gt;
 Hacked into 1 file (m-iniparser) by Freek/2005&lt;br /&gt;
 Original terms following:&lt;br /&gt;
&lt;br /&gt;
 -- -&lt;br /&gt;
&lt;br /&gt;
 Copyright (c) 2000 by Nicolas Devillard (ndevilla AT free DOT fr).&lt;br /&gt;
&lt;br /&gt;
 Written by Nicolas Devillard. Not derived from licensed software.&lt;br /&gt;
&lt;br /&gt;
 Permission is granted to anyone to use this software for any&lt;br /&gt;
 purpose on any computer system, and to redistribute it freely,&lt;br /&gt;
 subject to the following restrictions:&lt;br /&gt;
&lt;br /&gt;
 1. The author is not responsible for the consequences of use of&lt;br /&gt;
 this software, no matter how awful, even if they arise&lt;br /&gt;
 from defects in it.&lt;br /&gt;
&lt;br /&gt;
 2. The origin of this software must not be misrepresented, either&lt;br /&gt;
 by explicit claim or by omission.&lt;br /&gt;
&lt;br /&gt;
 3. Altered versions must be plainly marked as such, and must not&lt;br /&gt;
 be misrepresented as being the original software.&lt;br /&gt;
&lt;br /&gt;
 4. This notice may not be removed or altered.&lt;br /&gt;
&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;string.h&amp;gt;&lt;br /&gt;
/* #include &amp;lt;unistd.h&amp;gt; */&lt;br /&gt;
&lt;br /&gt;
#include &amp;quot;iniparser.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#ifdef __cplusplus&lt;br /&gt;
extern &amp;quot;C&amp;quot; {&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
/* strlib.c following */&lt;br /&gt;
&lt;br /&gt;
#define ASCIILINESZ 1024&lt;br /&gt;
/*-------------------------------------------------------------------------*/&lt;br /&gt;
/**&lt;br /&gt;
  @brief    Convert a string to lowercase.&lt;br /&gt;
  @param    s   String to convert.&lt;br /&gt;
  @return   ptr to statically allocated string.&lt;br /&gt;
&lt;br /&gt;
  This function returns a pointer to a statically allocated string&lt;br /&gt;
  containing a lowercased version of the input string. Do not free&lt;br /&gt;
  or modify the returned string! Since the returned string is statically&lt;br /&gt;
  allocated, it will be modified at each function call (not re-entrant).&lt;br /&gt;
 */&lt;br /&gt;
/*--------------------------------------------------------------------------*/&lt;br /&gt;
&lt;br /&gt;
static char * strlwc(char *s)&lt;br /&gt;
{&lt;br /&gt;
    static char l[ASCIILINESZ+1];&lt;br /&gt;
    int i ;&lt;br /&gt;
&lt;br /&gt;
    if (s==NULL) return NULL ;&lt;br /&gt;
    memset(l, 0, ASCIILINESZ+1);&lt;br /&gt;
    i=0 ;&lt;br /&gt;
    while (s[i] &amp;amp;&amp;amp; i&amp;lt;ASCIILINESZ) {&lt;br /&gt;
        l[i] = (char)tolower((int)s[i]);&lt;br /&gt;
        i++ ;&lt;br /&gt;
    }&lt;br /&gt;
    l[ASCIILINESZ]=(char)0;&lt;br /&gt;
    return l ;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/*-------------------------------------------------------------------------*/&lt;br /&gt;
/**&lt;br /&gt;
  @brief    Convert a string to uppercase.&lt;br /&gt;
  @param    s   String to convert.&lt;br /&gt;
  @return   ptr to statically allocated string.&lt;br /&gt;
&lt;br /&gt;
  This function returns a pointer to a statically allocated string&lt;br /&gt;
  containing an uppercased version of the input string. Do not free&lt;br /&gt;
  or modify the returned string! Since the returned string is statically&lt;br /&gt;
  allocated, it will be modified at each function call (not re-entrant).&lt;br /&gt;
 */&lt;br /&gt;
/*--------------------------------------------------------------------------*/&lt;br /&gt;
&lt;br /&gt;
static char * strupc(char *s)&lt;br /&gt;
{&lt;br /&gt;
    static char l[ASCIILINESZ+1];&lt;br /&gt;
    int i ;&lt;br /&gt;
&lt;br /&gt;
    if (s==NULL) return NULL ;&lt;br /&gt;
    memset(l, 0, ASCIILINESZ+1);&lt;br /&gt;
    i=0 ;&lt;br /&gt;
    while (s[i] &amp;amp;&amp;amp; i&amp;lt;ASCIILINESZ) {&lt;br /&gt;
        l[i] = (char)toupper((int)s[i]);&lt;br /&gt;
        i++ ;&lt;br /&gt;
    }&lt;br /&gt;
    l[ASCIILINESZ]=(char)0;&lt;br /&gt;
    return l ;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/*-------------------------------------------------------------------------*/&lt;br /&gt;
/**&lt;br /&gt;
  @brief    Skip blanks until the first non-blank character.&lt;br /&gt;
  @param    s   String to parse.&lt;br /&gt;
  @return   Pointer to char inside given string.&lt;br /&gt;
&lt;br /&gt;
  This function returns a pointer to the first non-blank character in the&lt;br /&gt;
  given string.&lt;br /&gt;
 */&lt;br /&gt;
/*--------------------------------------------------------------------------*/&lt;br /&gt;
&lt;br /&gt;
static char * strskp(char *s)&lt;br /&gt;
{&lt;br /&gt;
    char * skip = s;&lt;br /&gt;
    if (s==NULL) return NULL ;&lt;br /&gt;
    while (isspace((int)*skip) &amp;amp;&amp;amp; *skip) skip++;&lt;br /&gt;
    return skip ;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/*-------------------------------------------------------------------------*/&lt;br /&gt;
/**&lt;br /&gt;
  @brief    Remove blanks at the end of a string.&lt;br /&gt;
  @param    s   String to parse.&lt;br /&gt;
  @return   ptr to statically allocated string.&lt;br /&gt;
&lt;br /&gt;
  This function returns a pointer to a statically allocated string,&lt;br /&gt;
  which is identical to the input string, except that all blank&lt;br /&gt;
  characters at the end of the string have been removed.&lt;br /&gt;
  Do not free or modify the returned string! Since the returned string&lt;br /&gt;
  is statically allocated, it will be modified at each function call&lt;br /&gt;
  (not re-entrant).&lt;br /&gt;
 */&lt;br /&gt;
/*--------------------------------------------------------------------------*/&lt;br /&gt;
&lt;br /&gt;
static char * strcrop(char *s)&lt;br /&gt;
{&lt;br /&gt;
    static char l[ASCIILINESZ+1];&lt;br /&gt;
    char * last ;&lt;br /&gt;
&lt;br /&gt;
    if (s==NULL) return NULL ;&lt;br /&gt;
    memset(l, 0, ASCIILINESZ+1);&lt;br /&gt;
    strcpy(l, s);&lt;br /&gt;
    last = l + strlen(l);&lt;br /&gt;
    while (last &amp;gt; l) {&lt;br /&gt;
        if (!isspace((int)*(last-1)))&lt;br /&gt;
            break ;&lt;br /&gt;
        last -- ;&lt;br /&gt;
    }&lt;br /&gt;
    *last = (char)0;&lt;br /&gt;
    return l ;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/*-------------------------------------------------------------------------*/&lt;br /&gt;
/**&lt;br /&gt;
  @brief    Remove blanks at the beginning and the end of a string.&lt;br /&gt;
  @param    s   String to parse.&lt;br /&gt;
  @return   ptr to statically allocated string.&lt;br /&gt;
&lt;br /&gt;
  This function returns a pointer to a statically allocated string,&lt;br /&gt;
  which is identical to the input string, except that all blank&lt;br /&gt;
  characters at the end and the beg. of the string have been removed.&lt;br /&gt;
  Do not free or modify the returned string! Since the returned string&lt;br /&gt;
  is statically allocated, it will be modified at each function call&lt;br /&gt;
  (not re-entrant).&lt;br /&gt;
 */&lt;br /&gt;
/*--------------------------------------------------------------------------*/&lt;br /&gt;
static char * strstrip(char *s)&lt;br /&gt;
{&lt;br /&gt;
    static char l[ASCIILINESZ+1];&lt;br /&gt;
    char * last ;&lt;br /&gt;
&lt;br /&gt;
    if (s==NULL) return NULL ;&lt;br /&gt;
&lt;br /&gt;
    while (isspace((int)*s) &amp;amp;&amp;amp; *s) s++;&lt;br /&gt;
&lt;br /&gt;
    memset(l, 0, ASCIILINESZ+1);&lt;br /&gt;
    strcpy(l, s);&lt;br /&gt;
    last = l + strlen(l);&lt;br /&gt;
    while (last &amp;gt; l) {&lt;br /&gt;
        if (!isspace((int)*(last-1)))&lt;br /&gt;
            break ;&lt;br /&gt;
        last -- ;&lt;br /&gt;
    }&lt;br /&gt;
    *last = (char)0;&lt;br /&gt;
&lt;br /&gt;
    return (char*)l ;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/* dictionary.c.c following */&lt;br /&gt;
/** Maximum value size for integers and doubles. */&lt;br /&gt;
#define MAXVALSZ    1024&lt;br /&gt;
&lt;br /&gt;
/** Minimal allocated number of entries in a dictionary */&lt;br /&gt;
#define DICTMINSZ   128&lt;br /&gt;
&lt;br /&gt;
/** Invalid key token */&lt;br /&gt;
#define [[DICT_INVALID_KEY]]    ((char*)-1)&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
 Doubles the allocated size associated to a pointer&lt;br /&gt;
 &#039;size&#039; is the current allocated size.&lt;br /&gt;
 */&lt;br /&gt;
static void * mem_double(void *ptr, int size)&lt;br /&gt;
{&lt;br /&gt;
    void *newptr;&lt;br /&gt;
&lt;br /&gt;
    newptr = calloc(2*size, 1);&lt;br /&gt;
    memcpy(newptr, ptr, size);&lt;br /&gt;
    free(ptr);&lt;br /&gt;
    return newptr ;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/*---------------------------------------------------------------------------&lt;br /&gt;
                            Function codes&lt;br /&gt;
 ---------------------------------------------------------------------------*/&lt;br /&gt;
&lt;br /&gt;
/*-------------------------------------------------------------------------*/&lt;br /&gt;
/**&lt;br /&gt;
  @brief    Compute the hash key for a string.&lt;br /&gt;
  @param    key     Character string to use for key.&lt;br /&gt;
  @return   1 unsigned int on at least 32 bits.&lt;br /&gt;
&lt;br /&gt;
  This hash function has been taken from an Article in Dr Dobbs Journal.&lt;br /&gt;
  This is normally a collision-free function, distributing keys evenly.&lt;br /&gt;
  The key is stored anyway in the struct so that collision can be avoided&lt;br /&gt;
  by comparing the key itself in last resort.&lt;br /&gt;
 */&lt;br /&gt;
/*--------------------------------------------------------------------------*/&lt;br /&gt;
&lt;br /&gt;
static unsigned dictionary_hash(char *key)&lt;br /&gt;
{&lt;br /&gt;
    int         len ;&lt;br /&gt;
    unsigned    hash ;&lt;br /&gt;
    int         i ;&lt;br /&gt;
&lt;br /&gt;
    len = strlen(key);&lt;br /&gt;
    for (hash=0, i=0 ; i&amp;lt;len ; i++) {&lt;br /&gt;
        hash += (unsigned)key[i] ;&lt;br /&gt;
        hash += (hash&amp;lt;&amp;lt;10);&lt;br /&gt;
        hash ^= (hash&amp;gt;&amp;gt;6) ;&lt;br /&gt;
    }&lt;br /&gt;
    hash += (hash &amp;lt;&amp;lt;3);&lt;br /&gt;
    hash ^= (hash &amp;gt;&amp;gt;11);&lt;br /&gt;
    hash += (hash &amp;lt;&amp;lt;15);&lt;br /&gt;
    return hash ;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/*-------------------------------------------------------------------------*/&lt;br /&gt;
/**&lt;br /&gt;
  @brief    Create a new dictionary object.&lt;br /&gt;
  @param    size    Optional initial size of the dictionary.&lt;br /&gt;
  @return   1 newly allocated dictionary objet.&lt;br /&gt;
&lt;br /&gt;
  This function allocates a new dictionary object of given size and returns&lt;br /&gt;
  it. If you do not know in advance (roughly) the number of entries in the&lt;br /&gt;
  dictionary, give size=0.&lt;br /&gt;
 */&lt;br /&gt;
/*--------------------------------------------------------------------------*/&lt;br /&gt;
&lt;br /&gt;
static dictionary * dictionary_new(int size)&lt;br /&gt;
{&lt;br /&gt;
    dictionary *d ;&lt;br /&gt;
&lt;br /&gt;
    /* If no size was specified, allocate space for DICTMINSZ */&lt;br /&gt;
    if (size&amp;lt;DICTMINSZ) size=DICTMINSZ ;&lt;br /&gt;
&lt;br /&gt;
    d = (dictionary *)calloc(1, sizeof(dictionary));&lt;br /&gt;
    d-&amp;gt;size = size ;&lt;br /&gt;
    d-&amp;gt;val  = (char **)calloc(size, sizeof(char*));&lt;br /&gt;
    d-&amp;gt;key  = (char **)calloc(size, sizeof(char*));&lt;br /&gt;
    d-&amp;gt;hash = (unsigned int *)calloc(size, sizeof(unsigned));&lt;br /&gt;
&lt;br /&gt;
    return d;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/*-------------------------------------------------------------------------*/&lt;br /&gt;
/**&lt;br /&gt;
  @brief    Delete a dictionary object&lt;br /&gt;
  @param    d   dictionary object to deallocate.&lt;br /&gt;
  @return   void&lt;br /&gt;
&lt;br /&gt;
  Deallocate a dictionary object and all memory associated to it.&lt;br /&gt;
 */&lt;br /&gt;
/*--------------------------------------------------------------------------*/&lt;br /&gt;
&lt;br /&gt;
static void dictionary_del(dictionary *d)&lt;br /&gt;
{&lt;br /&gt;
    int     i ;&lt;br /&gt;
&lt;br /&gt;
    if (d==NULL) return ;&lt;br /&gt;
    for (i=0 ; i&amp;lt;d-&amp;gt;size ; i++) {&lt;br /&gt;
        if (d-&amp;gt;key[i]!=NULL)&lt;br /&gt;
            free(d-&amp;gt;key[i]);&lt;br /&gt;
        if (d-&amp;gt;val[i]!=NULL)&lt;br /&gt;
            free(d-&amp;gt;val[i]);&lt;br /&gt;
    }&lt;br /&gt;
    free(d-&amp;gt;val);&lt;br /&gt;
    free(d-&amp;gt;key);&lt;br /&gt;
    free(d-&amp;gt;hash);&lt;br /&gt;
    free(d);&lt;br /&gt;
&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/*-------------------------------------------------------------------------*/&lt;br /&gt;
/**&lt;br /&gt;
  @brief    Get a value from a dictionary.&lt;br /&gt;
  @param    d       dictionary object to search.&lt;br /&gt;
  @param    key     Key to look for in the dictionary.&lt;br /&gt;
  @param    def     Default value to return if key not found.&lt;br /&gt;
  @return   1 pointer to internally allocated character string.&lt;br /&gt;
&lt;br /&gt;
  This function locates a key in a dictionary and returns a pointer to its&lt;br /&gt;
  value, or the passed &#039;def&#039; pointer if no such key can be found in&lt;br /&gt;
  dictionary. The returned character pointer points to data internal to the&lt;br /&gt;
  dictionary object, you should not try to free it or modify it.&lt;br /&gt;
 */&lt;br /&gt;
/*--------------------------------------------------------------------------*/&lt;br /&gt;
static char * dictionary_get(dictionary *d, char *key, char *def)&lt;br /&gt;
{&lt;br /&gt;
    unsigned    hash ;&lt;br /&gt;
    int         i ;&lt;br /&gt;
&lt;br /&gt;
    hash = dictionary_hash(key);&lt;br /&gt;
    for (i=0 ; i&amp;lt;d-&amp;gt;size ; i++) {&lt;br /&gt;
        if (d-&amp;gt;key==NULL)&lt;br /&gt;
            continue ;&lt;br /&gt;
        /* Compare hash */&lt;br /&gt;
        if (hash==d-&amp;gt;hash[i]) {&lt;br /&gt;
            /* Compare string, to avoid hash collisions */&lt;br /&gt;
            if (!strcmp(key, d-&amp;gt;key[i])) {&lt;br /&gt;
                return d-&amp;gt;val[i] ;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return def ;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/*-------------------------------------------------------------------------*/&lt;br /&gt;
/**&lt;br /&gt;
  @brief    Set a value in a dictionary.&lt;br /&gt;
  @param    d       dictionary object to modify.&lt;br /&gt;
  @param    key     Key to modify or add.&lt;br /&gt;
  @param    val     Value to add.&lt;br /&gt;
  @return   void&lt;br /&gt;
&lt;br /&gt;
  If the given key is found in the dictionary, the associated value is&lt;br /&gt;
  replaced by the provided one. If the key cannot be found in the&lt;br /&gt;
  dictionary, it is added to it.&lt;br /&gt;
&lt;br /&gt;
  It is Ok to provide a NULL value for val, but NULL values for the dictionary&lt;br /&gt;
  or the key are considered as errors: the function will return immediately&lt;br /&gt;
  in such a case.&lt;br /&gt;
&lt;br /&gt;
  Notice that if you dictionary_set a variable to NULL, a call to&lt;br /&gt;
  dictionary_get will return a NULL value: the variable will be found, and&lt;br /&gt;
  its value (NULL) is returned. In other words, setting the variable&lt;br /&gt;
  content to NULL is equivalent to deleting the variable from the&lt;br /&gt;
  dictionary. It is not possible (in this implementation) to have a key in&lt;br /&gt;
  the dictionary without value.&lt;br /&gt;
 */&lt;br /&gt;
/*--------------------------------------------------------------------------*/&lt;br /&gt;
&lt;br /&gt;
static void dictionary_set(dictionary *d, char *key, char *val)&lt;br /&gt;
{&lt;br /&gt;
    int         i ;&lt;br /&gt;
    unsigned    hash ;&lt;br /&gt;
&lt;br /&gt;
    if (d==NULL || key==NULL) return ;&lt;br /&gt;
&lt;br /&gt;
    /* Compute hash for this key */&lt;br /&gt;
    hash = dictionary_hash(key) ;&lt;br /&gt;
    /* Find if value is already in blackboard */&lt;br /&gt;
    if (d-&amp;gt;n&amp;gt;0) {&lt;br /&gt;
        for (i=0 ; i&amp;lt;d-&amp;gt;size ; i++) {&lt;br /&gt;
            if (d-&amp;gt;key[i]==NULL)&lt;br /&gt;
                continue ;&lt;br /&gt;
            if (hash==d-&amp;gt;hash[i]) { /* Same hash value */&lt;br /&gt;
                if (!strcmp(key, d-&amp;gt;key[i])) {   /* Same key */&lt;br /&gt;
                    /* Found a value: modify and return */&lt;br /&gt;
                    if (d-&amp;gt;val[i]!=NULL)&lt;br /&gt;
                        free(d-&amp;gt;val[i]);&lt;br /&gt;
                    d-&amp;gt;val[i] = val ? strdup(val) : NULL ;&lt;br /&gt;
                    /* Value has been modified: return */&lt;br /&gt;
                    return ;&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    /* Add a new value */&lt;br /&gt;
    /* See if dictionary needs to grow */&lt;br /&gt;
    if (d-&amp;gt;n==d-&amp;gt;size) {&lt;br /&gt;
&lt;br /&gt;
        /* Reached maximum size: reallocate blackboard */&lt;br /&gt;
        d-&amp;gt;val  = (char **)mem_double(d-&amp;gt;val,  d-&amp;gt;size * sizeof(char*)) ;&lt;br /&gt;
        d-&amp;gt;key  = (char **)mem_double(d-&amp;gt;key,  d-&amp;gt;size * sizeof(char*)) ;&lt;br /&gt;
        d-&amp;gt;hash = (unsigned int *)mem_double(d-&amp;gt;hash, d-&amp;gt;size * sizeof(unsigned)) ;&lt;br /&gt;
&lt;br /&gt;
        /* Double size */&lt;br /&gt;
        d-&amp;gt;size *= 2 ;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /* Insert key in the first empty slot */&lt;br /&gt;
    for (i=0 ; i&amp;lt;d-&amp;gt;size ; i++) {&lt;br /&gt;
        if (d-&amp;gt;key[i]==NULL) {&lt;br /&gt;
            /* Add key here */&lt;br /&gt;
            break ;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    /* Copy key */&lt;br /&gt;
    d-&amp;gt;key[i]  = strdup(key);&lt;br /&gt;
    d-&amp;gt;val[i]  = val ? strdup(val) : NULL ;&lt;br /&gt;
    d-&amp;gt;hash[i] = hash;&lt;br /&gt;
    d-&amp;gt;n ++ ;&lt;br /&gt;
    return ;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/*-------------------------------------------------------------------------*/&lt;br /&gt;
/**&lt;br /&gt;
  @brief    Delete a key in a dictionary&lt;br /&gt;
  @param    d       dictionary object to modify.&lt;br /&gt;
  @param    key     Key to remove.&lt;br /&gt;
  @return   void&lt;br /&gt;
&lt;br /&gt;
  This function deletes a key in a dictionary. Nothing is done if the&lt;br /&gt;
  key cannot be found.&lt;br /&gt;
 */&lt;br /&gt;
/*--------------------------------------------------------------------------*/&lt;br /&gt;
static void dictionary_unset(dictionary *d, char *key)&lt;br /&gt;
{&lt;br /&gt;
    unsigned    hash ;&lt;br /&gt;
    int         i ;&lt;br /&gt;
&lt;br /&gt;
    hash = dictionary_hash(key);&lt;br /&gt;
    for (i=0 ; i&amp;lt;d-&amp;gt;size ; i++) {&lt;br /&gt;
        if (d-&amp;gt;key[i]==NULL)&lt;br /&gt;
            continue ;&lt;br /&gt;
        /* Compare hash */&lt;br /&gt;
        if (hash==d-&amp;gt;hash[i]) {&lt;br /&gt;
            /* Compare string, to avoid hash collisions */&lt;br /&gt;
            if (!strcmp(key, d-&amp;gt;key[i])) {&lt;br /&gt;
                /* Found key */&lt;br /&gt;
                break ;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    if (i&amp;gt;=d-&amp;gt;size)&lt;br /&gt;
        /* Key not found */&lt;br /&gt;
        return ;&lt;br /&gt;
&lt;br /&gt;
    free(d-&amp;gt;key[i]);&lt;br /&gt;
    d-&amp;gt;key[i] = NULL ;&lt;br /&gt;
    if (d-&amp;gt;val[i]!=NULL) {&lt;br /&gt;
        free(d-&amp;gt;val[i]);&lt;br /&gt;
        d-&amp;gt;val[i] = NULL ;&lt;br /&gt;
    }&lt;br /&gt;
    d-&amp;gt;hash[i] = 0 ;&lt;br /&gt;
    d-&amp;gt;n -- ;&lt;br /&gt;
    return ;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/*-------------------------------------------------------------------------*/&lt;br /&gt;
/**&lt;br /&gt;
  @brief    Dump a dictionary to an opened file pointer.&lt;br /&gt;
  @param    d   Dictionary to dump&lt;br /&gt;
  @param    f   Opened file pointer.&lt;br /&gt;
  @return   void&lt;br /&gt;
&lt;br /&gt;
  Dumps a dictionary onto an opened file pointer. Key pairs are printed out&lt;br /&gt;
  as @c [Key]=[Value], one per line. It is Ok to provide stdout or stderr as&lt;br /&gt;
  output file pointers.&lt;br /&gt;
 */&lt;br /&gt;
/*--------------------------------------------------------------------------*/&lt;br /&gt;
&lt;br /&gt;
static void dictionary_dump(dictionary *d, FILE *f)&lt;br /&gt;
{&lt;br /&gt;
    int i;&lt;br /&gt;
&lt;br /&gt;
    if (d==NULL || f==NULL) return;&lt;br /&gt;
&lt;br /&gt;
    for (i=0; i&amp;lt;d-&amp;gt;size; i++) {&lt;br /&gt;
        if (d-&amp;gt;key[i] == NULL)&lt;br /&gt;
            continue ;&lt;br /&gt;
        if (d-&amp;gt;val[i] != NULL) {&lt;br /&gt;
            fprintf(f, &amp;quot;[%s]=[%s]\n&amp;quot;, d-&amp;gt;key[i], d-&amp;gt;val[i]);&lt;br /&gt;
        } else {&lt;br /&gt;
            fprintf(f, &amp;quot;[%s]=UNDEF\n&amp;quot;, d-&amp;gt;key[i]);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/* iniparser.c.c following */&lt;br /&gt;
#define ASCIILINESZ         1024&lt;br /&gt;
#define [[INI_INVALID_KEY]]     ((char*)-1)&lt;br /&gt;
&lt;br /&gt;
/* Private: add an entry to the dictionary */&lt;br /&gt;
static void iniparser_add_entry(&lt;br /&gt;
    dictionary *d,&lt;br /&gt;
    char *sec,&lt;br /&gt;
    char *key,&lt;br /&gt;
    char *val)&lt;br /&gt;
{&lt;br /&gt;
    char longkey[2*ASCIILINESZ+1];&lt;br /&gt;
&lt;br /&gt;
    /* Make a key as section:keyword */&lt;br /&gt;
    if (key!=NULL) {&lt;br /&gt;
        sprintf(longkey, &amp;quot;%s:%s&amp;quot;, sec, key);&lt;br /&gt;
    } else {&lt;br /&gt;
        strcpy(longkey, sec);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /* Add (key,val) to dictionary */&lt;br /&gt;
    dictionary_set(d, longkey, val);&lt;br /&gt;
    return ;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/*-------------------------------------------------------------------------*/&lt;br /&gt;
/**&lt;br /&gt;
  @brief    Get number of sections in a dictionary&lt;br /&gt;
  @param    d   Dictionary to examine&lt;br /&gt;
  @return   int Number of sections found in dictionary&lt;br /&gt;
&lt;br /&gt;
  This function returns the number of sections found in a dictionary.&lt;br /&gt;
  The test to recognize sections is done on the string stored in the&lt;br /&gt;
  dictionary: a section name is given as &amp;quot;section&amp;quot; whereas a key is&lt;br /&gt;
  stored as &amp;quot;section:key&amp;quot;, thus the test looks for entries that do not&lt;br /&gt;
  contain a colon.&lt;br /&gt;
&lt;br /&gt;
  This clearly fails in the case a section name contains a colon, but&lt;br /&gt;
  this should simply be avoided.&lt;br /&gt;
&lt;br /&gt;
  This function returns -1 in case of error.&lt;br /&gt;
 */&lt;br /&gt;
/*--------------------------------------------------------------------------*/&lt;br /&gt;
&lt;br /&gt;
int iniparser_getnsec(dictionary *d)&lt;br /&gt;
{&lt;br /&gt;
    int i ;&lt;br /&gt;
    int nsec ;&lt;br /&gt;
&lt;br /&gt;
    if (d==NULL) return -1 ;&lt;br /&gt;
    nsec=0 ;&lt;br /&gt;
    for (i=0 ; i&amp;lt;d-&amp;gt;size ; i++) {&lt;br /&gt;
        if (d-&amp;gt;key[i]==NULL)&lt;br /&gt;
            continue ;&lt;br /&gt;
        if (strchr(d-&amp;gt;key[i], &#039;:&#039;)==NULL) {&lt;br /&gt;
            nsec ++ ;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return nsec ;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/*-------------------------------------------------------------------------*/&lt;br /&gt;
/**&lt;br /&gt;
  @brief    Get name for section n in a dictionary.&lt;br /&gt;
  @param    d   Dictionary to examine&lt;br /&gt;
  @param    n   Section number (from 0 to nsec-1).&lt;br /&gt;
  @return   Pointer to char string&lt;br /&gt;
&lt;br /&gt;
  This function locates the n-th section in a dictionary and returns&lt;br /&gt;
  its name as a pointer to a string statically allocated inside the&lt;br /&gt;
  dictionary. Do not free or modify the returned string!&lt;br /&gt;
&lt;br /&gt;
  This function returns NULL in case of error.&lt;br /&gt;
 */&lt;br /&gt;
/*--------------------------------------------------------------------------*/&lt;br /&gt;
&lt;br /&gt;
char * iniparser_getsecname(dictionary *d, int n)&lt;br /&gt;
{&lt;br /&gt;
    int i ;&lt;br /&gt;
    int foundsec ;&lt;br /&gt;
&lt;br /&gt;
    if (d==NULL || n&amp;lt;0) return NULL ;&lt;br /&gt;
    foundsec=0 ;&lt;br /&gt;
    for (i=0 ; i&amp;lt;d-&amp;gt;size ; i++) {&lt;br /&gt;
        if (d-&amp;gt;key[i]==NULL)&lt;br /&gt;
            continue ;&lt;br /&gt;
        if (strchr(d-&amp;gt;key[i], &#039;:&#039;)==NULL) {&lt;br /&gt;
            foundsec++ ;&lt;br /&gt;
            if (foundsec&amp;gt;n)&lt;br /&gt;
                break ;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    if (foundsec&amp;lt;=n) {&lt;br /&gt;
        return NULL ;&lt;br /&gt;
    }&lt;br /&gt;
    return d-&amp;gt;key[i] ;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/*-------------------------------------------------------------------------*/&lt;br /&gt;
/**&lt;br /&gt;
  @brief    Dump a dictionary to an opened file pointer.&lt;br /&gt;
  @param    d   Dictionary to dump.&lt;br /&gt;
  @param    f   Opened file pointer to dump to.&lt;br /&gt;
  @return   void&lt;br /&gt;
&lt;br /&gt;
  This function prints out the contents of a dictionary, one element by&lt;br /&gt;
  line, onto the provided file pointer. It is OK to specify @c stderr&lt;br /&gt;
  or @c stdout as output files. This function is meant for debugging&lt;br /&gt;
  purposes mostly.&lt;br /&gt;
 */&lt;br /&gt;
/*--------------------------------------------------------------------------*/&lt;br /&gt;
void iniparser_dump(dictionary *d, FILE *f)&lt;br /&gt;
{&lt;br /&gt;
    dictionary_dump(d,f);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/*-------------------------------------------------------------------------*/&lt;br /&gt;
/**&lt;br /&gt;
  @brief    Save a dictionary to a loadable ini file&lt;br /&gt;
  @param    d   Dictionary to dump&lt;br /&gt;
  @param    f   Opened file pointer to dump to&lt;br /&gt;
  @return   void&lt;br /&gt;
&lt;br /&gt;
  This function dumps a given dictionary into a loadable ini file.&lt;br /&gt;
  It is Ok to specify @c stderr or @c stdout as output files.&lt;br /&gt;
 */&lt;br /&gt;
/*--------------------------------------------------------------------------*/&lt;br /&gt;
&lt;br /&gt;
void iniparser_dump_ini(dictionary *d, FILE *f)&lt;br /&gt;
{&lt;br /&gt;
    int     i, j ;&lt;br /&gt;
    char    keym[ASCIILINESZ+1];&lt;br /&gt;
    int     nsec ;&lt;br /&gt;
    char *  secname ;&lt;br /&gt;
    int     seclen ;&lt;br /&gt;
&lt;br /&gt;
    if (d==NULL || f==NULL) return ;&lt;br /&gt;
&lt;br /&gt;
    nsec = iniparser_getnsec(d);&lt;br /&gt;
    if (nsec&amp;lt;1) {&lt;br /&gt;
        /* No section in file: dump all keys as they are */&lt;br /&gt;
        for (i=0 ; i&amp;lt;d-&amp;gt;size ; i++) {&lt;br /&gt;
            if (d-&amp;gt;key[i]==NULL)&lt;br /&gt;
                continue ;&lt;br /&gt;
            fprintf(f, &amp;quot;%s = %s\n&amp;quot;, d-&amp;gt;key[i], d-&amp;gt;val[i]);&lt;br /&gt;
        }&lt;br /&gt;
        return ;&lt;br /&gt;
    }&lt;br /&gt;
    for (i=0 ; i&amp;lt;nsec ; i++) {&lt;br /&gt;
        secname = iniparser_getsecname(d, i) ;&lt;br /&gt;
        seclen  = (int)strlen(secname);&lt;br /&gt;
        fprintf(f, &amp;quot;\n[%s]\n&amp;quot;, secname);&lt;br /&gt;
        sprintf(keym, &amp;quot;%s:&amp;quot;, secname);&lt;br /&gt;
        for (j=0 ; j&amp;lt;d-&amp;gt;size ; j++) {&lt;br /&gt;
            if (d-&amp;gt;key[j]==NULL)&lt;br /&gt;
                continue ;&lt;br /&gt;
            if (!strncmp(d-&amp;gt;key[j], keym, seclen+1)) {&lt;br /&gt;
                fprintf(f,&lt;br /&gt;
                        &amp;quot;%-30s = %s\n&amp;quot;,&lt;br /&gt;
                        d-&amp;gt;key[j]+seclen+1,&lt;br /&gt;
                        d-&amp;gt;val[j] ? d-&amp;gt;val[j] : &amp;quot;&amp;quot;);&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    fprintf(f, &amp;quot;\n&amp;quot;);&lt;br /&gt;
    return ;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/*-------------------------------------------------------------------------*/&lt;br /&gt;
/**&lt;br /&gt;
  @brief    Get the string associated to a key, return NULL if not found&lt;br /&gt;
  @param    d   Dictionary to search&lt;br /&gt;
  @param    key Key string to look for&lt;br /&gt;
  @return   pointer to statically allocated character string, or NULL.&lt;br /&gt;
&lt;br /&gt;
  This function queries a dictionary for a key. A key as read from an&lt;br /&gt;
  ini file is given as &amp;quot;section:key&amp;quot;. If the key cannot be found,&lt;br /&gt;
  NULL is returned.&lt;br /&gt;
  The returned char pointer is pointing to a string allocated in&lt;br /&gt;
  the dictionary, do not free or modify it.&lt;br /&gt;
&lt;br /&gt;
  This function is only provided for backwards compatibility with&lt;br /&gt;
  previous versions of iniparser. It is recommended to use&lt;br /&gt;
  iniparser_getstring() instead.&lt;br /&gt;
 */&lt;br /&gt;
/*--------------------------------------------------------------------------*/&lt;br /&gt;
char * iniparser_getstr(dictionary *d, char *key)&lt;br /&gt;
{&lt;br /&gt;
    return iniparser_getstring(d, key, NULL);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/*-------------------------------------------------------------------------*/&lt;br /&gt;
/**&lt;br /&gt;
  @brief    Get the string associated to a key&lt;br /&gt;
  @param    d       Dictionary to search&lt;br /&gt;
  @param    key     Key string to look for&lt;br /&gt;
  @param    def     Default value to return if key not found.&lt;br /&gt;
  @return   pointer to statically allocated character string&lt;br /&gt;
&lt;br /&gt;
  This function queries a dictionary for a key. A key as read from an&lt;br /&gt;
  ini file is given as &amp;quot;section:key&amp;quot;. If the key cannot be found,&lt;br /&gt;
  the pointer passed as &#039;def&#039; is returned.&lt;br /&gt;
  The returned char pointer is pointing to a string allocated in&lt;br /&gt;
  the dictionary, do not free or modify it.&lt;br /&gt;
 */&lt;br /&gt;
/*--------------------------------------------------------------------------*/&lt;br /&gt;
char * iniparser_getstring(dictionary *d, char *key, char *def)&lt;br /&gt;
{&lt;br /&gt;
    char * lc_key ;&lt;br /&gt;
    char * sval ;&lt;br /&gt;
&lt;br /&gt;
    if (d==NULL || key==NULL)&lt;br /&gt;
        return def ;&lt;br /&gt;
&lt;br /&gt;
    lc_key = strdup(strlwc(key));&lt;br /&gt;
    sval = dictionary_get(d, lc_key, def);&lt;br /&gt;
    free(lc_key);&lt;br /&gt;
    return sval ;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/*-------------------------------------------------------------------------*/&lt;br /&gt;
/**&lt;br /&gt;
  @brief    Get the string associated to a key, convert to an int&lt;br /&gt;
  @param    d Dictionary to search&lt;br /&gt;
  @param    key Key string to look for&lt;br /&gt;
  @param    notfound Value to return in case of error&lt;br /&gt;
  @return   integer&lt;br /&gt;
&lt;br /&gt;
  This function queries a dictionary for a key. A key as read from an&lt;br /&gt;
  ini file is given as &amp;quot;section:key&amp;quot;. If the key cannot be found,&lt;br /&gt;
  the notfound value is returned.&lt;br /&gt;
 */&lt;br /&gt;
/*--------------------------------------------------------------------------*/&lt;br /&gt;
int iniparser_getint(dictionary *d, char *key, int notfound)&lt;br /&gt;
{&lt;br /&gt;
    char *str ;&lt;br /&gt;
&lt;br /&gt;
    str = iniparser_getstring(d, key, [[INI_INVALID_KEY]]);&lt;br /&gt;
    if (str==[[INI_INVALID_KEY]]) return notfound ;&lt;br /&gt;
    return atoi(str);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/*-------------------------------------------------------------------------*/&lt;br /&gt;
/**&lt;br /&gt;
  @brief    Get the string associated to a key, convert to a double&lt;br /&gt;
  @param    d Dictionary to search&lt;br /&gt;
  @param    key Key string to look for&lt;br /&gt;
  @param    notfound Value to return in case of error&lt;br /&gt;
  @return   double&lt;br /&gt;
&lt;br /&gt;
  This function queries a dictionary for a key. A key as read from an&lt;br /&gt;
  ini file is given as &amp;quot;section:key&amp;quot;. If the key cannot be found,&lt;br /&gt;
  the notfound value is returned.&lt;br /&gt;
 */&lt;br /&gt;
/*--------------------------------------------------------------------------*/&lt;br /&gt;
double iniparser_getdouble(dictionary *d, char *key, double notfound)&lt;br /&gt;
{&lt;br /&gt;
    char * str ;&lt;br /&gt;
&lt;br /&gt;
    str = iniparser_getstring(d, key, [[INI_INVALID_KEY]]);&lt;br /&gt;
    if (str==[[INI_INVALID_KEY]]) return notfound ;&lt;br /&gt;
    return atof(str);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/*-------------------------------------------------------------------------*/&lt;br /&gt;
/**&lt;br /&gt;
  @brief    Get the string associated to a key, convert to a boolean&lt;br /&gt;
  @param    d Dictionary to search&lt;br /&gt;
  @param    key Key string to look for&lt;br /&gt;
  @param    notfound Value to return in case of error&lt;br /&gt;
  @return   integer&lt;br /&gt;
&lt;br /&gt;
  This function queries a dictionary for a key. A key as read from an&lt;br /&gt;
  ini file is given as &amp;quot;section:key&amp;quot;. If the key cannot be found,&lt;br /&gt;
  the notfound value is returned.&lt;br /&gt;
&lt;br /&gt;
  A true boolean is found if one of the following is matched:&lt;br /&gt;
&lt;br /&gt;
  - A string starting with &#039;y&#039;&lt;br /&gt;
  - A string starting with &#039;Y&#039;&lt;br /&gt;
  - A string starting with &#039;t&#039;&lt;br /&gt;
  - A string starting with &#039;T&#039;&lt;br /&gt;
  - A string starting with &#039;1&#039;&lt;br /&gt;
&lt;br /&gt;
  A false boolean is found if one of the following is matched:&lt;br /&gt;
&lt;br /&gt;
  - A string starting with &#039;n&#039;&lt;br /&gt;
  - A string starting with &#039;N&#039;&lt;br /&gt;
  - A string starting with &#039;f&#039;&lt;br /&gt;
  - A string starting with &#039;F&#039;&lt;br /&gt;
  - A string starting with &#039;0&#039;&lt;br /&gt;
&lt;br /&gt;
  The notfound value returned if no boolean is identified, does not&lt;br /&gt;
  necessarily have to be 0 or 1.&lt;br /&gt;
 */&lt;br /&gt;
/*--------------------------------------------------------------------------*/&lt;br /&gt;
int iniparser_getboolean(dictionary *d, char *key, int notfound)&lt;br /&gt;
{&lt;br /&gt;
    char *c ;&lt;br /&gt;
    int ret ;&lt;br /&gt;
&lt;br /&gt;
    c = iniparser_getstring(d, key, [[INI_INVALID_KEY]]);&lt;br /&gt;
    if (c==[[INI_INVALID_KEY]]) return notfound ;&lt;br /&gt;
    if (c[0]==&#039;y&#039; || c[0]==&#039;Y&#039; || c[0]==&#039;1&#039; || c[0]==&#039;t&#039; || c[0]==&#039;T&#039;) {&lt;br /&gt;
        ret = 1 ;&lt;br /&gt;
    } else if (c[0]==&#039;n&#039; || c[0]==&#039;N&#039; || c[0]==&#039;0&#039; || c[0]==&#039;f&#039; || c[0]==&#039;F&#039;) {&lt;br /&gt;
        ret = 0 ;&lt;br /&gt;
    } else {&lt;br /&gt;
        ret = notfound ;&lt;br /&gt;
    }&lt;br /&gt;
    return ret;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/*-------------------------------------------------------------------------*/&lt;br /&gt;
/**&lt;br /&gt;
  @brief    Finds out if a given entry exists in a dictionary&lt;br /&gt;
  @param    ini     Dictionary to search&lt;br /&gt;
  @param    entry   Name of the entry to look for&lt;br /&gt;
  @return   integer 1 if entry exists, 0 otherwise&lt;br /&gt;
&lt;br /&gt;
  Finds out if a given entry exists in the dictionary. Since sections&lt;br /&gt;
  are stored as keys with NULL associated values, this is the only way&lt;br /&gt;
  of querying for the presence of sections in a dictionary.&lt;br /&gt;
 */&lt;br /&gt;
/*--------------------------------------------------------------------------*/&lt;br /&gt;
&lt;br /&gt;
int iniparser_find_entry(&lt;br /&gt;
    dictionary  *ini,&lt;br /&gt;
    char        *entry&lt;br /&gt;
)&lt;br /&gt;
{&lt;br /&gt;
    int found=0 ;&lt;br /&gt;
    if (iniparser_getstring(ini, entry, [[INI_INVALID_KEY]])!=[[INI_INVALID_KEY]]) {&lt;br /&gt;
        found = 1 ;&lt;br /&gt;
    }&lt;br /&gt;
    return found ;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/*-------------------------------------------------------------------------*/&lt;br /&gt;
/**&lt;br /&gt;
  @brief    Set an entry in a dictionary.&lt;br /&gt;
  @param    ini     Dictionary to modify.&lt;br /&gt;
  @param    entry   Entry to modify (entry name)&lt;br /&gt;
  @param    val     New value to associate to the entry.&lt;br /&gt;
  @return   int 0 if Ok, -1 otherwise.&lt;br /&gt;
&lt;br /&gt;
  If the given entry can be found in the dictionary, it is modified to&lt;br /&gt;
  contain the provided value. If it cannot be found, -1 is returned.&lt;br /&gt;
  It is Ok to set val to NULL.&lt;br /&gt;
 */&lt;br /&gt;
/*--------------------------------------------------------------------------*/&lt;br /&gt;
&lt;br /&gt;
int iniparser_setstr(dictionary *ini, char *entry, char *val)&lt;br /&gt;
{&lt;br /&gt;
    dictionary_set(ini, strlwc(entry), val);&lt;br /&gt;
    return 0 ;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/*-------------------------------------------------------------------------*/&lt;br /&gt;
/**&lt;br /&gt;
  @brief    Delete an entry in a dictionary&lt;br /&gt;
  @param    ini     Dictionary to modify&lt;br /&gt;
  @param    entry   Entry to delete (entry name)&lt;br /&gt;
  @return   void&lt;br /&gt;
&lt;br /&gt;
  If the given entry can be found, it is deleted from the dictionary.&lt;br /&gt;
 */&lt;br /&gt;
/*--------------------------------------------------------------------------*/&lt;br /&gt;
void iniparser_unset(dictionary *ini, char *entry)&lt;br /&gt;
{&lt;br /&gt;
    dictionary_unset(ini, strlwc(entry));&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/*-------------------------------------------------------------------------*/&lt;br /&gt;
/**&lt;br /&gt;
  @brief    Parse an ini file and return an allocated dictionary object&lt;br /&gt;
  @param    ininame Name of the ini file to read.&lt;br /&gt;
  @return   Pointer to newly allocated dictionary&lt;br /&gt;
&lt;br /&gt;
  This is the parser for ini files. This function is called, providing&lt;br /&gt;
  the name of the file to be read. It returns a dictionary object that&lt;br /&gt;
  should not be accessed directly, but through accessor functions&lt;br /&gt;
  instead.&lt;br /&gt;
&lt;br /&gt;
  The returned dictionary must be freed using iniparser_free().&lt;br /&gt;
 */&lt;br /&gt;
/*--------------------------------------------------------------------------*/&lt;br /&gt;
&lt;br /&gt;
dictionary * iniparser_new(char *ininame)&lt;br /&gt;
{&lt;br /&gt;
    dictionary *d ;&lt;br /&gt;
    char lin[ASCIILINESZ+1];&lt;br /&gt;
    char sec[ASCIILINESZ+1];&lt;br /&gt;
    char key[ASCIILINESZ+1];&lt;br /&gt;
    char val[ASCIILINESZ+1];&lt;br /&gt;
    char *where ;&lt;br /&gt;
    FILE *ini ;&lt;br /&gt;
    int lineno ;&lt;br /&gt;
&lt;br /&gt;
    if ((ini=fopen(ininame, &amp;quot;r&amp;quot;))==NULL) {&lt;br /&gt;
        return NULL ;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    sec[0]=0;&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * Initialize a new dictionary entry&lt;br /&gt;
     */&lt;br /&gt;
    d = dictionary_new(0);&lt;br /&gt;
    lineno = 0 ;&lt;br /&gt;
    while (fgets(lin, ASCIILINESZ, ini)!=NULL) {&lt;br /&gt;
        lineno++ ;&lt;br /&gt;
        where = strskp(lin); /* Skip leading spaces */&lt;br /&gt;
        if (*where==&#039;;&#039; || *where==&#039;#&#039; || *where==0)&lt;br /&gt;
            continue ; /* Comment lines */&lt;br /&gt;
        else {&lt;br /&gt;
            if (sscanf(where, &amp;quot;[%[^]]&amp;quot;, sec)==1) {&lt;br /&gt;
                /* Valid section name */&lt;br /&gt;
                strcpy(sec, strlwc(sec));&lt;br /&gt;
                iniparser_add_entry(d, sec, NULL, NULL);&lt;br /&gt;
            } else if (sscanf (where, &amp;quot;%[^=] = \&amp;quot;%[^\&amp;quot;]\&amp;quot;&amp;quot;, key, val) == 2&lt;br /&gt;
                   ||  sscanf (where, &amp;quot;%[^=] = &#039;%[^\&#039;]&#039;&amp;quot;,   key, val) == 2&lt;br /&gt;
                   ||  sscanf (where, &amp;quot;%[^=] = %[^;#]&amp;quot;,     key, val) == 2) {&lt;br /&gt;
                strcpy(key, strlwc(strcrop(key)));&lt;br /&gt;
                /*&lt;br /&gt;
                 * sscanf cannot handle &amp;quot;&amp;quot; or &#039;&#039; as empty value,&lt;br /&gt;
                 * this is done here&lt;br /&gt;
                 */&lt;br /&gt;
                if (!strcmp(val, &amp;quot;\&amp;quot;\&amp;quot;&amp;quot;) || !strcmp(val, &amp;quot;&#039;&#039;&amp;quot;)) {&lt;br /&gt;
                    val[0] = (char)0;&lt;br /&gt;
                } else {&lt;br /&gt;
                    strcpy(val, strcrop(val));&lt;br /&gt;
                }&lt;br /&gt;
                iniparser_add_entry(d, sec, key, val);&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    fclose(ini);&lt;br /&gt;
    return d ;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/*-------------------------------------------------------------------------*/&lt;br /&gt;
/**&lt;br /&gt;
  @brief    Free all memory associated to an ini dictionary&lt;br /&gt;
  @param    d Dictionary to free&lt;br /&gt;
  @return   void&lt;br /&gt;
&lt;br /&gt;
  Free all memory associated to an ini dictionary.&lt;br /&gt;
  It is mandatory to call this function before the dictionary object&lt;br /&gt;
  gets out of the current context.&lt;br /&gt;
 */&lt;br /&gt;
/*--------------------------------------------------------------------------*/&lt;br /&gt;
&lt;br /&gt;
void iniparser_free(dictionary *d)&lt;br /&gt;
{&lt;br /&gt;
    dictionary_del(d);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#ifdef __cplusplus&lt;br /&gt;
}&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== LGPL License ==&lt;br /&gt;
&lt;br /&gt;
http://www.gnu.org/licenses/lgpl.html&lt;br /&gt;
&lt;br /&gt;
== Revisions ==&lt;br /&gt;
&lt;br /&gt;
* 2006-10-05: Initial version 1.0.0.&lt;br /&gt;
* 2007-03-13: Version 1.0.1 fixes an installer issue where wininetd would not be installed as a service when the install path did not default to &amp;quot;c:\windows&amp;quot; for the user.  Wininetd can still be installed manually by typing &amp;lt;tt&amp;gt;wininetd --install&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* 2007-04-14: http://www.autopower.com/rgozar/u2pipe-1.0.1-setup.exe was hanging when clicked.  Now fixed.&lt;br /&gt;
* 2007-08-27: Version 1.0.3 now ported for unix (AIX and &amp;lt;nowiki&amp;gt;RedHat&amp;lt;/nowiki&amp;gt; Linux binaries hyperlinked above).&lt;br /&gt;
* 2009-04-17: Revised linux installation notes.&lt;/div&gt;</summary>
		<author><name>Rkgozar</name></author>
	</entry>
	<entry>
		<id>https://pickwiki.org/index.php?title=User_talk:Rkgozar&amp;diff=2547</id>
		<title>User talk:Rkgozar</title>
		<link rel="alternate" type="text/html" href="https://pickwiki.org/index.php?title=User_talk:Rkgozar&amp;diff=2547"/>
		<updated>2015-04-22T17:58:26Z</updated>

		<summary type="html">&lt;p&gt;Rkgozar: group dynamics, anyone?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Group Dynamics ==&lt;br /&gt;
Today I look at PickWiki&#039;s recent changes and all I see are a bunch of bot sign-ups; I can&#039;t see what&#039;s changed or newly contributed. A few weeks ago when the site first came up I thought I would try to make a small change to my own page (or as it was pointed out I don&#039;t really have my own page, just one that happens to have the same name as me) and weeks afterward the moderator still hadn&#039;t allowed the change. Only after making a side comment in the email list did my change get approved. As far as I can tell I&#039;m the only contributor so far that&#039;s been willing to overlook the annoyances and attempt to make changes.&lt;br /&gt;
&lt;br /&gt;
Group dynamics are vital to the survival of a community website. The smallest things can help a group to grow, or instantly kill it. I&#039;m concerned that implementation decisions are being made that are actually hurting growth. What&#039;s being done to PickWiki with the specific intention of creating growth?&lt;br /&gt;
&lt;br /&gt;
I&#039;m not talking about software changes; MediaWiki is great software with millions of users. I&#039;m talking about what&#039;s being done that will get that Pick professional with 30 years experience to &#039;&#039;want&#039;&#039; to contribute? And not drive him away? [[User:Rkgozar|Rkgozar]] ([[User talk:Rkgozar|talk]]) 10:58, 22 April 2015 (PDT)&lt;/div&gt;</summary>
		<author><name>Rkgozar</name></author>
	</entry>
	<entry>
		<id>https://pickwiki.org/index.php?title=User:Rkgozar&amp;diff=2543</id>
		<title>User:Rkgozar</title>
		<link rel="alternate" type="text/html" href="https://pickwiki.org/index.php?title=User:Rkgozar&amp;diff=2543"/>
		<updated>2015-04-13T12:54:28Z</updated>

		<summary type="html">&lt;p&gt;Rkgozar: Created page with &amp;quot;Rex Gozar  &amp;quot;For every complex problem, there is a solution that is simple, neat, and wrong.&amp;quot; &amp;lt;i&amp;gt;H.L. Mencken&amp;lt;/i&amp;gt;  Contact me at [mailto:rgozar@gmail.com rgozar@gmail.com].  *...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Rex Gozar&lt;br /&gt;
&lt;br /&gt;
&amp;quot;For every complex problem, there is a solution that is simple, neat, and wrong.&amp;quot; &amp;lt;i&amp;gt;H.L. Mencken&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Contact me at [mailto:rgozar@gmail.com rgozar@gmail.com].&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;b&amp;gt;[[QuickSort]]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;Universe BASIC implementation of the quick sort algorithm.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;[[Row2Col]]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;Transpose a variable&#039;s &amp;quot;rows&amp;quot; (fields) into &amp;quot;columns&amp;quot; (values), and back again.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;[[u2pipe]]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;Connect a web server to a Universe or Unidata database via u2pipe and wininetd.  Ported to windows and unix.  AIX, &amp;lt;nowiki&amp;gt;RedHat Linux&amp;lt;/nowiki&amp;gt; and Windows binaries available.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;[[How-To Improve Large String Performance Using Buffers]]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;Processes that create or manipulate large amounts of data (over 1MB) may be slow, impacting user response time and system performance. This performance degradation can be traced to Universe needing to reallocate and copy memory repeatedly as the amount of data grows. If you can allocate all the memory that you&#039;ll need up front, you can eliminate this bottleneck. This document discusses a coding strategy for doing this.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;[[CodingStandards|Coding Standards]]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;Coding standards are basic rules to help us catch bugs and improve the quality of the programs we produce. They help us in all phases of development by giving us stable and time-tested coding structures that work.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;[[Project Cleansweep]]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;I firmly believe that shoddy programming practices have hurt the credibility of Pick applications.  I discuss active steps to conform your legacy application to modern coding standards.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;[[Getting Personal with PickWiki]]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;I&#039;m on a campaign to get every Pick developer to use [[PickWiki]].  Why? Because I know that there&#039;s a wealth of technical knowledge out there that would benefit the entire Pick community.  But it&#039;s stupid for me to think that you brilliant technical innovators would contribute your precious time and effort purely for the betterment of mankind, nor for the sake of promoting the database we all know and love. Then I had a new thought...&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;[[CSV2FIELDS]]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;Convert a single CSV string into a field-delimited dynamic array.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;[[Rex Gozar/Notes]]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;Various programming notes and half-baked ideas. Maybe I&#039;ll formalize them for public consumption (when I get the time -- HA!).&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;[[ENCRYPT64]]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;Sample code using the &amp;lt;tt&amp;gt;ENCRYPT&amp;lt;/tt&amp;gt; function in Universe.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;[[Hexadecimal Conversion]]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;Converting bytes into hexadecimal and back in Universe.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rkgozar</name></author>
	</entry>
</feed>