├── .gitattributes ├── .gitignore ├── .travis.yml ├── COPYING ├── Dockerfile ├── Makefile ├── README.md ├── README.txt ├── builds ├── gsl.pro └── msvc │ ├── .gitignore │ ├── README.md │ ├── build │ ├── buildall.bat │ └── buildbase.bat │ ├── properties │ ├── Common.props │ ├── Debug.props │ ├── DebugDEXE.props │ ├── DebugLEXE.props │ ├── DebugSEXE.props │ ├── EXE.props │ ├── Link.props │ ├── Messages.props │ ├── Output.props │ ├── Release.props │ ├── ReleaseDEXE.props │ ├── ReleaseLEXE.props │ ├── ReleaseSEXE.props │ ├── Win32.props │ └── x64.props │ ├── resource.h │ ├── resource.rc │ ├── vs2010 │ ├── gsl.sln │ └── gsl │ │ ├── gsl.props │ │ ├── gsl.vcxproj │ │ ├── gsl.vcxproj.filters │ │ └── packages.config │ └── vs2012 │ ├── gsl.sln │ └── gsl │ ├── gsl.props │ ├── gsl.vcxproj │ ├── gsl.vcxproj.filters │ └── packages.config ├── ci_build.sh ├── doc ├── denormalizing.md ├── denormalizing.txt ├── examples │ ├── directory-iteration.gsl │ ├── error-parameter.gsl │ ├── fruits-denormalized.xml │ ├── fruits.gsl │ ├── fruits.xml │ ├── regression-case1.xml │ ├── regression-case2.xml │ ├── regression-gsl.gsl │ └── zones.xml └── modules │ ├── ggconv.txt │ ├── ggdiag.txt │ ├── ggenvt.txt │ ├── ggfile.txt │ ├── gggsl.txt │ ├── ggmath.txt │ ├── ggpcre.txt │ ├── ggproc.txt │ ├── ggscrp.txt │ ├── ggsock.txt │ ├── ggstrn.txt │ ├── ggsymb.txt │ ├── ggthrd.txt │ ├── ggtime.txt │ └── ggxml.txt ├── examples ├── fsm_c.gsl ├── zs_lex.c ├── zs_lex.h ├── zs_lex.xml └── zs_lex_fsm.h ├── images └── README_1.png ├── packaging ├── debian │ ├── .gitignore │ ├── changelog │ ├── compat │ ├── control │ ├── copyright │ ├── generator-scripting-language-examples.install │ ├── generator-scripting-language.docs │ ├── generator-scripting-language.dsc.obs │ ├── generator-scripting-language.install │ ├── rules │ └── source │ │ ├── format │ │ └── lintian-overrides ├── linux │ ├── create_tarball.sh │ └── rpm │ │ └── SPECS │ │ └── generator-scripting-language.spec ├── nuget │ ├── .gitignore │ ├── package.bat │ ├── package.config │ ├── package.gsl │ └── package.nuspec └── obs │ └── _service ├── pcre ├── .gitignore ├── AUTHORS ├── COPYING ├── ChangeLog ├── INSTALL ├── LICENCE ├── Makefile ├── NEWS ├── NON-UNIX-USE ├── README ├── RunGrepTest.in ├── RunTest.in ├── build.sh ├── c ├── config.guess ├── config.h ├── config.h.in ├── config.sub ├── configure ├── configure.ac ├── configure.bat ├── dftables.c ├── install-sh ├── libpcre.def ├── libpcre.pc.in ├── libpcre.vcproj ├── libpcreposix.def ├── ltmain.sh ├── makevp.bat ├── mkinstalldirs ├── pcre-config.in ├── pcre.def ├── pcre.h ├── pcre_compile.c ├── pcre_config.c ├── pcre_dfa_exec.c ├── pcre_exec.c ├── pcre_fullinfo.c ├── pcre_get.c ├── pcre_globals.c ├── pcre_info.c ├── pcre_internal.h ├── pcre_maketables.c ├── pcre_ord2utf8.c ├── pcre_printint.src ├── pcre_refcount.c ├── pcre_scanner.cc ├── pcre_scanner.h ├── pcre_scanner_unittest.cc ├── pcre_stringpiece.cc ├── pcre_stringpiece.h.in ├── pcre_stringpiece_unittest.cc ├── pcre_study.c ├── pcre_tables.c ├── pcre_try_flipped.c ├── pcre_ucp_searchfuncs.c ├── pcre_valid_utf8.c ├── pcre_version.c ├── pcre_xclass.c ├── pcrecpp.cc ├── pcrecpp.h ├── pcrecpp_unittest.cc ├── pcrecpparg.h.in ├── pcredemo.c ├── pcregrep.c ├── pcreposix.c ├── pcreposix.h ├── pcretest.c ├── perltest ├── readme.txt ├── stamp_generate ├── ucp.h ├── ucpinternal.h └── ucptable.c └── src ├── .gitignore ├── Makefile ├── c ├── c.bat ├── console.gsl ├── ggcode.c ├── ggcode.d ├── ggcode.h ├── ggcode.i ├── ggcode.l ├── ggcode.xml ├── ggcodem.c ├── ggcodem.h ├── ggcomm.c ├── ggcomm.h ├── ggconv.c ├── ggconv.gxl ├── ggconv.h ├── ggdiag.c ├── ggdiag.gxl ├── ggdiag.h ├── ggdoc.gsl ├── ggenvt.c ├── ggenvt.gxl ├── ggenvt.h ├── ggfile.c ├── ggfile.gxl ├── ggfile.h ├── ggfunc.inc ├── gggsl.c ├── gggsl.d ├── gggsl.gxl ├── gggsl.h ├── gggsl.i ├── gggsl.l ├── gghead.h ├── ggmacro.gsl ├── ggmath.c ├── ggmath.gxl ├── ggmath.h ├── ggobjt.c ├── ggobjt.gsl ├── ggobjt.h ├── ggpars.c ├── ggpars.d ├── ggpars.h ├── ggpars.i ├── ggpars.l ├── ggpars.xml ├── ggparsm.c ├── ggparsm.h ├── ggpcre.c ├── ggpcre.gxl ├── ggpcre.h ├── ggpriv.h ├── ggproc.c ├── ggproc.gxl ├── ggproc.h ├── ggreport.gsl ├── ggscop.c ├── ggscop.h ├── ggscrp.c ├── ggscrp.d ├── ggscrp.gxl ├── ggscrp.h ├── ggscrp.i ├── ggscrp.l ├── ggsock.c ├── ggsock.d ├── ggsock.gxl ├── ggsock.h ├── ggsock.i ├── ggsock.l ├── ggstrn.c ├── ggstrn.gxl ├── ggstrn.h ├── ggsymb.c ├── ggsymb.gxl ├── ggsymb.h ├── ggthrd.c ├── ggthrd.d ├── ggthrd.gxl ├── ggthrd.h ├── ggthrd.i ├── ggthrd.l ├── ggtime.c ├── ggtime.gxl ├── ggtime.h ├── ggxml.c ├── ggxml.gxl ├── ggxml.h ├── gsl.c ├── gsl.d ├── gsl.h ├── gsl.i ├── gsl.l ├── prelude.h ├── sfl.h ├── sflbits.c ├── sflbits.h ├── sflcomp.c ├── sflcomp.h ├── sflcons.c ├── sflcons.h ├── sflconv.c ├── sflconv.h ├── sflcryp.c ├── sflcryp.h ├── sflcvbs.c ├── sflcvdp.c ├── sflcvds.c ├── sflcvns.c ├── sflcvsb.c ├── sflcvsd.c ├── sflcvsn.c ├── sflcvst.c ├── sflcvst.d ├── sflcvst.i ├── sflcvtp.c ├── sflcvts.c ├── sfldate.c ├── sfldate.h ├── sfldes.c ├── sfldes.h ├── sfldescr.c ├── sfldescr.h ├── sfldir.c ├── sfldir.h ├── sflenv.c ├── sflenv.h ├── sflexdr.c ├── sflexdr.h ├── sflfile.c ├── sflfile.h ├── sflfind.c ├── sflfind.h ├── sflfort.c ├── sflfort.h ├── sflhead.h ├── sflheap.c ├── sflheap.h ├── sflhttp.c ├── sflhttp.h ├── sflini.c ├── sflini.h ├── sfllang.c ├── sfllang.h ├── sfllbuf.c ├── sfllbuf.h ├── sfllist.c ├── sfllist.h ├── sflmail.c ├── sflmail.h ├── sflmath.c ├── sflmath.h ├── sflmem.c ├── sflmem.h ├── sflmesg.c ├── sflmesg.h ├── sflmime.c ├── sflmime.h ├── sflnode.c ├── sflnode.h ├── sflprint.c ├── sflprint.h ├── sflproc.c ├── sflproc.h ├── sflproco.imp ├── sflprocu.imp ├── sflprocv.imp ├── sflprocw.imp ├── sflprocx.h ├── sflprocx.imp ├── sflscrit.c ├── sflscrit.d ├── sflscrit.i ├── sflsearch.c ├── sflsearch.h ├── sflsha.c ├── sflsha.h ├── sflslot.c ├── sflslot.h ├── sflsock.c ├── sflsock.h ├── sflsort.c ├── sflsort.h ├── sflstr.c ├── sflstr.h ├── sflsymb.c ├── sflsymb.h ├── sflsyst.c ├── sflsyst.h ├── sfltok.c ├── sfltok.h ├── sfltree.c ├── sfltree.h ├── sfltron.c ├── sfltron.h ├── sfluid.c ├── sfluid.h ├── sflxml.c ├── sflxml.h ├── sflxmll.c ├── sflxmll.h ├── sflxmls.c ├── sflxmls.h ├── smt3.h ├── smtdefn.h ├── smtecho.c ├── smtecho.d ├── smtecho.i ├── smthead.h ├── smtlib.c ├── smtlib.h ├── smtlog.c ├── smtlog.d ├── smtlog.i ├── smtmem.h ├── smtmsg.c ├── smtmsg.h ├── smtoper.c ├── smtoper.d ├── smtoper.i ├── smtpipe.c ├── smtpipe.d ├── smtpipe.i ├── smtpop.c ├── smtpop.d ├── smtpop.i ├── smtpriv.h ├── smtrdns.c ├── smtrdns.d ├── smtrdns.i ├── smtrdnsl.c ├── smtrdnsl.h ├── smtserv.c ├── smtserv.h ├── smtsimu.c ├── smtsimu.d ├── smtsimu.h ├── smtsimu.i ├── smtslot.c ├── smtslot.d ├── smtslot.i ├── smtsmtp.c ├── smtsmtp.d ├── smtsmtp.i ├── smtsock.c ├── smtsock.d ├── smtsock.i ├── smtsslm.h ├── smttime.c ├── smttime.h ├── smttran.c ├── smttran.d ├── smttran.i ├── smttst1.c ├── smttst1.d ├── smttst1.i ├── smttst2.c ├── smttst2.d ├── smttst2.i ├── smttst3.c ├── smttst3.d ├── smttst3.i ├── smtxlog.c ├── smtxlog.d ├── smtxlog.h ├── smtxlog.i ├── syscli.c ├── sysclia.c ├── sysclia.d ├── sysclia.i ├── sysman.c ├── sysman.h ├── sysmana.c ├── sysmana.d ├── sysmana.i ├── testall.gsl ├── testall.inc ├── testchi2.gsl ├── testconv.gsl ├── testdate.gsl ├── testdb.gsl ├── testdir.gsl ├── testdir.xml ├── testdir2.gsl ├── testecho.gsl ├── testesc.gsl ├── testfile.gsl ├── testmath.gsl ├── testscope.gsl ├── testsort.gsl ├── teststr.gsl └── version.h /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.sln.docstates 8 | 9 | # Build results 10 | 11 | [Dd]ebug/ 12 | [Rr]elease/ 13 | x64/ 14 | build/ 15 | [Bb]in/ 16 | [Oo]bj/ 17 | 18 | # Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets 19 | !packages/*/build/ 20 | 21 | # MSTest test Results 22 | [Tt]est[Rr]esult*/ 23 | [Bb]uild[Ll]og.* 24 | 25 | *_i.c 26 | *_p.c 27 | *.ilk 28 | *.meta 29 | *.obj 30 | *.pch 31 | *.pdb 32 | *.pgc 33 | *.pgd 34 | *.rsp 35 | *.sbr 36 | *.tlb 37 | *.tli 38 | *.tlh 39 | *.tmp 40 | *.tmp_proj 41 | *.log 42 | *.vspscc 43 | *.vssscc 44 | .builds 45 | *.pidb 46 | *.log 47 | *.scc 48 | 49 | # Visual C++ cache files 50 | ipch/ 51 | *.aps 52 | *.ncb 53 | *.opensdf 54 | *.sdf 55 | *.cachefile 56 | 57 | # Visual Studio profiler 58 | *.psess 59 | *.vsp 60 | *.vspx 61 | 62 | # Guidance Automation Toolkit 63 | *.gpState 64 | 65 | # ReSharper is a .NET coding add-in 66 | _ReSharper*/ 67 | *.[Rr]e[Ss]harper 68 | 69 | # TeamCity is a build add-in 70 | _TeamCity* 71 | 72 | # DotCover is a Code Coverage Tool 73 | *.dotCover 74 | 75 | # NCrunch 76 | *.ncrunch* 77 | .*crunch*.local.xml 78 | 79 | # Installshield output folder 80 | [Ee]xpress/ 81 | 82 | # DocProject is a documentation generator add-in 83 | DocProject/buildhelp/ 84 | DocProject/Help/*.HxT 85 | DocProject/Help/*.HxC 86 | DocProject/Help/*.hhc 87 | DocProject/Help/*.hhk 88 | DocProject/Help/*.hhp 89 | DocProject/Help/Html2 90 | DocProject/Help/html 91 | 92 | # Click-Once directory 93 | publish/ 94 | 95 | # Publish Web Output 96 | *.Publish.xml 97 | 98 | # NuGet Packages Directory 99 | ## TODO: If you have NuGet Package Restore enabled, uncomment the next line 100 | #packages/ 101 | 102 | # Windows Azure Build Output 103 | csx 104 | *.build.csdef 105 | 106 | # Windows Store app package directory 107 | AppPackages/ 108 | 109 | # Others 110 | sql/ 111 | tmp/ 112 | *.Cache 113 | ClientBin/ 114 | [Ss]tyle[Cc]op.* 115 | ~$* 116 | *~ 117 | *.dbmdl 118 | *.[Pp]ublish.xml 119 | *.pfx 120 | *.publishsettings 121 | 122 | # RIA/Silverlight projects 123 | Generated_Code/ 124 | 125 | # Backup & report files from converting an old project file to a newer 126 | # Visual Studio version. Backup files are not needed, because we have git ;-) 127 | _UpgradeReport_Files/ 128 | Backup*/ 129 | UpgradeLog*.XML 130 | UpgradeLog*.htm 131 | 132 | # SQL Server files 133 | App_Data/*.mdf 134 | App_Data/*.ldf 135 | 136 | 137 | #LightSwitch generated files 138 | GeneratedArtifacts/ 139 | _Pvt_Extensions/ 140 | ModelManifest.xml 141 | 142 | # ========================= 143 | # Windows detritus 144 | # ========================= 145 | 146 | # Windows image file caches 147 | Thumbs.db 148 | ehthumbs.db 149 | 150 | # Folder config file 151 | Desktop.ini 152 | 153 | # Recycle Bin used on file shares 154 | $RECYCLE.BIN/ 155 | 156 | # Mac desktop service store files 157 | .DS_Store 158 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # Travis CI script 2 | language: c 3 | 4 | cache: ccache 5 | 6 | sudo: true 7 | 8 | # Set CI_TIME=true to enable build-step profiling in Travis 9 | # Set CI_TRACE=true to enable shell script tracing in Travis 10 | # Set CI_CONFIG_QUIET=true to enable "configure --quiet" (only report stderr) 11 | env: 12 | global: 13 | - CI_TIME=true 14 | - CI_TRACE=false 15 | - CI_CONFIG_QUIET=true 16 | matrix: 17 | - BUILD_TYPE=default 18 | - BUILD_TYPE=with-pcre 19 | 20 | script: 21 | - ./ci_build.sh 22 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:trusty 2 | MAINTAINER Godefroid Chapelle 3 | 4 | RUN DEBIAN_FRONTEND=noninteractive apt-get update -y -q 5 | RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q --force-yes build-essential 6 | RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q --force-yes libpcre3-dev 7 | 8 | RUN mkdir /tmp/gsl 9 | COPY src /tmp/gsl/src 10 | COPY pcre /tmp/gsl/pcre 11 | WORKDIR /tmp/gsl/src 12 | RUN make 13 | RUN make install 14 | ENTRYPOINT ["/usr/local/bin/gsl"] 15 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for iMatix GSL/4.1 3 | # 4 | # Basic Makefile to build GSL starting from project root directory, 5 | # allowing a simple build against system or bundled libpcre. 6 | # 7 | # Copyright (C) 2017 by the GSL community 8 | # 9 | # This file is licensed under the BSD license as follows: 10 | # 11 | # Redistribution and use in source and binary forms, with or without 12 | # modification, are permitted provided that the following conditions 13 | # are met: 14 | # 15 | # * Redistributions of source code must retain the above copyright 16 | # notice, this list of conditions and the following disclaimer. 17 | # * Redistributions in binary form must reproduce the above copyright 18 | # notice, this list of conditions and the following disclaimer in 19 | # the documentation and/or other materials provided with the 20 | # distribution. 21 | # * Neither the name of iMatix Corporation nor the names of its 22 | # contributors may be used to endorse or promote products derived 23 | # from this software without specific prior written permission. 24 | # 25 | # THIS SOFTWARE IS PROVIDED BY IMATIX CORPORATION "AS IS" AND ANY 26 | # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 28 | # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL IMATIX CORPORATION BE 29 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 30 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 31 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 32 | # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 33 | # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 34 | # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 35 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 36 | # 37 | 38 | all: gsl 39 | 40 | gsl: gsl-shared 41 | 42 | pcre/libpcre.a: 43 | cd pcre && $(MAKE) libpcre.a 44 | 45 | gsl-shared: 46 | cd src && $(MAKE) all && cp -f gsl $@ 47 | 48 | gsl-static: pcre/libpcre.a 49 | cd src && $(MAKE) CCLIBS="../pcre/libpcre.a" all && cp -f gsl $@ 50 | 51 | check install uninstall: 52 | cd src && $(MAKE) $@ 53 | 54 | clean: 55 | cd src && $(MAKE) $@ 56 | cd pcre && $(MAKE) $@ 57 | -------------------------------------------------------------------------------- /builds/msvc/.gitignore: -------------------------------------------------------------------------------- 1 | *.opensdf 2 | *.suo 3 | *.sdf 4 | *.user 5 | *.aps 6 | *.log 7 | */packages/ 8 | !build 9 | build/pcre.*/ -------------------------------------------------------------------------------- /builds/msvc/README.md: -------------------------------------------------------------------------------- 1 | These builds do not use the `pcre` sources contained within the GSL repository. Instead they rely on the [NuGet PCRE](https://www.nuget.org/packages/pcre) and [NuGet PCRE.redist](https://www.nuget.org/packages/pcre.redist) packages. This package currently supports only **Visual Studio 2012** and **Visual Studio 2010**. As a consequence there is currently no GSL build provided for **Visual Studio 2013**. 2 | -------------------------------------------------------------------------------- /builds/msvc/build/buildall.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | ECHO. 3 | ECHO Downloading gsl dependencies from NuGet 4 | REM Yes this is redundant, but much simpler then a central repo. 5 | CALL nuget.exe install ..\vs2012\gsl\packages.config -o ..\vs2012\packages 6 | CALL nuget.exe install ..\vs2010\gsl\packages.config -o ..\vs2010\packages 7 | ECHO. 8 | CALL buildbase.bat ..\vs2012\gsl.sln 11 9 | ECHO. 10 | CALL buildbase.bat ..\vs2010\gsl.sln 10 11 | ECHO. 12 | PAUSE -------------------------------------------------------------------------------- /builds/msvc/build/buildbase.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | REM Usage: [buildbase.bat ..\vs2013\mysolution.sln 12] 3 | 4 | SET solution=%1 5 | SET version=%2 6 | SET log=build_%version%.log 7 | SET tools=Microsoft Visual Studio %version%.0\VC\vcvarsall.bat 8 | SET environment="%programfiles(x86)%\%tools%" 9 | IF NOT EXIST %environment% SET environment="%programfiles%\%tools%" 10 | IF NOT EXIST %environment% GOTO no_tools 11 | 12 | ECHO Building: %solution% 13 | 14 | CALL %environment% x86 > nul 15 | ECHO Platform=x86 16 | 17 | ECHO Configuration=StaticDebug 18 | msbuild /m /v:n /p:Configuration=StaticDebug /p:Platform=Win32 %solution% >> %log% 19 | IF errorlevel 1 GOTO error 20 | ECHO Configuration=StaticRelease 21 | msbuild /m /v:n /p:Configuration=StaticRelease /p:Platform=Win32 %solution% >> %log% 22 | IF errorlevel 1 GOTO error 23 | 24 | CALL %environment% x86_amd64 > nul 25 | ECHO Platform=x64 26 | 27 | ECHO Configuration=StaticDebug 28 | msbuild /m /v:n /p:Configuration=StaticDebug /p:Platform=x64 %solution% >> %log% 29 | IF errorlevel 1 GOTO error 30 | ECHO Configuration=StaticRelease 31 | msbuild /m /v:n /p:Configuration=StaticRelease /p:Platform=x64 %solution% >> %log% 32 | IF errorlevel 1 GOTO error 33 | 34 | ECHO Complete: %solution% 35 | GOTO end 36 | 37 | :error 38 | ECHO *** ERROR, build terminated early, see: %log% 39 | GOTO end 40 | 41 | :no_tools 42 | ECHO *** ERROR, build tools not found: %tools% 43 | 44 | :end 45 | 46 | -------------------------------------------------------------------------------- /builds/msvc/properties/Common.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <_PropertySheetDisplayName>Common Settings 6 | Unicode 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | true 16 | 17 | Level3 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /builds/msvc/properties/Debug.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | <_PropertySheetDisplayName>Debug Settings 10 | Debug 11 | 12 | 13 | 14 | 15 | EnableFastChecks 16 | ProgramDatabase 17 | true 18 | Disabled 19 | _DEBUG;%(PreprocessorDefinitions) 20 | 21 | 22 | _DEBUG;%(PreprocessorDefinitions) 23 | 24 | 25 | true 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /builds/msvc/properties/DebugDEXE.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <_PropertySheetDisplayName>Console Debug Dynamic 6 | dynamic 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | MultiThreadedDebugDLL 17 | true 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /builds/msvc/properties/DebugLEXE.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <_PropertySheetDisplayName>Console Debug Link Time Code Generation 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | MultiThreadedDebug 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /builds/msvc/properties/DebugSEXE.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <_PropertySheetDisplayName>Console Debug Static 6 | static 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | MultiThreadedDebug 17 | true 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /builds/msvc/properties/EXE.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <_PropertySheetDisplayName>Console Application 6 | true 7 | 8 | 9 | 10 | 11 | _CONSOLE;%(PreprocessorDefinitions) 12 | 13 | 14 | Console 15 | 16 | 17 | -------------------------------------------------------------------------------- /builds/msvc/properties/Link.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <_PropertySheetDisplayName>Link Time Code Generation Settings 6 | ltcg 7 | 8 | 9 | 10 | 11 | true 12 | 13 | 14 | UseLinkTimeCodeGeneration 15 | 16 | 17 | true 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /builds/msvc/properties/Messages.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <_PropertySheetDisplayName>Build Messages 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /builds/msvc/properties/Output.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <_PropertySheetDisplayName>Output Settings 6 | 7 | $(ProjectDir)..\..\ 8 | $(ProjectDir)..\..\..\..\ 9 | $(ProjectDir)..\..\..\..\..\ 10 | $(ProjectDir)..\..\..\..\bin\$(PlatformName)\$(DebugOrRelease)\$(PlatformToolset)\$(DefaultLinkage)\ 11 | $(ProjectDir)..\..\..\..\obj\$(TargetName)\$(PlatformName)\$(DebugOrRelease)\$(PlatformToolset)\$(DefaultLinkage)\ 12 | $(OutDir) 13 | $(TargetName) 14 | $(TargetDir)$(TargetName)$(TargetExt) 15 | 16 | 17 | 18 | 19 | $(OutDir)$(TargetName).lib 20 | 21 | 22 | $(OutDir)$(TargetName).log 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /builds/msvc/properties/Release.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | <_PropertySheetDisplayName>Release Settings 10 | Release 11 | false 12 | 13 | 14 | 15 | 16 | /Oy- %(AdditionalOptions) 17 | 18 | true 19 | true 20 | OnlyExplicitInline 21 | false 22 | MaxSpeed 23 | NDEBUG;%(PreprocessorDefinitions) 24 | 25 | 26 | NDEBUG;%(PreprocessorDefinitions) 27 | 28 | 29 | true 30 | 31 | true 32 | 33 | 34 | 35 | 36 | 37 | StreamingSIMDExtensions2 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /builds/msvc/properties/ReleaseDEXE.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <_PropertySheetDisplayName>Console Release Dynamic 6 | dynamic 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | MultiThreadedDLL 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /builds/msvc/properties/ReleaseLEXE.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <_PropertySheetDisplayName>Console Release Link Time Code Generation 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | MultiThreaded 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /builds/msvc/properties/ReleaseSEXE.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <_PropertySheetDisplayName>Console Release Static 6 | static 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | MultiThreaded 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /builds/msvc/properties/Win32.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <_PropertySheetDisplayName>x86 Settings 6 | 7 | 8 | 9 | 10 | WIN32;_WIN32;%(PreprocessorDefinitions) 11 | 12 | 13 | MachineX86 14 | 15 | 16 | /MACHINE:X86 %(AdditionalOptions) 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /builds/msvc/properties/x64.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <_PropertySheetDisplayName>x64 Settings 6 | 7 | 8 | 9 | 10 | 13 | WIN32;_WIN32;WIN64;_WIN64;%(PreprocessorDefinitions) 14 | 15 | 16 | MachineX64 17 | 18 | 19 | /MACHINE:X64 %(AdditionalOptions) 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /builds/msvc/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by resource.rc 4 | 5 | // Next default values for new objects 6 | // 7 | #ifdef APSTUDIO_INVOKED 8 | #ifndef APSTUDIO_READONLY_SYMBOLS 9 | #define _APS_NEXT_RESOURCE_VALUE 101 10 | #define _APS_NEXT_COMMAND_VALUE 40001 11 | #define _APS_NEXT_CONTROL_VALUE 1001 12 | #define _APS_NEXT_SYMED_VALUE 101 13 | #endif 14 | #endif 15 | -------------------------------------------------------------------------------- /builds/msvc/resource.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imatix/gsl/20d56ca93748b12f44528f0bc2250305a95327c0/builds/msvc/resource.rc -------------------------------------------------------------------------------- /builds/msvc/vs2010/gsl.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Visual Studio 2010 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gsl", "gsl\gsl.vcxproj", "{AD4A2E37-0B82-457C-995E-B9FA74A43472}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | LtcgDebug|Win32 = LtcgDebug|Win32 9 | LtcgDebug|x64 = LtcgDebug|x64 10 | LtcgRelease|Win32 = LtcgRelease|Win32 11 | LtcgRelease|x64 = LtcgRelease|x64 12 | StaticDebug|Win32 = StaticDebug|Win32 13 | StaticDebug|x64 = StaticDebug|x64 14 | StaticRelease|Win32 = StaticRelease|Win32 15 | StaticRelease|x64 = StaticRelease|x64 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.DynDebug|Win32.ActiveCfg = DebugDEXE|Win32 19 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.DynDebug|Win32.Build.0 = DebugDEXE|Win32 20 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.DynDebug|x64.ActiveCfg = DebugDEXE|x64 21 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.DynDebug|x64.Build.0 = DebugDEXE|x64 22 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.DynRelease|Win32.ActiveCfg = ReleaseDEXE|Win32 23 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.DynRelease|Win32.Build.0 = ReleaseDEXE|Win32 24 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.DynRelease|x64.ActiveCfg = ReleaseDEXE|x64 25 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.DynRelease|x64.Build.0 = ReleaseDEXE|x64 26 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.LtcgDebug|Win32.ActiveCfg = DebugLEXE|Win32 27 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.LtcgDebug|Win32.Build.0 = DebugLEXE|Win32 28 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.LtcgDebug|x64.ActiveCfg = DebugLEXE|x64 29 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.LtcgDebug|x64.Build.0 = DebugLEXE|x64 30 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.LtcgRelease|Win32.ActiveCfg = ReleaseLEXE|Win32 31 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.LtcgRelease|Win32.Build.0 = ReleaseLEXE|Win32 32 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.LtcgRelease|x64.ActiveCfg = ReleaseLEXE|x64 33 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.LtcgRelease|x64.Build.0 = ReleaseLEXE|x64 34 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.StaticDebug|Win32.ActiveCfg = DebugSEXE|Win32 35 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.StaticDebug|Win32.Build.0 = DebugSEXE|Win32 36 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.StaticDebug|x64.ActiveCfg = DebugSEXE|x64 37 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.StaticDebug|x64.Build.0 = DebugSEXE|x64 38 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.StaticRelease|Win32.ActiveCfg = ReleaseSEXE|Win32 39 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.StaticRelease|Win32.Build.0 = ReleaseSEXE|Win32 40 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.StaticRelease|x64.ActiveCfg = ReleaseSEXE|x64 41 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.StaticRelease|x64.Build.0 = ReleaseSEXE|x64 42 | EndGlobalSection 43 | GlobalSection(SolutionProperties) = preSolution 44 | HideSolutionNode = FALSE 45 | EndGlobalSection 46 | EndGlobal 47 | -------------------------------------------------------------------------------- /builds/msvc/vs2010/gsl/gsl.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <_PropertySheetDisplayName>GSL Common Settings 6 | AllRules.ruleset 7 | false 8 | 9 | 10 | 11 | 12 | 13 | 14 | $(RepoRoot)src\;%(AdditionalIncludeDirectories) 15 | 4996;%(DisableSpecificWarnings) 16 | false 17 | _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) 18 | 19 | 20 | PCRE_STATIC;%(PreprocessorDefinitions) 21 | 22 | 23 | 24 | 25 | 26 | 27 | dynamic 28 | 29 | 30 | ltcg 31 | 32 | 33 | static 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /builds/msvc/vs2010/gsl/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /builds/msvc/vs2012/gsl.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Express 2012 for Windows Desktop 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gsl", "gsl\gsl.vcxproj", "{AD4A2E37-0B82-457C-995E-B9FA74A43472}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | LtcgDebug|Win32 = LtcgDebug|Win32 9 | LtcgDebug|x64 = LtcgDebug|x64 10 | LtcgRelease|Win32 = LtcgRelease|Win32 11 | LtcgRelease|x64 = LtcgRelease|x64 12 | StaticDebug|Win32 = StaticDebug|Win32 13 | StaticDebug|x64 = StaticDebug|x64 14 | StaticRelease|Win32 = StaticRelease|Win32 15 | StaticRelease|x64 = StaticRelease|x64 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.DynDebug|Win32.ActiveCfg = DebugDEXE|Win32 19 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.DynDebug|Win32.Build.0 = DebugDEXE|Win32 20 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.DynDebug|x64.ActiveCfg = DebugDEXE|x64 21 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.DynDebug|x64.Build.0 = DebugDEXE|x64 22 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.DynRelease|Win32.ActiveCfg = ReleaseDEXE|Win32 23 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.DynRelease|Win32.Build.0 = ReleaseDEXE|Win32 24 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.DynRelease|x64.ActiveCfg = ReleaseDEXE|x64 25 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.DynRelease|x64.Build.0 = ReleaseDEXE|x64 26 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.LtcgDebug|Win32.ActiveCfg = DebugLEXE|Win32 27 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.LtcgDebug|Win32.Build.0 = DebugLEXE|Win32 28 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.LtcgDebug|x64.ActiveCfg = DebugLEXE|x64 29 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.LtcgDebug|x64.Build.0 = DebugLEXE|x64 30 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.LtcgRelease|Win32.ActiveCfg = ReleaseLEXE|Win32 31 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.LtcgRelease|Win32.Build.0 = ReleaseLEXE|Win32 32 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.LtcgRelease|x64.ActiveCfg = ReleaseLEXE|x64 33 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.LtcgRelease|x64.Build.0 = ReleaseLEXE|x64 34 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.StaticDebug|Win32.ActiveCfg = DebugSEXE|Win32 35 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.StaticDebug|Win32.Build.0 = DebugSEXE|Win32 36 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.StaticDebug|x64.ActiveCfg = DebugSEXE|x64 37 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.StaticDebug|x64.Build.0 = DebugSEXE|x64 38 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.StaticRelease|Win32.ActiveCfg = ReleaseSEXE|Win32 39 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.StaticRelease|Win32.Build.0 = ReleaseSEXE|Win32 40 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.StaticRelease|x64.ActiveCfg = ReleaseSEXE|x64 41 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.StaticRelease|x64.Build.0 = ReleaseSEXE|x64 42 | EndGlobalSection 43 | GlobalSection(SolutionProperties) = preSolution 44 | HideSolutionNode = FALSE 45 | EndGlobalSection 46 | EndGlobal 47 | -------------------------------------------------------------------------------- /builds/msvc/vs2012/gsl/gsl.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <_PropertySheetDisplayName>GSL Common Settings 6 | AllRules.ruleset 7 | false 8 | 9 | 10 | 11 | 12 | 13 | 14 | $(RepoRoot)src\;%(AdditionalIncludeDirectories) 15 | 4996;%(DisableSpecificWarnings) 16 | false 17 | _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) 18 | 19 | 20 | PCRE_STATIC;%(PreprocessorDefinitions) 21 | 22 | 23 | 24 | 25 | 26 | 27 | dynamic 28 | 29 | 30 | ltcg 31 | 32 | 33 | static 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /builds/msvc/vs2012/gsl/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /ci_build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # 4 | # This script is used by travis ci to test updates for zproject itself: 5 | # it builds a latest GSL, then zproject, and tests it by regenerating 6 | # a stable consumer project (CZMQ) which is expected to pass well. 7 | # Optionally speeds up the compilation steps using ccache (stashed). 8 | # 9 | 10 | set -e 11 | 12 | # Set this to enable verbose profiling 13 | [ -n "${CI_TIME-}" ] || CI_TIME="" 14 | case "$CI_TIME" in 15 | [Yy][Ee][Ss]|[Oo][Nn]|[Tt][Rr][Uu][Ee]) 16 | CI_TIME="time -p " ;; 17 | [Nn][Oo]|[Oo][Ff][Ff]|[Ff][Aa][Ll][Ss][Ee]) 18 | CI_TIME="" ;; 19 | esac 20 | 21 | # Set this to enable verbose tracing 22 | [ -n "${CI_TRACE-}" ] || CI_TRACE="no" 23 | case "$CI_TRACE" in 24 | [Nn][Oo]|[Oo][Ff][Ff]|[Ff][Aa][Ll][Ss][Ee]) 25 | set +x ;; 26 | [Yy][Ee][Ss]|[Oo][Nn]|[Tt][Rr][Uu][Ee]) 27 | set -x ;; 28 | esac 29 | 30 | case "$BUILD_TYPE" in 31 | "default"|"with-pcre") 32 | mkdir tmp 33 | BUILD_PREFIX="$PWD/tmp" 34 | 35 | CCACHE_PATH="$PATH" 36 | CCACHE_DIR="${HOME}/.ccache" 37 | export CCACHE_PATH CCACHE_DIR 38 | # ccache -s 2>/dev/null || true 39 | 40 | if [ "$BUILD_TYPE" = with-pcre ]; then 41 | [ -z "$CI_TIME" ] || echo "`date`: Starting build of bundled pcre..." 42 | ( cd ./pcre && \ 43 | CCACHE_BASEDIR=${PWD} && \ 44 | export CCACHE_BASEDIR && \ 45 | $CI_TIME make -j4 && \ 46 | DESTDIR="${BUILD_PREFIX}" $CI_TIME make install \ 47 | ) || exit 1 48 | fi 49 | 50 | [ -z "$CI_TIME" ] || echo "`date`: Starting build of gsl..." 51 | ( EXTRA_MAKE_OPTS="" 52 | [ "$BUILD_TYPE" = with-pcre ] \ 53 | && { EXTRA_MAKE_OPTS=CCLIBS="../pcre/libpcre.a" && \ 54 | echo "Using bundled PCRE libs as a static built-in"; } \ 55 | || echo "Using system-provided PCRE libs" 56 | cd ./src && \ 57 | CCACHE_BASEDIR=${PWD} && \ 58 | export CCACHE_BASEDIR && \ 59 | $CI_TIME make $EXTRA_MAKE_OPTS -j4 && \ 60 | DESTDIR="${BUILD_PREFIX}" $CI_TIME make $EXTRA_MAKE_OPTS install \ 61 | ) || exit 1 62 | 63 | [ -z "$CI_TIME" ] || echo "`date`: Builds completed without fatal errors!" 64 | 65 | 66 | echo "=== What is the GSL binary linked against (note libpcre in particular)?" 67 | ldd src/gsl || true 68 | 69 | echo "=== Self-test GSL parser" 70 | (cd src && $CI_TIME make check) || exit $? 71 | 72 | echo "=== How well did ccache help on this platform?" 73 | ccache -s 2>/dev/null || true 74 | echo "===" 75 | ;; 76 | *) 77 | pushd "./builds/${BUILD_TYPE}" && \ 78 | REPO_DIR="$(dirs -l +1)" $CI_TIME ./ci_build.sh \ 79 | || exit 1 80 | ;; 81 | esac 82 | 83 | echo "=== Are GitIgnores good after making zproject '$BUILD_TYPE'? (should have no output below)" 84 | git status -s || true 85 | echo "===" 86 | -------------------------------------------------------------------------------- /doc/denormalizing.txt: -------------------------------------------------------------------------------- 1 | Denormalizing Trees 2 | =================== 3 | 4 | In code generating, it is useful to work with a single tree in memory. However if the data sources are disparate, 5 | a useful first step is to combine the data sources into a single tree before starting code generation. 6 | 7 | This "denormalizing" step is accomplished by essentially "looking up" each normalized attribute and appending it to the target. 8 | 9 | Here is an example. Suppose you had an XML file listing fruits and the zones where they grow and 10 | another file describing the zones, and your task is to generate a set of data where each fruit 11 | is listed with its corresponding zone description. 12 | 13 | #File: fruits.xml 14 | 15 | .pull examples/fruits.xml,code 16 | 17 | #File: zones.xml 18 | 19 | .pull examples/zones.xml,code 20 | 21 | The easiest method is to generate a third file, say, "fruits-denormalized.xml", containing the desired data, 22 | and use that to drive the generation step. 23 | 24 | Here is the GSL script to accomplish that: 25 | 26 | 1 .template 0 27 | 2 zones = XML.load_file("zones.xml") 28 | 3 for fruit 29 | 4 .zone_desc = zones->zone(name = .zone).description ? "" 30 | 5 endfor 31 | 6 root.save("fruits-denormalized.xml") 32 | 7 .endtemplate 33 | 34 | 35 | This script is invoked as: 36 | 37 | gsl -script:fruits.gsl fruits.xml 38 | 39 | which will start off in template mode. However, since this script does not generate template output, 40 | line 1 turns off template mode so each line does not have to be prefixed with a dot. 41 | 42 | Line 2 loads the lookup file into a variable named `zones`. The line executes at the top level scope, so 43 | the variable is really named 'global.zones'. While it is not necessary to be explicit here, a more complicated 44 | script that loads the data in a different scope may need to be explicit. Note that the xml file must be valid XML. 45 | It may help to run all xml files through xmllint to be sure. Otherwise gsl will complain with a misleading error. 46 | This will be fixed in future version. 47 | 48 | 49 | Lines 3 to 5 loop over the input file `fruits.xml` and for each fruit item, does a lookup for the corresponding zone 50 | and appends the associated description. Normally, if the item were not found, GSL would complain and stop. However, default operator '?' is used to suppress that behaviour and instead assign an empty string in that case. 51 | 52 | Finally, the modified tree is saved to a file, ready to be used for a generation task. 53 | 54 | File: fruits-denormalized.xml 55 | 56 | .pull examples/fruits-denormalized.xml,code 57 | 58 | This lookup mechanism could be used directly during the generation step, of course. 59 | However, I generally decompose steps into discrete pieces whenever possible so I can keep track of one step at a time. 60 | -------------------------------------------------------------------------------- /doc/examples/directory-iteration.gsl: -------------------------------------------------------------------------------- 1 | dir = directory.open(".", error_text) ? 2 | 3 | if defined(dir) 4 | for dir.file as f 5 | echo "file:$(f.name) has size: $(f.size)" 6 | endfor 7 | else 8 | abort "Error: " + error_text 9 | endif -------------------------------------------------------------------------------- /doc/examples/error-parameter.gsl: -------------------------------------------------------------------------------- 1 | dir = directory.open(".", error_text) ? 2 | 3 | if ! defined(dir) 4 | abort "E: cannot open directory: " + error_text 5 | endif -------------------------------------------------------------------------------- /doc/examples/fruits-denormalized.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 11 | 15 | 16 | -------------------------------------------------------------------------------- /doc/examples/fruits.gsl: -------------------------------------------------------------------------------- 1 | .template 0 2 | global.zones = XML.load_file("zones.xml", err) 3 | 4 | for fruit 5 | .zone_desc = zones->zone(name = .zone).description ? "unknown" 6 | endfor 7 | 8 | root.save("fruits-denormalized.xml") 9 | .endtemplate 10 | -------------------------------------------------------------------------------- /doc/examples/fruits.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /doc/examples/regression-case1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /doc/examples/regression-case2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Test 4 | 5 | 6 | -------------------------------------------------------------------------------- /doc/examples/regression-gsl.gsl: -------------------------------------------------------------------------------- 1 | .template 0 2 | if defined(options->code->BEGIN) 3 | echo "not empty" 4 | >$(options->code->BEGIN.) 5 | else 6 | echo "is empty" 7 | endif 8 | endtemplate 9 | -------------------------------------------------------------------------------- /doc/examples/zones.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /doc/modules/ggconv.txt: -------------------------------------------------------------------------------- 1 | MODULE: GSL/conv package 2 | 3 | Class: Conversion Functions 4 | 5 | Function: conv . chr (arg) 6 | Converts ascii code to character. 7 | If the argument is a number between 1 and 255, inclusive, 8 | returns the character represented by the ascii code. 9 | If the argument is a number is outside the range, 10 | returns the empty string. 11 | 12 | Function: conv . number (arg) 13 | Converts numeric looking input to number value. 14 | If the argument looks like a number, returns the numeric value. 15 | 16 | Function: conv . ord (arg) 17 | Converts character to ascii code. 18 | If the argument is a string, returns the ascii 19 | code of the first character, only. 20 | 21 | Function: conv . string (arg) 22 | Converts input to string value. 23 | If the argument is defined, returns string value. 24 | 25 | 26 | -------------------------------------------------------------------------------- /doc/modules/ggdiag.txt: -------------------------------------------------------------------------------- 1 | MODULE: GSL/diag package 2 | 3 | Class: Diagnostic Functions 4 | 5 | Function: diag . used () 6 | Shows amount (bytes) of memory allocated. 7 | 8 | Function: diag . allocs () 9 | Shows number of memory allocations. 10 | 11 | Function: diag . frees () 12 | Shows number of memory deallocations. Should equal allocs. 13 | 14 | Function: diag . display (filename) 15 | Writes the contents of the memory allocation list to the specified file. 16 | 17 | Function: diag . checkall () 18 | Checks all allocated memory blocks for corruption and terminates 19 | the program if any are found. 20 | 21 | Function: diag . raise (signal) 22 | Send a signal corresponding to the numeric argument to the gsl process. 23 | See signal(2) for numeric signal values. 24 | 25 | Function: diag . animate (value) 26 | Control GSL finite state machine progress where applicable. 27 | Use non-zero numeric argument to enable and a zero to disable. 28 | 29 | Function: diag . console_set_mode (mode) 30 | Sets console display mode; the argument can be one of: 31 | 32 | 0 - Output text exactly as specified. (Default). 33 | 1 - Prefix text by "yy/mm/dd hh:mm:ss " 34 | 2 - Prefix text by "hh:mm:ss " 35 | 3 - Same as #2 but output is fully flushed 36 | 37 | 38 | -------------------------------------------------------------------------------- /doc/modules/ggenvt.txt: -------------------------------------------------------------------------------- 1 | MODULE: GSL/environment package 2 | 3 | Class: Environment Functions 4 | 5 | Function: env . get (name) 6 | Returns value of environment variable `name`, if it exists. 7 | 8 | Function: env . set (name,[value]) 9 | If value is provided, sets environment variable `name` to `value`. 10 | Otherwise, clears environment variable `name`. 11 | 12 | 13 | -------------------------------------------------------------------------------- /doc/modules/gggsl.txt: -------------------------------------------------------------------------------- 1 | MODULE: GSL/gsl control package 2 | 3 | Class: GSL Control Class 4 | 5 | Function: gsl . include (filename,[template]) 6 | Includes a GSL script file. 7 | 8 | Uses the current template mode unless over-ridden by the optional argument. 9 | 10 | Function: gsl . exec (command,[template]) 11 | Executes a GSL script. If the script does not open an output file, 12 | its output is returned as the result of this function. 13 | 14 | Uses the current template mode unless over-ridden by the optional argument. 15 | 16 | 17 | -------------------------------------------------------------------------------- /doc/modules/ggmath.txt: -------------------------------------------------------------------------------- 1 | MODULE: GSL/math package 2 | 3 | Class: Math Functions 4 | 5 | Function: math . abs (parm) 6 | 7 | Function: math . ceil (parm) 8 | 9 | Function: math . floor (parm) 10 | 11 | Function: math . mod (x,y) 12 | 13 | Function: math . rand () 14 | 15 | Function: math . sqrt (parm) 16 | 17 | Function: math . exp (parm) 18 | 19 | Function: math . log (parm) 20 | 21 | Function: math . log10 (parm) 22 | 23 | Function: math . pow (x,y) 24 | 25 | Function: math . sin (parm) 26 | 27 | Function: math . cos (parm) 28 | 29 | Function: math . tan (parm) 30 | 31 | Function: math . sinh (parm) 32 | 33 | Function: math . cosh (parm) 34 | 35 | Function: math . tanh (parm) 36 | 37 | Function: math . asin (parm) 38 | 39 | Function: math . acos (parm) 40 | 41 | Function: math . atan (parm) 42 | 43 | Function: math . atan2 (x,y) 44 | 45 | Function: math . pi () 46 | 47 | Function: math . asinh (parm) 48 | 49 | Function: math . acosh (parm) 50 | 51 | Function: math . atanh (parm) 52 | 53 | 54 | -------------------------------------------------------------------------------- /doc/modules/ggpcre.txt: -------------------------------------------------------------------------------- 1 | MODULE: GSL/regexp package 2 | 3 | Class: Regular Expression Functions 4 | 5 | Function: regexp . match (pattern,subject,[match]) 6 | 7 | 8 | -------------------------------------------------------------------------------- /doc/modules/ggproc.txt: -------------------------------------------------------------------------------- 1 | MODULE: GSL/process management 2 | package 3 | 4 | Class: Process 5 | 6 | Function: proc . new (command,[workdir],[inname],[outname],[errname]) 7 | Creates a process object. The command is a native system command. Does 8 | not execute the command. 9 | 10 | The `command` argument names a file to execute along with possible arguments. 11 | The command will be searched for in the directories specified by the 12 | PATH environment variable. 13 | 14 | If `workdir` is provided, a chdir will be performed before the process is run. 15 | 16 | If `inname`, `outname`, `errname` are provided, 17 | the stdin, stdout, and stderr for the process will be 18 | respectively redirected to the named files. 19 | 20 | Returns the process object. 21 | 22 | 23 | Class: Process handle 24 | 25 | Function: . setenv (name,[value]) 26 | Sets an environment variable for the process. Can only be called before 27 | the process is started with proc_handle.run () 28 | 29 | Function: . getenv (name) 30 | Gets an environment variable from the process. 31 | Can only be called before the process is started with proc_handle.run () 32 | 33 | Function: . run ([error]) 34 | Runs a process created with proc.new () 35 | 36 | Returns -1 if there was an error creating the object. 37 | Also places an error message into the parameter error. 38 | 39 | 40 | -------------------------------------------------------------------------------- /doc/modules/ggscrp.txt: -------------------------------------------------------------------------------- 1 | MODULE: GSL/script package 2 | 3 | Class: GSL Script Line 4 | 5 | 6 | -------------------------------------------------------------------------------- /doc/modules/ggsock.txt: -------------------------------------------------------------------------------- 1 | MODULE: GSL/socket package 2 | 3 | Class: Socket 4 | 5 | Function: sock . passive (service,[error]) 6 | 7 | Function: sock . connect ([host],service,[timeout],[error]) 8 | 9 | 10 | Class: Socket handle 11 | 12 | Function: . accept ([timeout],[error]) 13 | 14 | Function: . close ([timeout],[error]) 15 | 16 | Function: . read (buffer,[minimum],[timeout],[error]) 17 | 18 | Function: . write (buffer,[timeout],[error]) 19 | 20 | 21 | -------------------------------------------------------------------------------- /doc/modules/ggstrn.txt: -------------------------------------------------------------------------------- 1 | MODULE: GSL/string package 2 | 3 | Class: String Functions 4 | 5 | Function: string . length (string) 6 | 7 | Function: string . locate (haystack,needle) 8 | 9 | Function: string . locate_last (haystack,needle) 10 | 11 | Function: string . substr (string,[start],[end],[length]) 12 | 13 | Function: string . trim (string) 14 | 15 | Function: string . justify (string,width,[prefix]) 16 | 17 | Function: string . certify (number,[language]) 18 | 19 | Function: string . replace (strbuf,strpattern) 20 | 21 | Function: string . match (string1,string2) 22 | 23 | Function: string . prefixed (string,prefix) 24 | 25 | Function: string . prefix (string,delims) 26 | 27 | Function: string . defix (string,delims) 28 | 29 | Function: string . hash (string) 30 | 31 | Function: string . convch (string,from,to) 32 | 33 | Function: string . lexcmp (string1,string2) 34 | 35 | Function: string . lexncmp (string1,string2,count) 36 | 37 | Function: string . lexwcmp (string1,pattern) 38 | 39 | Function: string . matchpat (string1,pattern,[ic]) 40 | 41 | Function: string . soundex (string) 42 | 43 | Function: string . cntch (string,value) 44 | 45 | 46 | -------------------------------------------------------------------------------- /doc/modules/ggsymb.txt: -------------------------------------------------------------------------------- 1 | MODULE: GSL/symb package 2 | 3 | Class: Symbol 4 | 5 | 6 | -------------------------------------------------------------------------------- /doc/modules/ggthrd.txt: -------------------------------------------------------------------------------- 1 | MODULE: GSL/thrd package 2 | 3 | Class: Thread 4 | 5 | Function: thread . parse (command,[error]) 6 | Parses the command, placing any error message in the parameter 'error'. 7 | Errors can also be recovered via thread class attributes. 8 | If successful, returns an object of type 'parsed item' which can 9 | then be run as many times as necessary, saving the need to re-parse 10 | each time. 11 | 12 | Function: thread . new (command,[error]) 13 | Parses and runs the command, placing any error message in the parameter 14 | 'error'. Errors can also be recovered via thread class and child thread 15 | object attributes. If the parsing was successful, returns an object 16 | of type 'child thread'. 17 | 18 | Function: thread . sleep (csecs) 19 | Puts the current thread to sleep for the specified number of centiseconds. 20 | Returns -1 if csecs is invalid. 21 | 22 | Function: thread . receive ([receive]) 23 | Receives a message from the thread's message queue. If the queue is empty, 24 | the thread sleeps until a message is available. 25 | 26 | Places a reference to the sending thread in the first parameter. Places 27 | arbitrary values from the message into successive parameters. 28 | 29 | 30 | Class: Thread 31 | 32 | Function: . send () 33 | Sends a message with an arbitrary number of arguments to the thread. 34 | 35 | 36 | Class: Thread 37 | 38 | Function: . interrupt () 39 | Shuts down the thread. 40 | 41 | Function: . send () 42 | Sends a message with an arbitrary number of arguments to the thread. 43 | 44 | 45 | Class: Thread 46 | 47 | Function: . run ([error]) 48 | 49 | 50 | -------------------------------------------------------------------------------- /doc/modules/ggtime.txt: -------------------------------------------------------------------------------- 1 | MODULE: GSL/time package 2 | 3 | Class: Time Functions 4 | 5 | Function: time . picture ([time],[picture]) 6 | 7 | Function: time . number (time) 8 | 9 | Function: time . now ([date],[time]) 10 | Assigns date and time to the passed parameters. Also returns the time. 11 | 12 | Function: time . diff (date1,time1,date2,time2) 13 | Returns the difference (in csecs) between two date/times. 14 | 15 | 16 | Class: Date Functions 17 | 18 | Function: date . picture ([date],[picture]) 19 | 20 | Function: date . number (date) 21 | 22 | 23 | -------------------------------------------------------------------------------- /doc/modules/ggxml.txt: -------------------------------------------------------------------------------- 1 | MODULE: GSL/XML package 2 | 3 | Class: XML 4 | 5 | Function: XML . new ([name]) 6 | Creates a free 'unattached' XML item. In reality it is attached to the 7 | global variable ancestor, but only so that GSL can de-allocate it on 8 | termination. 9 | 10 | Therefore if the GSL script does not deallocate the item, it will remain 11 | until GSL shuts down. 12 | 13 | Function: XML . load_string (string,[error]) 14 | Loads the supplied string as an XML item. 15 | Returns a pointer to the (first) resulting XML item or undefined if there 16 | was an error. In the latter case, an error message is placed in the 17 | parameter 'error' and in the XML thread context. 18 | 19 | Function: XML . load_file (filename,[error]) 20 | Loads the file with the supplied name as an XML item. 21 | Returns a pointer to the (first) resulting XML item or undefined if there 22 | was an error. In the latter case, an error message is placed in the 23 | parameter 'error' and in the XML thread context. 24 | 25 | 26 | Class: XML item 27 | 28 | Function: . deleted () 29 | Returns TRUE if the XML item has been deleted. 30 | 31 | Function: . prev () 32 | Returns the previous XML item. 33 | 34 | Function: . string () 35 | Returns the XML item formatted as a string. 36 | 37 | Function: . load_string (string,[error]) 38 | Loads the supplied string as a child of the item. 39 | Returns a pointer to the (first) resulting XML item or undefined if there 40 | was an error. In the latter case, an error messa ge is placed in the 41 | parameter 'error' and in the XML thread context. 42 | 43 | Function: . load_file (filename,[error]) 44 | Loads the file with the supplied name as a child of the item. 45 | Returns a pointer to the (first) resulting XML item or undefined if there 46 | was an error. In the latter case, an error message is placed in the 47 | parameter 'error' and in the XML thread context. 48 | 49 | Function: . save (filename,[error]) 50 | Saves the XML item to a file with the given name. Any file errors are 51 | places in the parameter 'error' and in the XML thread context. Returns 52 | zero if no error occurred, errno otherwise. 53 | 54 | 55 | Class: XML value 56 | 57 | 58 | -------------------------------------------------------------------------------- /examples/zs_lex.h: -------------------------------------------------------------------------------- 1 | /* ========================================================================= 2 | zs_lex - the ZeroScript lexer 3 | 4 | Copyright (c) the Contributors as noted in the AUTHORS file. 5 | This file is part of the ZeroScript language, http://zeroscript.org. 6 | 7 | This Source Code Form is subject to the terms of the Mozilla Public 8 | License, v. 2.0. If a copy of the MPL was not distributed with this 9 | file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | ========================================================================= 11 | */ 12 | 13 | #ifndef ZS_LEX_H_INCLUDED 14 | #define ZS_LEX_H_INCLUDED 15 | 16 | #include 17 | 18 | #ifdef __cplusplus 19 | extern "C" { 20 | #endif 21 | 22 | // Opaque class structure 23 | typedef struct _zs_lex_t zs_lex_t; 24 | 25 | typedef enum { 26 | zs_lex_function, // function name 27 | zs_lex_compose, // function name followed by : 28 | zs_lex_string, // string 29 | zs_lex_number, // number expression 30 | zs_lex_open, // open list 31 | zs_lex_close, // close list 32 | zs_lex_invalid, // Syntax error 33 | zs_lex_null, // Nothing to return 34 | zs_lex_tokens // Size of this set 35 | } zs_lex_token_t; 36 | 37 | 38 | // @interface 39 | // Create a new zs_lex, return the reference if successful, or NULL 40 | // if construction failed due to lack of available memory. 41 | zs_lex_t * 42 | zs_lex_new (void); 43 | 44 | // Destroy the zs_lex and free all memory used by the object. 45 | void 46 | zs_lex_destroy (zs_lex_t **self_p); 47 | 48 | // Enable verbose tracing of lexer 49 | void 50 | zs_lex_verbose (zs_lex_t *self, bool verbose); 51 | 52 | // Start parsing buffer, return type of first token 53 | zs_lex_token_t 54 | zs_lex_first (zs_lex_t *self, const char *input); 55 | 56 | // Continue parsing buffer, return type of next token 57 | zs_lex_token_t 58 | zs_lex_next (zs_lex_t *self); 59 | 60 | // Return actual token value, if any 61 | const char * 62 | zs_lex_token (zs_lex_t *self); 63 | 64 | // Return position of last processed character in text 65 | uint 66 | zs_lex_offset (zs_lex_t *self); 67 | 68 | // Return number of processing cycles used so far 69 | uint64_t 70 | zs_lex_cycles (zs_lex_t *self); 71 | 72 | // Self test of this class 73 | void 74 | zs_lex_test (bool animate); 75 | // @end 76 | 77 | #ifdef __cplusplus 78 | } 79 | #endif 80 | 81 | #endif 82 | -------------------------------------------------------------------------------- /images/README_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imatix/gsl/20d56ca93748b12f44528f0bc2250305a95327c0/images/README_1.png -------------------------------------------------------------------------------- /packaging/debian/.gitignore: -------------------------------------------------------------------------------- 1 | files 2 | *.substvars 3 | generator-scripting-language-dbg/* 4 | generator-scripting-language/* 5 | -------------------------------------------------------------------------------- /packaging/debian/changelog: -------------------------------------------------------------------------------- 1 | generator-scripting-language (4.1.4) UNRELEASED; urgency=low 2 | 3 | * Initial packaging. 4 | 5 | -- iMatix Corporation Sun, 21 Aug 2016 00:00:00 +0000 6 | -------------------------------------------------------------------------------- /packaging/debian/compat: -------------------------------------------------------------------------------- 1 | 9 2 | -------------------------------------------------------------------------------- /packaging/debian/control: -------------------------------------------------------------------------------- 1 | Source: generator-scripting-language 2 | Section: devel 3 | Priority: optional 4 | Maintainer: GSL Developers 5 | Standards-Version: 4.1.0 6 | Build-Depends: debhelper (>= 9), 7 | libpcre3-dev, 8 | Homepage: https://github.com/imatix/gsl 9 | 10 | Package: generator-scripting-language 11 | Architecture: any 12 | Depends: ${misc:Depends}, 13 | ${shlibs:Depends}, 14 | Description: Generator Scripting Language code generator 15 | GSL/4.1 is a code construction tool. It will generate code in all 16 | languages and for all purposes. If this sounds too good to be true, 17 | welcome to 1996, when we invented these techniques. Magic is simply 18 | technology that is twenty years ahead of its time. In addition to 19 | code construction, GSL has been used to generate database schema 20 | definitions, user interfaces, reports, system administration tools 21 | and much more. 22 | 23 | Package: generator-scripting-language-dbg 24 | Architecture: any 25 | Section: debug 26 | Depends: 27 | generator-scripting-language (= ${binary:Version}), 28 | ${misc:Depends}, 29 | Description: debugging symbols for generator-scripting-language 30 | This package contains the debugging symbols for generator-scripting-language. 31 | 32 | Package: generator-scripting-language-examples 33 | Architecture: all 34 | Depends: ${misc:Depends}, 35 | generator-scripting-language (= ${source:Version}), 36 | Description: Examples for the Generator Scripting Language code generator 37 | GSL/4.1 is a code construction tool. It will generate code in all 38 | languages and for all purposes. If this sounds too good to be true, 39 | welcome to 1996, when we invented these techniques. Magic is simply 40 | technology that is twenty years ahead of its time. In addition to 41 | code construction, GSL has been used to generate database schema 42 | definitions, user interfaces, reports, system administration tools 43 | and much more. 44 | . 45 | This package contains examples to get started with gsl. 46 | -------------------------------------------------------------------------------- /packaging/debian/generator-scripting-language-examples.install: -------------------------------------------------------------------------------- 1 | examples/* usr/share/generator-scripting-language/examples/ 2 | doc/examples/* usr/share/generator-scripting-language/examples/ 3 | -------------------------------------------------------------------------------- /packaging/debian/generator-scripting-language.docs: -------------------------------------------------------------------------------- 1 | doc/denormalizing.md 2 | doc/denormalizing.txt 3 | doc/modules/* 4 | images/README*.png 5 | README.md 6 | README.txt 7 | -------------------------------------------------------------------------------- /packaging/debian/generator-scripting-language.dsc.obs: -------------------------------------------------------------------------------- 1 | Format: 3.0 (native) 2 | Binary: generator-scripting-language 3 | Source: generator-scripting-language 4 | Version: 4.1.4 5 | Maintainer: GSL Developers 6 | Architecture: any 7 | Standards-Version: 4.1.0 8 | Build-Depends: debhelper (>= 9), 9 | libpcre3-dev, 10 | Homepage: https://github.com/imatix/gsl 11 | 12 | Files: 13 | 7697688bf65a35bc33ae2db51ebb0e3b 818110 generator-scripting-language.tar.gz 14 | -------------------------------------------------------------------------------- /packaging/debian/generator-scripting-language.install: -------------------------------------------------------------------------------- 1 | src/gsl usr/bin 2 | -------------------------------------------------------------------------------- /packaging/debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | #export DH_VERBOSE=1 3 | export DEB_BUILD_MAINT_OPTIONS = hardening=+all 4 | 5 | ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) 6 | PAR := $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) 7 | MAKEFLAGS += -j$(PAR) 8 | endif 9 | 10 | %: 11 | dh $@ 12 | 13 | override_dh_strip: 14 | dh_strip --dbg-package=generator-scripting-language-dbg 15 | 16 | override_dh_auto_build: 17 | $(MAKE) -C src CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" 18 | 19 | override_dh_auto_clean: 20 | test ! -d src || $(MAKE) -C src clean 21 | dh_auto_clean 22 | 23 | -------------------------------------------------------------------------------- /packaging/debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (native) 2 | -------------------------------------------------------------------------------- /packaging/debian/source/lintian-overrides: -------------------------------------------------------------------------------- 1 | generator-scripting-language: outdated-autotools-helper-file 2 | -------------------------------------------------------------------------------- /packaging/linux/create_tarball.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | PACKAGE_TMP="/tmp" 4 | PACKAGE_NAME="imatix-gsl" 5 | PACKAGE_VERSION="4.1.4" 6 | 7 | SCRIPTS_DIR=$(dirname $(cd ${0%/*} 2>>/dev/null ; echo `pwd`/${0##*/})) 8 | PROJECT_DIR="$(realpath ${SCRIPTS_DIR}/../../)" 9 | PROJECT_NAME=$(basename $PROJECT_DIR) 10 | 11 | rm -rf $PACKAGE_TMP/$PACKAGE_NAME-$PACKAGE_VERSION 12 | cd $PROJECT_DIR/.. 13 | cp -r $PROJECT_NAME ${PACKAGE_TMP}/${PACKAGE_NAME}-${PACKAGE_VERSION} 14 | cd $PACKAGE_TMP/${PACKAGE_NAME}-${PACKAGE_VERSION}/ 15 | rm -rf .git 16 | cd ../ 17 | tar cfz ${PACKAGE_NAME}-${PACKAGE_VERSION}.tar.gz ${PACKAGE_NAME}-${PACKAGE_VERSION} 18 | cd $SCRIPTS_DIR 19 | pwd 20 | echo "File was created at ${PACKAGE_TMP}/${PACKAGE_NAME}-${PACKAGE_VERSION}.tar.gz" 21 | -------------------------------------------------------------------------------- /packaging/linux/rpm/SPECS/generator-scripting-language.spec: -------------------------------------------------------------------------------- 1 | %define revision 0 2 | %undefine _debugsource_packages 3 | 4 | Summary: imatix GSL is a code construction tool 5 | Name: generator-scripting-language 6 | Version: 4.1.4 7 | Release: %{revision}%{?dist} 8 | License: GPL v3+ 9 | Group: Libraries 10 | Source0: http://download.zeromq.org/gsl-%{version}.tar.gz 11 | URL: http://zeromq.org/ 12 | BuildRequires: pcre-devel 13 | 14 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) 15 | 16 | %description 17 | GSL/4.1 is a code construction tool. It will generate code in all languages 18 | and for all purposes. If this sounds too good to be true, welcome to 1996, 19 | when we invented these techniques. Magic is simply technology that is twenty 20 | years ahead of its time. In addition to code construction, GSL has been used 21 | to generate database schema definitions, user interfaces, reports, system 22 | administration tools and much more. 23 | 24 | %prep 25 | %setup -q -n gsl-%{version} 26 | %build 27 | cd src 28 | make 29 | cd ../ 30 | %install 31 | %{__rm} -rf $RPM_BUILD_ROOT 32 | cd src 33 | %{__make} install \ 34 | DESTDIR=$RPM_BUILD_ROOT/usr 35 | cd .. 36 | %post -p /sbin/ldconfig 37 | 38 | %postun -p /sbin/ldconfig 39 | 40 | %clean 41 | %{__rm} -rf $RPM_BUILD_ROOT 42 | 43 | %files 44 | %defattr(644,root,root,755) 45 | %doc doc/denormalizing.md 46 | %doc doc/denormalizing.txt 47 | %doc doc/modules/* 48 | %doc README.md 49 | %doc README.txt 50 | %attr(755,root,root) %{_bindir}/gsl 51 | 52 | %package -n %{name}-examples 53 | Summary: imatix GSL is a code construction tool 54 | Requires: %{name} = %{version} 55 | 56 | %description -n %{name}-examples 57 | This package contains examples to get started with gsl. 58 | 59 | %files -n %{name}-examples 60 | %defattr(-,root,root) 61 | %doc examples/* 62 | %doc doc/examples/* 63 | 64 | %changelog 65 | -------------------------------------------------------------------------------- /packaging/nuget/.gitignore: -------------------------------------------------------------------------------- 1 | *.nupkg 2 | -------------------------------------------------------------------------------- /packaging/nuget/package.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | ECHO Started nuget packaging build. 3 | ECHO. 4 | REM http://www.nuget.org/packages/gsl 5 | gsl -q -script:package.gsl package.config 6 | ECHO. 7 | REM http://nuget.codeplex.com/releases 8 | nuget pack package.nuspec -verbosity detailed 9 | ECHO. 10 | ECHO Completed nuget packaging build. The package is in the following folder: 11 | CD -------------------------------------------------------------------------------- /packaging/nuget/package.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /packaging/nuget/package.gsl: -------------------------------------------------------------------------------- 1 | .# Generate NuGet nuspec file (for subsequent packing). 2 | .# 3 | .# This is a code generator built using the iMatix GSL code generation 4 | .# language. See https://github.com/imatix/gsl for details. This script 5 | .# is licensed under MIT/X11. 6 | .# 7 | .echo "Generating package.nuspec from template." 8 | .output "package.nuspec" 9 | 10 | 15 | 16 | 17 | $(package.id) 18 | $(package.version) 19 | $(package.id) 20 | Pieter Hintjens and others 21 | Eric Voskuil 22 | https://raw.github.com/imatix/gsl/master/COPYING 23 | https://github.com/imatix/gsl 24 | http://upload.wikimedia.org/wikipedia/en/e/ef/Command_prompt_icon_%28windows%29.png 25 | true 26 | false 27 | GSL is a single file executable tool for generating or transforming source code in all languages. GSL is a simple language and you'll not have any difficulty understanding its syntax. 28 | GSL is a code construction tool based on GSL/4.1. 29 | https://github.com/imatix/gsl 30 | GPL v3 31 | gsl, gslgen, codegen, T4, template, iMatix, model 32 | 33 | .for dependency 34 | 35 | .endfor 36 | 37 | 38 | 39 | 40 | 41 | 46 | -------------------------------------------------------------------------------- /packaging/nuget/package.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | gsl 10 | 4.1.4.0 11 | gsl 12 | Pieter Hintjens and others 13 | Eric Voskuil 14 | https://raw.github.com/imatix/gsl/master/COPYING 15 | https://github.com/imatix/gsl 16 | http://upload.wikimedia.org/wikipedia/en/e/ef/Command_prompt_icon_%28windows%29.png 17 | true 18 | true 19 | GSL is a single file executable tool for generating or transforming source code in all languages. GSL is a simple language and you'll not have any difficulty understanding its syntax. 20 | GSL is a code construction tool based on GSL/4.1. 21 | https://github.com/imatix/gsl 22 | GPL v3 23 | gsl, gslgen, codegen, T4, template, iMatix, model 24 | 25 | 26 | 27 | 28 | 33 | -------------------------------------------------------------------------------- /pcre/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.a 3 | *.lst 4 | *.cpp 5 | pcre_chartables.c 6 | pcretest 7 | pcredemo 8 | pcregrep 9 | dftables 10 | -------------------------------------------------------------------------------- /pcre/AUTHORS: -------------------------------------------------------------------------------- 1 | THE MAIN PCRE LIBRARY 2 | --------------------- 3 | 4 | Written by: Philip Hazel 5 | Email local part: ph10 6 | Email domain: cam.ac.uk 7 | 8 | University of Cambridge Computing Service, 9 | Cambridge, England. Phone: +44 1223 334714. 10 | 11 | Copyright (c) 1997-2005 University of Cambridge 12 | All rights reserved 13 | 14 | 15 | THE C++ WRAPPER LIBRARY 16 | ----------------------- 17 | 18 | Written by: Google Inc. 19 | 20 | Copyright (c) 2005 Google Inc 21 | All rights reserved 22 | 23 | #### 24 | -------------------------------------------------------------------------------- /pcre/COPYING: -------------------------------------------------------------------------------- 1 | PCRE LICENCE 2 | ------------ 3 | 4 | PCRE is a library of functions to support regular expressions whose syntax 5 | and semantics are as close as possible to those of the Perl 5 language. 6 | 7 | Release 6 of PCRE is distributed under the terms of the "BSD" licence, as 8 | specified below. The documentation for PCRE, supplied in the "doc" 9 | directory, is distributed under the same terms as the software itself. 10 | 11 | The basic library functions are written in C and are freestanding. Also 12 | included in the distribution is a set of C++ wrapper functions. 13 | 14 | 15 | THE BASIC LIBRARY FUNCTIONS 16 | --------------------------- 17 | 18 | Written by: Philip Hazel 19 | Email local part: ph10 20 | Email domain: cam.ac.uk 21 | 22 | University of Cambridge Computing Service, 23 | Cambridge, England. Phone: +44 1223 334714. 24 | 25 | Copyright (c) 1997-2005 University of Cambridge 26 | All rights reserved. 27 | 28 | 29 | THE C++ WRAPPER FUNCTIONS 30 | ------------------------- 31 | 32 | Contributed by: Google Inc. 33 | 34 | Copyright (c) 2005, Google Inc. 35 | All rights reserved. 36 | 37 | 38 | THE "BSD" LICENCE 39 | ----------------- 40 | 41 | Redistribution and use in source and binary forms, with or without 42 | modification, are permitted provided that the following conditions are met: 43 | 44 | * Redistributions of source code must retain the above copyright notice, 45 | this list of conditions and the following disclaimer. 46 | 47 | * Redistributions in binary form must reproduce the above copyright 48 | notice, this list of conditions and the following disclaimer in the 49 | documentation and/or other materials provided with the distribution. 50 | 51 | * Neither the name of the University of Cambridge nor the name of Google 52 | Inc. nor the names of their contributors may be used to endorse or 53 | promote products derived from this software without specific prior 54 | written permission. 55 | 56 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 57 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 58 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 59 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 60 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 61 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 62 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 63 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 64 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 65 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 66 | POSSIBILITY OF SUCH DAMAGE. 67 | 68 | End 69 | -------------------------------------------------------------------------------- /pcre/LICENCE: -------------------------------------------------------------------------------- 1 | PCRE LICENCE 2 | ------------ 3 | 4 | PCRE is a library of functions to support regular expressions whose syntax 5 | and semantics are as close as possible to those of the Perl 5 language. 6 | 7 | Release 6 of PCRE is distributed under the terms of the "BSD" licence, as 8 | specified below. The documentation for PCRE, supplied in the "doc" 9 | directory, is distributed under the same terms as the software itself. 10 | 11 | The basic library functions are written in C and are freestanding. Also 12 | included in the distribution is a set of C++ wrapper functions. 13 | 14 | 15 | THE BASIC LIBRARY FUNCTIONS 16 | --------------------------- 17 | 18 | Written by: Philip Hazel 19 | Email local part: ph10 20 | Email domain: cam.ac.uk 21 | 22 | University of Cambridge Computing Service, 23 | Cambridge, England. Phone: +44 1223 334714. 24 | 25 | Copyright (c) 1997-2006 University of Cambridge 26 | All rights reserved. 27 | 28 | 29 | THE C++ WRAPPER FUNCTIONS 30 | ------------------------- 31 | 32 | Contributed by: Google Inc. 33 | 34 | Copyright (c) 2005, Google Inc. 35 | All rights reserved. 36 | 37 | 38 | THE "BSD" LICENCE 39 | ----------------- 40 | 41 | Redistribution and use in source and binary forms, with or without 42 | modification, are permitted provided that the following conditions are met: 43 | 44 | * Redistributions of source code must retain the above copyright notice, 45 | this list of conditions and the following disclaimer. 46 | 47 | * Redistributions in binary form must reproduce the above copyright 48 | notice, this list of conditions and the following disclaimer in the 49 | documentation and/or other materials provided with the distribution. 50 | 51 | * Neither the name of the University of Cambridge nor the name of Google 52 | Inc. nor the names of their contributors may be used to endorse or 53 | promote products derived from this software without specific prior 54 | written permission. 55 | 56 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 57 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 58 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 59 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 60 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 61 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 62 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 63 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 64 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 65 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 66 | POSSIBILITY OF SUCH DAMAGE. 67 | 68 | End 69 | -------------------------------------------------------------------------------- /pcre/build.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Builds pcre library on Linux 3 | # 4 | 5 | ./c -q -l dftables 6 | ./dftables pcre_chartables.c 7 | 8 | ./c pcre_chartables 9 | ./c pcre_compile 10 | ./c pcre_config 11 | ./c pcre_dfa_exec 12 | ./c pcre_exec 13 | ./c pcre_fullinfo 14 | ./c pcre_get 15 | ./c pcre_globals 16 | ./c pcre_info 17 | ./c pcre_maketables 18 | ./c pcre_ord2utf8 19 | ./c pcre_refcount 20 | ./c pcre_study 21 | ./c pcre_tables 22 | ./c pcre_try_flipped 23 | ./c pcre_ucp_searchfuncs 24 | ./c pcre_valid_utf8 25 | ./c pcre_version 26 | ./c pcre_xclass 27 | 28 | ./c -r libpcre pcre_chartables 29 | ./c -r libpcre pcre_compile 30 | ./c -r libpcre pcre_config 31 | ./c -r libpcre pcre_dfa_exec 32 | ./c -r libpcre pcre_exec 33 | ./c -r libpcre pcre_fullinfo 34 | ./c -r libpcre pcre_get 35 | ./c -r libpcre pcre_globals 36 | ./c -r libpcre pcre_info 37 | ./c -r libpcre pcre_maketables 38 | ./c -r libpcre pcre_ord2utf8 39 | ./c -r libpcre pcre_refcount 40 | ./c -r libpcre pcre_study 41 | ./c -r libpcre pcre_tables 42 | ./c -r libpcre pcre_try_flipped 43 | ./c -r libpcre pcre_ucp_searchfuncs 44 | ./c -r libpcre pcre_valid_utf8 45 | ./c -r libpcre pcre_version 46 | ./c -r libpcre pcre_xclass 47 | 48 | ./c -l pcregrep 49 | ./c -l pcredemo 50 | ./c -l pcretest 51 | 52 | echo -n "Install PCRE to /usr/local? (y/n) " 53 | read answer 54 | if [ $answer == "y" ]; then 55 | echo "Installing pcre.h into /usr/local/include..." 56 | cp pcre.h /usr/local/include 57 | echo "Installing libpcre.a into /usr/local/lib..." 58 | cp libpcre.a /usr/local/lib 59 | fi 60 | -------------------------------------------------------------------------------- /pcre/libpcre.def: -------------------------------------------------------------------------------- 1 | LIBRARY libpcre 2 | EXPORTS 3 | pcre_malloc 4 | pcre_free 5 | pcre_config 6 | pcre_callout 7 | pcre_compile 8 | pcre_copy_substring 9 | pcre_dfa_exec 10 | pcre_exec 11 | pcre_get_substring 12 | pcre_get_stringnumber 13 | pcre_get_substring_list 14 | pcre_free_substring 15 | pcre_free_substring_list 16 | pcre_info 17 | pcre_fullinfo 18 | pcre_maketables 19 | pcre_study 20 | pcre_version 21 | -------------------------------------------------------------------------------- /pcre/libpcre.pc.in: -------------------------------------------------------------------------------- 1 | # Package Information for pkg-config 2 | 3 | prefix=@prefix@ 4 | exec_prefix=@exec_prefix@ 5 | libdir=@libdir@ 6 | includedir=@includedir@ 7 | 8 | Name: libpcre 9 | Description: PCRE - Perl compatible regular expressions C library 10 | Version: @PCRE_VERSION@ 11 | Libs: -L${libdir} -lpcre 12 | Cflags: -I${includedir} 13 | -------------------------------------------------------------------------------- /pcre/libpcreposix.def: -------------------------------------------------------------------------------- 1 | LIBRARY libpcreposix 2 | EXPORTS 3 | pcre_malloc 4 | pcre_free 5 | pcre_config 6 | pcre_callout 7 | pcre_compile 8 | pcre_copy_substring 9 | pcre_dfa_exec 10 | pcre_exec 11 | pcre_get_substring 12 | pcre_get_stringnumber 13 | pcre_get_substring_list 14 | pcre_free_substring 15 | pcre_free_substring_list 16 | pcre_info 17 | pcre_fullinfo 18 | pcre_maketables 19 | pcre_study 20 | pcre_version 21 | 22 | regcomp 23 | regexec 24 | regerror 25 | regfree 26 | -------------------------------------------------------------------------------- /pcre/makevp.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | REM This file was contributed by Alexander Tokarev for building PCRE for use 4 | REM with Virtual Pascal. It has not been tested with the latest PCRE release. 5 | 6 | REM CHANGE THIS FOR YOUR BORLAND C++ COMPILER PATH 7 | 8 | SET BORLAND=c:\usr\apps\bcc55 9 | 10 | sh configure 11 | 12 | bcc32 -DDFTABLES -DSTATIC -DVPCOMPAT -I%BORLAND%\include -L%BORLAND%\lib dftables.c 13 | 14 | dftables > chartables.c 15 | 16 | bcc32 -c -RT- -y- -v- -u- -P- -O2 -5 -DSTATIC -DVPCOMPAT -UDFTABLES -I%BORLAND%\include get.c maketables.c pcre.c study.c 17 | 18 | tlib %BORLAND%\lib\cw32.lib *calloc *del *strncmp *memcpy *memmove *memset 19 | tlib pcre.lib +get.obj +maketables.obj +pcre.obj +study.obj +calloc.obj +del.obj +strncmp.obj +memcpy.obj +memmove.obj +memset.obj 20 | 21 | del *.obj *.exe *.tds *.bak >nul 2>nul 22 | 23 | echo --- 24 | echo Now the library should be complete. Please check all messages above. 25 | echo Don't care for warnings, it's OK. 26 | -------------------------------------------------------------------------------- /pcre/mkinstalldirs: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # mkinstalldirs --- make directory hierarchy 3 | # Author: Noah Friedman 4 | # Created: 1993-05-16 5 | # Public domain 6 | 7 | # $Id: mkinstalldirs,v 1.12.2.1 1998/12/26 17:32:14 bje Exp $ 8 | 9 | errstatus=0 10 | 11 | for file 12 | do 13 | set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` 14 | shift 15 | 16 | pathcomp= 17 | for d 18 | do 19 | pathcomp="$pathcomp$d" 20 | case "$pathcomp" in 21 | -* ) pathcomp=./$pathcomp ;; 22 | esac 23 | 24 | if test ! -d "$pathcomp"; then 25 | echo "mkdir $pathcomp" 26 | 27 | mkdir "$pathcomp" || lasterr=$? 28 | 29 | if test ! -d "$pathcomp"; then 30 | errstatus=$lasterr 31 | fi 32 | fi 33 | 34 | pathcomp="$pathcomp/" 35 | done 36 | done 37 | 38 | exit $errstatus 39 | 40 | # mkinstalldirs ends here 41 | -------------------------------------------------------------------------------- /pcre/pcre-config.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | prefix=@prefix@ 4 | exec_prefix=@exec_prefix@ 5 | exec_prefix_set=no 6 | 7 | usage="\ 8 | Usage: pcre-config [--prefix] [--exec-prefix] [--version] [--libs] [--libs-posix] [--cflags] [--cflags-posix]" 9 | 10 | if test $# -eq 0; then 11 | echo "${usage}" 1>&2 12 | exit 1 13 | fi 14 | 15 | libR= 16 | case `uname -s` in 17 | *SunOS*) 18 | libR=" -R@libdir@" 19 | ;; 20 | esac 21 | 22 | while test $# -gt 0; do 23 | case "$1" in 24 | -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; 25 | *) optarg= ;; 26 | esac 27 | 28 | case $1 in 29 | --prefix=*) 30 | prefix=$optarg 31 | if test $exec_prefix_set = no ; then 32 | exec_prefix=$optarg 33 | fi 34 | ;; 35 | --prefix) 36 | echo $prefix 37 | ;; 38 | --exec-prefix=*) 39 | exec_prefix=$optarg 40 | exec_prefix_set=yes 41 | ;; 42 | --exec-prefix) 43 | echo $exec_prefix 44 | ;; 45 | --version) 46 | echo @PCRE_VERSION@ 47 | ;; 48 | --cflags | --cflags-posix) 49 | if test @includedir@ != /usr/include ; then 50 | includes=-I@includedir@ 51 | fi 52 | echo $includes 53 | ;; 54 | --libs-posix) 55 | echo -L@libdir@$libR -lpcreposix -lpcre 56 | ;; 57 | --libs) 58 | echo -L@libdir@$libR -lpcre 59 | ;; 60 | *) 61 | echo "${usage}" 1>&2 62 | exit 1 63 | ;; 64 | esac 65 | shift 66 | done 67 | -------------------------------------------------------------------------------- /pcre/pcre.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | 3 | pcre_malloc DATA 4 | pcre_free DATA 5 | 6 | pcre_compile 7 | pcre_compile2 8 | pcre_config 9 | pcre_copy_named_substring 10 | pcre_copy_substring 11 | pcre_dfa_exec 12 | pcre_exec 13 | pcre_free_substring 14 | pcre_free_substring_list 15 | pcre_fullinfo 16 | pcre_get_named_substring 17 | pcre_get_stringnumber 18 | pcre_get_substring 19 | pcre_get_substring_list 20 | pcre_info 21 | pcre_maketables 22 | pcre_refcount 23 | pcre_study 24 | pcre_version 25 | 26 | regcomp 27 | regexec 28 | regerror 29 | regfree 30 | -------------------------------------------------------------------------------- /pcre/pcre_compile.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imatix/gsl/20d56ca93748b12f44528f0bc2250305a95327c0/pcre/pcre_compile.c -------------------------------------------------------------------------------- /pcre/pcre_stringpiece.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2005, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Author: wilsonh@google.com (Wilson Hsieh) 31 | // 32 | 33 | #include 34 | #include "config.h" 35 | #include "pcre_stringpiece.h" 36 | 37 | std::ostream& operator<<(std::ostream& o, const pcrecpp::StringPiece& piece) { 38 | return (o << piece.as_string()); 39 | } 40 | -------------------------------------------------------------------------------- /pcre/pcre_version.c: -------------------------------------------------------------------------------- 1 | /************************************************* 2 | * Perl-Compatible Regular Expressions * 3 | *************************************************/ 4 | 5 | /* PCRE is a library of functions to support regular expressions whose syntax 6 | and semantics are as close as possible to those of the Perl 5 language. 7 | 8 | Written by Philip Hazel 9 | Copyright (c) 1997-2006 University of Cambridge 10 | 11 | ----------------------------------------------------------------------------- 12 | Redistribution and use in source and binary forms, with or without 13 | modification, are permitted provided that the following conditions are met: 14 | 15 | * Redistributions of source code must retain the above copyright notice, 16 | this list of conditions and the following disclaimer. 17 | 18 | * Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | * Neither the name of the University of Cambridge nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 27 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 28 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 29 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 30 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 31 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 32 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 33 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 34 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 35 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 36 | POSSIBILITY OF SUCH DAMAGE. 37 | ----------------------------------------------------------------------------- 38 | */ 39 | 40 | 41 | /* This module contains the external function pcre_version(), which returns a 42 | string that identifies the PCRE version that is in use. */ 43 | 44 | 45 | #include "pcre_internal.h" 46 | 47 | 48 | /************************************************* 49 | * Return version string * 50 | *************************************************/ 51 | 52 | #define STRING(a) # a 53 | #define XSTRING(s) STRING(s) 54 | 55 | PCRE_DATA_SCOPE const char * 56 | pcre_version(void) 57 | { 58 | return XSTRING(PCRE_MAJOR) 59 | "." XSTRING(PCRE_MINOR) 60 | XSTRING(PCRE_PRERELEASE) 61 | " " XSTRING(PCRE_DATE); 62 | } 63 | 64 | /* End of pcre_version.c */ 65 | -------------------------------------------------------------------------------- /pcre/readme.txt: -------------------------------------------------------------------------------- 1 | Please refer to the file README. 2 | -------------------------------------------------------------------------------- /pcre/stamp_generate: -------------------------------------------------------------------------------- 1 | Source files successfully generated 2 | -------------------------------------------------------------------------------- /src/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | gsl 3 | *.a 4 | 5 | -------------------------------------------------------------------------------- /src/console.gsl: -------------------------------------------------------------------------------- 1 | # Trivial GSL console 2 | # Just to show the idea 3 | # 4 | console.put (console.version ()) 5 | console.put ( 'Welcome to the GSL console. 6 | From here you can run GSL commands interactively. 7 | Type any GSL command and press [Enter] to execute it. 8 | Type \'exit\' to leave the command console. 9 | ') 10 | 11 | while 1 12 | string = console.get ("> ") 13 | if string = "exit" 14 | last 15 | endif 16 | gsl string 17 | endwhile 18 | 19 | -------------------------------------------------------------------------------- /src/ggcode.i: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------* 2 | * ggcode.i - LIBERO dialog interpreter for ggcode.c. * 3 | * Generated by LIBERO 2.4 on 9 Sep, 2014, 21:58. * 4 | * Schema file used: smtschm.c. * 5 | *---------------------------------------------------------------------------*/ 6 | if (agent_lookup (AGENT_NAME)) 7 | return (0); /* Agent already declared */ 8 | if ((agent = agent_declare (AGENT_NAME)) == NULL) 9 | return (-1); /* Could not declare agent */ 10 | 11 | #if (defined (SINGLE_THREADED)) 12 | agent-> tcb_size = 0; /* No context block */ 13 | agent-> max_threads = 1; /* and max. 1 thread */ 14 | #else 15 | agent-> tcb_size = sizeof (TCB); 16 | #endif 17 | agent-> initialise = initialise_the_thread; 18 | agent-> maxevent = 92; 19 | agent-> maxmodule = 131; 20 | agent-> maxstate = 25; 21 | agent-> priority = SMT_PRIORITY_NORMAL; 22 | agent-> LR_defaults = 24; 23 | agent-> LR_nextst = &_LR_nextst [0][0]; 24 | agent-> LR_action = &_LR_action [0][0]; 25 | agent-> LR_offset = _LR_offset; 26 | agent-> LR_vector = _LR_vector; 27 | agent-> LR_module = _LR_module; 28 | agent-> LR_mname = _LR_mname; 29 | agent-> LR_sname = _LR_sname; 30 | agent-> LR_ename = _LR_ename; 31 | #if (defined (SMT_PROFILE)) 32 | agent-> LR_count = &_LR_count [0]; 33 | agent-> LR_time = &_LR_time [0]; 34 | agent-> LR_flow = &_LR_flow [0][0]; 35 | 36 | memset (_LR_count, 0, sizeof (_LR_count)); 37 | memset (_LR_time, 0, sizeof (_LR_time)); 38 | #endif 39 | -------------------------------------------------------------------------------- /src/ggconv.h: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------- 2 | * ggconv.h - GSL/conv package header 3 | * 4 | * Generated from ggconv by ggobjt.gsl using GSL/4. 5 | * DO NOT MODIFY THIS FILE. 6 | * 7 | * For documentation and updates see http://www.imatix.com. 8 | *---------------------------------------------------------------------------*/ 9 | 10 | #ifndef GGCONV_INCLUDED 11 | #define GGCONV_INCLUDED 12 | 13 | /*- Global variables --------------------------------------------------------*/ 14 | 15 | extern CLASS_DESCRIPTOR 16 | conv_class; 17 | 18 | /*- Function prototypes -----------------------------------------------------*/ 19 | 20 | int register_conv_classes (void); 21 | 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /src/ggdiag.h: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------- 2 | * ggdiag.h - GSL/diag package header 3 | * 4 | * Generated from ggdiag by ggobjt.gsl using GSL/4. 5 | * DO NOT MODIFY THIS FILE. 6 | * 7 | * For documentation and updates see http://www.imatix.com. 8 | *---------------------------------------------------------------------------*/ 9 | 10 | #ifndef GGDIAG_INCLUDED 11 | #define GGDIAG_INCLUDED 12 | 13 | /*- Global variables --------------------------------------------------------*/ 14 | 15 | extern CLASS_DESCRIPTOR 16 | diag_class; 17 | 18 | /*- Function prototypes -----------------------------------------------------*/ 19 | 20 | int register_diag_classes (void); 21 | 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /src/ggdoc.gsl: -------------------------------------------------------------------------------- 1 | .------------------------------------------------------------------------------ 2 | .- 3 | .- ggdoc.gsl - Object module documentation generator 4 | .- 5 | .- 6 | .- Copyright (c) 1996-2010 iMatix Corporation 7 | .- 8 | .- This program is free software; you can redistribute it and/or modify 9 | .- it under the terms of the GNU General Public License as published by 10 | .- the Free Software Foundation; either version 3 of the License, or (at 11 | .- your option) any later version. 12 | .- 13 | .- This program is distributed in the hope that it will be useful, but 14 | .- WITHOUT ANY WARRANTY; without even the implied warranty of 15 | .- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | .- General Public License for more details. 17 | .- 18 | .- For information on alternative licensing for OEMs, please contact 19 | .- iMatix Corporation. 20 | .- 21 | .------------------------------------------------------------------------------ 22 | .- 23 | .xml to root << . 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | . 38 | .- 39 | MODULE: $(title:) 40 | 41 | .for class by - register ? 1 42 | Class: $(title:) 43 | 44 | . for function 45 | Function: $(!register??'<'?)$(class.name:)$(!register??'>'?) . \ 46 | $(name:) (\ 47 | . for parameter 48 | $(compulsory??''?'[')$(name:)$(compulsory??''?']')$(!last()??','?)\ 49 | . endfor 50 | ) 51 | . if defined (-> description) 52 | $(string.trim(->description.)) 53 | . endif 54 | 55 | . endfor 56 | 57 | .endfor 58 | -------------------------------------------------------------------------------- /src/ggenvt.gxl: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | Returns value of environment variable `name`, if it exists. 33 | 34 | 35 | 36 | { 37 | result-> value. s = mem_strdup (getenv (string_value (& name-> value))); 38 | if (result-> value. s) 39 | result-> value. type = TYPE_STRING; 40 | 41 | return 0; 42 | } 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | If value is provided, sets environment variable `name` to `value`. 51 | Otherwise, clears environment variable `name`. 52 | 53 | 54 | 55 | 56 | 57 | { 58 | result-> value. type = TYPE_NUMBER; 59 | if (value 60 | && value-> value. type != TYPE_UNDEFINED) 61 | result-> value. n = env_set (string_value (& name-> value), 62 | string_value (& value-> value), 63 | 1); 64 | else 65 | { 66 | env_clear (string_value (& name-> value)); 67 | result-> value. n = 0; 68 | } 69 | return 0; 70 | } 71 | 72 | 73 | 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /src/ggenvt.h: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------- 2 | * ggenvt.h - GSL/environment package header 3 | * 4 | * Generated from ggenvt by ggobjt.gsl using GSL/4. 5 | * DO NOT MODIFY THIS FILE. 6 | * 7 | * For documentation and updates see http://www.imatix.com. 8 | *---------------------------------------------------------------------------*/ 9 | 10 | #ifndef GGENVT_INCLUDED 11 | #define GGENVT_INCLUDED 12 | 13 | /*- Global variables --------------------------------------------------------*/ 14 | 15 | extern CLASS_DESCRIPTOR 16 | env_class; 17 | 18 | /*- Function prototypes -----------------------------------------------------*/ 19 | 20 | int register_env_classes (void); 21 | 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /src/ggfile.h: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------- 2 | * ggfile.h - GSL/fileio package header 3 | * 4 | * Generated from ggfile by ggobjt.gsl using GSL/4. 5 | * DO NOT MODIFY THIS FILE. 6 | * 7 | * For documentation and updates see http://www.imatix.com. 8 | *---------------------------------------------------------------------------*/ 9 | 10 | #ifndef GGFILE_INCLUDED 11 | #define GGFILE_INCLUDED 12 | 13 | /*- Global variables --------------------------------------------------------*/ 14 | 15 | extern CLASS_DESCRIPTOR 16 | directory_class; 17 | 18 | extern CLASS_DESCRIPTOR 19 | directory_entry_class; 20 | 21 | extern CLASS_DESCRIPTOR 22 | file_class; 23 | 24 | extern CLASS_DESCRIPTOR 25 | file_entry_class; 26 | 27 | /*- Function prototypes -----------------------------------------------------*/ 28 | 29 | int register_file_classes (void); 30 | 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /src/gggsl.h: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------- 2 | * gggsl.h - GSL/gsl control package header 3 | * 4 | * Generated from gggsl by ggobjt.gsl using GSL/4. 5 | * DO NOT MODIFY THIS FILE. 6 | * 7 | * For documentation and updates see http://www.imatix.com. 8 | *---------------------------------------------------------------------------*/ 9 | 10 | #ifndef GGGSL_INCLUDED 11 | #define GGGSL_INCLUDED 12 | /*- Public definitions ------------------------------------------------------*/ 13 | 14 | typedef struct { 15 | int 16 | links; 17 | Bool 18 | ignorecase, /* = use case for pretty-print */ 19 | cobol, /* COBOL = 6 char line numbers */ 20 | template; /* Template mode? */ 21 | SCRIPT_LINE 22 | *line; /* script_line item for current line */ 23 | int 24 | shuffle; /* Min whitespace size for shuffle */ 25 | char 26 | *terminator; /* Line terminator string */ 27 | char 28 | *escape; /* Escape symbol, if not '\' */ 29 | char 30 | *substitute; /* Substitute symbol, if not '$' */ 31 | int 32 | argc; /* Command line arguments */ 33 | char 34 | **argv; 35 | SYMTAB_ITEM 36 | *switches; /* Original command-line switches */ 37 | char 38 | *output_file, /* Output file name */ 39 | *input_file; /* Input file name */ 40 | long 41 | output_line; /* Line number in output file. */ 42 | } GSL_CONTROL; 43 | 44 | extern char 45 | *me, /* Module name */ 46 | *version; /* GSL version */ 47 | 48 | 49 | /*- Global variables --------------------------------------------------------*/ 50 | 51 | extern CLASS_DESCRIPTOR 52 | gsl_class; 53 | 54 | /*- Function prototypes -----------------------------------------------------*/ 55 | 56 | int register_gsl_classes (void); 57 | 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /src/gggsl.i: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------* 2 | * gggsl.i - LIBERO dialog interpreter for gggsl.c. * 3 | * Generated by LIBERO 2.4 on 11 Oct, 2010, 17:16. * 4 | * Schema file used: smtschm.c. * 5 | *---------------------------------------------------------------------------*/ 6 | if (agent_lookup (AGENT_NAME)) 7 | return (0); /* Agent already declared */ 8 | if ((agent = agent_declare (AGENT_NAME)) == NULL) 9 | return (-1); /* Could not declare agent */ 10 | 11 | #if (defined (SINGLE_THREADED)) 12 | agent-> tcb_size = 0; /* No context block */ 13 | agent-> max_threads = 1; /* and max. 1 thread */ 14 | #else 15 | agent-> tcb_size = sizeof (TCB); 16 | #endif 17 | agent-> initialise = initialise_the_thread; 18 | agent-> maxevent = 6; 19 | agent-> maxmodule = 4; 20 | agent-> maxstate = 3; 21 | agent-> priority = SMT_PRIORITY_NORMAL; 22 | agent-> LR_defaults = 2; 23 | agent-> LR_nextst = &_LR_nextst [0][0]; 24 | agent-> LR_action = &_LR_action [0][0]; 25 | agent-> LR_offset = _LR_offset; 26 | agent-> LR_vector = _LR_vector; 27 | agent-> LR_module = _LR_module; 28 | agent-> LR_mname = _LR_mname; 29 | agent-> LR_sname = _LR_sname; 30 | agent-> LR_ename = _LR_ename; 31 | #if (defined (SMT_PROFILE)) 32 | agent-> LR_count = &_LR_count [0]; 33 | agent-> LR_time = &_LR_time [0]; 34 | agent-> LR_flow = &_LR_flow [0][0]; 35 | 36 | memset (_LR_count, 0, sizeof (_LR_count)); 37 | memset (_LR_time, 0, sizeof (_LR_time)); 38 | #endif 39 | -------------------------------------------------------------------------------- /src/gggsl.l: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------------- 2 | ! gggsl.l - GSL/gsl control package dialog 3 | ! 4 | ! Generated from gggsl by ggobjt.gsl using GSL/4. 5 | ! DO NOT MODIFY THIS FILE. 6 | ! 7 | ! For documentation and updates see http://www.imatix.com. 8 | !---------------------------------------------------------------------------- 9 | 10 | -schema=smtschm.c 11 | -nostubs 12 | 13 | 14 | Starting: 15 | (--) Execute -> Executing 16 | + 17 | 18 | Executing: 19 | (--) Ok -> 20 | + Return-Done 21 | + Terminate-The-Thread 22 | (--) Message -> 23 | + Forward-Message-As-Call-Message 24 | (--) Error -> 25 | + Forward-Message-As-Call-Error 26 | + Terminate-The-Thread 27 | (--) Fatal -> 28 | + Forward-Message-As-Call-Error 29 | + Terminate-The-Thread 30 | 31 | Defaults: 32 | (--) Shutdown -> 33 | + Terminate-The-Thread 34 | 35 | -------------------------------------------------------------------------------- /src/gghead.h: -------------------------------------------------------------------------------- 1 | /*===========================================================================* 2 | * * 3 | * gghead.h - Header for generated gsl.h * 4 | * * 5 | * Copyright (c) 1996-2010 iMatix Corporation * 6 | * * 7 | * This program is free software; you can redistribute it and/or modify * 8 | * it under the terms of the GNU General Public License as published by * 9 | * the Free Software Foundation; either version 3 of the License, or (at * 10 | * your option) any later version. * 11 | * * 12 | * This program is distributed in the hope that it will be useful, but * 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * General Public License for more details. * 16 | * * 17 | * For information on alternative licensing for OEMs, please contact * 18 | * iMatix Corporation. * 19 | * * 20 | *===========================================================================*/ 21 | /* ----------------------------------------------------------------- 22 | Synopsis: This header file is GENERATED by the Boom installer. DO NOT 23 | MODIFY THIS FILE. If you change prelude.h, or any of the 24 | other GSL header files, re-run boomake to recreate this file. 25 | -------------------------------------------------------------------*/ 26 | -------------------------------------------------------------------------------- /src/ggmacro.gsl: -------------------------------------------------------------------------------- 1 | .------------------------------------------------------------------------------ 2 | .- 3 | .- ggmacro.gsl - GSL macro examples 4 | .- 5 | .- Copyright (c) 1996-2010 iMatix Corporation 6 | .- 7 | .- This program is free software; you can redistribute it and/or modify 8 | .- it under the terms of the GNU General Public License as published by 9 | .- the Free Software Foundation; either version 3 of the License, or (at 10 | .- your option) any later version. 11 | .- 12 | .- This program is distributed in the hope that it will be useful, but 13 | .- WITHOUT ANY WARRANTY; without even the implied warranty of 14 | .- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | .- General Public License for more details. 16 | .- 17 | .- For information on alternative licensing for OEMs, please contact 18 | .- iMatix Corporation. 19 | .- 20 | .------------------------------------------------------------------------------ 21 | .- 22 | .macro push_outfile (newfile) 23 | . if ! defined (_file_stack) 24 | . define _file_stack 0 25 | . endif 26 | . define _file_stack = _file_stack + 1 27 | . define _file_stack_$(_file_stack) = outfile 28 | . append newfile 29 | .endmacro 30 | .- 31 | .macro pop_outfile 32 | . if ! defined (_file_stack) | _file_stack = 0 33 | . abort "File stack empty." 34 | . endif 35 | . append _file_stack_$(_file_stack) 36 | . define _file_stack_$(_file_stack) 37 | . define _file_stack = _file_stack - 1 38 | .endmacro 39 | .- 40 | -------------------------------------------------------------------------------- /src/ggmath.h: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------- 2 | * ggmath.h - GSL/math package header 3 | * 4 | * Generated from ggmath by ggobjt.gsl using GSL/4. 5 | * DO NOT MODIFY THIS FILE. 6 | * 7 | * For documentation and updates see http://www.imatix.com. 8 | *---------------------------------------------------------------------------*/ 9 | 10 | #ifndef GGMATH_INCLUDED 11 | #define GGMATH_INCLUDED 12 | 13 | /*- Global variables --------------------------------------------------------*/ 14 | 15 | extern CLASS_DESCRIPTOR 16 | math_class; 17 | 18 | /*- Function prototypes -----------------------------------------------------*/ 19 | 20 | int register_math_classes (void); 21 | 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /src/ggobjt.h: -------------------------------------------------------------------------------- 1 | /*===========================================================================* 2 | * * 3 | * ggobjt.h - Object functions * 4 | * * 5 | * Copyright (c) 1996-2010 iMatix Corporation * 6 | * * 7 | * This program is free software; you can redistribute it and/or modify * 8 | * it under the terms of the GNU General Public License as published by * 9 | * the Free Software Foundation; either version 3 of the License, or (at * 10 | * your option) any later version. * 11 | * * 12 | * This program is distributed in the hope that it will be useful, but * 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * General Public License for more details. * 16 | * * 17 | * For information on alternative licensing for OEMs, please contact * 18 | * iMatix Corporation. * 19 | * * 20 | *===========================================================================*/ 21 | 22 | #ifndef GGOBJT_INCLUDED /* Allow multiple inclusions */ 23 | #define GGOBJT_INCLUDED 24 | 25 | /*- Type definitions --------------------------------------------------------*/ 26 | 27 | 28 | /*- Global variables --------------------------------------------------------*/ 29 | 30 | extern char 31 | object_error [LINE_MAX + 1]; 32 | 33 | /*- Functions ---------------------------------------------------------------*/ 34 | 35 | void initialise_objects (void); 36 | void destroy_objects (void); 37 | int object_register (PLUGIN_INITIALISE *init, 38 | function shutdown); 39 | int initialise_classes (THREAD *thread); 40 | GSL_FUNCTION *locate_method (CLASS_DESCRIPTOR *class, 41 | const char *name); 42 | int build_method_arguments (SCRIPT_NODE *fn_node, 43 | RESULT_NODE ***arg); 44 | Bool arguments_are_defined (int argc, 45 | RESULT_NODE **argv, 46 | RESULT_NODE *result); 47 | void *get_class_item (THREAD *gsl_thread, 48 | const char *class); 49 | 50 | /*---------------------------------------------------------------------------*/ 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/ggpars.i: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------* 2 | * ggpars.i - LIBERO dialog interpreter for ggpars.c. * 3 | * Generated by LIBERO 2.4 on 11 Oct, 2010, 17:16. * 4 | * Schema file used: smtschm.c. * 5 | *---------------------------------------------------------------------------*/ 6 | if (agent_lookup (AGENT_NAME)) 7 | return (0); /* Agent already declared */ 8 | if ((agent = agent_declare (AGENT_NAME)) == NULL) 9 | return (-1); /* Could not declare agent */ 10 | 11 | #if (defined (SINGLE_THREADED)) 12 | agent-> tcb_size = 0; /* No context block */ 13 | agent-> max_threads = 1; /* and max. 1 thread */ 14 | #else 15 | agent-> tcb_size = sizeof (TCB); 16 | #endif 17 | agent-> initialise = initialise_the_thread; 18 | agent-> maxevent = 95; 19 | agent-> maxmodule = 113; 20 | agent-> maxstate = 49; 21 | agent-> priority = SMT_PRIORITY_NORMAL; 22 | agent-> LR_defaults = 47; 23 | agent-> LR_nextst = &_LR_nextst [0][0]; 24 | agent-> LR_action = &_LR_action [0][0]; 25 | agent-> LR_offset = _LR_offset; 26 | agent-> LR_vector = _LR_vector; 27 | agent-> LR_module = _LR_module; 28 | agent-> LR_mname = _LR_mname; 29 | agent-> LR_sname = _LR_sname; 30 | agent-> LR_ename = _LR_ename; 31 | #if (defined (SMT_PROFILE)) 32 | agent-> LR_count = &_LR_count [0]; 33 | agent-> LR_time = &_LR_time [0]; 34 | agent-> LR_flow = &_LR_flow [0][0]; 35 | 36 | memset (_LR_count, 0, sizeof (_LR_count)); 37 | memset (_LR_time, 0, sizeof (_LR_time)); 38 | #endif 39 | -------------------------------------------------------------------------------- /src/ggpcre.h: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------- 2 | * ggpcre.h - GSL/regexp package header 3 | * 4 | * Generated from ggpcre by ggobjt.gsl using GSL/4. 5 | * DO NOT MODIFY THIS FILE. 6 | * 7 | * For documentation and updates see http://www.imatix.com. 8 | *---------------------------------------------------------------------------*/ 9 | 10 | #ifndef GGPCRE_INCLUDED 11 | #define GGPCRE_INCLUDED 12 | 13 | /*- Global variables --------------------------------------------------------*/ 14 | 15 | extern CLASS_DESCRIPTOR 16 | regexp_class; 17 | 18 | /*- Function prototypes -----------------------------------------------------*/ 19 | 20 | int register_regexp_classes (void); 21 | 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /src/ggpriv.h: -------------------------------------------------------------------------------- 1 | /*===========================================================================* 2 | * * 3 | * ggpriv.h - Project header file * 4 | * * 5 | * Copyright (c) 1996-2010 iMatix Corporation * 6 | * * 7 | * This program is free software; you can redistribute it and/or modify * 8 | * it under the terms of the GNU General Public License as published by * 9 | * the Free Software Foundation; either version 3 of the License, or (at * 10 | * your option) any later version. * 11 | * * 12 | * This program is distributed in the hope that it will be useful, but * 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * General Public License for more details. * 16 | * * 17 | * For information on alternative licensing for OEMs, please contact * 18 | * iMatix Corporation. * 19 | * * 20 | *===========================================================================*/ 21 | 22 | #ifndef GGPRIV_INCLUDED /* Allow multiple inclusions */ 23 | #define GGPRIV_INCLUDED 24 | 25 | #include "sfl.h" /* SFL functions and definitions */ 26 | #include "smt3.h" /* SMT functions and definitions */ 27 | #if 0 28 | #include "smtmem.h" /* SMT memory accounting */ 29 | #endif 30 | #include "ggcomm.h" /* Common stuff header file */ 31 | #include "ggpars.h" /* Script parser header file */ 32 | #include "ggparsm.h" /* Parser message header file */ 33 | #include "ggscrp.h" /* Script object header file */ 34 | #include "ggsymb.h" /* Symbol object header file */ 35 | #include "gggsl.h" /* GSL control block header file */ 36 | #include "ggscop.h" /* Scope header file */ 37 | #include "ggcode.h" /* Code generator header file */ 38 | #include "ggcodem.h" /* Code generator message file */ 39 | #include "ggobjt.h" /* Object module header file */ 40 | #include "ggxml.h" /* XML object header file */ 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /src/ggproc.h: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------- 2 | * ggproc.h - GSL/process management 3 | package header 4 | * 5 | * Generated from ggproc by ggobjt.gsl using GSL/4. 6 | * DO NOT MODIFY THIS FILE. 7 | * 8 | * For documentation and updates see http://www.imatix.com. 9 | *---------------------------------------------------------------------------*/ 10 | 11 | #ifndef GGPROC_INCLUDED 12 | #define GGPROC_INCLUDED 13 | 14 | /*- Global variables --------------------------------------------------------*/ 15 | 16 | extern CLASS_DESCRIPTOR 17 | proc_class; 18 | 19 | extern CLASS_DESCRIPTOR 20 | proc_handle_class; 21 | 22 | /*- Function prototypes -----------------------------------------------------*/ 23 | 24 | int register_proc_classes (void); 25 | 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /src/ggreport.gsl: -------------------------------------------------------------------------------- 1 | .------------------------------------------------------------------------------ 2 | .- 3 | .- ggreport.gsl - GSL reporting examples 4 | .- 5 | .- 6 | .- Copyright (c) 1996-2010 iMatix Corporation 7 | .- 8 | .- This program is free software; you can redistribute it and/or modify 9 | .- it under the terms of the GNU General Public License as published by 10 | .- the Free Software Foundation; either version 3 of the License, or (at 11 | .- your option) any later version. 12 | .- 13 | .- This program is distributed in the hope that it will be useful, but 14 | .- WITHOUT ANY WARRANTY; without even the implied warranty of 15 | .- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | .- General Public License for more details. 17 | .- 18 | .- For information on alternative licensing for OEMs, please contact 19 | .- iMatix Corporation. 20 | .- 21 | .------------------------------------------------------------------------------ 22 | .- 23 | .macro report 24 | . if macro ("$(name())_prefix") 25 | . invoke $(name())_prefix 26 | . endif 27 | . define report.last = "" 28 | . for . where name () <> "" 29 | . if name () <> report.last 30 | . if report.last <> "" & macro ("$(last:)_footer") 31 | . invoke $(last:)_footer 32 | . endif 33 | . if macro ("$(name())_header") 34 | . invoke $(name ())_header 35 | . endif 36 | . define report.last = name () 37 | . endif 38 | . invoke report 39 | . endfor 40 | . if report.last <> "" & macro ("$(last:)_footer") 41 | . invoke $(last:)_footer 42 | . endif 43 | . if macro ("$(name())_suffix") 44 | . invoke $(name())_suffix 45 | . endif 46 | .endmacro 47 | -------------------------------------------------------------------------------- /src/ggscrp.i: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------* 2 | * ggscrp.i - LIBERO dialog interpreter for ggscrp.c. * 3 | * Generated by LIBERO 2.4 on 11 Oct, 2010, 17:16. * 4 | * Schema file used: smtschm.c. * 5 | *---------------------------------------------------------------------------*/ 6 | if (agent_lookup (AGENT_NAME)) 7 | return (0); /* Agent already declared */ 8 | if ((agent = agent_declare (AGENT_NAME)) == NULL) 9 | return (-1); /* Could not declare agent */ 10 | 11 | #if (defined (SINGLE_THREADED)) 12 | agent-> tcb_size = 0; /* No context block */ 13 | agent-> max_threads = 1; /* and max. 1 thread */ 14 | #else 15 | agent-> tcb_size = sizeof (TCB); 16 | #endif 17 | agent-> initialise = initialise_the_thread; 18 | agent-> maxevent = 30; 19 | agent-> maxmodule = 38; 20 | agent-> maxstate = 7; 21 | agent-> priority = SMT_PRIORITY_NORMAL; 22 | agent-> LR_defaults = 6; 23 | agent-> LR_nextst = &_LR_nextst [0][0]; 24 | agent-> LR_action = &_LR_action [0][0]; 25 | agent-> LR_offset = _LR_offset; 26 | agent-> LR_vector = _LR_vector; 27 | agent-> LR_module = _LR_module; 28 | agent-> LR_mname = _LR_mname; 29 | agent-> LR_sname = _LR_sname; 30 | agent-> LR_ename = _LR_ename; 31 | #if (defined (SMT_PROFILE)) 32 | agent-> LR_count = &_LR_count [0]; 33 | agent-> LR_time = &_LR_time [0]; 34 | agent-> LR_flow = &_LR_flow [0][0]; 35 | 36 | memset (_LR_count, 0, sizeof (_LR_count)); 37 | memset (_LR_time, 0, sizeof (_LR_time)); 38 | #endif 39 | -------------------------------------------------------------------------------- /src/ggsock.h: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------- 2 | * ggsock.h - GSL/socket package header 3 | * 4 | * Generated from ggsock by ggobjt.gsl using GSL/4. 5 | * DO NOT MODIFY THIS FILE. 6 | * 7 | * For documentation and updates see http://www.imatix.com. 8 | *---------------------------------------------------------------------------*/ 9 | 10 | #ifndef GGSOCK_INCLUDED 11 | #define GGSOCK_INCLUDED 12 | 13 | /*- Global variables --------------------------------------------------------*/ 14 | 15 | extern CLASS_DESCRIPTOR 16 | sock_class; 17 | 18 | extern CLASS_DESCRIPTOR 19 | sock_handle_class; 20 | 21 | /*- Function prototypes -----------------------------------------------------*/ 22 | 23 | int register_sock_classes (void); 24 | 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /src/ggsock.i: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------* 2 | * ggsock.i - LIBERO dialog interpreter for ggsock.c. * 3 | * Generated by LIBERO 2.4 on 11 Oct, 2010, 17:16. * 4 | * Schema file used: smtschm.c. * 5 | *---------------------------------------------------------------------------*/ 6 | if (agent_lookup (AGENT_NAME)) 7 | return (0); /* Agent already declared */ 8 | if ((agent = agent_declare (AGENT_NAME)) == NULL) 9 | return (-1); /* Could not declare agent */ 10 | 11 | #if (defined (SINGLE_THREADED)) 12 | agent-> tcb_size = 0; /* No context block */ 13 | agent-> max_threads = 1; /* and max. 1 thread */ 14 | #else 15 | agent-> tcb_size = sizeof (TCB); 16 | #endif 17 | agent-> initialise = initialise_the_thread; 18 | agent-> maxevent = 9; 19 | agent-> maxmodule = 9; 20 | agent-> maxstate = 2; 21 | agent-> priority = SMT_PRIORITY_NORMAL; 22 | agent-> LR_defaults = -1; 23 | agent-> LR_nextst = &_LR_nextst [0][0]; 24 | agent-> LR_action = &_LR_action [0][0]; 25 | agent-> LR_offset = _LR_offset; 26 | agent-> LR_vector = _LR_vector; 27 | agent-> LR_module = _LR_module; 28 | agent-> LR_mname = _LR_mname; 29 | agent-> LR_sname = _LR_sname; 30 | agent-> LR_ename = _LR_ename; 31 | #if (defined (SMT_PROFILE)) 32 | agent-> LR_count = &_LR_count [0]; 33 | agent-> LR_time = &_LR_time [0]; 34 | agent-> LR_flow = &_LR_flow [0][0]; 35 | 36 | memset (_LR_count, 0, sizeof (_LR_count)); 37 | memset (_LR_time, 0, sizeof (_LR_time)); 38 | #endif 39 | -------------------------------------------------------------------------------- /src/ggsock.l: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------------- 2 | ! ggsock.l - GSL/socket package dialog 3 | ! 4 | ! Generated from ggsock by ggobjt.gsl using GSL/4. 5 | ! DO NOT MODIFY THIS FILE. 6 | ! 7 | ! For documentation and updates see http://www.imatix.com. 8 | !---------------------------------------------------------------------------- 9 | 10 | -schema=smtschm.c 11 | -nostubs 12 | 13 | 14 | After-Init: 15 | (--) Ok -> Waiting 16 | + 17 | 18 | Waiting: 19 | (--) Ok -> 20 | + Reply-Ok-Result 21 | + Terminate-The-Thread 22 | (--) Error -> 23 | + Reply-Error-Result 24 | + Terminate-The-Thread 25 | (--) Closed -> 26 | + Reply-Closed-Result 27 | + Terminate-The-Thread 28 | (--) Timeout -> 29 | + Reply-Timeout-Result 30 | + Terminate-The-Thread 31 | (--) Connect-Ok -> 32 | + Reply-Connect-Ok-Result 33 | + Terminate-The-Thread 34 | (--) Readh-Ok -> 35 | + Reply-Readh-Ok-Result 36 | + Terminate-The-Thread 37 | (--) Readh-Closed -> 38 | + Reply-Readh-Closed-Result 39 | + Terminate-The-Thread 40 | (--) Readh-Timeout -> 41 | + Reply-Readh-Timeout-Result 42 | + Terminate-The-Thread 43 | (--) Shutdown -> 44 | + Terminate-The-Thread 45 | 46 | -------------------------------------------------------------------------------- /src/ggstrn.h: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------- 2 | * ggstrn.h - GSL/string package header 3 | * 4 | * Generated from ggstrn by ggobjt.gsl using GSL/4. 5 | * DO NOT MODIFY THIS FILE. 6 | * 7 | * For documentation and updates see http://www.imatix.com. 8 | *---------------------------------------------------------------------------*/ 9 | 10 | #ifndef GGSTRN_INCLUDED 11 | #define GGSTRN_INCLUDED 12 | 13 | /*- Global variables --------------------------------------------------------*/ 14 | 15 | extern CLASS_DESCRIPTOR 16 | string_class; 17 | 18 | /*- Function prototypes -----------------------------------------------------*/ 19 | 20 | int register_string_classes (void); 21 | 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /src/ggsymb.h: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------- 2 | * ggsymb.h - GSL/symb package header 3 | * 4 | * Generated from ggsymb by ggobjt.gsl using GSL/4. 5 | * DO NOT MODIFY THIS FILE. 6 | * 7 | * For documentation and updates see http://www.imatix.com. 8 | *---------------------------------------------------------------------------*/ 9 | 10 | #ifndef GGSYMB_INCLUDED 11 | #define GGSYMB_INCLUDED 12 | /*- Public definitions ------------------------------------------------------*/ 13 | 14 | typedef struct { 15 | int 16 | links; 17 | char 18 | *name; 19 | SYMTAB 20 | *symtab; 21 | Bool 22 | done, 23 | loop; /* To check for self-references */ 24 | } SYMTAB_ITEM; 25 | 26 | 27 | /*- Global variables --------------------------------------------------------*/ 28 | 29 | extern CLASS_DESCRIPTOR 30 | symb_class; 31 | 32 | /*- Function prototypes -----------------------------------------------------*/ 33 | 34 | int register_symb_classes (void); 35 | 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /src/ggthrd.h: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------- 2 | * ggthrd.h - GSL/thrd package header 3 | * 4 | * Generated from ggthrd by ggobjt.gsl using GSL/4. 5 | * DO NOT MODIFY THIS FILE. 6 | * 7 | * For documentation and updates see http://www.imatix.com. 8 | *---------------------------------------------------------------------------*/ 9 | 10 | #ifndef GGTHRD_INCLUDED 11 | #define GGTHRD_INCLUDED 12 | 13 | /*- Global variables --------------------------------------------------------*/ 14 | 15 | extern CLASS_DESCRIPTOR 16 | thread_class; 17 | 18 | extern CLASS_DESCRIPTOR 19 | remote_thread_class; 20 | 21 | extern CLASS_DESCRIPTOR 22 | child_thread_class; 23 | 24 | extern CLASS_DESCRIPTOR 25 | parsed_item_class; 26 | 27 | /*- Function prototypes -----------------------------------------------------*/ 28 | 29 | int register_thread_classes (void); 30 | 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /src/ggthrd.i: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------* 2 | * ggthrd.i - LIBERO dialog interpreter for ggthrd.c. * 3 | * Generated by LIBERO 2.4 on 11 Oct, 2010, 17:16. * 4 | * Schema file used: smtschm.c. * 5 | *---------------------------------------------------------------------------*/ 6 | if (agent_lookup (AGENT_NAME)) 7 | return (0); /* Agent already declared */ 8 | if ((agent = agent_declare (AGENT_NAME)) == NULL) 9 | return (-1); /* Could not declare agent */ 10 | 11 | #if (defined (SINGLE_THREADED)) 12 | agent-> tcb_size = 0; /* No context block */ 13 | agent-> max_threads = 1; /* and max. 1 thread */ 14 | #else 15 | agent-> tcb_size = sizeof (TCB); 16 | #endif 17 | agent-> initialise = initialise_the_thread; 18 | agent-> maxevent = 8; 19 | agent-> maxmodule = 10; 20 | agent-> maxstate = 5; 21 | agent-> priority = SMT_PRIORITY_NORMAL; 22 | agent-> LR_defaults = 4; 23 | agent-> LR_nextst = &_LR_nextst [0][0]; 24 | agent-> LR_action = &_LR_action [0][0]; 25 | agent-> LR_offset = _LR_offset; 26 | agent-> LR_vector = _LR_vector; 27 | agent-> LR_module = _LR_module; 28 | agent-> LR_mname = _LR_mname; 29 | agent-> LR_sname = _LR_sname; 30 | agent-> LR_ename = _LR_ename; 31 | #if (defined (SMT_PROFILE)) 32 | agent-> LR_count = &_LR_count [0]; 33 | agent-> LR_time = &_LR_time [0]; 34 | agent-> LR_flow = &_LR_flow [0][0]; 35 | 36 | memset (_LR_count, 0, sizeof (_LR_count)); 37 | memset (_LR_time, 0, sizeof (_LR_time)); 38 | #endif 39 | -------------------------------------------------------------------------------- /src/ggthrd.l: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------------- 2 | ! ggthrd.l - GSL/thrd package dialog 3 | ! 4 | ! Generated from ggthrd by ggobjt.gsl using GSL/4. 5 | ! DO NOT MODIFY THIS FILE. 6 | ! 7 | ! For documentation and updates see http://www.imatix.com. 8 | !---------------------------------------------------------------------------- 9 | 10 | -schema=smtschm.c 11 | -nostubs 12 | 13 | 14 | After-Init: 15 | (--) Parse -> Parsing 16 | + 17 | (--) Run -> Running 18 | + Spawn-GSL-Thread 19 | (--) Parse-And-Run -> Parsing-Before-Run 20 | + 21 | 22 | Parsing: 23 | (--) Message -> 24 | + Log-Message 25 | (--) Ok -> 26 | + Reply-Parsed-Ok-Result 27 | + Terminate-The-Thread 28 | (--) Error -> 29 | + Reply-Parse-Error-Result 30 | + Destroy-The-Thread 31 | + Terminate-The-Thread 32 | (--) Shutdown -> 33 | + Terminate-The-Thread 34 | 35 | Running: 36 | (--) Ok -> 37 | + Set-Thread-Finished-Status 38 | + Terminate-The-Thread 39 | (--) Error -> 40 | + Set-Thread-Error-Status 41 | + Terminate-The-Thread 42 | (--) Shutdown -> 43 | + Terminate-The-Thread 44 | 45 | Parsing-Before-Run: 46 | (--) Message -> 47 | + Log-Message 48 | (--) Ok -> Running 49 | + Reply-Running-Ok-Result 50 | + Spawn-GSL-Thread 51 | (--) Error -> 52 | + Reply-Parse-Error-Result 53 | + Destroy-The-Thread 54 | + Terminate-The-Thread 55 | (--) Shutdown -> 56 | + Terminate-The-Thread 57 | 58 | Defaults: 59 | (--) Interrupt -> 60 | + Shutdown-Running-GSL-Thread 61 | + Terminate-The-Thread 62 | 63 | 64 | -------------------------------------------------------------------------------- /src/ggtime.h: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------- 2 | * ggtime.h - GSL/time package header 3 | * 4 | * Generated from ggtime by ggobjt.gsl using GSL/4. 5 | * DO NOT MODIFY THIS FILE. 6 | * 7 | * For documentation and updates see http://www.imatix.com. 8 | *---------------------------------------------------------------------------*/ 9 | 10 | #ifndef GGTIME_INCLUDED 11 | #define GGTIME_INCLUDED 12 | 13 | /*- Global variables --------------------------------------------------------*/ 14 | 15 | extern CLASS_DESCRIPTOR 16 | time_class; 17 | 18 | extern CLASS_DESCRIPTOR 19 | date_class; 20 | 21 | /*- Function prototypes -----------------------------------------------------*/ 22 | 23 | int register_time_classes (void); 24 | 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /src/ggxml.h: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------- 2 | * ggxml.h - GSL/XML package header 3 | * 4 | * Generated from ggxml by ggobjt.gsl using GSL/4. 5 | * DO NOT MODIFY THIS FILE. 6 | * 7 | * For documentation and updates see http://www.imatix.com. 8 | *---------------------------------------------------------------------------*/ 9 | 10 | #ifndef GGXML_INCLUDED 11 | #define GGXML_INCLUDED 12 | /*- Public definitions ------------------------------------------------------*/ 13 | 14 | void * 15 | get_gsl_xml_item (XML_ITEM *xml_item); 16 | 17 | XML_ITEM * 18 | get_xml_item (void *gsl_xml_item); 19 | 20 | 21 | /*- Global variables --------------------------------------------------------*/ 22 | 23 | extern CLASS_DESCRIPTOR 24 | XML_class; 25 | 26 | extern CLASS_DESCRIPTOR 27 | XML_item_class; 28 | 29 | extern CLASS_DESCRIPTOR 30 | XML_value_class; 31 | 32 | /*- Function prototypes -----------------------------------------------------*/ 33 | 34 | int register_XML_classes (void); 35 | 36 | int shutdown_XML_classes (void); 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /src/gsl.i: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------* 2 | * gsl.i - LIBERO dialog interpreter for gsl.c. * 3 | * Generated by LIBERO 2.4 on 11 Oct, 2010, 17:16. * 4 | * Schema file used: smtschm.c. * 5 | *---------------------------------------------------------------------------*/ 6 | if (agent_lookup (AGENT_NAME)) 7 | return (0); /* Agent already declared */ 8 | if ((agent = agent_declare (AGENT_NAME)) == NULL) 9 | return (-1); /* Could not declare agent */ 10 | 11 | #if (defined (SINGLE_THREADED)) 12 | agent-> tcb_size = 0; /* No context block */ 13 | agent-> max_threads = 1; /* and max. 1 thread */ 14 | #else 15 | agent-> tcb_size = sizeof (TCB); 16 | #endif 17 | agent-> initialise = initialise_the_thread; 18 | agent-> maxevent = 5; 19 | agent-> maxmodule = 2; 20 | agent-> maxstate = 1; 21 | agent-> priority = SMT_PRIORITY_NORMAL; 22 | agent-> LR_defaults = -1; 23 | agent-> LR_nextst = &_LR_nextst [0][0]; 24 | agent-> LR_action = &_LR_action [0][0]; 25 | agent-> LR_offset = _LR_offset; 26 | agent-> LR_vector = _LR_vector; 27 | agent-> LR_module = _LR_module; 28 | agent-> LR_mname = _LR_mname; 29 | agent-> LR_sname = _LR_sname; 30 | agent-> LR_ename = _LR_ename; 31 | #if (defined (SMT_PROFILE)) 32 | agent-> LR_count = &_LR_count [0]; 33 | agent-> LR_time = &_LR_time [0]; 34 | agent-> LR_flow = &_LR_flow [0][0]; 35 | 36 | memset (_LR_count, 0, sizeof (_LR_count)); 37 | memset (_LR_time, 0, sizeof (_LR_time)); 38 | #endif 39 | -------------------------------------------------------------------------------- /src/gsl.l: -------------------------------------------------------------------------------- 1 | !----------------------------------------------------------------------------* 2 | ! * 3 | ! gsl.l - GSL main program * 4 | ! * 5 | ! Copyright (c) 1996-2010 iMatix Corporation * 6 | ! * 7 | ! This program is free software; you can redistribute it and/or modify * 8 | ! it under the terms of the GNU General Public License as published by * 9 | ! the Free Software Foundation; either version 3 of the License, or (at * 10 | ! your option) any later version. * 11 | ! * 12 | ! This program is distributed in the hope that it will be useful, but * 13 | ! WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | ! General Public License for more details. * 16 | ! * 17 | ! For information on alternative licensing for OEMs, please contact * 18 | ! iMatix Corporation. * 19 | ! * 20 | !----------------------------------------------------------------------------* 21 | 22 | -schema=smtschm.c 23 | -nosort 24 | -idle 25 | 26 | After-Init: 27 | (--) Ok -> 28 | + 29 | (--) Message -> 30 | + Display-Error-Message 31 | (--) Error -> 32 | + Display-Error-Message 33 | (--) Fatal -> 34 | + Display-Error-Message 35 | (--) Shutdown -> 36 | + Terminate-The-Thread 37 | -------------------------------------------------------------------------------- /src/sflcvst.i: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------* 2 | * sflcvst.i - LIBERO dialog interpreter for sflcvst.c. * 3 | * Generated by LIBERO 2.4 on 11 Oct, 2010, 17:15. * 4 | *---------------------------------------------------------------------------*/ 5 | 6 | _LR_state = 0; /* First state is always 0 */ 7 | initialise_the_program (); 8 | while (the_next_event != terminate_event) { 9 | _LR_event = the_next_event; 10 | if (_LR_event >= 6 || _LR_event < 0) { 11 | printf ("State %d - event %d is out of range\n", 12 | _LR_state, _LR_event); 13 | break; 14 | } 15 | _LR_savest = _LR_state; 16 | _LR_index = _LR_action [_LR_state][_LR_event]; 17 | /* If no action for this event, try the defaults state */ 18 | if (_LR_index == 0) { 19 | _LR_state = _LR_defaults_state; 20 | _LR_index = _LR_action [_LR_state][_LR_event]; 21 | } 22 | if (_LR_index == 0) { 23 | printf ("State %d - event %d is not accepted\n", 24 | _LR_state, _LR_event); 25 | break; 26 | } 27 | the_next_event = _LR_NULL_EVENT; 28 | the_exception_event = _LR_NULL_EVENT; 29 | exception_raised = FALSE; 30 | 31 | _LR_number = 0; 32 | while ((_LR_vector [_LR_index] [_LR_number] != _LR_STOP) 33 | && (! exception_raised)) { 34 | (*_LR_module [_LR_vector [_LR_index] [_LR_number++]]) (); 35 | 36 | _LR_index = _LR_action [_LR_state][_LR_event]; 37 | } 38 | if (exception_raised) { 39 | if (the_exception_event != _LR_NULL_EVENT) 40 | _LR_event = the_exception_event; 41 | the_next_event = _LR_event; 42 | } 43 | else 44 | _LR_state = _LR_nextst [_LR_state][_LR_event]; 45 | 46 | if (_LR_state == _LR_defaults_state) 47 | _LR_state = _LR_savest; 48 | if (the_next_event == _LR_NULL_EVENT) { 49 | get_external_event (); 50 | if (the_next_event == _LR_NULL_EVENT) { 51 | printf ("No event set after event %d in state %d\n", 52 | _LR_event, _LR_state); 53 | break; 54 | } 55 | } 56 | } 57 | return (feedback); 58 | } 59 | 60 | /*- Standard dialog routines ------------------------------------------------*/ 61 | 62 | static void raise_exception (event_t event) 63 | { 64 | exception_raised = TRUE; 65 | if (event >= 0) 66 | the_exception_event = event; 67 | -------------------------------------------------------------------------------- /src/sfldes.h: -------------------------------------------------------------------------------- 1 | /*===========================================================================* 2 | * * 3 | * $(filename) - $(description) * 4 | * * 5 | * $(project) $(version) * 6 | * $(copyright) * 7 | * * 8 | * $(license) * 9 | *===========================================================================*/ 10 | /* ----------------------------------------------------------------- 11 | Synopsis: The encryption/decryption functions were based on the 12 | cryptosystem library by Andrew Brown , 13 | cleaned-up for portability. Thanks for a great package. 14 | -------------------------------------------------------------------*/ 15 | #ifndef _SFLDES_INCLUDED /* Allow multiple inclusions */ 16 | #define _SFLDES_INCLUDED 17 | 18 | /*- Definitions -------------------------------------------------------------*/ 19 | 20 | typedef byte des_cblock [8]; 21 | 22 | /*- Structure ---------------------------------------------------------------*/ 23 | 24 | typedef struct des_keys_struct 25 | { 26 | union 27 | { 28 | des_cblock _; /* Make sure things are correct */ 29 | qbyte pad[2]; /* on systems with 8 byte longs */ 30 | } ks; 31 | # define _ ks._ 32 | } des_keys [16]; 33 | 34 | /*- Function prototypes -----------------------------------------------------*/ 35 | 36 | #ifdef __cplusplus 37 | extern "C" { 38 | #endif 39 | 40 | int des_key (des_cblock *key, des_keys *schedule); 41 | int crypt_des (des_cblock *input, des_cblock *output, 42 | des_keys *ks, int encrypt); 43 | int crypt_des3 (des_cblock *input, des_cblock *output, 44 | des_keys *ks1, des_keys *ks2, 45 | des_keys *ks3, int encrypt); 46 | 47 | #ifdef __cplusplus 48 | } 49 | #endif 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /src/sfllang.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imatix/gsl/20d56ca93748b12f44528f0bc2250305a95327c0/src/sfllang.c -------------------------------------------------------------------------------- /src/sflprocv.imp: -------------------------------------------------------------------------------- 1 | /*===========================================================================* 2 | * * 3 | * sflprocv.imp - Process control functions for OpenVMS * 4 | * * 5 | * Copyright (c) 1991-2010 iMatix Corporation * 6 | * * 7 | * ------------------ GPL Licensed Source Code ------------------ * 8 | * iMatix makes this software available under the GNU General * 9 | * Public License (GPL) license for open source projects. For * 10 | * details of the GPL license please see www.gnu.org or read the * 11 | * file license.gpl provided in this package. * 12 | * * 13 | * This program is free software; you can redistribute it and/or * 14 | * modify it under the terms of the GNU General Public License as * 15 | * published by the Free Software Foundation; either version 3 of * 16 | * the License, or (at your option) any later version. * 17 | * * 18 | * This program is distributed in the hope that it will be useful, * 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 21 | * GNU General Public License for more details. * 22 | * * 23 | * You should have received a copy of the GNU General Public * 24 | * License along with this program in the file 'license.gpl'; if * 25 | * not, see . * 26 | * * 27 | * You can also license this software under iMatix's General Terms * 28 | * of Business (GTB) for commercial projects. If you have not * 29 | * explicitly licensed this software under the iMatix GTB you may * 30 | * only use it under the terms of the GNU General Public License. * 31 | * * 32 | * For more information, send an email to info@imatix.com. * 33 | * -------------------------------------------------------------- * 34 | *===========================================================================*/ 35 | 36 | /* VMS Implementation of the SFL process_create_full() function */ 37 | return ((PROCESS) 0); /* Not supported on this system */ 38 | -------------------------------------------------------------------------------- /src/sflscrit.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imatix/gsl/20d56ca93748b12f44528f0bc2250305a95327c0/src/sflscrit.c -------------------------------------------------------------------------------- /src/sflscrit.i: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------* 2 | * sflscrit.i - LIBERO dialog interpreter for sflscrit.c. * 3 | * Generated by LIBERO 2.4 on 11 Oct, 2010, 17:15. * 4 | *---------------------------------------------------------------------------*/ 5 | 6 | _LR_state = 0; /* First state is always 0 */ 7 | initialise_the_program (); 8 | while (the_next_event != terminate_event) { 9 | _LR_event = the_next_event; 10 | if (_LR_event >= 10 || _LR_event < 0) { 11 | printf ("State %d - event %d is out of range\n", 12 | _LR_state, _LR_event); 13 | break; 14 | } 15 | _LR_savest = _LR_state; 16 | _LR_index = _LR_action [_LR_state][_LR_event]; 17 | if (_LR_index == 0) { 18 | printf ("State %d - event %d is not accepted\n", 19 | _LR_state, _LR_event); 20 | break; 21 | } 22 | the_next_event = _LR_NULL_EVENT; 23 | the_exception_event = _LR_NULL_EVENT; 24 | exception_raised = FALSE; 25 | 26 | _LR_number = 0; 27 | while ((_LR_vector [_LR_index] [_LR_number] != _LR_STOP) 28 | && (! exception_raised)) { 29 | (*_LR_module [_LR_vector [_LR_index] [_LR_number++]]) (); 30 | 31 | _LR_index = _LR_action [_LR_state][_LR_event]; 32 | } 33 | if (exception_raised) { 34 | if (the_exception_event != _LR_NULL_EVENT) 35 | _LR_event = the_exception_event; 36 | the_next_event = _LR_event; 37 | } 38 | else 39 | _LR_state = _LR_nextst [_LR_state][_LR_event]; 40 | 41 | if (the_next_event == _LR_NULL_EVENT) { 42 | get_external_event (); 43 | if (the_next_event == _LR_NULL_EVENT) { 44 | printf ("No event set after event %d in state %d\n", 45 | _LR_event, _LR_state); 46 | break; 47 | } 48 | } 49 | } 50 | return (feedback); 51 | } 52 | 53 | /*- Standard dialog routines ------------------------------------------------*/ 54 | 55 | static void raise_exception (event_t event) 56 | { 57 | exception_raised = TRUE; 58 | if (event >= 0) 59 | the_exception_event = event; 60 | -------------------------------------------------------------------------------- /src/sflsha.h: -------------------------------------------------------------------------------- 1 | /*===========================================================================* 2 | * * 3 | * sflsha.c - message digest functions (SHA1) * 4 | * * 5 | * Note: contributed to the SFL, provenance not yet checked. * 6 | * The copyright belongs to the original authors according to * 7 | * their license agreement. Parts are copyright (c) 2003 iMatix * 8 | * Corporation * 9 | *===========================================================================*/ 10 | 11 | #ifndef _SFLSHA_INCLUDED /* Allow multiple inclusions */ 12 | #define _SFLSHA_INCLUDED 13 | 14 | /*- Definitions -------------------------------------------------------------*/ 15 | 16 | #define SHA_DATA_SIZE 64 17 | #define SHA_DIGEST_SIZE 20 18 | 19 | 20 | /*- Structure ---------------------------------------------------------------*/ 21 | 22 | typedef struct { 23 | qbyte digest [5]; /* Message digest */ 24 | qbyte data [16]; /* SHS data buffer */ 25 | qbyte count_low; 26 | qbyte count_hi; /* 64-bit bit count */ 27 | } SHA_CONTEXT; 28 | 29 | 30 | /*- Function prototypes -----------------------------------------------------*/ 31 | 32 | #ifdef __cplusplus 33 | extern "C" { 34 | #endif 35 | 36 | void sha_init (SHA_CONTEXT *context); 37 | void sha_update (SHA_CONTEXT *context, const byte *input, 38 | const qbyte input_length); 39 | void sha_final (SHA_CONTEXT *context, byte *digest); 40 | byte *sha (const byte *input, const qbyte input_length, byte *digest); 41 | 42 | #ifdef __cplusplus 43 | } 44 | #endif 45 | 46 | #endif 47 | 48 | -------------------------------------------------------------------------------- /src/smtecho.i: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------* 2 | * smtecho.i - LIBERO dialog interpreter for smtecho.c. * 3 | * Generated by LIBERO 2.4 on 11 Oct, 2010, 17:15. * 4 | * Schema file used: smtschm.c. * 5 | *---------------------------------------------------------------------------*/ 6 | if (agent_lookup (AGENT_NAME)) 7 | return (0); /* Agent already declared */ 8 | if ((agent = agent_declare (AGENT_NAME)) == NULL) 9 | return (-1); /* Could not declare agent */ 10 | 11 | #if (defined (SINGLE_THREADED)) 12 | agent-> tcb_size = 0; /* No context block */ 13 | agent-> max_threads = 1; /* and max. 1 thread */ 14 | #else 15 | agent-> tcb_size = sizeof (TCB); 16 | #endif 17 | agent-> initialise = initialise_the_thread; 18 | agent-> maxevent = 9; 19 | agent-> maxmodule = 11; 20 | agent-> maxstate = 6; 21 | agent-> priority = SMT_PRIORITY_NORMAL; 22 | agent-> LR_defaults = 4; 23 | agent-> LR_nextst = &_LR_nextst [0][0]; 24 | agent-> LR_action = &_LR_action [0][0]; 25 | agent-> LR_offset = _LR_offset; 26 | agent-> LR_vector = _LR_vector; 27 | agent-> LR_module = _LR_module; 28 | agent-> LR_mname = _LR_mname; 29 | agent-> LR_sname = _LR_sname; 30 | agent-> LR_ename = _LR_ename; 31 | #if (defined (SMT_PROFILE)) 32 | agent-> LR_count = &_LR_count [0]; 33 | agent-> LR_time = &_LR_time [0]; 34 | agent-> LR_flow = &_LR_flow [0][0]; 35 | 36 | memset (_LR_count, 0, sizeof (_LR_count)); 37 | memset (_LR_time, 0, sizeof (_LR_time)); 38 | #endif 39 | -------------------------------------------------------------------------------- /src/smthead.h: -------------------------------------------------------------------------------- 1 | /*===========================================================================* 2 | * * 3 | * smthead.h - Header for generated smt3.h * 4 | * * 5 | * Copyright (c) 1991-2010 iMatix Corporation * 6 | * * 7 | * ------------------ GPL Licensed Source Code ------------------ * 8 | * iMatix makes this software available under the GNU General * 9 | * Public License (GPL) license for open source projects. For * 10 | * details of the GPL license please see www.gnu.org or read the * 11 | * file license.gpl provided in this package. * 12 | * * 13 | * This program is free software; you can redistribute it and/or * 14 | * modify it under the terms of the GNU General Public License as * 15 | * published by the Free Software Foundation; either version 3 of * 16 | * the License, or (at your option) any later version. * 17 | * * 18 | * This program is distributed in the hope that it will be useful, * 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 21 | * GNU General Public License for more details. * 22 | * * 23 | * You should have received a copy of the GNU General Public * 24 | * License along with this program in the file 'license.gpl'; if * 25 | * not, see . * 26 | * * 27 | * You can also license this software under iMatix's General Terms * 28 | * of Business (GTB) for commercial projects. If you have not * 29 | * explicitly licensed this software under the iMatix GTB you may * 30 | * only use it under the terms of the GNU General Public License. * 31 | * * 32 | * For more information, send an email to info@imatix.com. * 33 | * -------------------------------------------------------------- * 34 | *===========================================================================*/ 35 | /* ----------------------------------------------------------------- 36 | Synopsis: This header file is GENERATED by the Boom installer. DO NOT 37 | MODIFY THIS FILE. If you change any of the SMT header files, 38 | re-run boomake to recreate this file. 39 | -------------------------------------------------------------------*/ 40 | -------------------------------------------------------------------------------- /src/smtlog.i: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------* 2 | * smtlog.i - LIBERO dialog interpreter for smtlog.c. * 3 | * Generated by LIBERO 2.4 on 11 Oct, 2010, 17:15. * 4 | * Schema file used: smtschm.c. * 5 | *---------------------------------------------------------------------------*/ 6 | if (agent_lookup (AGENT_NAME)) 7 | return (0); /* Agent already declared */ 8 | if ((agent = agent_declare (AGENT_NAME)) == NULL) 9 | return (-1); /* Could not declare agent */ 10 | 11 | #if (defined (SINGLE_THREADED)) 12 | agent-> tcb_size = 0; /* No context block */ 13 | agent-> max_threads = 1; /* and max. 1 thread */ 14 | #else 15 | agent-> tcb_size = sizeof (TCB); 16 | #endif 17 | agent-> initialise = initialise_the_thread; 18 | agent-> maxevent = 11; 19 | agent-> maxmodule = 9; 20 | agent-> maxstate = 4; 21 | agent-> priority = SMT_PRIORITY_NORMAL; 22 | agent-> LR_defaults = 3; 23 | agent-> LR_nextst = &_LR_nextst [0][0]; 24 | agent-> LR_action = &_LR_action [0][0]; 25 | agent-> LR_offset = _LR_offset; 26 | agent-> LR_vector = _LR_vector; 27 | agent-> LR_module = _LR_module; 28 | agent-> LR_mname = _LR_mname; 29 | agent-> LR_sname = _LR_sname; 30 | agent-> LR_ename = _LR_ename; 31 | #if (defined (SMT_PROFILE)) 32 | agent-> LR_count = &_LR_count [0]; 33 | agent-> LR_time = &_LR_time [0]; 34 | agent-> LR_flow = &_LR_flow [0][0]; 35 | 36 | memset (_LR_count, 0, sizeof (_LR_count)); 37 | memset (_LR_time, 0, sizeof (_LR_time)); 38 | #endif 39 | -------------------------------------------------------------------------------- /src/smtoper.i: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------* 2 | * smtoper.i - LIBERO dialog interpreter for smtoper.c. * 3 | * Generated by LIBERO 2.4 on 11 Oct, 2010, 17:15. * 4 | * Schema file used: smtschm.c. * 5 | *---------------------------------------------------------------------------*/ 6 | if (agent_lookup (AGENT_NAME)) 7 | return (0); /* Agent already declared */ 8 | if ((agent = agent_declare (AGENT_NAME)) == NULL) 9 | return (-1); /* Could not declare agent */ 10 | 11 | #if (defined (SINGLE_THREADED)) 12 | agent-> tcb_size = 0; /* No context block */ 13 | agent-> max_threads = 1; /* and max. 1 thread */ 14 | #else 15 | agent-> tcb_size = sizeof (TCB); 16 | #endif 17 | agent-> initialise = initialise_the_thread; 18 | agent-> maxevent = 9; 19 | agent-> maxmodule = 8; 20 | agent-> maxstate = 3; 21 | agent-> priority = SMT_PRIORITY_NORMAL; 22 | agent-> LR_defaults = 2; 23 | agent-> LR_nextst = &_LR_nextst [0][0]; 24 | agent-> LR_action = &_LR_action [0][0]; 25 | agent-> LR_offset = _LR_offset; 26 | agent-> LR_vector = _LR_vector; 27 | agent-> LR_module = _LR_module; 28 | agent-> LR_mname = _LR_mname; 29 | agent-> LR_sname = _LR_sname; 30 | agent-> LR_ename = _LR_ename; 31 | #if (defined (SMT_PROFILE)) 32 | agent-> LR_count = &_LR_count [0]; 33 | agent-> LR_time = &_LR_time [0]; 34 | agent-> LR_flow = &_LR_flow [0][0]; 35 | 36 | memset (_LR_count, 0, sizeof (_LR_count)); 37 | memset (_LR_time, 0, sizeof (_LR_time)); 38 | #endif 39 | -------------------------------------------------------------------------------- /src/smtpipe.i: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------* 2 | * smtpipe.i - LIBERO dialog interpreter for smtpipe.c. * 3 | * Generated by LIBERO 2.4 on 11 Oct, 2010, 17:15. * 4 | * Schema file used: smtschm.c. * 5 | *---------------------------------------------------------------------------*/ 6 | if (agent_lookup (AGENT_NAME)) 7 | return (0); /* Agent already declared */ 8 | if ((agent = agent_declare (AGENT_NAME)) == NULL) 9 | return (-1); /* Could not declare agent */ 10 | 11 | #if (defined (SINGLE_THREADED)) 12 | agent-> tcb_size = 0; /* No context block */ 13 | agent-> max_threads = 1; /* and max. 1 thread */ 14 | #else 15 | agent-> tcb_size = sizeof (TCB); 16 | #endif 17 | agent-> initialise = initialise_the_thread; 18 | agent-> maxevent = 5; 19 | agent-> maxmodule = 6; 20 | agent-> maxstate = 3; 21 | agent-> priority = SMT_PRIORITY_NORMAL; 22 | agent-> LR_defaults = 2; 23 | agent-> LR_nextst = &_LR_nextst [0][0]; 24 | agent-> LR_action = &_LR_action [0][0]; 25 | agent-> LR_offset = _LR_offset; 26 | agent-> LR_vector = _LR_vector; 27 | agent-> LR_module = _LR_module; 28 | agent-> LR_mname = _LR_mname; 29 | agent-> LR_sname = _LR_sname; 30 | agent-> LR_ename = _LR_ename; 31 | #if (defined (SMT_PROFILE)) 32 | agent-> LR_count = &_LR_count [0]; 33 | agent-> LR_time = &_LR_time [0]; 34 | agent-> LR_flow = &_LR_flow [0][0]; 35 | 36 | memset (_LR_count, 0, sizeof (_LR_count)); 37 | memset (_LR_time, 0, sizeof (_LR_time)); 38 | #endif 39 | -------------------------------------------------------------------------------- /src/smtpop.i: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------* 2 | * smtpop.i - LIBERO dialog interpreter for smtpop.c. * 3 | * Generated by LIBERO 2.4 on 11 Oct, 2010, 17:15. * 4 | * Schema file used: smtschm.c. * 5 | *---------------------------------------------------------------------------*/ 6 | if (agent_lookup (AGENT_NAME)) 7 | return (0); /* Agent already declared */ 8 | if ((agent = agent_declare (AGENT_NAME)) == NULL) 9 | return (-1); /* Could not declare agent */ 10 | 11 | #if (defined (SINGLE_THREADED)) 12 | agent-> tcb_size = 0; /* No context block */ 13 | agent-> max_threads = 1; /* and max. 1 thread */ 14 | #else 15 | agent-> tcb_size = sizeof (TCB); 16 | #endif 17 | agent-> initialise = initialise_the_thread; 18 | agent-> maxevent = 24; 19 | agent-> maxmodule = 31; 20 | agent-> maxstate = 14; 21 | agent-> priority = SMT_PRIORITY_NORMAL; 22 | agent-> LR_defaults = 13; 23 | agent-> LR_nextst = &_LR_nextst [0][0]; 24 | agent-> LR_action = &_LR_action [0][0]; 25 | agent-> LR_offset = _LR_offset; 26 | agent-> LR_vector = _LR_vector; 27 | agent-> LR_module = _LR_module; 28 | agent-> LR_mname = _LR_mname; 29 | agent-> LR_sname = _LR_sname; 30 | agent-> LR_ename = _LR_ename; 31 | #if (defined (SMT_PROFILE)) 32 | agent-> LR_count = &_LR_count [0]; 33 | agent-> LR_time = &_LR_time [0]; 34 | agent-> LR_flow = &_LR_flow [0][0]; 35 | 36 | memset (_LR_count, 0, sizeof (_LR_count)); 37 | memset (_LR_time, 0, sizeof (_LR_time)); 38 | #endif 39 | -------------------------------------------------------------------------------- /src/smtrdns.i: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------* 2 | * smtrdns.i - LIBERO dialog interpreter for smtrdns.c. * 3 | * Generated by LIBERO 2.4 on 11 Oct, 2010, 17:15. * 4 | * Schema file used: smtschm.c. * 5 | *---------------------------------------------------------------------------*/ 6 | if (agent_lookup (AGENT_NAME)) 7 | return (0); /* Agent already declared */ 8 | if ((agent = agent_declare (AGENT_NAME)) == NULL) 9 | return (-1); /* Could not declare agent */ 10 | 11 | #if (defined (SINGLE_THREADED)) 12 | agent-> tcb_size = 0; /* No context block */ 13 | agent-> max_threads = 1; /* and max. 1 thread */ 14 | #else 15 | agent-> tcb_size = sizeof (TCB); 16 | #endif 17 | agent-> initialise = initialise_the_thread; 18 | agent-> maxevent = 26; 19 | agent-> maxmodule = 45; 20 | agent-> maxstate = 19; 21 | agent-> priority = SMT_PRIORITY_NORMAL; 22 | agent-> LR_defaults = 17; 23 | agent-> LR_nextst = &_LR_nextst [0][0]; 24 | agent-> LR_action = &_LR_action [0][0]; 25 | agent-> LR_offset = _LR_offset; 26 | agent-> LR_vector = _LR_vector; 27 | agent-> LR_module = _LR_module; 28 | agent-> LR_mname = _LR_mname; 29 | agent-> LR_sname = _LR_sname; 30 | agent-> LR_ename = _LR_ename; 31 | #if (defined (SMT_PROFILE)) 32 | agent-> LR_count = &_LR_count [0]; 33 | agent-> LR_time = &_LR_time [0]; 34 | agent-> LR_flow = &_LR_flow [0][0]; 35 | 36 | memset (_LR_count, 0, sizeof (_LR_count)); 37 | memset (_LR_time, 0, sizeof (_LR_time)); 38 | #endif 39 | -------------------------------------------------------------------------------- /src/smtsimu.i: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------* 2 | * smtsimu.i - LIBERO dialog interpreter for smtsimu.c. * 3 | * Generated by LIBERO 2.4 on 11 Oct, 2010, 17:15. * 4 | * Schema file used: smtschm.c. * 5 | *---------------------------------------------------------------------------*/ 6 | if (agent_lookup (AGENT_NAME)) 7 | return (0); /* Agent already declared */ 8 | if ((agent = agent_declare (AGENT_NAME)) == NULL) 9 | return (-1); /* Could not declare agent */ 10 | 11 | #if (defined (SINGLE_THREADED)) 12 | agent-> tcb_size = 0; /* No context block */ 13 | agent-> max_threads = 1; /* and max. 1 thread */ 14 | #else 15 | agent-> tcb_size = sizeof (TCB); 16 | #endif 17 | agent-> initialise = initialise_the_thread; 18 | agent-> maxevent = 4; 19 | agent-> maxmodule = 3; 20 | agent-> maxstate = 3; 21 | agent-> priority = SMT_PRIORITY_NORMAL; 22 | agent-> LR_defaults = 2; 23 | agent-> LR_nextst = &_LR_nextst [0][0]; 24 | agent-> LR_action = &_LR_action [0][0]; 25 | agent-> LR_offset = _LR_offset; 26 | agent-> LR_vector = _LR_vector; 27 | agent-> LR_module = _LR_module; 28 | agent-> LR_mname = _LR_mname; 29 | agent-> LR_sname = _LR_sname; 30 | agent-> LR_ename = _LR_ename; 31 | #if (defined (SMT_PROFILE)) 32 | agent-> LR_count = &_LR_count [0]; 33 | agent-> LR_time = &_LR_time [0]; 34 | agent-> LR_flow = &_LR_flow [0][0]; 35 | 36 | memset (_LR_count, 0, sizeof (_LR_count)); 37 | memset (_LR_time, 0, sizeof (_LR_time)); 38 | #endif 39 | -------------------------------------------------------------------------------- /src/smtslot.i: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------* 2 | * smtslot.i - LIBERO dialog interpreter for smtslot.c. * 3 | * Generated by LIBERO 2.4 on 11 Oct, 2010, 17:15. * 4 | * Schema file used: smtschm.c. * 5 | *---------------------------------------------------------------------------*/ 6 | if (agent_lookup (AGENT_NAME)) 7 | return (0); /* Agent already declared */ 8 | if ((agent = agent_declare (AGENT_NAME)) == NULL) 9 | return (-1); /* Could not declare agent */ 10 | 11 | #if (defined (SINGLE_THREADED)) 12 | agent-> tcb_size = 0; /* No context block */ 13 | agent-> max_threads = 1; /* and max. 1 thread */ 14 | #else 15 | agent-> tcb_size = sizeof (TCB); 16 | #endif 17 | agent-> initialise = initialise_the_thread; 18 | agent-> maxevent = 10; 19 | agent-> maxmodule = 9; 20 | agent-> maxstate = 5; 21 | agent-> priority = SMT_PRIORITY_NORMAL; 22 | agent-> LR_defaults = 4; 23 | agent-> LR_nextst = &_LR_nextst [0][0]; 24 | agent-> LR_action = &_LR_action [0][0]; 25 | agent-> LR_offset = _LR_offset; 26 | agent-> LR_vector = _LR_vector; 27 | agent-> LR_module = _LR_module; 28 | agent-> LR_mname = _LR_mname; 29 | agent-> LR_sname = _LR_sname; 30 | agent-> LR_ename = _LR_ename; 31 | #if (defined (SMT_PROFILE)) 32 | agent-> LR_count = &_LR_count [0]; 33 | agent-> LR_time = &_LR_time [0]; 34 | agent-> LR_flow = &_LR_flow [0][0]; 35 | 36 | memset (_LR_count, 0, sizeof (_LR_count)); 37 | memset (_LR_time, 0, sizeof (_LR_time)); 38 | #endif 39 | -------------------------------------------------------------------------------- /src/smtsmtp.i: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------* 2 | * smtsmtp.i - LIBERO dialog interpreter for smtsmtp.c. * 3 | * Generated by LIBERO 2.4 on 11 Oct, 2010, 17:15. * 4 | * Schema file used: smtschm.c. * 5 | *---------------------------------------------------------------------------*/ 6 | if (agent_lookup (AGENT_NAME)) 7 | return (0); /* Agent already declared */ 8 | if ((agent = agent_declare (AGENT_NAME)) == NULL) 9 | return (-1); /* Could not declare agent */ 10 | 11 | #if (defined (SINGLE_THREADED)) 12 | agent-> tcb_size = 0; /* No context block */ 13 | agent-> max_threads = 1; /* and max. 1 thread */ 14 | #else 15 | agent-> tcb_size = sizeof (TCB); 16 | #endif 17 | agent-> initialise = initialise_the_thread; 18 | agent-> maxevent = 23; 19 | agent-> maxmodule = 27; 20 | agent-> maxstate = 14; 21 | agent-> priority = SMT_PRIORITY_NORMAL; 22 | agent-> LR_defaults = 13; 23 | agent-> LR_nextst = &_LR_nextst [0][0]; 24 | agent-> LR_action = &_LR_action [0][0]; 25 | agent-> LR_offset = _LR_offset; 26 | agent-> LR_vector = _LR_vector; 27 | agent-> LR_module = _LR_module; 28 | agent-> LR_mname = _LR_mname; 29 | agent-> LR_sname = _LR_sname; 30 | agent-> LR_ename = _LR_ename; 31 | #if (defined (SMT_PROFILE)) 32 | agent-> LR_count = &_LR_count [0]; 33 | agent-> LR_time = &_LR_time [0]; 34 | agent-> LR_flow = &_LR_flow [0][0]; 35 | 36 | memset (_LR_count, 0, sizeof (_LR_count)); 37 | memset (_LR_time, 0, sizeof (_LR_time)); 38 | #endif 39 | -------------------------------------------------------------------------------- /src/smtsock.i: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------* 2 | * smtsock.i - LIBERO dialog interpreter for smtsock.c. * 3 | * Generated by LIBERO 2.4 on 11 Oct, 2010, 17:15. * 4 | * Schema file used: smtschm.c. * 5 | *---------------------------------------------------------------------------*/ 6 | if (agent_lookup (AGENT_NAME)) 7 | return (0); /* Agent already declared */ 8 | if ((agent = agent_declare (AGENT_NAME)) == NULL) 9 | return (-1); /* Could not declare agent */ 10 | 11 | #if (defined (SINGLE_THREADED)) 12 | agent-> tcb_size = 0; /* No context block */ 13 | agent-> max_threads = 1; /* and max. 1 thread */ 14 | #else 15 | agent-> tcb_size = sizeof (TCB); 16 | #endif 17 | agent-> initialise = initialise_the_thread; 18 | agent-> maxevent = 22; 19 | agent-> maxmodule = 28; 20 | agent-> maxstate = 5; 21 | agent-> priority = SMT_PRIORITY_NORMAL; 22 | agent-> LR_defaults = 4; 23 | agent-> LR_nextst = &_LR_nextst [0][0]; 24 | agent-> LR_action = &_LR_action [0][0]; 25 | agent-> LR_offset = _LR_offset; 26 | agent-> LR_vector = _LR_vector; 27 | agent-> LR_module = _LR_module; 28 | agent-> LR_mname = _LR_mname; 29 | agent-> LR_sname = _LR_sname; 30 | agent-> LR_ename = _LR_ename; 31 | #if (defined (SMT_PROFILE)) 32 | agent-> LR_count = &_LR_count [0]; 33 | agent-> LR_time = &_LR_time [0]; 34 | agent-> LR_flow = &_LR_flow [0][0]; 35 | 36 | memset (_LR_count, 0, sizeof (_LR_count)); 37 | memset (_LR_time, 0, sizeof (_LR_time)); 38 | #endif 39 | -------------------------------------------------------------------------------- /src/smttran.i: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------* 2 | * smttran.i - LIBERO dialog interpreter for smttran.c. * 3 | * Generated by LIBERO 2.4 on 11 Oct, 2010, 17:15. * 4 | * Schema file used: smtschm.c. * 5 | *---------------------------------------------------------------------------*/ 6 | if (agent_lookup (AGENT_NAME)) 7 | return (0); /* Agent already declared */ 8 | if ((agent = agent_declare (AGENT_NAME)) == NULL) 9 | return (-1); /* Could not declare agent */ 10 | 11 | #if (defined (SINGLE_THREADED)) 12 | agent-> tcb_size = 0; /* No context block */ 13 | agent-> max_threads = 1; /* and max. 1 thread */ 14 | #else 15 | agent-> tcb_size = sizeof (TCB); 16 | #endif 17 | agent-> initialise = initialise_the_thread; 18 | agent-> maxevent = 26; 19 | agent-> maxmodule = 37; 20 | agent-> maxstate = 7; 21 | agent-> priority = SMT_PRIORITY_NORMAL; 22 | agent-> LR_defaults = 5; 23 | agent-> LR_nextst = &_LR_nextst [0][0]; 24 | agent-> LR_action = &_LR_action [0][0]; 25 | agent-> LR_offset = _LR_offset; 26 | agent-> LR_vector = _LR_vector; 27 | agent-> LR_module = _LR_module; 28 | agent-> LR_mname = _LR_mname; 29 | agent-> LR_sname = _LR_sname; 30 | agent-> LR_ename = _LR_ename; 31 | #if (defined (SMT_PROFILE)) 32 | agent-> LR_count = &_LR_count [0]; 33 | agent-> LR_time = &_LR_time [0]; 34 | agent-> LR_flow = &_LR_flow [0][0]; 35 | 36 | memset (_LR_count, 0, sizeof (_LR_count)); 37 | memset (_LR_time, 0, sizeof (_LR_time)); 38 | #endif 39 | -------------------------------------------------------------------------------- /src/smttst1.i: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------* 2 | * smttst1.i - LIBERO dialog interpreter for smttst1.c. * 3 | * Generated by LIBERO 2.4 on 11 Oct, 2010, 17:15. * 4 | * Schema file used: smtschm.c. * 5 | *---------------------------------------------------------------------------*/ 6 | if (agent_lookup (AGENT_NAME)) 7 | return (0); /* Agent already declared */ 8 | if ((agent = agent_declare (AGENT_NAME)) == NULL) 9 | return (-1); /* Could not declare agent */ 10 | 11 | #if (defined (SINGLE_THREADED)) 12 | agent-> tcb_size = 0; /* No context block */ 13 | agent-> max_threads = 1; /* and max. 1 thread */ 14 | #else 15 | agent-> tcb_size = sizeof (TCB); 16 | #endif 17 | agent-> initialise = initialise_the_thread; 18 | agent-> maxevent = 4; 19 | agent-> maxmodule = 2; 20 | agent-> maxstate = 3; 21 | agent-> priority = SMT_PRIORITY_NORMAL; 22 | agent-> LR_defaults = 2; 23 | agent-> LR_nextst = &_LR_nextst [0][0]; 24 | agent-> LR_action = &_LR_action [0][0]; 25 | agent-> LR_offset = _LR_offset; 26 | agent-> LR_vector = _LR_vector; 27 | agent-> LR_module = _LR_module; 28 | agent-> LR_mname = _LR_mname; 29 | agent-> LR_sname = _LR_sname; 30 | agent-> LR_ename = _LR_ename; 31 | #if (defined (SMT_PROFILE)) 32 | agent-> LR_count = &_LR_count [0]; 33 | agent-> LR_time = &_LR_time [0]; 34 | agent-> LR_flow = &_LR_flow [0][0]; 35 | 36 | memset (_LR_count, 0, sizeof (_LR_count)); 37 | memset (_LR_time, 0, sizeof (_LR_time)); 38 | #endif 39 | -------------------------------------------------------------------------------- /src/smttst2.i: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------* 2 | * smttst2.i - LIBERO dialog interpreter for smttst2.c. * 3 | * Generated by LIBERO 2.4 on 11 Oct, 2010, 17:15. * 4 | * Schema file used: smtschm.c. * 5 | *---------------------------------------------------------------------------*/ 6 | if (agent_lookup (AGENT_NAME)) 7 | return (0); /* Agent already declared */ 8 | if ((agent = agent_declare (AGENT_NAME)) == NULL) 9 | return (-1); /* Could not declare agent */ 10 | 11 | #if (defined (SINGLE_THREADED)) 12 | agent-> tcb_size = 0; /* No context block */ 13 | agent-> max_threads = 1; /* and max. 1 thread */ 14 | #else 15 | agent-> tcb_size = sizeof (TCB); 16 | #endif 17 | agent-> initialise = initialise_the_thread; 18 | agent-> maxevent = 5; 19 | agent-> maxmodule = 5; 20 | agent-> maxstate = 3; 21 | agent-> priority = SMT_PRIORITY_NORMAL; 22 | agent-> LR_defaults = 2; 23 | agent-> LR_nextst = &_LR_nextst [0][0]; 24 | agent-> LR_action = &_LR_action [0][0]; 25 | agent-> LR_offset = _LR_offset; 26 | agent-> LR_vector = _LR_vector; 27 | agent-> LR_module = _LR_module; 28 | agent-> LR_mname = _LR_mname; 29 | agent-> LR_sname = _LR_sname; 30 | agent-> LR_ename = _LR_ename; 31 | agent-> animate = TRUE; 32 | #if (defined (SMT_PROFILE)) 33 | agent-> LR_count = &_LR_count [0]; 34 | agent-> LR_time = &_LR_time [0]; 35 | agent-> LR_flow = &_LR_flow [0][0]; 36 | 37 | memset (_LR_count, 0, sizeof (_LR_count)); 38 | memset (_LR_time, 0, sizeof (_LR_time)); 39 | #endif 40 | -------------------------------------------------------------------------------- /src/smttst3.i: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------* 2 | * smttst3.i - LIBERO dialog interpreter for smttst3.c. * 3 | * Generated by LIBERO 2.4 on 11 Oct, 2010, 17:15. * 4 | * Schema file used: smtschm.c. * 5 | *---------------------------------------------------------------------------*/ 6 | if (agent_lookup (AGENT_NAME)) 7 | return (0); /* Agent already declared */ 8 | if ((agent = agent_declare (AGENT_NAME)) == NULL) 9 | return (-1); /* Could not declare agent */ 10 | 11 | #if (defined (SINGLE_THREADED)) 12 | agent-> tcb_size = 0; /* No context block */ 13 | agent-> max_threads = 1; /* and max. 1 thread */ 14 | #else 15 | agent-> tcb_size = sizeof (TCB); 16 | #endif 17 | agent-> initialise = initialise_the_thread; 18 | agent-> maxevent = 18; 19 | agent-> maxmodule = 20; 20 | agent-> maxstate = 6; 21 | agent-> priority = SMT_PRIORITY_NORMAL; 22 | agent-> LR_defaults = 5; 23 | agent-> LR_nextst = &_LR_nextst [0][0]; 24 | agent-> LR_action = &_LR_action [0][0]; 25 | agent-> LR_offset = _LR_offset; 26 | agent-> LR_vector = _LR_vector; 27 | agent-> LR_module = _LR_module; 28 | agent-> LR_mname = _LR_mname; 29 | agent-> LR_sname = _LR_sname; 30 | agent-> LR_ename = _LR_ename; 31 | #if (defined (SMT_PROFILE)) 32 | agent-> LR_count = &_LR_count [0]; 33 | agent-> LR_time = &_LR_time [0]; 34 | agent-> LR_flow = &_LR_flow [0][0]; 35 | 36 | memset (_LR_count, 0, sizeof (_LR_count)); 37 | memset (_LR_time, 0, sizeof (_LR_time)); 38 | #endif 39 | -------------------------------------------------------------------------------- /src/smtxlog.i: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------* 2 | * smtxlog.i - LIBERO dialog interpreter for smtxlog.c. * 3 | * Generated by LIBERO 2.4 on 11 Oct, 2010, 17:15. * 4 | * Schema file used: smtschm.c. * 5 | *---------------------------------------------------------------------------*/ 6 | if (agent_lookup (AGENT_NAME)) 7 | return (0); /* Agent already declared */ 8 | if ((agent = agent_declare (AGENT_NAME)) == NULL) 9 | return (-1); /* Could not declare agent */ 10 | 11 | #if (defined (SINGLE_THREADED)) 12 | agent-> tcb_size = 0; /* No context block */ 13 | agent-> max_threads = 1; /* and max. 1 thread */ 14 | #else 15 | agent-> tcb_size = sizeof (TCB); 16 | #endif 17 | agent-> initialise = initialise_the_thread; 18 | agent-> maxevent = 17; 19 | agent-> maxmodule = 23; 20 | agent-> maxstate = 6; 21 | agent-> priority = SMT_PRIORITY_NORMAL; 22 | agent-> LR_defaults = 5; 23 | agent-> LR_nextst = &_LR_nextst [0][0]; 24 | agent-> LR_action = &_LR_action [0][0]; 25 | agent-> LR_offset = _LR_offset; 26 | agent-> LR_vector = _LR_vector; 27 | agent-> LR_module = _LR_module; 28 | agent-> LR_mname = _LR_mname; 29 | agent-> LR_sname = _LR_sname; 30 | agent-> LR_ename = _LR_ename; 31 | #if (defined (SMT_PROFILE)) 32 | agent-> LR_count = &_LR_count [0]; 33 | agent-> LR_time = &_LR_time [0]; 34 | agent-> LR_flow = &_LR_flow [0][0]; 35 | 36 | memset (_LR_count, 0, sizeof (_LR_count)); 37 | memset (_LR_time, 0, sizeof (_LR_time)); 38 | #endif 39 | -------------------------------------------------------------------------------- /src/sysclia.i: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------* 2 | * sysclia.i - LIBERO dialog interpreter for sysclia.c. * 3 | * Generated by LIBERO 2.4 on 11 Oct, 2010, 17:15. * 4 | * Schema file used: smtschm.c. * 5 | *---------------------------------------------------------------------------*/ 6 | if (agent_lookup (AGENT_NAME)) 7 | return (0); /* Agent already declared */ 8 | if ((agent = agent_declare (AGENT_NAME)) == NULL) 9 | return (-1); /* Could not declare agent */ 10 | 11 | #if (defined (SINGLE_THREADED)) 12 | agent-> tcb_size = 0; /* No context block */ 13 | agent-> max_threads = 1; /* and max. 1 thread */ 14 | #else 15 | agent-> tcb_size = sizeof (TCB); 16 | #endif 17 | agent-> initialise = initialise_the_thread; 18 | agent-> maxevent = 32; 19 | agent-> maxmodule = 34; 20 | agent-> maxstate = 9; 21 | agent-> priority = SMT_PRIORITY_NORMAL; 22 | agent-> LR_defaults = 8; 23 | agent-> LR_nextst = &_LR_nextst [0][0]; 24 | agent-> LR_action = &_LR_action [0][0]; 25 | agent-> LR_offset = _LR_offset; 26 | agent-> LR_vector = _LR_vector; 27 | agent-> LR_module = _LR_module; 28 | agent-> LR_mname = _LR_mname; 29 | agent-> LR_sname = _LR_sname; 30 | agent-> LR_ename = _LR_ename; 31 | #if (defined (SMT_PROFILE)) 32 | agent-> LR_count = &_LR_count [0]; 33 | agent-> LR_time = &_LR_time [0]; 34 | agent-> LR_flow = &_LR_flow [0][0]; 35 | 36 | memset (_LR_count, 0, sizeof (_LR_count)); 37 | memset (_LR_time, 0, sizeof (_LR_time)); 38 | #endif 39 | -------------------------------------------------------------------------------- /src/sysmana.i: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------* 2 | * sysmana.i - LIBERO dialog interpreter for sysmana.c. * 3 | * Generated by LIBERO 2.4 on 11 Oct, 2010, 17:15. * 4 | * Schema file used: smtschm.c. * 5 | *---------------------------------------------------------------------------*/ 6 | if (agent_lookup (AGENT_NAME)) 7 | return (0); /* Agent already declared */ 8 | if ((agent = agent_declare (AGENT_NAME)) == NULL) 9 | return (-1); /* Could not declare agent */ 10 | 11 | #if (defined (SINGLE_THREADED)) 12 | agent-> tcb_size = 0; /* No context block */ 13 | agent-> max_threads = 1; /* and max. 1 thread */ 14 | #else 15 | agent-> tcb_size = sizeof (TCB); 16 | #endif 17 | agent-> initialise = initialise_the_thread; 18 | agent-> maxevent = 36; 19 | agent-> maxmodule = 58; 20 | agent-> maxstate = 19; 21 | agent-> priority = SMT_PRIORITY_NORMAL; 22 | agent-> LR_defaults = 17; 23 | agent-> LR_nextst = &_LR_nextst [0][0]; 24 | agent-> LR_action = &_LR_action [0][0]; 25 | agent-> LR_offset = _LR_offset; 26 | agent-> LR_vector = _LR_vector; 27 | agent-> LR_module = _LR_module; 28 | agent-> LR_mname = _LR_mname; 29 | agent-> LR_sname = _LR_sname; 30 | agent-> LR_ename = _LR_ename; 31 | #if (defined (SMT_PROFILE)) 32 | agent-> LR_count = &_LR_count [0]; 33 | agent-> LR_time = &_LR_time [0]; 34 | agent-> LR_flow = &_LR_flow [0][0]; 35 | 36 | memset (_LR_count, 0, sizeof (_LR_count)); 37 | memset (_LR_time, 0, sizeof (_LR_time)); 38 | #endif 39 | -------------------------------------------------------------------------------- /src/testall.gsl: -------------------------------------------------------------------------------- 1 | .------------------------------------------------------------------------------ 2 | .- 3 | .- testall.gsl - Test all GSL functions 4 | .- 5 | .------------------------------------------------------------------------------ 6 | if ! defined (testall_included) 7 | echo "Starting regression tests..." 8 | define testall_included = 1 9 | endif 10 | 11 | echo "Non-template mode:" 12 | >The current script is: $(script) 13 | >The date and time are: $(date), $(time). 14 | >This are some special characters: ! ( ) \\ ? . : ; 15 | 16 | template 1 17 | .echo "Non-template mode:" 18 | The current script is: $(script) 19 | The date and time are: $(date), $(time). 20 | This are some special characters: ! ( ) \\ ? . : ; 21 | .endtemplate 22 | 23 | new child 24 | child.name = "me" 25 | endnew 26 | new child 27 | child.name = "you" 28 | endnew 29 | new colour 30 | colour.name = "blue" 31 | for root.child where name = "me" 32 | new style 33 | style.width = "1" 34 | endnew 35 | endfor 36 | endnew 37 | for child 38 | if name = "you" 39 | last 40 | endif 41 | echo "1: me = " + child.name 42 | echo "2: blue = " + root-> colour.name 43 | endfor 44 | 45 | define var = undefinedvar? 46 | if defined (var) 47 | echo "We should not come here" 48 | else 49 | echo "3: undefined variable as expected" 50 | endif 51 | 52 | for child 53 | child.level = "purple" 54 | new level to child 55 | level.name = "1" 56 | level.size = "medium" 57 | endnew 58 | for child.level as childlevel 59 | echo "4: $(childlevel.size) rare, purple = $(child.level)" 60 | echo "Should be 'level' -> $(name ($(0)))" 61 | echo "Should be 'child' -> $(name ($(-1)))" 62 | echo "Should be 'root' -> $(name ($(-2)))" 63 | echo "Should be 'gsl' -> $(name ($(-4))?)" 64 | echo "Should be '1': -> $(count (-1.level))" 65 | new level to -1 66 | level.name = "2" 67 | level.size = "large" 68 | endnew 69 | echo "Should be '2': -> $(count (-1.level))" 70 | endfor 71 | last 72 | endfor 73 | 74 | [gsl].include ("testall.inc") 75 | [gsl].include ("testall.inc") 76 | 77 | define var = 78 | var ?= "abc" 79 | if var = "abc" 80 | echo "6: ?= assignment works okay" 81 | endif 82 | 83 | var1 ?= var2 ? 84 | echo "7: var1 is undefined: $(var1?"okay")" 85 | 86 | function hello (world) 87 | echo hello.world 88 | endfunction 89 | 90 | invoke hello ("8: function call with arguments seems to work") 91 | 92 | function test () 93 | return "9: function returning value" 94 | endfunction 95 | 96 | echo test () 97 | 98 | echo "10: Count function result (should be 2): " + count (child) 99 | 100 | echo "11: last step in testall" 101 | 102 | -------------------------------------------------------------------------------- /src/testall.inc: -------------------------------------------------------------------------------- 1 | if ! defined (testall_inc_included) 2 | testall_inc_included = 1 3 | echo "5: inside include file: $(script)" 4 | endif 5 | -------------------------------------------------------------------------------- /src/testchi2.gsl: -------------------------------------------------------------------------------- 1 | .------------------------------------------------------------------------------ 2 | .- 3 | .- testchi2.gsl - Test random GSL functions 4 | .- 5 | .------------------------------------------------------------------------------ 6 | 7 | # 8 | # Randomness test: 9 | # Chi square computation 10 | # 11 | 12 | # Number of random number processed 13 | max_number = 40000 14 | # Number of boxes for storage 15 | box_number = 10 16 | # Number of step for display 17 | step_number = 1000 18 | 19 | 20 | # Init of boxes 21 | # 22 | k = 0 23 | while (k < box_number) 24 | boxes_$(k) = 0 25 | k += 1 26 | endwhile 27 | 28 | # Process random processes 29 | # 30 | sum1 = 0 31 | sum2 = 0 32 | i = 0 33 | while (i < max_number) 34 | if (math.mod (i, step_number) = 0) 35 | echo "$(i) processed..." 36 | endif 37 | 38 | stored = 0 39 | r = math.rand () 40 | 41 | sum1 += r 42 | sum2 += r * r 43 | k = 0 44 | # Test if in first boxes 45 | while (k < box_number - 1) 46 | if !stored & r < ((k + 1) / box_number) 47 | boxes_$(k) += 1 48 | stored = 1 49 | endif 50 | k += 1 51 | endwhile 52 | 53 | # Else (last box) 54 | if (!stored) 55 | boxes_$(box_number - 1) += 1 56 | stored = 1 57 | endif 58 | 59 | i += 1 60 | endwhile 61 | 62 | # Display results (content of boxes) 63 | # 64 | k = 0 65 | while (k < box_number) 66 | echo "< $((k + 1) / box_number): $(boxes_$(k))" 67 | k += 1 68 | endwhile 69 | 70 | # Compute Chi square value 71 | # 72 | e = max_number / box_number 73 | chisq = 0 74 | k = 0 75 | while (k < box_number) 76 | t = boxes_$(k) - e 77 | chisq += t * t / e 78 | k += 1 79 | endwhile 80 | 81 | mean1 = sum1 / max_number 82 | mean2 = sum2 / max_number 83 | var = mean2 - (mean1 * mean1) 84 | 85 | # Display results stats 86 | # 87 | echo "Mean = $(mean1)" 88 | echo "Variance = $(var)" 89 | echo "Chi 2 = $(chisq)" 90 | 91 | -------------------------------------------------------------------------------- /src/testconv.gsl: -------------------------------------------------------------------------------- 1 | .------------------------------------------------------------------------------ 2 | .- 3 | .- testconv.gsl - Test conversion GSL functions 4 | .- 5 | .------------------------------------------------------------------------------ 6 | 7 | echo "Conv.ord function result (should be 64): " + conv.ord ('@') 8 | echo "Conv.chr function result (should be ]): " + conv.chr (93) 9 | 10 | -------------------------------------------------------------------------------- /src/testdate.gsl: -------------------------------------------------------------------------------- 1 | .------------------------------------------------------------------------------ 2 | .- 3 | .- testdate.gsl - Test date GSL functions 4 | .- 5 | .------------------------------------------------------------------------------ 6 | 7 | mydate = 19630619 8 | 9 | echo date.picture () 10 | echo date.picture (mydate,) 11 | echo date.picture (mydate, "mmm d, yy") 12 | echo date.picture (, "dddd dd mmmm yyyy") 13 | echo date.number (date) 14 | 15 | mytime = 15520123 16 | 17 | echo time.picture () 18 | echo time.picture (mytime,) 19 | echo time.picture (mytime, "hh:mm") 20 | echo time.number (time) 21 | 22 | -------------------------------------------------------------------------------- /src/testdb.gsl: -------------------------------------------------------------------------------- 1 | # Tests GSL/DB interface to Berkeley DB 2 | 3 | global.ignorecase = 0 4 | echo "Testing GSL object " + db.version ("obj") 5 | echo "Database version:" + db.version ("db") 6 | 7 | # We test each of the database types supported by Berkeley DB 8 | # These use different locking and transaction modes, so it's 9 | # worth trying each one. 10 | xml to root << ' 11 | 12 | 13 | 14 | 15 | ' 16 | for test 17 | echo "Testing $(type) in $(database)..." 18 | dir.delete (database) 19 | db.create_database (database, type, 0) 20 | 21 | db.connect (database) 22 | db.set ("debug", 1) 23 | 24 | echo "Creating tables" 25 | db.create_table ("customer") 26 | db.create_index ("customer", "journal", "c:1-3") 27 | db.create_index ("customer", "postcode", "f,:5") 28 | db.create_table ("contract") 29 | db.create_table ("account") 30 | 31 | echo "Inserting records" 32 | db.insert ("customer", "100100", "F01,Tom's Hardware,Main Avenue,Montreal,1080") 33 | db.insert ("customer", "100200", "F01,Once More With Feeling,Downtown street 31,Harvard,2031") 34 | db.insert ("customer", "100300", "F02,Those Old Time Blues,Washington Square,Los Angelese,9002") 35 | db.insert ("customer", "100400", "F01,Mother Earth,Business Avenue,New York,1020") 36 | db.insert ("customer", "100500", "F03,Englishe Bookshoppe,Tough Times Square,Bristol,33YMQ") 37 | db.insert ("customer", "100600", "F02,Janet's Pet Store,Dog Boulevard,London,YWM21P") 38 | db.flush ("customer") 39 | 40 | db.stats ("customer") 41 | for stats 42 | echo "Records=$(rows) pagesize=$(pagesize) used=$(usedpages) free=$(freepages) depth=$(depth)" 43 | endfor 44 | 45 | echo "Reading records by primary key" 46 | have_data = db.fetch ("customer") 47 | records = 0 48 | while have_data 49 | records += 1 50 | have_data = db.fetch ("customer",,"next") 51 | endwhile 52 | echo " -- $(records) records read" 53 | 54 | echo "Reading records for journal F01" 55 | have_data = db.fetch ("customer", "journal", "ge", "F01") 56 | records = 0 57 | while have_data & ->record.index = "F01" 58 | records += 1 59 | have_data = db.fetch ("customer", "journal", "next") 60 | endwhile 61 | echo " -- $(records) records read" 62 | 63 | echo "Deleting records for journal F02" 64 | have_data = db.fetch ("customer", "journal", "eq", "F02") 65 | records = 0 66 | while have_data & ->record.index = "F02" 67 | records += 1 68 | db.delete ("customer") 69 | have_data = db.fetch ("customer", "journal", "next") 70 | endwhile 71 | echo " -- $(records) records deleted" 72 | 73 | echo "Rows in table:" + db.stats ("customer") 74 | 75 | db.disconnect () 76 | db.connect (database) 77 | echo "Dropping contract table" 78 | db.drop_table ("contract") 79 | endfor 80 | 81 | echo "Finished all tests" 82 | 83 | -------------------------------------------------------------------------------- /src/testdir.gsl: -------------------------------------------------------------------------------- 1 | .------------------------------------------------------------------------------ 2 | .- 3 | .- testdir.gsl - Test directory GSL functions 4 | .- 5 | .------------------------------------------------------------------------------ 6 | 7 | echo "current working directory: " + directory.cwd 8 | 9 | dir = directory.open (".", error_text) ? 10 | if defined (dir) 11 | for dir.file by name 12 | echo "File name: $(name:) size: $(size)" 13 | endfor 14 | else 15 | abort "ERROR: " + error_text 16 | endif 17 | 18 | echo "***************************" 19 | 20 | dir = directory.open (".", error_text) ? 21 | for dir.file by path 22 | echo "$(path:%-30s) $(name)" 23 | endfor 24 | 25 | rc = directory.create ("dummy") 26 | output ("dummy/dummy.txt") 27 | >directory.create has returned value $(rc) 28 | close 29 | file.delete ("dummy/dummy.txt") 30 | rc = directory.delete ("dummy/dummy.txt") 31 | echo "directory.delete has returned value $(rc)" 32 | -------------------------------------------------------------------------------- /src/testdir2.gsl: -------------------------------------------------------------------------------- 1 | .template 0 2 | 3 | diag.console_set_mode(0) 4 | 5 | function runshell(testname, element, basedir) 6 | if count($(my.element)) = 0 7 | return 8 | endif 9 | sh = "$(my.basedir).sh" 10 | output sh 11 | ># test: $(my.testname) - $(my.element) 12 | for $(my.element) as elt 13 | >$(elt.:left) 14 | endfor 15 | close 16 | p = proc.new("sh $(sh)") 17 | p.setenv("BASE", my.basedir) 18 | p.run(err) 19 | file.delete(sh) 20 | if err ? 21 | echo "shell error: $(my.testname) : $(err)" 22 | endif 23 | endfunction 24 | 25 | function is (actual, expect) 26 | 27 | if my.actual <> my.expect 28 | echo "test $(name) failed: expected: $(my.expect), got: $(my.actual)" 29 | global.fail_count += 1 30 | else 31 | global.pass_count += 1 32 | endif 33 | endfunction 34 | 35 | global.fail_count = 0 36 | global.pass_count = 0 37 | 38 | for test 39 | 40 | echo "Running test: $(.name)" 41 | 42 | basedir = "/tmp/gsl-testdir-$(math.ceil(1000 + math.rand() * 1000))" 43 | 44 | if defined(->setup.message) 45 | echo "Setting up test [$(.name)] - $(->setup.message)" 46 | endif 47 | 48 | runshell(.name, "setup", basedir) 49 | 50 | for case 51 | .name = "[$(test.name)][$(index())]" 52 | 53 | dir = directory.open(basedir, err) ? 54 | 55 | if defined(dir) 56 | if when ?= "open" 57 | is("success", expect) 58 | elsif when ?= "count" 59 | is(count(dir.$(filter)), expect) 60 | else 61 | echo "unhandled test outcome: [$(name)] missing when attrib" 62 | endif 63 | else 64 | if when = "open" 65 | is("error", expect) 66 | else 67 | echo "unhandled test outcome: [$(name)] open failed on $(basedir): $(err). Missing when attrib" 68 | endif 69 | endif 70 | endfor 71 | 72 | runshell(.name, "cleanup", basedir) 73 | endfor 74 | 75 | echo "$(global.pass_count + global.fail_count %3d) tests" 76 | echo "$(global.pass_count %3d) passed" 77 | echo "$(global.fail_count %3d) failed" 78 | 79 | .endtemplate 80 | -------------------------------------------------------------------------------- /src/testecho.gsl: -------------------------------------------------------------------------------- 1 | maxthread = 20 2 | maxmsg = 100 3 | 4 | function global.abort_error () 5 | abort sock.error 6 | endfunction 7 | 8 | function global.testecho (n) 9 | scope testecho 10 | testecho.s = sock.connect ("localhost", (arg1 ? 0) + 7) ? abort_error () 11 | testecho.i = 0 12 | while i < maxmsg 13 | testecho.msg = "$(n) - $(i)" 14 | s.write (msg) 15 | s.read (testecho.buf, 1) 16 | if ! defined (testecho.buf) | buf <> msg 17 | echo "ERROR $(n) - <$(testecho.buf ? 'UNDEF')>" 18 | endif 19 | i += 1 20 | endwhile 21 | s.close () 22 | endscope 23 | # For coninued hammering uncomment the following lines. 24 | # thread.new ("testecho (numthread)") 25 | # numthread += 1 26 | # echo numthread 27 | endfunction 28 | 29 | numthread = 0 30 | while numthread < maxthread 31 | thread.new ("testecho (numthread)") 32 | numthread += 1 33 | echo numthread 34 | endwhile 35 | -------------------------------------------------------------------------------- /src/testesc.gsl: -------------------------------------------------------------------------------- 1 | # run with -escape:~ and -substitute:# 2 | echo "[" + [gsl].escape + "]" 3 | echo "[" + [gsl].substitute + "]" 4 | a = "12345" 5 | echo "#(a)" 6 | echo "this should ~ 7 | be on one line" 8 | -------------------------------------------------------------------------------- /src/testfile.gsl: -------------------------------------------------------------------------------- 1 | .------------------------------------------------------------------------------ 2 | .- 3 | .- testfile.gsl - Test file GSL functions 4 | .- 5 | .------------------------------------------------------------------------------ 6 | 7 | in = file.open ("testfile.gsl", "r") 8 | s = "" 9 | xline = file.read (in) 10 | while defined (xline) 11 | s += xline + "\n" 12 | xline = file.read (in)? 13 | endwhile 14 | ret = file.close (in) 15 | 16 | out = file.open ("testfile.out", "w") 17 | ret = file.write (out, s) 18 | ret = file.close (out) 19 | 20 | echo "Expect YES:" 21 | if file.locate ("testfile.gsl") <> "" 22 | echo "YES" 23 | else 24 | echo "NO" 25 | endif 26 | 27 | echo "Expect NO:" 28 | if file.locate ("testfile.xxx") ?<> "" 29 | echo "YES" 30 | else 31 | echo "NO" 32 | endif 33 | 34 | echo "Expect file not found error:" 35 | in = file.open ("testfile.xxx") ? 36 | echo file.error 37 | 38 | echo "Expect YES:" 39 | if file.basename ("testfile.gsl") = "testfile" 40 | echo "YES" 41 | else 42 | echo "NO" 43 | endif 44 | 45 | -------------------------------------------------------------------------------- /src/testmath.gsl: -------------------------------------------------------------------------------- 1 | .------------------------------------------------------------------------------ 2 | .- 3 | .- testmath.gsl - Test math GSL functions 4 | .- 5 | .------------------------------------------------------------------------------ 6 | 7 | echo "Math.abs function result (should be 3): " + math.abs (-3) 8 | echo "Math.ceil function result (should be 46): " + math.ceil (45.234) 9 | echo "Math.floor function result (should be 45): " + math.floor (45.234) 10 | echo "Math.mod function result (should be 2): " + math.mod (22, 5) 11 | 12 | i = 0 13 | while i < 10 14 | echo "Math.rand function result: " + math.rand () 15 | i += 1 16 | endwhile 17 | 18 | echo "Math.sqrt function result (should be 5): " + math.sqrt (25) 19 | echo "Math.exp function result (should be 20.08...): " + math.exp (3) 20 | echo "Math.log function result (should be 2.30...): " + math.log (10) 21 | echo "Math.log10 function result (should be 3): " + math.log10 (1000) 22 | echo "Math.pow function result (should be -0.125): " + math.pow (-2, -3) 23 | 24 | pi = math.pi () 25 | echo "Math.pi function result (should be PI): " + pi 26 | echo "Math.sin function result (should be 1): " + math.sin (pi / 2) 27 | echo "Math.cos function result (should be 1): " + math.cos (0) 28 | echo "Math.tan function result (should be 1): " + math.tan (pi / 4) 29 | echo "Math.asin function result (should be PI): " + math.asin (1) * 2 30 | echo "Math.acos function result (should be PI): " + math.acos (-1) 31 | echo "Math.atan function result (should be PI): " + math.atan (1) * 4 32 | echo "Math.atan2 function result (should be -PI): " + math.atan2 (-1, 1) * 4 33 | echo "Math.sinh function result (should be 0): " + math.sinh (0) 34 | echo "Math.cosh function result (should be 1): " + math.cosh (0) 35 | echo "Math.tanh function result (should be -0.7615...): " + math.tanh (-1) 36 | echo "Math.asinh function result (should be 0.8813...): " + math.asinh (1) 37 | echo "Math.acosh function result (should be 1.316...): " + math.acosh (2) 38 | echo "Math.atanh function result (should be -0.5493...): " + math.atanh (-0.5) 39 | 40 | -------------------------------------------------------------------------------- /src/testscope.gsl: -------------------------------------------------------------------------------- 1 | .------------------------------------------------------------------------------ 2 | .- 3 | .- testscope.gsl - Test scope 4 | .- 5 | .------------------------------------------------------------------------------ 6 | 7 | xml to root <<. 8 | 9 | 10 | 11 | 12 | . 13 | for a 14 | for b 15 | for -1.b 16 | echo name () 17 | endfor 18 | endfor 19 | endfor 20 | -------------------------------------------------------------------------------- /src/testsort.gsl: -------------------------------------------------------------------------------- 1 | .------------------------------------------------------------------------------ 2 | .- 3 | .- testsort.gsl - Test Math GSL functions 4 | .- Bubble Sort 5 | .- 6 | .------------------------------------------------------------------------------ 7 | 8 | function bubble_sort (tab, size) 9 | i = 0 10 | while i < my.size 11 | j = 1 12 | while (i + j) < my.size 13 | if $(my.tab)_$(j - 1) > $(my.tab)_$(j) 14 | temp = $(my.tab)_$(j) 15 | $(my.tab)_$(j) = $(my.tab)_$(j - 1) 16 | $(my.tab)_$(j - 1) = temp 17 | endif 18 | j += 1 19 | endwhile 20 | i += 1 21 | endwhile 22 | endfunction 23 | 24 | function print_array (tab, size) 25 | i = 0 26 | while i < my.size 27 | echo "$(i): $($(my.tab)_$(i))" 28 | i += 1 29 | endwhile 30 | endfunction 31 | 32 | function init_array (tab, size) 33 | min = 1 34 | max = 15 35 | i = 0 36 | while i < my.size 37 | $(my.tab)_$(i) = math.ceil ((max - min) * math.rand () + min) 38 | i += 1 39 | endwhile 40 | endfunction 41 | 42 | n = 10 43 | init_array ("t", n) 44 | 45 | echo "Before Buble Sort:" 46 | print_array ("t", n) 47 | 48 | bubble_sort ("t", n) 49 | 50 | echo "After Buble Sort:" 51 | print_array ("t", n) 52 | 53 | -------------------------------------------------------------------------------- /src/teststr.gsl: -------------------------------------------------------------------------------- 1 | .------------------------------------------------------------------------------ 2 | .- 3 | .- teststr.gsl - test string functions 4 | .- 5 | .------------------------------------------------------------------------------ 6 | 7 | number = 212000000 8 | rs = string.certify (number, "fr") 9 | echo "certify: should be 'Deux cent douze millions': " + rs 10 | 11 | rs = string.certify (number, ) 12 | echo "certify: should be 'Two hundred and twelve million': " + rs 13 | 14 | str = "A fool and his guilt are soon parted." 15 | echo str 16 | echo string.replace (str, "guilt|honey") 17 | 18 | str = "A beautiful eye makes silence eloquent, a kind eye makes contradiction 19 | an assent, an enraged eye makes beauty deformed. This little member gives life 20 | to every part about us; and I believe the story of Argus implies no more, than 21 | the eye is in every part; that is to say, every other part would be mutilated, 22 | were not its force represented more by the eye than even by itself. -- Addison" 23 | 24 | echo string.justify (str, 45) 25 | echo string.match ("pipo des alpes", "pipo des alpes") 26 | echo string.match ("pipo des alpes", "totor du jura") 27 | echo string.match ("abc", "123456") 28 | echo string.prefixed ("pipo des alpes", "pipo") 29 | echo string.prefixed ("pipo des alpes", "toto") 30 | echo string.prefix ("pipo des alpes", " ") 31 | echo string.defix ("pipo des alpes", " ") 32 | echo string.hash ("pipo des alpes") 33 | echo string.convch ("pipo des alpes", "p", "t") 34 | echo string.lexcmp ("pipo des alpes", "Pipo des Alpes") 35 | echo string.lexncmp ("pipo des alpes", "peepoo dezalp", 5) 36 | echo string.lexwcmp ("pipo des alpes", "Pipo des *") 37 | echo string.matchpat ("pipo des alpes", "[a-z]*") 38 | echo string.soundex ("pipo des alpes") 39 | echo string.cntch ("pipo des alpes", "p") 40 | > | $(string.justify(str,20):block)\ 41 | > | $(string.justify (str, 30):block)\ 42 | > | 43 | -------------------------------------------------------------------------------- /src/version.h: -------------------------------------------------------------------------------- 1 | /*========================================================== 2 | * 3 | * version.h - version information for GSL 4 | * 5 | * Should be the last file included in parent source program. 6 | * Generated by iMatix Boom 7 | * 8 | * Copyright (c) 1996-2010 iMatix Corporation 9 | * All rights reserved. 10 | * 11 | * This file is licensed under the BSD license as follows: 12 | * 13 | * Redistribution and use in source and binary forms, with or without 14 | * modification, are permitted provided that the following conditions 15 | * are met: 16 | * 17 | * * Redistributions of source code must retain the above copyright 18 | * notice, this list of conditions and the following disclaimer. 19 | * * Redistributions in binary form must reproduce the above copyright 20 | * notice, this list of conditions and the following disclaimer in 21 | * the documentation and/or other materials provided with the 22 | * distribution. 23 | * * Neither the name of iMatix Corporation nor the names of its 24 | * contributors may be used to endorse or promote products derived 25 | * from this software without specific prior written permission. 26 | * 27 | * THIS SOFTWARE IS PROVIDED BY IMATIX CORPORATION "AS IS" AND ANY 28 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 29 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 30 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL IMATIX CORPORATION BE 31 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 32 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 33 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 34 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 35 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 36 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 37 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 38 | * 39 | *==========================================================*/ 40 | 41 | #undef VERSION /* Scrap any previous definitions */ 42 | #undef PRODUCT 43 | #undef COPYRIGHT 44 | #undef BUILDDATE 45 | #undef BUILDMODEL 46 | #define VERSION "4.1.4" 47 | #define PRODUCT "GSL/4.1.4" 48 | #define COPYRIGHT "Copyright (c) 1996-2016 iMatix Corporation" 49 | #define BUILDDATE "" 50 | #define BUILDMODEL "Built from http://github.com/imatix/gsl.git master" 51 | #if defined (VERSION_EMBED) 52 | /* Embed the version information in the resulting binary */ 53 | char *gsl_version_start = "VeRsIoNsTaRt:gsl"; 54 | char *gsl_version = VERSION; 55 | char *gsl_product = PRODUCT; 56 | char *gsl_copyright = COPYRIGHT; 57 | char *gsl_buildmodel = BUILDMODEL; 58 | char *gsl_svn_revision = SVN_REVISION; 59 | char *gsl_version_end = "VeRsIoNeNd:gsl"; 60 | #endif 61 | --------------------------------------------------------------------------------