diff --git a/.bash_history b/.bash_history new file mode 100644 index 0000000..0eaaa3b --- /dev/null +++ b/.bash_history @@ -0,0 +1,78 @@ +cd cobroutines/ +ls +make -f Makefile.Win32 +ls +a.exe +cat xupeta.c +ls +vi mwindows.h +vi sql* +vi scr.c +ls +mv screen.c~ screen.c +ls +make -f Makefile.Win32 +ls +file *] +exit +cd c:/mingw +grep -r -i euidaccess * +grep -r -i uname * +cd c:/ +cd tiny-extras/Postgres/Release/ +ls +pexports TCSql.dll +cd +ls +cd lib +ls +cd +ls +tconfig.mingw.sh +make clean +make +make clean +make +make install +make +make +make install +make +make install +make +make install +make +make install +make +make install +make +make install +make +make install +make +make install +make +make install +make +make install +make +make install +make +make install +make +make install +make +make install +make +make install +make +make install +make +make install +make +make install +make install +make +make install +make +make install diff --git a/.cproject b/.cproject new file mode 100644 index 0000000..8fe4a68 --- /dev/null +++ b/.cproject @@ -0,0 +1,203 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.dep.inc b/.dep.inc new file mode 100644 index 0000000..4560e55 --- /dev/null +++ b/.dep.inc @@ -0,0 +1,5 @@ +# This code depends on make tool being used +DEPFILES=$(wildcard $(addsuffix .d, ${OBJECTFILES})) +ifneq (${DEPFILES},) +include ${DEPFILES} +endif diff --git a/.metadata/.lock b/.metadata/.lock new file mode 100644 index 0000000..e69de29 diff --git a/.metadata/.mylyn/repositories.xml.zip b/.metadata/.mylyn/repositories.xml.zip new file mode 100644 index 0000000..c095d15 Binary files /dev/null and b/.metadata/.mylyn/repositories.xml.zip differ diff --git a/.metadata/.plugins/org.eclipse.cdt.core/.log b/.metadata/.plugins/org.eclipse.cdt.core/.log new file mode 100644 index 0000000..5687012 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.cdt.core/.log @@ -0,0 +1 @@ +*** SESSION set 03, 2012 10:31:09.42 ------------------------------------------- diff --git a/.metadata/.plugins/org.eclipse.cdt.make.core/specs.c b/.metadata/.plugins/org.eclipse.cdt.make.core/specs.c new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.cdt.make.core/specs.c @@ -0,0 +1 @@ + diff --git a/.metadata/.plugins/org.eclipse.cdt.make.core/specs.cpp b/.metadata/.plugins/org.eclipse.cdt.make.core/specs.cpp new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.cdt.make.core/specs.cpp @@ -0,0 +1 @@ + diff --git a/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version new file mode 100644 index 0000000..25cb955 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index new file mode 100644 index 0000000..98daeff Binary files /dev/null and b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version new file mode 100644 index 0000000..6b2aaa7 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.metadata/.plugins/org.eclipse.core.resources/.root/1.tree b/.metadata/.plugins/org.eclipse.core.resources/.root/1.tree new file mode 100644 index 0000000..77be1fe Binary files /dev/null and b/.metadata/.plugins/org.eclipse.core.resources/.root/1.tree differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources b/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources new file mode 100644 index 0000000..bd08eee Binary files /dev/null and b/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources differ diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.ui.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.ui.prefs new file mode 100644 index 0000000..5e2da66 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.ui.prefs @@ -0,0 +1,4 @@ +eclipse.preferences.version=1 +spelling_locale_initialized=true +useAnnotationsPrefPage=true +useQuickDiffPrefPage=true diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..dffc6b5 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +version=1 diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.epp.usagedata.recording.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.epp.usagedata.recording.prefs new file mode 100644 index 0000000..b8957f6 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.epp.usagedata.recording.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.epp.usagedata.recording.last-upload=1346679081898 diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 0000000..7ea7e34 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,14 @@ +content_assist_proposals_background=255,255,255 +content_assist_proposals_foreground=0,0,0 +eclipse.preferences.version=1 +fontPropagated=true +org.eclipse.jdt.internal.ui.navigator.layout=2 +org.eclipse.jdt.ui.editor.tab.width= +org.eclipse.jdt.ui.formatterprofiles.version=12 +org.eclipse.jdt.ui.javadoclocations.migrated=true +org.eclipse.jface.textfont=1|Consolas|10.0|0|WINDOWS|1|0|0|0|0|0|0|0|0|1|0|0|0|0|Consolas; +proposalOrderMigrated=true +spelling_locale_initialized=true +tabWidthPropagated=true +useAnnotationsPrefPage=true +useQuickDiffPrefPage=true diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jst.j2ee.webservice.ui.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jst.j2ee.webservice.ui.prefs new file mode 100644 index 0000000..553bb96 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jst.j2ee.webservice.ui.prefs @@ -0,0 +1,2 @@ +areThereWebServices=false +eclipse.preferences.version=1 diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.context.core.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.context.core.prefs new file mode 100644 index 0000000..43e97e4 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.context.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +mylyn.attention.migrated=true diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.monitor.ui.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.monitor.ui.prefs new file mode 100644 index 0000000..8d462a6 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.monitor.ui.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.mylyn.monitor.activity.tracking.enabled.checked=true diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.team.cvs.ui.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.team.cvs.ui.prefs new file mode 100644 index 0000000..f9e585b --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.team.cvs.ui.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +pref_first_startup=false diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.team.ui.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.team.ui.prefs new file mode 100644 index 0000000..56cd496 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.team.ui.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.team.ui.first_time=false diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs new file mode 100644 index 0000000..a86421e --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs @@ -0,0 +1,5 @@ +PROBLEMS_FILTERS_MIGRATE=true +eclipse.preferences.version=1 +platformState=1341602168725 +quickStart=true +tipsAndTricks=true diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs new file mode 100644 index 0000000..08076f2 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +showIntro=false diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs new file mode 100644 index 0000000..e9a9951 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs @@ -0,0 +1,3 @@ +//org.eclipse.ui.commands/state/org.eclipse.wst.xml.views.XPathView.processor.xpathprocessor/org.eclipse.ui.commands.radioState=xpath10 +ENABLED_DECORATORS=de.tobject.findbugs.decorators.WorkingSetBugCountDecorator\:true,de.tobject.findbugs.decorators.ProjectBugCountDecorator\:true,de.tobject.findbugs.decorators.FolderBugCountDecorator\:true,de.tobject.findbugs.decorators.FileBugCountDecorator\:true,org.eclipse.jst.ws.jaxws.dom.integration.navigator.WebServiceDecorator\:true,org.eclipse.wst.server.ui.decorator\:false,sf.eclipse.javacc.jjdecorator\:true,org.dyno.visual.swing.decorator\:true,org.eclipse.cdt.ui.indexedFiles\:false,org.eclipse.cdt.managedbuilder.ui.excludedFile\:true,org.eclipse.datatools.connectivity.sqm.core.internal.ui.explorer.DependencyDecoration\:true,org.eclipse.datatools.connectivity.sqm.core.internal.ui.explorer.ColumnDecoration\:true,org.eclipse.datatools.connectivity.sqm.core.internal.ui.explorer.ForeignKeyDecoration\:true,org.eclipse.datatools.connectivity.sqm.core.internal.ui.explorer.IndexTriggerDecoration\:true,org.eclipse.datatools.connectivity.internal.core.ui.bookmarkDecoration\:true,org.eclipse.datatools.connectivity.internal.core.ui.FilterNodeDecoration\:true,org.eclipse.datatools.connectivity.ui.decorator.contentextension\:false,org.eclipse.datatools.enablement.ingres.ui.providers.decorators.SynonymDecorationService\:true,org.eclipse.datatools.enablement.ingres.internal.ui.providers.decorators.ParameterDecorationService\:true,org.eclipse.datatools.enablement.sybase.asa.proxytabledecorator\:true,org.eclipse.datatools.enablement.sybase.ase.webservicetabledecorator\:true,org.eclipse.datatools.enablement.sybase.systemtabledecorator\:true,org.eclipse.jdt.ui.override.decorator\:true,org.eclipse.jdt.ui.interface.decorator\:false,org.eclipse.jdt.ui.buildpath.decorator\:true,org.eclipse.jst.j2ee.internal.ui.util.AnnotationIconDecorator_ejb\:true,org.eclipse.jst.j2ee.navigator.internal.J2EEProjectDecorator\:true,org.eclipse.jst.jee.ui.internal.navigator.ejb.BeanDecorator\:true,org.eclipse.jst.jee.navigator.internal.JEEProjectDecorator\:true,org.eclipse.jst.j2ee.internal.ui.util.AnnotationIconDecorator_servlet\:true,org.eclipse.jst.servlet.ui.Decorator\:true,org.eclipse.mylyn.context.ui.decorator.interest\:true,org.eclipse.mylyn.tasks.ui.decorators.task\:true,org.eclipse.mylyn.team.ui.changeset.decorator\:true,org.eclipse.pde.ui.binaryProjectDecorator\:false,org.eclipse.rse.core.virtualobject.decorator\:true,org.eclipse.rse.core.binary.executable.decorator\:true,org.eclipse.rse.core.script.executable.decorator\:true,org.eclipse.rse.core.java.executable.decorator\:true,org.eclipse.rse.core.library.decorator\:true,org.eclipse.rse.core.link.decorator\:true,org.eclipse.rse.subsystems.error.decorator\:true,org.eclipse.team.cvs.ui.decorator\:true,org.eclipse.team.svn.ui.decorator.SVNLightweightDecorator\:false,org.eclipse.ui.LinkedResourceDecorator\:true,org.eclipse.ui.VirtualResourceDecorator\:true,org.eclipse.ui.ContentTypeDecorator\:true,org.eclipse.ui.ResourceFilterDecorator\:false,org.eclipse.wst.jsdt.ui.override.decorator\:true,org.eclipse.wst.server.ui.navigatorDecorator\:true, +eclipse.preferences.version=1 diff --git a/.metadata/.plugins/org.eclipse.epp.usagedata.recording/usagedata.csv b/.metadata/.plugins/org.eclipse.epp.usagedata.recording/usagedata.csv new file mode 100644 index 0000000..724cee2 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.epp.usagedata.recording/usagedata.csv @@ -0,0 +1,127 @@ +what,kind,bundleId,bundleVersion,description,time +activated,perspective,org.eclipse.jst.j2ee.ui,,"org.eclipse.jst.j2ee.J2EEPerspective",1346679079785 +started,bundle,org.eclipse.osgi,3.7.2.v20120110-1415,"org.eclipse.osgi",1346679079787 +started,bundle,org.eclipse.equinox.simpleconfigurator,1.0.200.v20110815-1438,"org.eclipse.equinox.simpleconfigurator",1346679079798 +started,bundle,com.ibm.icu,4.4.2.v20110823,"com.ibm.icu",1346679079815 +started,bundle,org.eclipse.core.contenttype,3.4.100.v20110423-0524,"org.eclipse.core.contenttype",1346679079822 +started,bundle,org.eclipse.core.databinding.observable,1.4.0.I20110222-0800,"org.eclipse.core.databinding.observable",1346679079836 +started,bundle,org.eclipse.core.expressions,3.4.300.v20110228,"org.eclipse.core.expressions",1346679079850 +started,bundle,org.eclipse.core.filebuffers,3.5.200.v20110928-1504,"org.eclipse.core.filebuffers",1346679079853 +started,bundle,org.eclipse.core.filesystem,1.3.100.v20110423-0524,"org.eclipse.core.filesystem",1346679079871 +started,bundle,org.eclipse.core.jobs,3.5.101.v20120113-1953,"org.eclipse.core.jobs",1346679079886 +started,bundle,org.eclipse.core.net,1.2.100.I20110511-0800,"org.eclipse.core.net",1346679079893 +started,bundle,org.eclipse.core.resources,3.7.101.v20120125-1505,"org.eclipse.core.resources",1346679079905 +started,bundle,org.eclipse.core.runtime,3.7.0.v20110110,"org.eclipse.core.runtime",1346679079915 +started,bundle,org.eclipse.core.runtime.compatibility,3.2.100.v20100505,"org.eclipse.core.runtime.compatibility",1346679079924 +started,bundle,org.eclipse.core.runtime.compatibility.auth,3.2.200.v20110110,"org.eclipse.core.runtime.compatibility.auth",1346679079937 +started,bundle,org.eclipse.emf.common,2.7.0.v20120127-1122,"org.eclipse.emf.common",1346679079937 +started,bundle,org.eclipse.emf.common.ui,2.7.0.v20120130-0943,"org.eclipse.emf.common.ui",1346679079951 +started,bundle,org.eclipse.emf.ecore,2.7.0.v20120127-1122,"org.eclipse.emf.ecore",1346679079951 +started,bundle,org.eclipse.emf.ecore.xmi,2.7.0.v20120127-1122,"org.eclipse.emf.ecore.xmi",1346679079962 +started,bundle,org.eclipse.emf.edit,2.7.2.v20120130-0943,"org.eclipse.emf.edit",1346679079978 +started,bundle,org.eclipse.emf.edit.ui,2.7.0.v20120130-0943,"org.eclipse.emf.edit.ui",1346679079978 +started,bundle,org.eclipse.epp.mpc.ui,1.1.1.I20110907-0947,"org.eclipse.epp.mpc.ui",1346679079978 +started,bundle,org.eclipse.epp.usagedata.gathering,1.3.1.R201106061540,"org.eclipse.epp.usagedata.gathering",1346679079980 +started,bundle,org.eclipse.epp.usagedata.recording,1.3.1.R201106061540,"org.eclipse.epp.usagedata.recording",1346679079993 +started,bundle,org.eclipse.equinox.app,1.3.100.v20110321,"org.eclipse.equinox.app",1346679080001 +started,bundle,org.eclipse.equinox.common,3.6.0.v20110523,"org.eclipse.equinox.common",1346679080016 +started,bundle,org.eclipse.equinox.ds,1.3.1.R37x_v20110701,"org.eclipse.equinox.ds",1346679080028 +started,bundle,org.eclipse.equinox.event,1.2.100.v20110502,"org.eclipse.equinox.event",1346679080044 +started,bundle,org.eclipse.equinox.p2.core,2.1.1.v20120113-1346,"org.eclipse.equinox.p2.core",1346679080057 +started,bundle,org.eclipse.equinox.p2.directorywatcher,1.0.300.v20110815-1419,"org.eclipse.equinox.p2.directorywatcher",1346679080058 +started,bundle,org.eclipse.equinox.p2.engine,2.1.1.R37x_v20111003,"org.eclipse.equinox.p2.engine",1346679080067 +started,bundle,org.eclipse.equinox.p2.metadata,2.1.0.v20110815-1419,"org.eclipse.equinox.p2.metadata",1346679080084 +started,bundle,org.eclipse.equinox.p2.metadata.repository,1.2.0.v20110815-1419,"org.eclipse.equinox.p2.metadata.repository",1346679080098 +started,bundle,org.eclipse.equinox.p2.operations,2.1.1.R37x_v20111111,"org.eclipse.equinox.p2.operations",1346679080106 +started,bundle,org.eclipse.equinox.p2.reconciler.dropins,1.1.100.v20110815-1419,"org.eclipse.equinox.p2.reconciler.dropins",1346679080112 +started,bundle,org.eclipse.equinox.p2.repository,2.1.1.v20120113-1346,"org.eclipse.equinox.p2.repository",1346679080124 +started,bundle,org.eclipse.equinox.p2.ui.sdk.scheduler,1.0.100.v20110815-1419,"org.eclipse.equinox.p2.ui.sdk.scheduler",1346679080138 +started,bundle,org.eclipse.equinox.p2.updatechecker,1.1.200.v20110815-1419,"org.eclipse.equinox.p2.updatechecker",1346679080148 +started,bundle,org.eclipse.equinox.preferences,3.4.2.v20120111-2020,"org.eclipse.equinox.preferences",1346679080156 +started,bundle,org.eclipse.equinox.registry,3.5.101.R37x_v20110810-1611,"org.eclipse.equinox.registry",1346679080164 +started,bundle,org.eclipse.equinox.security,1.1.1.R37x_v20110822-1018,"org.eclipse.equinox.security",1346679080181 +started,bundle,org.eclipse.equinox.util,1.0.300.v20110502,"org.eclipse.equinox.util",1346679080189 +started,bundle,org.eclipse.help,3.5.100.v20110426,"org.eclipse.help",1346679080201 +started,bundle,org.eclipse.jdt.core,3.7.3.v20120119-1537,"org.eclipse.jdt.core",1346679080212 +started,bundle,org.eclipse.jdt.core.manipulation,1.4.0.v20110928-1453,"org.eclipse.jdt.core.manipulation",1346679080223 +started,bundle,org.eclipse.jdt.ui,3.7.2.v20120109-1427,"org.eclipse.jdt.ui",1346679080244 +started,bundle,org.eclipse.jem.util,2.1.100.v201103021400,"org.eclipse.jem.util",1346679080252 +started,bundle,org.eclipse.jface,3.7.0.v20110928-1505,"org.eclipse.jface",1346679080260 +started,bundle,org.eclipse.jsch.core,1.1.300.I20110514-0800,"org.eclipse.jsch.core",1346679080273 +started,bundle,org.eclipse.jst.j2ee.ui,1.1.503.v201201190400,"org.eclipse.jst.j2ee.ui",1346679080281 +started,bundle,org.eclipse.jst.j2ee.webservice,1.1.400.v201004110600,"org.eclipse.jst.j2ee.webservice",1346679080298 +started,bundle,org.eclipse.jst.j2ee.webservice.ui,1.1.500.v201105122000,"org.eclipse.jst.j2ee.webservice.ui",1346679080310 +started,bundle,org.eclipse.jst.ws.jaxws.utils,1.0.100.v201201031437,"org.eclipse.jst.ws.jaxws.utils",1346679080321 +started,bundle,org.eclipse.ltk.core.refactoring,3.5.201.r372_v20111101-0700,"org.eclipse.ltk.core.refactoring",1346679080335 +started,bundle,org.eclipse.mylyn.bugzilla.core,3.6.5.v20120123-0100,"org.eclipse.mylyn.bugzilla.core",1346679080347 +started,bundle,org.eclipse.mylyn.bugzilla.ui,3.6.0.v20110608-1400,"org.eclipse.mylyn.bugzilla.ui",1346679080352 +started,bundle,org.eclipse.mylyn.commons.identity,0.8.0.v20110608-1400,"org.eclipse.mylyn.commons.identity",1346679080362 +started,bundle,org.eclipse.mylyn.commons.net,3.6.0.v20110608-1400,"org.eclipse.mylyn.commons.net",1346679080362 +started,bundle,org.eclipse.mylyn.commons.ui,3.6.1.v20110720-0100,"org.eclipse.mylyn.commons.ui",1346679080371 +started,bundle,org.eclipse.mylyn.context.core,3.6.1.v20110720-0100,"org.eclipse.mylyn.context.core",1346679080382 +started,bundle,org.eclipse.mylyn.context.ui,3.6.1.v20120112-0100,"org.eclipse.mylyn.context.ui",1346679080390 +started,bundle,org.eclipse.mylyn.monitor.ui,3.6.0.v20110608-1400,"org.eclipse.mylyn.monitor.ui",1346679080400 +started,bundle,org.eclipse.mylyn.tasks.ui,3.6.5.v20120215-0100,"org.eclipse.mylyn.tasks.ui",1346679080420 +started,bundle,org.eclipse.mylyn.team.ui,3.6.1.v20110825-0100,"org.eclipse.mylyn.team.ui",1346679080436 +started,bundle,org.eclipse.search,3.7.0.v20110928-1504,"org.eclipse.search",1346679080448 +started,bundle,org.eclipse.team.core,3.6.0.I20110525-0800,"org.eclipse.team.core",1346679080460 +started,bundle,org.eclipse.team.cvs.core,3.3.400.I20110510-0800,"org.eclipse.team.cvs.core",1346679080470 +started,bundle,org.eclipse.team.cvs.ui,3.3.401.v20120126-1227,"org.eclipse.team.cvs.ui",1346679080479 +started,bundle,org.eclipse.team.ui,3.6.101.R37x_v20111109-0800,"org.eclipse.team.ui",1346679080493 +started,bundle,org.eclipse.ui,3.7.0.v20110928-1505,"org.eclipse.ui",1346679080503 +started,bundle,org.eclipse.ui.console,3.5.100.v20111007_r372,"org.eclipse.ui.console",1346679080508 +started,bundle,org.eclipse.ui.editors,3.7.0.v20110928-1504,"org.eclipse.ui.editors",1346679080520 +started,bundle,org.eclipse.ui.forms,3.5.101.v20111011-1919,"org.eclipse.ui.forms",1346679080533 +started,bundle,org.eclipse.ui.ide,3.7.0.v20110928-1505,"org.eclipse.ui.ide",1346679080549 +started,bundle,org.eclipse.ui.intro,3.4.100.v20110425,"org.eclipse.ui.intro",1346679080564 +started,bundle,org.eclipse.ui.intro.universal,3.2.500.v20110510,"org.eclipse.ui.intro.universal",1346679080564 +started,bundle,org.eclipse.ui.navigator,3.5.101.v20120106-1355,"org.eclipse.ui.navigator",1346679080612 +started,bundle,org.eclipse.ui.navigator.resources,3.4.300.v20110928-1505,"org.eclipse.ui.navigator.resources",1346679080624 +started,bundle,org.eclipse.ui.net,1.2.100.v20111208-1155,"org.eclipse.ui.net",1346679080639 +started,bundle,org.eclipse.ui.views,3.6.0.v20110928-1505,"org.eclipse.ui.views",1346679080650 +started,bundle,org.eclipse.ui.workbench,3.7.1.v20120104-1859,"org.eclipse.ui.workbench",1346679080661 +started,bundle,org.eclipse.ui.workbench.texteditor,3.7.0.v20110928-1504,"org.eclipse.ui.workbench.texteditor",1346679080675 +started,bundle,org.eclipse.update.configurator,3.3.100.v20100512,"org.eclipse.update.configurator",1346679080685 +started,bundle,org.eclipse.update.core,3.2.500.v20110330,"org.eclipse.update.core",1346679080703 +started,bundle,org.eclipse.update.scheduler,3.2.300.v20100512,"org.eclipse.update.scheduler",1346679080716 +started,bundle,org.eclipse.wst.common.emf,1.2.100.v201101101900,"org.eclipse.wst.common.emf",1346679080728 +started,bundle,org.eclipse.wst.common.emfworkbench.integration,1.2.101.v201107140600,"org.eclipse.wst.common.emfworkbench.integration",1346679080758 +started,bundle,org.eclipse.wst.common.frameworks,1.2.102.v201201190400,"org.eclipse.wst.common.frameworks",1346679080768 +started,bundle,org.eclipse.wst.common.project.facet.core,1.4.201.v201201101553,"org.eclipse.wst.common.project.facet.core",1346679080768 +started,bundle,org.eclipse.wst.web,1.1.501.v201201190400,"org.eclipse.wst.web",1346679080777 +started,bundle,org.eclipse.cdt.codan.ui.cxx,2.0.0.201202111925,"org.eclipse.cdt.codan.ui.cxx",1346679080791 +started,bundle,org.eclipse.cdt.core,5.3.2.201202111925,"org.eclipse.cdt.core",1346679080807 +started,bundle,org.eclipse.cdt.make.core,7.1.2.201202111925,"org.eclipse.cdt.make.core",1346679080827 +started,bundle,org.eclipse.cdt.make.ui,7.1.2.201202111925,"org.eclipse.cdt.make.ui",1346679080837 +started,bundle,org.eclipse.cdt.managedbuilder.core,8.0.2.201202111925,"org.eclipse.cdt.managedbuilder.core",1346679080851 +started,bundle,org.eclipse.cdt.ui,5.3.2.201202111925,"org.eclipse.cdt.ui",1346679080869 +os,sysinfo,,,"win32",1346679080875 +arch,sysinfo,,,"x86",1346679080875 +ws,sysinfo,,,"win32",1346679080875 +locale,sysinfo,,,"pt_BR",1346679080875 +processors,sysinfo,,,"4",1346679080875 +java.runtime.name,sysinfo,,,"Java(TM) SE Runtime Environment",1346679080875 +java.runtime.version,sysinfo,,,"1.7.0_05-b05",1346679080875 +java.specification.name,sysinfo,,,"Java Platform API Specification",1346679080875 +java.specification.vendor,sysinfo,,,"Oracle Corporation",1346679080875 +java.specification.version,sysinfo,,,"1.7",1346679080875 +java.vendor,sysinfo,,,"Oracle Corporation",1346679080875 +java.version,sysinfo,,,"1.7.0_05",1346679080875 +java.vm.info,sysinfo,,,"mixed mode, sharing",1346679080875 +java.vm.name,sysinfo,,,"Java HotSpot(TM) Client VM",1346679080875 +java.vm.specification.name,sysinfo,,,"Java Virtual Machine Specification",1346679080876 +java.vm.specification.vendor,sysinfo,,,"Oracle Corporation",1346679080876 +java.vm.specification.version,sysinfo,,,"1.7",1346679080876 +java.vm.vendor,sysinfo,,,"Oracle Corporation",1346679080876 +java.vm.version,sysinfo,,,"23.1-b03",1346679080876 +activated,view,org.eclipse.ui.navigator.resources,3.4.300.v20110928-1505,"org.eclipse.ui.navigator.ProjectExplorer",1346679080998 +activated,view,org.eclipse.ui.navigator.resources,3.4.300.v20110928-1505,"org.eclipse.ui.navigator.ProjectExplorer",1346679081044 +closed,view,org.eclipse.ui,3.7.0.v20110928-1505,"org.eclipse.ui.internal.introview",1346679081073 +started,bundle,org.eclipse.cdt.codan.core.cxx,1.0.0.201202111925,"org.eclipse.cdt.codan.core.cxx",1346679081307 +started,bundle,org.eclipse.cdt.codan.core,2.0.0.201202111925,"org.eclipse.cdt.codan.core",1346679081325 +started,bundle,org.eclipse.cdt.codan.checkers,1.0.1.201202111925,"org.eclipse.cdt.codan.checkers",1346679081384 +deactivated,workbench,org.eclipse.ui.workbench,3.7.1.v20120104-1859,"",1346679084397 +activated,workbench,org.eclipse.ui.workbench,3.7.1.v20120104-1859,"",1346679086387 +closed,workbench,org.eclipse.ui.workbench,3.7.1.v20120104-1859,"",1346679086454 +started,bundle,org.eclipse.compare.core,3.5.200.I20110208-0800,"org.eclipse.compare.core",1346679087321 +started,bundle,org.eclipse.compare,3.5.202.R37x_v20111109-0800,"org.eclipse.compare",1346679087364 diff --git a/.metadata/.plugins/org.eclipse.jdt.core/invalidArchivesCache b/.metadata/.plugins/org.eclipse.jdt.core/invalidArchivesCache new file mode 100644 index 0000000..593f470 Binary files /dev/null and b/.metadata/.plugins/org.eclipse.jdt.core/invalidArchivesCache differ diff --git a/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache b/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache new file mode 100644 index 0000000..593f470 Binary files /dev/null and b/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache differ diff --git a/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat b/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat new file mode 100644 index 0000000..7af5cbd Binary files /dev/null and b/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat differ diff --git a/.metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml b/.metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml new file mode 100644 index 0000000..a4ee3cb --- /dev/null +++ b/.metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml @@ -0,0 +1,2 @@ + + diff --git a/.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml b/.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml new file mode 100644 index 0000000..9e390f5 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml @@ -0,0 +1,2 @@ + + diff --git a/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml b/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml new file mode 100644 index 0000000..5ca0b77 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml @@ -0,0 +1,3 @@ + +
+
diff --git a/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml b/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml new file mode 100644 index 0000000..d8563d0 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml @@ -0,0 +1,202 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.metadata/version.ini b/.metadata/version.ini new file mode 100644 index 0000000..c51ff74 --- /dev/null +++ b/.metadata/version.ini @@ -0,0 +1 @@ +org.eclipse.core.runtime=1 \ No newline at end of file diff --git a/.project b/.project new file mode 100644 index 0000000..4ca7b17 --- /dev/null +++ b/.project @@ -0,0 +1,70 @@ + + + tinycobol + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + ?name? + + + + org.eclipse.cdt.make.core.append_environment + true + + + org.eclipse.cdt.make.core.buildArguments + + + + org.eclipse.cdt.make.core.buildCommand + make + + + org.eclipse.cdt.make.core.buildLocation + ${workspace_loc:/tiny/Default} + + + org.eclipse.cdt.make.core.contents + org.eclipse.cdt.make.core.activeConfigSettings + + + org.eclipse.cdt.make.core.enableAutoBuild + false + + + org.eclipse.cdt.make.core.enableCleanBuild + true + + + org.eclipse.cdt.make.core.enableFullBuild + true + + + org.eclipse.cdt.make.core.stopOnError + true + + + org.eclipse.cdt.make.core.useDefaultBuildCmd + true + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + org.eclipse.cdt.core.ccnature + + diff --git a/.settings/org.eclipse.cdt.codan.core.prefs b/.settings/org.eclipse.cdt.codan.core.prefs new file mode 100644 index 0000000..3a30df6 --- /dev/null +++ b/.settings/org.eclipse.cdt.codan.core.prefs @@ -0,0 +1,67 @@ +#Thu Nov 17 11:51:18 BRST 2011 +eclipse.preferences.version=1 +org.eclipse.cdt.codan.checkers.errnoreturn=Warning +org.eclipse.cdt.codan.checkers.errnoreturn.params={implicit\=>false} +org.eclipse.cdt.codan.checkers.errreturnvalue=Error +org.eclipse.cdt.codan.checkers.errreturnvalue.params={} +org.eclipse.cdt.codan.checkers.noreturn=Error +org.eclipse.cdt.codan.checkers.noreturn.params={implicit\=>false} +org.eclipse.cdt.codan.internal.checkers.AbstractClassCreation=Error +org.eclipse.cdt.codan.internal.checkers.AbstractClassCreation.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}} +org.eclipse.cdt.codan.internal.checkers.AmbiguousProblem=Error +org.eclipse.cdt.codan.internal.checkers.AmbiguousProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}} +org.eclipse.cdt.codan.internal.checkers.AssignmentInConditionProblem=Warning +org.eclipse.cdt.codan.internal.checkers.AssignmentInConditionProblem.params={} +org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem=Error +org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem.params={} +org.eclipse.cdt.codan.internal.checkers.CaseBreakProblem=Info +org.eclipse.cdt.codan.internal.checkers.CaseBreakProblem.params={no_break_comment\=>"no break",last_case_param\=>true,empty_case_param\=>false} +org.eclipse.cdt.codan.internal.checkers.CatchByReference=Warning +org.eclipse.cdt.codan.internal.checkers.CatchByReference.params={unknown\=>false,exceptions\=>()} +org.eclipse.cdt.codan.internal.checkers.CircularReferenceProblem=Error +org.eclipse.cdt.codan.internal.checkers.CircularReferenceProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}} +org.eclipse.cdt.codan.internal.checkers.FieldResolutionProblem=Error +org.eclipse.cdt.codan.internal.checkers.FieldResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}} +org.eclipse.cdt.codan.internal.checkers.FunctionResolutionProblem=Error +org.eclipse.cdt.codan.internal.checkers.FunctionResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}} +org.eclipse.cdt.codan.internal.checkers.InvalidArguments=Error +org.eclipse.cdt.codan.internal.checkers.InvalidArguments.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}} +org.eclipse.cdt.codan.internal.checkers.InvalidTemplateArgumentsProblem=Error +org.eclipse.cdt.codan.internal.checkers.InvalidTemplateArgumentsProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}} +org.eclipse.cdt.codan.internal.checkers.LabelStatementNotFoundProblem=Error +org.eclipse.cdt.codan.internal.checkers.LabelStatementNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}} +org.eclipse.cdt.codan.internal.checkers.MemberDeclarationNotFoundProblem=Error +org.eclipse.cdt.codan.internal.checkers.MemberDeclarationNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}} +org.eclipse.cdt.codan.internal.checkers.MethodResolutionProblem=Error +org.eclipse.cdt.codan.internal.checkers.MethodResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}} +org.eclipse.cdt.codan.internal.checkers.NamingConventionFunctionChecker=-Info +org.eclipse.cdt.codan.internal.checkers.NamingConventionFunctionChecker.params={pattern\=>"^[a-z]",macro\=>true,exceptions\=>()} +org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructorProblem=Warning +org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructorProblem.params={} +org.eclipse.cdt.codan.internal.checkers.OverloadProblem=Error +org.eclipse.cdt.codan.internal.checkers.OverloadProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}} +org.eclipse.cdt.codan.internal.checkers.RedeclarationProblem=Error +org.eclipse.cdt.codan.internal.checkers.RedeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}} +org.eclipse.cdt.codan.internal.checkers.RedefinitionProblem=Error +org.eclipse.cdt.codan.internal.checkers.RedefinitionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}} +org.eclipse.cdt.codan.internal.checkers.ReturnStyleProblem=-Warning +org.eclipse.cdt.codan.internal.checkers.ReturnStyleProblem.params={} +org.eclipse.cdt.codan.internal.checkers.ScanfFormatStringSecurityProblem=-Warning +org.eclipse.cdt.codan.internal.checkers.ScanfFormatStringSecurityProblem.params={} +org.eclipse.cdt.codan.internal.checkers.StatementHasNoEffectProblem=Warning +org.eclipse.cdt.codan.internal.checkers.StatementHasNoEffectProblem.params={macro\=>true,exceptions\=>()} +org.eclipse.cdt.codan.internal.checkers.SuggestedParenthesisProblem=Warning +org.eclipse.cdt.codan.internal.checkers.SuggestedParenthesisProblem.params={paramNot\=>false} +org.eclipse.cdt.codan.internal.checkers.SuspiciousSemicolonProblem=Warning +org.eclipse.cdt.codan.internal.checkers.SuspiciousSemicolonProblem.params={else\=>false,afterelse\=>false} +org.eclipse.cdt.codan.internal.checkers.TypeResolutionProblem=Error +org.eclipse.cdt.codan.internal.checkers.TypeResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}} +org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem=Warning +org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem.params={macro\=>true} +org.eclipse.cdt.codan.internal.checkers.UnusedStaticFunctionProblem=Warning +org.eclipse.cdt.codan.internal.checkers.UnusedStaticFunctionProblem.params={macro\=>true} +org.eclipse.cdt.codan.internal.checkers.UnusedVariableDeclarationProblem=Warning +org.eclipse.cdt.codan.internal.checkers.UnusedVariableDeclarationProblem.params={macro\=>true,exceptions\=>("@(\#)","$Id")} +org.eclipse.cdt.codan.internal.checkers.VariableResolutionProblem=Error +org.eclipse.cdt.codan.internal.checkers.VariableResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}} +useParentScope=false diff --git a/ANNOUNCE b/ANNOUNCE new file mode 100644 index 0000000..699417d --- /dev/null +++ b/ANNOUNCE @@ -0,0 +1,280 @@ +TC-main: +TinyCOBOL is an effort to create a free COBOL 85 compiler. + +It generates GNU assembler for the IA32 (i386) Linux, BeOS, FreeBSD, +Win32 platforms. A executable binary can then be created using the GNU +assembler and linker. + +The project is approaching the first beta release with many statements +already implemented. + + +0.62: +This release contains mainly bugs fixes, and some enhancements. +It includes updates to the main compiler and run-time. + +The pre-processor has been integrated back into the main compiler. +Improvemnents to error detection, reporting and parser recovery. +Support for dynamic loading of DLL's for the Win32 platform. + + +0.61: +This release contains mainly bugs fixes, and some enhancements. +It includes updates to the main compiler and run-time. + + +0.60: +This release contains mainly bugs fixes, and some enhancements. +It includes updates to the main compiler and run-time. + +Improvemnents have been made in the following areas: locking for +relative files, better support of print files (write after and +before advancing) and better compatibility with 85 Standard for +some indexed file I/O operations. + + +0.59: +This release contains mainly bugs fixes, and some enhancements. +It includes updates to the main compiler and run-time. + +Support for internationalization (en, pr_BR, it, fr) has been added. + +Improvemnents have been made in the following areas: multi-line +comment entries in the identification division, run-time error +reporting, and plenty of new intrinsics. + +Finally, there is now only one library, shared by default. + + +0.58: +This release contains mainly bugs fixes, and some enhancements. +It includes updates to the main compiler, run-time, the regression +and NIST test suites. + +Support for inline comments, DEBUGGING lines, declaratives (preliminary), +intrinsic functions (preliminary), INSPECT CONVERTING, concatenation +(preliminary), have been added to the compiler. + +The compiler front end and resource options have been enhanced +to define the default compiler action (create executable or library). +The compiler can also create an static/shared libraries, from COBOL sources, +directly from the command line. + +And finally, embedded SQL can be used with TC, by using a vendor supplied +SQL pre-processor and libraries. + + +0.57: +This release contains mainly bugs fixes, and some enhancements. +It includes updates to the main compiler, run-time, the regression +and NIST test suites. +Support for the ADD/SUBTRACT CORRESPONDING, RENAMES, statements +have been added to the compiler. + +The compiler front end and resource options have been enhanced to +enable TC to create an executable directly using the command line. +The compiler will now auto detect the TC auxiliary libraries required, +and include them in the link step. + + +0.56: +This release contains mainly bugs fixes, and some enhancements. +It includes updates to the main compiler, run-time, the regression +test suite. + +Support for the CHAIN, GOBACK statements, BLANK WHEN ZERO, +INITIAL (preliminary), SPECIAL-NAMES (preliminary) clauses, +COMPUTATIONAL-X type, have been added to the compiler. + +The compiler front end has been enhanced to enable TC to create +an executable directly using the command line. + +The command line options have been changed to more closely reflect +the GCC options. + +Preliminary support for the Win32 (native, no emulation layer required) +platform using the MinGW (Mingw32) tool chain. + +A set of utilities have been added to enable TC testing +for COBOL standard compatibility using the NIST test suite. + +General notes: +Bison is the default parser, Berkeley's YACC (byacc) version 1.9.3 +is now an option. +The configure script will now handle multiple versions library DB and +C compilers depending on the options selected. + +Important note: +Effective with version 0.56, the command line options have been changed +to more closely reflect the GCC options. + +The default action when no appropriate command line option is given, +defaults to 'x', create an executable (preprocess, compile, assemble and link). + +Previous version defaulted to 'S', generate assembler code (preprocess, compile). + + +0.55: +This release contains mainly bugs fixes, and enhancements. +It includes updates to the main compiler, run-time, +the regression test suite. +The grammar was modified to enable compilation with Bison. +The MOVE run-time routines have been updated and improved. +ScreenIO has been updated to handle screen status and function keys. +Support for [SIGN IS] {LEADING/TRAILING} [SEPARATE] clauses, +have been added to the compiler run-time. +Preliminary work as started on the NIST test programs. + +Important note: +Effective with version 0.55, to compile the TinyCOBOL compiler +will require Berkeley's YACC (byacc) version 1.9.3 or Bison. +Version 1.9.3 of YACC (byacc), only available on the snapshots web +page, has been modified to handle huge grammars such as COBOL. +Using previous versions of Berkeley's YACC on the TinyCOBOL grammar, +will result in an abort on a table overflow error. + + +0.54: +This release contains mainly bugs fixes, and enhancements. +It includes updates to the preprocessor, main compiler, RTS, +the regression test suite, EVALUATE, GOTO, READ, WRITE, RETURN, +DELETE, START, REWRITE statements. +Support for multiple WHEN clauses in SEARCH statement, +[SIGN IS] {LEADING/TRAILING} [SEPARATE] clauses, +FLOAT-LONG (COMP-2) FLOAT-SHORT (COMP-1) floating point types, +INSPECT...CONVERTING clause, have been added to the compiler. + + +0.53: +This release contains mainly bugs fixes, and enhancements. +It includes updates to the preprocessor, math verbs, +the regression test suite, gdb debug stabs, +STRING/UNSTRING statements, ACCEPT from COMMAND-LINE and +ENVIRONMENT-VARIABLE statements. +Support for the dynamic CALL statement, +ACCEPT DAY, DAY-OF-WEEK, ON EXCEPTION and ERASE clauses, +ADD and SUBTRACT (CORRESPONDING option) statements, +EXTERNAL clause in the SELECT statement, BINARY-CHAR, +BINARY-SHORT, BINARY-LONG, BINARY-DOUBLE and +COMP-1/COMP-2 (preliminary) floating point types, +support for the Debian package format +have been added to the compiler. + + +0.52: +This release contains bugs fixes, and enhancements, +including updates to the preprocessor, math verbs, +MOVE (CORRESPONDING option) statement, COMPUTE (exponent operator) statement, +enhancements to the regression test suite. +Support for the BLANK WHEN ZERO clause, SYNC clause, qualification, +OCCURS...DEPENDING ON... clause (variable-sized tables), +RECORD VARYING ... DEPENDING ON ... (variable-sized records) clause, +multiple record defines for FD entries, sequence of source programs, +have been added to the compiler. + + +0.51: +This release contains bugs fixes, and enhancements, +including updates to the math verbs, the STRING statement, +file IO READ/WRITE statements, DISPLAY/ACCEPT statements, +SET statement, abbreviated conditional expressions. +Reference modification, pointer types, EXTERNAL semantics (preliminary) +have been added to the compiler. +The new pre-processor will now execute by default. +The Win32 (preliminary) platform, using the Cygwin emulation layer, +is now supported. + + +0.50: +This release contains bugs fixes, and code enhancements, +including updates to the math verbs, the EVALUATE statement, +file OPEN/CLOSE statements, file LINE SEQUENTIAL IO. +The CALL BY CONTENT, JUSTIFIED RIGHT, and REPORT SECTION (preliminary) +statements has been added to the COBOL grammar. +The DISPLAY/ACCEPT LINE/POSITION statements have been added, as an +extension to the standard COBOL grammar. +Sample programs with CGI, SQL, and GUI interfaces have been added +to the source distribution. + +0.4: +This release contains bugs fixes, and code enhancements, +including updates to the GO TO statement, the screen I/O +statements, SORT statements. A preprocessor has been added +to handle fixed and free syntax, and all COPY statements. +Support for external file name assignment in SELECT and +FD statements has been added as an extension to the standard +COBOL 85 grammar. + + +0.3: +This release contains bugs fixes, and major modifications. +It includes an update to the IF/ELSE statements to include +abbreviated conditional expressions. The addition of static variables, +the EVALUATE statements, variable length (1, 2, 4, 8) binary fields, +the screen I/O statements. The CALL BY ... RETURNING variable has been +added, as an extension to the standard COBOL 85 grammar. + + +0.2: +This release contains bugs fixes, and code enhancements, +including updates to the IF/ELSE relational, class, name, +sign conditionals statements. The CALL BY VALUE has been +added, as an extension to the standard COBOL grammar. + + +0.1.5.5: +This minor release contains some bugs fixes, and some +code enhancements, including updates to the PERFORM +statements. With this release all PERFORM statements +are functional and conform to the COBOL 85 standard. + + +0.1.5.3: +In this release, along with some bug fixes, the +INITIALIZE, CURRENCY, PERFORM WITH TEST BEFORE/AFTER +option statements have been added to the COBOL +grammar. + + +0.1.5.0: +This release contains some additions to the COBOL 85 +grammar and some bug fixes. + + +0.1.0.1: +bug fix release. + + +20000507: +An implemented SEARCH statement for tables, and more +bug fixes. + + +20000302: +Better configuration/installing, a new ability to read +environment variables using the ACCEPT verb, use of +library DB version 2.xx+, implementation of START ... +GREATER THAN or Relative files, an enhanced DISPLAY +verb to enable to direct output to stdout/stderr, and +many bug fixes. + + +991210: +Ability to use GDB for debugging, with COBOL source +lines listing, breakpoints, and variable +display/modifying, 32-bit binary storage and +operations on variables with "USAGE IS COMP", and +table access support using the SET statement. + + +991103: +The following features are implemented: ACCEPT from +time/date, DISPLAY, and file input/output (READ, +WRITE, REWRITE, START) for indexed, relative, line and +line sequential files. The functions for STRING, +UNSTRING, INSPECT, SET and ALTERNATE KEYS are +currently in development. + + +991028: +Initial release. diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..0f08fff --- /dev/null +++ b/AUTHORS @@ -0,0 +1,46 @@ +List is in alphabetic order. + +Author: +------------------------------------------------------------------------------- +Rildo Pragana . + +Maintained-by: +------------------------------------------------------------------------------- +Andrew Cameron +Bernard Giroud +Ferran Pegueroles +Jeff Smith +Rildo Pragana + +Contributors: Contribution: +------------------------------------------------------------------------------- +Alain Lucari - Fixes for write with advancing. +Alan Cox - Initial code to generate GNU assembler. +Bernard Giroud - Declaratives, Intrinsic functions, CALL statements. +David Douthitt - Produced libc6 RPM packages for releases. +David Essex - Preprocessor, internationalization, core compiler. +David Billsbrough - Sample spec file for RPM version 4 format. +Ferran Pegueroles - Created Debian package release and man files, + Screen status and function keys for screenIO, + Intrinsic functions. +Fred Mobach - Resident COBOL standard expert. +Gerard Hollard - Qualification problem fix. +Glen Colbert - Initial code for both command line front end and + regression test suite +Hudson Reis - Portuguese version of man files. +Jim Morcombe - External file MF compatibility option. +Jim Noeth - Move routines in RTS (Run Time System). +Jonathan Riddell - Docs: Introduction to COBOL and TinyCOBOL. +Jose de Souza - Several bug fixes in compiler and RTL. +Keiichi Takahashi - Created libc6 RPM packages. +Keisuke Nishida - Bison patch and misc. fixes. +Laura Tweedy - Initial lex code for preprocessor and cobf2f utility. +Leonardo Epifani - Several RTS patches. +Luciano D. C. Manzo - Initial spec file to create RPMs. +Mariusz Stakowski - INSPECT TALLYING. +Matt Verran - BeOS configuration. +Paolo Bizzarri - Several RTS patches. +Sean Bufford - Patch to fix indexed file index file I/O offset + calculation +Stephen Connolly + diff --git a/BUGS b/BUGS new file mode 100644 index 0000000..734bfb2 --- /dev/null +++ b/BUGS @@ -0,0 +1,91 @@ +BUGS: + +Note: This list is NOT up of date. + +---------------------------------------------------------------------------- + +From - Thu Mar 15 05:02:26 2001 +From: Mark Purtill +Subject: [Tiny-cobol-users] Bug: Qualified array core dump +Date: Wed, 14 Mar 2001 11:17:57 -0800 (PST) + + +I'm running tinycobol-0.50 (from the RPM) on a RedHat 5.1 +system. +The following program, when compiled, causes htcobol to +crash. + +WORKING-STORAGE SECTION. + +01 BUG1. + 05 BUG2. + 10 COMMON PIC 999 VALUE 6. + 05 BUG3 OCCURS 28 TIMES. + 10 COMMON PIC 999. + 05 BUG4 PIC 999. + 05 BUG5 PIC 999. + + PROCEDURE DIVISION. + +* This line works: + MOVE COMMON OF BUG2 TO BUG5. +* This line dumps core, after giving this message: +* *!ERROR!* 256 : line 24, symbol ): "" is not child of "" *** + MOVE COMMON OF BUG3(BUG5) TO BUG5. + + +---------------------------------------------------------------------------- + +error: + +In htcobgen.c yyparse(), seams to be writing a lot(230) of blanks lines +for no apparent reason. + +Beginning compile process ... +.... <- +Lines compiled: 231 + +cause: unknown. + +location: unknown. + + printf("Beginning compile process ...\n"); +-> yyparse(); + printf("Lines compiled: %4d\n",lineno); + + +---------------------------------------------------------------------------- + +error: + + 01 TABEL-C. + 05 TAB-C1 OCCURS 10 TIMES INDEXED BY C1. + 10 TAB-C2 OCCURS 20 TIMES INDEXED BY C2. + 15 TAB-C3 OCCURS 300 TIMES INDEXED BY C3. + 25 TAB-C4 PIC 9(05). + 25 TAB-C5 PIC 9(05). + +* SET C1 TO 1. + MOVE 1 TO C1. + +cause: +Implicit variables defined by INDEXED BY clause must be set by the +'SET var [ TO | UP BY | DOWN BY ] integer' clause. It should not be +set using MOVE, ADD, SUB verbs, thus should be flagged as an error. + +location: unknown. + +---------------------------------------------------------------------------- + +error: + + 01 W01-COMPUTE PIC 9(8). + 05 W05-HOUR PIC 9(2). + 05 W05-MIN PIC 9(2). + 05 W05-SEC PIC 9(2). + +cause: +Caused by using level 01 variable with PIC clause. Should be syntax error. + +location: unknown. + diff --git a/CHANGES b/CHANGES new file mode 100644 index 0000000..ad60df5 --- /dev/null +++ b/CHANGES @@ -0,0 +1,253 @@ +November 29, 1999 (Andrew) +Added code to fileio.c to return the correct ANSI 74 Error codes +for files that are accessed but not open etc. + +November 25, 1999 (Andrew) +Change fileio.c for write advancing. +Change htcobgen.c for write advancing. + +November 25, 1999 (Rildo) +Modified again the copy...replace list of replacements, so that all +replacements are appended only when switching the input file. (scan.l) + +November 23, 1999 (Andrew) +Fixed up rewrite for relative files. +Added code for write advancing. + +November 24, 1999 (Rildo) +Modified YY_INPUT and added several functions to do the preprocessing online +for the "copy" statement. The source is now yyin to be better flex compatible. + +November 23, 1999 (Rildo) +Fixed install and lookup functions for non-ASCII literals (high/low values). +Update "move" at the library to cope with quoted literals \0 and \xXX. + +November 22, 1999 (Andrew) +Change htcobgen.c (gen_rewrite) to handle relative rewrites. +Change fileio.c to handle rewrite. + +November 21, 1999 (Rildo) +Changes in picture processing (P assumes V). +Introduction of a variable decimal_comma in compile-time and run-time +to swap '.' and ',' interpretation. + +November 20, 1999 (Rildo) +Applied changes at the "main" suggested by Glen, regarding file names. +Implemented "ALL literal" at the parser,scanner,codegen and library (mcmove.c), +with just small changes at this last, function "move". Also, high-values, +low-values, quotes. + +November 19, 1999 (Andrew) +Added routine for "rewrite" to fileio.c. Cleaned up the code to remove +compile warnings. + +November 18, 1999 (Rildo) +Added several functions to manage multi-subscripted variables, including +relative references. + +November 15, 1999 (Rildo) +Merged with Andrew's changes. +Changed lookup_var (htcobgen.c) to make sure a field is fully qualified. + +November 15, 1999 (Andrew) +Added code to fileio.c to allow read and write to handle line sequential io. + +November 15, 1999 (Rildo) +Added "varying" clause to "perform". +Corrected my mistake on the syntax of "perform". +Changed "perform_range" to be better generalized (with/without "thru"). Now +inherited attributes hold what kind of perform to do. + +November 14, 1999 (Andrew) +Finished off the first version of the sort routines. These routines handle +duplicate keys. I have also added some of the code to the library for +read next. All changes have been made to fileio.c. + +November 13, 1999 (Rildo) +Changed "lookup_label" and added a forced-cloning option to "install". +Update listing generator (htcobgen.c) for the cloned paragraphs, +and also to accommodate the (compound) variable names. +Added "perform var/literal times paragraph_range" to our syntax. Now we can see +why we don't need to backtrack! +Routines added to htcobgen.c: gen_push_int, gen_perform_times, merged with the +previous semantics of perform. + +November 12, 1999 (Rildo) +Added more states to the scanner for accounting to redefined variables and +file variables (FD or SD). +Modified (again) "install" (htcobgen.c) to avoid cloning when not desired. + +November 12, 1999. (v991111): (David Essex) +Moved termios.h header to basicio.c file, to avoid any potential ECHO +redefinition. +Enhanced INSTALL instructions, and renamed Readme.txt file to README. +Changed output of scanner(scan.l) very slightly to have \n at end. +Changed Makefile so that htversion.h is created using directory name +and current date, instead of Version.txt file. + +November 11, 1999 (v991111a): (Rildo) +Added code (htcobgen.c) to take care of clones both for variables and +paragraphs. +Modified parsing to accept "var of parent of ...". +Started implementing of "inspect". + +November 11, 1999. (v991111): (David Essex) +Changed working storage fields parsing(htcobol.y), and added implicit +variable index creation code(htcobgen.c), so that 'INDEXED BY index' +clause will work. +Added error counter(on yerror()) which is used by htcobgen.c to set +the return code. This enables make to work properly. +Added the ability to use a full name when calling the compiler. Now +htcobol will try to open filename, then try filename.cob before aborting. + + +November 06, 1999 (Rildo) +Modified scan/parse to detect already defined variables (token VARIABLE). Now +labels, literals and variables are separate entities. + +November 05, 1999 (Andrew) +Modified the sort_release in fileio.c to handle a combination of Ascending +and Descending sort keys. + +November 04, 1999 (Rildo) +Modified hash() (htcobgen.c) to calculate the hashing with uppercased chars. +Modified code for the lookup of reserved words, for not buffering and +converting the string being tested (strcasecmp is used instead). +Added states to scan.l to simplify the parsing of all commenting statements +of the identification division. Now everything (except environment division +decl) is ignored. +The variable curr_division is used now in the parser to switch states of the +lexer (parser feedback). + +November 04, 1999 (Rildo) +Eliminated VALUES state (scan.l) and some general simplifying. +Corrected a bug with LABELSTR recognizing (if use "-" should be followed by at +least another char). + +November 03, 1999 (Rildo) +All functions named XXX_from and XXX_into are similar with their suffix-less +counterparts. Example cob_read_into == cob_read, cob_write_from == cob_write, +and so on. In place of the record pointer, there will be a buffer pointer. + +November 02, 1999 (Rildo) +Modified gen_cobwrite (htcobgen.c) so that for both "write" and "write from" +the same "call cob_write" is output, changing only the arguments. +Merged with last release of Andrew. + +November 02, 1999 (Andrew) +Written the basic Sort Library (fileio.c) +Provided test program t08 to test the sort library. +Sort with Duplicates still needs to be completed. + +October 30, 1999 (Rildo) +Moved file description generation to the end of data division, so we can +use a variable as filename container. Only cob_open runtime was changed to +accommodate such modification. Now there is a list (files_list) that accumulates +all file variables. +Eliminated old debug code and all o_deb references (htcobol.y, htcobgen.c), +including all line_info() calls. +Added stack frame cleaning (auto-magically) functions (htcobgen.c), and also +push_eax and push_ebx to use instead of writing directly to o_src. This should +make more error prone our code generation. + +October 30, 1999 (Andrew) +Started sort routines (fileio.c) +Modified htcobgen.c for sort commands. (?I think?) + +October 29, 1999 (Rildo) +Eliminated struct var_fd and moved open_mode to struct file_desc. +Now file functions receive a pointer to the record itself. +Sequential files save the file handle into dbp (instead of a db pointer). +All state information (only needed in indexed and relative files) are +saved at the libdb structs now. + +October 28, 1999 (Rildo) +Modified string recognizer in scan.l to allow 1-char strings. +Eliminated call_list in htcobgen.c (used to gen externals). +Corrected the syntax for filenames (now is in select statement, see t06). +Added cob_read, cob_write for relative files. +Fixed gen_write (htcobgen.c) for relative files. + +October 27, 1999. (v991027): (David Essex) +Added fix for lower case input in lex scanner(scan.l). +Added code for version number (Makefile htcobgen.c htversion.h). +Moved basic I/O routines from general.c to basicio.c file. +Added SP fix in gen_accept function (htcobgen.c). +Added function definitions and removed includes in (htcoblib.h). +Added fix for USAGE IS in lex scanner(scan.l). +Changed input file name and Makefile in directory test.code/tdb01. For some +reason, my version of GCC(2.7.2) refused to compile it with the file name main.c. + + +October 26, 1999: (Rildo Pragana) +Changed all file functions to "cob_", to avoid name clashes. +Removed RUNNING-TERMINALS clause from both parser and scanner. +Corrected wrong label at gen_not (htcobgen.c). +Eliminated "short" expressions in "jmp short L%d" (htcobgen.c). + +October 24, 1999 (Rildo): +Removed all debugging compilation, as this was for an old prolog-based debugger +and the tracking of ip locations is hard to do now, because of .align +instructions. Instead, we should use gdb with #line directives. +Modified several miscalculated stack cleaning instructions (addl $n,%esp). +Modified function calling: each parameter required is passed as two pointers, +(1) the fld_desc of the parameter and (2) the parameter storage. +Added file handling routines (yet unfinished): mc_open, mc_write, mc_close, +save_status. +Added a picture expand routine (mc_picexpand) in the library. + +October 23, 1999: +Added ACCEPT function in RTL(basicio.c). +Added fix to remove comma as decimal delimiter in lex scanner(scan.l). + +October 22, 1999: + +October 21, 1999: +Changed run header info in (htcobgen.c). +Added cobpp program utility in util directory. It will convert from +fixed to/from free-form COBOL formats. +Added new fix for program flow control at stop-run(htcobgen.c). +Added Rildo Pragana's fix for program flow control(htcobgen.c mccntrl.s). +Added fix for for period/comma in PIC and VALUE in lex scanner(scan.l). + +October 19, 1999: +Removed .fill and other junk at end. +Added id section. Removed prg-id as main label and replaced with main. +Added Rildo Pragana's indexed file I/O source in test.code/t04 directory. + +October 18, 1999: +Make some small changes in lex scanner(scan.l), while checking COPY code. + + +October 13, 1999: +Merged David Essex's and Andrew Cameron's versions, using Andrew Cameron +October 12, 1999 release as a base. +Added code(htcobgen.c) for return code. Program return code is stored in +register %eax. Since COBOL-74 does not support the statement RETURN-CODE, +the program return code is permanently set to zero. +Added fix for for comment line (^"*".*$) in lex scanner(scan.l). + +October 12, 1999: +Andrew Cameron releases his latest version. +Added math functions to lib. Started on file functions. + +October 11, 1999: +Andrew Cameron releases his latest version, based on Alan Cox's June 23, 1999 +version. +Added new basic I/O functions in RTL. Removed ncurses as basic I/O. + +October 3, 1999: +David Essex begins new version. +Changed COBOL generation to look like GCC assembler generation(htcobgen.c). +Enhanced debugging information for assembler in COBOL generation(htcobgen.c). +Added fix for for PIC with VALUE in lex scanner(scan.l). +Started work on process control. + +September 23, 1999: +Alan Cox releases his latest version to David Essex. + +June 23, 1999: +Alan Cox, releases his changes. It now generates GNU GAS assembler. + +June 11, 1999: +Rildo Pragana, releases his COBOL compiler (for msdos) under the GPL. diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..a43ea21 --- /dev/null +++ b/COPYING @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 675 Mass Ave, Cambridge, MA 02139, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) 19yy + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/COPYING.LIB b/COPYING.LIB new file mode 100644 index 0000000..161a3d1 --- /dev/null +++ b/COPYING.LIB @@ -0,0 +1,482 @@ + GNU LIBRARY GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1991 Free Software Foundation, Inc. + 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the library GPL. It is + numbered 2 because it goes with version 2 of the ordinary GPL.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Library General Public License, applies to some +specially designated Free Software Foundation software, and to any +other libraries whose authors decide to use it. You can use it for +your libraries, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if +you distribute copies of the library, or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link a program with the library, you must provide +complete object files to the recipients so that they can relink them +with the library, after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + Our method of protecting your rights has two steps: (1) copyright +the library, and (2) offer you this license which gives you legal +permission to copy, distribute and/or modify the library. + + Also, for each distributor's protection, we want to make certain +that everyone understands that there is no warranty for this free +library. If the library is modified by someone else and passed on, we +want its recipients to know that what they have is not the original +version, so that any problems introduced by others will not reflect on +the original authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that companies distributing free +software will individually obtain patent licenses, thus in effect +transforming the program into proprietary software. To prevent this, +we have made it clear that any patent must be licensed for everyone's +free use or not licensed at all. + + Most GNU software, including some libraries, is covered by the ordinary +GNU General Public License, which was designed for utility programs. This +license, the GNU Library General Public License, applies to certain +designated libraries. This license is quite different from the ordinary +one; be sure to read it in full, and don't assume that anything in it is +the same as in the ordinary license. + + The reason we have a separate public license for some libraries is that +they blur the distinction we usually make between modifying or adding to a +program and simply using it. Linking a program with a library, without +changing the library, is in some sense simply using the library, and is +analogous to running a utility program or application program. However, in +a textual and legal sense, the linked executable is a combined work, a +derivative of the original library, and the ordinary General Public License +treats it as such. + + Because of this blurred distinction, using the ordinary General +Public License for libraries did not effectively promote software +sharing, because most developers did not use the libraries. We +concluded that weaker conditions might promote sharing better. + + However, unrestricted linking of non-free programs would deprive the +users of those programs of all benefit from the free status of the +libraries themselves. This Library General Public License is intended to +permit developers of non-free programs to use free libraries, while +preserving your freedom as a user of such programs to change the free +libraries that are incorporated in them. (We have not seen how to achieve +this as regards changes in header files, but we have achieved it as regards +changes in the actual functions of the Library.) The hope is that this +will lead to faster development of free libraries. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, while the latter only +works together with the library. + + Note that it is possible for a library to be covered by the ordinary +General Public License rather than by this special one. + + GNU LIBRARY GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library which +contains a notice placed by the copyright holder or other authorized +party saying it may be distributed under the terms of this Library +General Public License (also called "this License"). Each licensee is +addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also compile or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + c) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + d) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the source code distributed need not include anything that is normally +distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Library General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + MA 02111-1307, USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! diff --git a/COPYRIGHT b/COPYRIGHT new file mode 100644 index 0000000..577d685 --- /dev/null +++ b/COPYRIGHT @@ -0,0 +1,14 @@ + + These files are part of the Tiny COBOL compiler. + + Copyright (C) 2001, 2000 Rildo Pragana, Alan Cox, Andrew Cameron, + David Essex, Glen Colbert, Jim Noeth. + Copyright (C) 1999 Rildo Pragana, Alan Cox, Andrew Cameron, David Essex. + Copyright (C) 1991, 1993 Rildo Pragana. + + + The Tiny COBOL compiler is licensed under the GNU General Public License. + See COPYING for details. + + The Tiny COBOL compiler run time library is licensed under the GNU Library + General Public License. See COPYING.LIB for details. diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..5435263 --- /dev/null +++ b/ChangeLog @@ -0,0 +1,8897 @@ +2005-08-03 21:53 rildo + + * lib/pictures.c, test.code/00_FernandoWuthstrack/Makefile: Fixed + bug with picture greater than 128 bytes (length computation in + picCharLen). + +2005-08-01 16:22 rildo + + * lib/fileio.c: Quick fix for rewrite after read_prev. There are + serious problems with file access libraries... + +2005-07-28 12:18 rildo + + * compiler/Makefile.in, compiler/htcobemt.c, compiler/htcobgen.c, + utils/htcobviscomp.tcl: Bug fix with memory allocation for items + with level 01, when OCCURS clause is found. + +2005-07-26 14:30 rildo + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htcoboly.h, test.code/00_FernandoWuthstrack/external1.cob, + test.code/00_FernandoWuthstrack/external1sub.cob, + test.code/00_FernandoWuthstrack/tcl/teste.c: Fixed bug with EXERNAL + variables. Now we can share variables declared external, between + two or more run units. + +2005-07-26 11:55 rildo + + * ChangeLog, test.code/00_FernandoWuthstrack/Makefile, + test.code/00_FernandoWuthstrack/external1.cob, + test.code/00_FernandoWuthstrack/external1sub.cob, + test.code/00_FernandoWuthstrack/tcl/ex1.cob, + test.code/t19/test19b.cob: Tests with EXTERNAL CLAUSE, to allow + sharing variables between run units. + +2005-07-25 21:30 rildo + + * test.code/00_FernandoWuthstrack/tcl/ex1.cob: Small changes... + +2005-07-25 21:24 rildo + + * test.code/00_FernandoWuthstrack/tcl/: Makefile, cobtools.h, + cobtools.tclc, ex1.cob, ex1.tcl, formA.tcl, mentry.cob, tclgui.cob, + tctcl.c: Changes in tctcl to simplify the interface. Added a simple + example to show how to interface to a GUI with full control from + the cobol program. + +2005-07-15 16:36 rildo + + * lib/cobmove_e_.c: Solved problem with move edited-edited. + +2005-07-10 00:59 rildo + + * lib/: scr_curses.c, screenio.c: Changes requested for "delete" + edition (pic 'X') and numeric input in screen section fields (to + display non­significative zeros). + +2005-07-06 23:04 rildo + + * lib/: config.c, htrtconf, scr_curses.c, screenio.h: Fix decimal + point key selection. Other fix for input of numerical fields with a + separate picture in screen section. + +2005-07-05 23:14 rildo + + * lib/: config.c, htrtconf, scr_curses.c, screenio.h: Added + KEY_AUTOCLEANALL configuration option, to enalbe/disable autoclean + when accepting alphanumeric (or non numeric in general) fields. + +2005-07-02 16:59 rildo + + * lib/screenio.c: Added refresh() to ncurses display functions, so + the display is updated in real time. + +2005-07-01 12:05 rildo + + * lib/scr_curses.c: Bug fix: when the first key is a signal change + ('+', or '-'), set the moved flag on, so it disables the auto-clean + feature. + +2005-07-01 11:52 rildo + + * lib/screenio.c: Fixed bug with memory allocation (too small field + when we have a signal). + +2005-06-28 00:39 rildo + + * compiler/htcobgen.c, lib/general.c, + test.code/00_FernandoWuthstrack/Makefile: Fixed bug with CANCEL + statement. + +2005-06-24 08:55 rildo + + * test.code/00_FernandoWuthstrack/: Makefile, tcl/Makefile, + tcl/api.doc, tcl/cobtools.h, tcl/cobtools.tclc, tcl/cscode.tcl, + tcl/formA.tcl, tcl/formB.tcl, tcl/mentry.cob, tcl/mentry.tcl, + tcl/tclgui.cob, tcl/tclguisub.cob, tcl/tclguisuba.cob, tcl/tctcl.c, + tcl/tctcl.def, tcl/teste.c, tcl/teste.tcl: Added test code + directories, including tclc interface. + +2005-06-23 11:12 rildo + + * lib/: scr_curses.c, screenio.c: Fixed more bugs found in screen + section when the iput picture is different from the destination + field's picture. + +2005-06-22 18:42 rildo + + * lib/scr_curses.c: Better check of digits overflow in decimal + (integer part) input. + +2005-06-22 18:30 rildo + + * lib/scr_curses.c: Fixed bug with accept decimal numbers when the + picture (integer part) have a number of digits different from the + accepted number. + +2005-06-22 10:30 rildo + + * ChangeLog, lib/scr_curses.c, lib/screenio.c: Bug fix with accept + in screen section (type = 'D'), (1) fix for decimal numbers and (2) + refmods. + +2005-06-21 18:26 rildo + + * compiler/htcobemt.c: Modified again accept of refmods to receive + the full field, but without the "auto-clean" feature (similar to a + regular accept). + +2005-06-20 19:42 rildo + + * lib/screenio.c: Still changes to avoid iCharCnt stay with wrong + value, yet allocate the correct size for Scr field. + +2005-06-20 19:38 rildo + + * lib/: pictures.c, screenio.c: Fixed a memory allocation bug in + ncurses display. + +2005-06-20 13:50 rildo + + * lib/: scr_curses.c, screenio.c: Fixed segfault with accept + refmoded variable (pic '99/99/9999'). + +2005-06-20 10:11 rildo + + * utils/htcobviscomp.tcl: Updated htcobviscomp.tcl to the new + environment. + +2005-06-15 19:27 rildo + + * compiler/htcobemt.c, lib/pictures.c, lib/screenio.c: Fixed bug + with screen section (display statement). + +2005-06-14 15:55 rildo + + * compiler/: htcobemt.c, htcobgen.c: Changes related to the merge + of SF cvs and local project cvs, + +2005-06-14 15:19 rildo + + * compiler/htcobemt.c, compiler/htcobgen.c, lib/config.c, + lib/general.c, lib/htcoblib.h, lib/pictures.c, lib/scr_curses.c, + lib/screenio.c, lib/screenio.h: Merged changes from SourceForge + site. + +2005-06-13 23:49 dessex + + * tconfig.mingw.sh, version.txt, cobrun/htcobrun.c, + cobrun/test.code/dyntest.cob, cobrun/test.code/subrots.cob, + compiler/htcobemt.c, compiler/htcobolrc.mingw: Added run-time + 'tcob_stop_run' call to end of 'cobrun' program. Added test run + script for 'cobrun.sh' shell script. Bug fix for MinGW function + calls. + +2005-06-13 04:14 dessex + + * version.txt, compiler/htcobemt.c: Added run-time 'tcob_stop_run' + call to end of generated function 'main'. + +2005-06-13 03:07 dessex + + * version.txt, compiler/htcobemt.c, test.code/t35/Makefile, + test.code/t35/test35.cob: Bug fix for 'e ' option. + +2005-06-13 02:07 dessex + + * compiler/htcobemt.c, test.code/t35/test35.cob, + test.code/tdb01/tdb01a.cob: Change to program entry code (Part II). + Bug fix for 'M auto' option. Stack bug fix for 'EXIT PROGRAM' and + 'GOBACK' statements. + +2005-06-12 01:23 dessex + + * Makefile.in, version.txt, cobrun/htcobrun.c, + cobrun/test.code/Makefile, cobrun/test.code/Makefile.mingw, + cobrun/test.code/subrots.cob, compiler/htcobemt.c, + compiler/htcobgen.c, compiler/htcobol.y, compiler/htcobolrc.in, + compiler/htglobals.c, compiler/htglobals.h, compiler/hthelp.h, + compiler/hthelp.h.in, info/htcobol.man, info/htcobol_en.man, + info/htcobol_man.html, info/htcobol_man_en.html, lib/basicio.c, + lib/general.c, lib/htcoblib.h: Changed program entry code to allow + more flexibility (Part I). Changed run-time to store + 'COMMAND-LINE' parameters. Changed 'STOP RUN' statement code + generation to conform to standard (clean-up and return to OS). + Updated cobrun program and test code samples. + +2005-06-09 17:59 dessex + + * Makefile.in, cobrun/test.code/dyntest.cob, compiler/htcoboly.h, + test.code/t15/test15e.cob, test.code/t15/test15g.cob, + test.code/t15/test15i.cob, test.code/t15/test15k.cob, + test_suite/call_tests/ptest01.cob, + test_suite/call_tests/ptest02.cob, + test_suite/call_tests/ptest03.cob, + test_suite/call_tests/ptest04.cob, + test_suite/call_tests/ptest05.cob, + test_suite/compile_tests/ctest01a.cob, + test_suite/compile_tests/ctest01b.cob, + test_suite/compile_tests/ctest03.cob, + test_suite/compile_tests/ctest04.cob, + test_suite/compile_tests/ctest05.cob, + test_suite/compile_tests/ctest06.cob, + test_suite/format_tests/test06a.cob: Changed invalid 'STOP-RUN' + statements to 'STOP RUN'. + +2005-06-02 04:28 dessex + + * Makefile.in, Makefile.mingw, configure, configure.in, + tconfig.mingw.sh, version.txt, cobrun/Makefile.in, + cobrun/Makefile.mingw, cobrun/Readme.txt, cobrun/htcobrun.c, + cobrun/htcobrun.sh, cobrun/test.code/Makefile, + cobrun/test.code/Makefile.mingw, cobrun/test.code/Readme.txt, + cobrun/test.code/dyntest.cob, cobrun/test.code/subrots.cob, + cobrun/test.code/tcobrun.sh: Added cobrun program and test code + samples. Updated the configure scripts and make files. + +2005-04-08 14:25 dessex + + * cobpp/Readme.txt, compiler/htcobol.y: Bug fix for nested + inline-performs with enclosed IF/ELSE statement. Update Readme + file for cobpp directory. + +2005-01-13 05:14 dessex + + * lib/fileio.c: Bug fix for zero size rec pointer array being + allocated when there is just one sort file. Thanks to Steven E. + Kalbach for reporting this bug. + +2005-01-12 02:35 dessex + + * compiler/htcobemt.c: GCC 3.x fix external variables. + +2004-11-25 21:00 dessex + + * ANNOUNCE, AUTHORS, ChangeLog, INSTALL.BeOS, INSTALL.Win32, + INSTALL.bin, Makefile.mingw, Readme.cygwin.txt, Readme.mingw32.txt, + tinycobol.lsm, version.txt, info/htcobol.man, info/htcobol_en.man, + info/htcobol_es.man, info/htcobol_fr.man, info/htcobol_it.man, + info/htcobol_man.html, info/htcobol_man_en.html, + info/htcobol_man_es.html, info/htcobol_man_fr.html, + info/htcobol_man_it.html, info/htcobol_man_pt_BR.html, + info/htcobol_pt_BR.man, info/isetup/Readme.isetup.txt, + info/isetup/tcobol.iss.in, lib/Makefile.mingw: Updates for the 0.62 + release. + +2004-11-13 04:07 dessex + + * configure, configure.in, htconfig.h.in, htconfig.mingw.h, + tconfig.mingw.sh, version.txt: Changed the configure scripts to get + the version number from an external file. + +2004-11-12 17:15 vilmar + + * lockserver/lockserver.c: correct a bug in lockserver.c discovered + by Leonardo Epifani leonardoepifani@tin.it . Variable client_len + was not initialized when configured to a non mingw environment. + +2004-11-11 22:51 dessex + + * Makefile.mingw, configure, configure.in, tconfig.mingw.sh, + compiler/Makefile.mingw: Make files fix and configure script update + for MinGW. + +2004-11-09 19:04 dessex + + * Makefile.in, Makefile.mingw, configure, configure.in, + cobpp/cobpp.c, cobpp/cobpp.h, compiler/Makefile.in, + compiler/Makefile.mingw, compiler/htcoboly.h, compiler/htglobals.c, + compiler/htglobals.h, compiler/pp_parser.y, compiler/pp_scanner.l, + info/Makefile.in, info/isetup/tcobol.bat, + info/isetup/tcobol.iss.in, test.code/ReportGen/report.cob, + test_suite/cobol_test.pl: Merged pre-processor into main compiler. + Updated the test_suite script to use main compiler for + pre-processor tests. Updated the build and install files. Updated + the configure script version. + +2004-11-06 09:42 vilmar + + * configure.in, compiler/htcobol.y: variable subscripted or indexed + not recognized as variable + +2004-11-04 20:16 vilmar + + * configure.in, compiler/htcobol.y: bug in move statement. literal + was allowed as destination. + +2004-11-04 18:48 vilmar + + * compiler/htcobol.y: bug in go to depending on, part I. variable + non numeric was accepted. + +2004-10-31 08:48 dessex + + * configure, configure.in, compiler/htcobemt.c: Bug fix for static + variables. + +2004-10-29 04:13 dessex + + * configure, configure.in, compiler/htcobgen.c, compiler/htcobol.y, + lib/htrtconf, test_suite/call_tests/stest02.cob, + test_suite/compile_tests/ctestws02.cob, + test_suite/format_tests/test05b.cob: Added error check to parser + for maximum elementary alphanumeric and numeric sizes. Added error + check to parser for undefined variables. Updated error check to + parser for MOVE statements. Updated RTL config file. + +2004-10-23 23:29 dessex + + * configure, configure.in, lib/basicio.c, lib/htcoblib.h: Changed a + C++ style variable (C99) define into C, so that it would compile + with GCC 2.x. Updated the configure script version. + +2004-10-23 15:43 hudsonreis + + * configure: Re-generating the configure script in linux + environment. The latest version was generated in a MSYS window and + the Win32 file system is different. + +2004-10-23 13:03 hudsonreis + + * lib/basicio.c: Added some rules in tcob_accept_cmd_line() to + ACCEPT ... FROM COMMAND-LINE work like in MF compiler. If the user + add the "--enable-mfcomp" switch running the configure script, + ACCEPT ... FROM COMMAND-LINE won't get the first argument(usually + the program-name) of the command-line. + +2004-10-22 19:00 vilmar + + * configure.in, configure, compiler/htcobgen.c, + test_suite/compile_tests/ctestp-add3.cob, + test_suite/compile_tests/ctestp-subtract3.cob, compiler/htcobol.y, + compiler/htcoboly.h: wrong variable qualification was accepted. + fix ctestp-add3.cob and ctestp-subtract3.cob + +2004-10-19 22:59 vilmar + + * configure.in, compiler/htcobol.y: qualified variables were not + treated correctly + +2004-10-16 14:12 dessex + + * configure, configure.in, compiler/scan.l: Preliminary scanner + changes to prepare for pre-processor re-integration into main + compiler. + +2004-10-08 01:31 dessex + + * INSTALL, install.txt: Renamed the file INSTALL to install.txt due + to a Win32 conflict with make install. + +2004-10-03 23:15 dessex + + * Makefile.mingw, configure, configure.in: Updated the configure + script version. MinGW make file bug fix make install. + +2004-10-03 21:31 dessex + + * configure, configure.in, compiler/htglobals.c: Bug fix for MinGW. + +2004-10-02 16:55 vilmar + + * lib/fileio.c: removing a bug in the tcob_write_adbv function. An + extra blank line was inserted when using after. + +2004-10-02 04:06 dessex + + * configure, configure.in, htconfig.h.in, tconfig.mingw.sh, + compiler/htcobol.c, compiler/htglobals.c, compiler/htglobals.h: + Updated the configure script for MinGW. Updated the configure + script version and htconfig init file. Updated the compiler init + code, for MinGW, to search the directory where compiler resides. + +2004-09-27 02:10 dessex + + * Readme.cygwin.txt, configure, configure.in, htconfig.0.h, + info/Makefile.in, lib/fileio.c: RTL bug fix for LINE-SEQUENTIAL + files sorts (part 2). Updated the configure script version. Make + file bug fix for man file install. + +2004-09-25 19:38 dessex + + * configure, configure.in, tinycobol.lsm, cobpp/Makefile.in, + cobpp/Makefile.mingw, cobpp/cobpp.c, cobpp/parser.y, + cobpp/scanner.l, lib/fileio.c, test.code/Readme.txt, + test.code/tgui02/Makefile.mingw, test.code/tgui02/Readme.txt, + test.code/tgui02/subp01.cob, test.code/tgui02/wprog.h, + test.code/tgui02/wprog01.c, test.code/tgui02/wprog02.c, + test.code/tgui02/wprog03.cob, test.code/tgui02/wres04.rc: Updated + the configure script version. RTL bug fix for LINE-SEQUENTIAL + files sorts. Preliminary pre-processor changes to prepare for + re-integration into main compiler. Added MinGW GUI examples in + 'test.code/tgui02' directory. + +2004-09-21 23:24 dessex + + * configure, configure.in, tconfig.mingw.sh, + cobpp/tcppversion.h.in, compiler/htcobemt.c, compiler/htcobol.y, + compiler/htcoboly.h, compiler/htversion.h.in, compiler/scan.l, + test_suite/compile_tests/ctest01a.cob, + test_suite/compile_tests/ctest01b.cob, + test_suite/compile_tests/ctest01c.cob, + test_suite/compile_tests/ctest01d.cob, + test_suite/compile_tests/ctest01e.cob, + test_suite/compile_tests/ctest04.cob, + test_suite/compile_tests/ctest05.cob, + test_suite/compile_tests/ctest06.cob, + test_suite/compile_tests/ctested01.cob, + test_suite/compile_tests/ctested02.cob, + test_suite/compile_tests/ctested03.cob, + test_suite/compile_tests/ctested04.cob, + test_suite/compile_tests/ctested05.cob, + test_suite/compile_tests/ctested06.cob, + test_suite/compile_tests/ctestfc01.cob, + test_suite/compile_tests/ctestfc02.cob, + test_suite/compile_tests/ctestp-accept1.cob, + test_suite/compile_tests/ctestp-accept2.cob, + test_suite/compile_tests/ctestp-add1.cob, + test_suite/compile_tests/ctestp-add2.cob, + test_suite/compile_tests/ctestp-add3.cob, + test_suite/compile_tests/ctestp-close1.cob, + test_suite/compile_tests/ctestp-compute1.cob, + test_suite/compile_tests/ctestp-continue1.cob, + test_suite/compile_tests/ctestp-delete1.cob, + test_suite/compile_tests/ctestp-divide1.cob, + test_suite/compile_tests/ctestp-divide2.cob, + test_suite/compile_tests/ctestp-divide3.cob, + test_suite/compile_tests/ctestp-divide4.cob, + test_suite/compile_tests/ctestp-divide5.cob, + test_suite/compile_tests/ctestp-goto1.cob, + test_suite/compile_tests/ctestp-initialize1.cob, + test_suite/compile_tests/ctestp-multiply1.cob, + test_suite/compile_tests/ctestp-multiply2.cob, + test_suite/compile_tests/ctestp-open1.cob, + test_suite/compile_tests/ctestp-read1.cob, + test_suite/compile_tests/ctestp-read2.cob, + test_suite/compile_tests/ctestp-read3.cob, + test_suite/compile_tests/ctestp-read4.cob, + test_suite/compile_tests/ctestp-rewrite1.cob, + test_suite/compile_tests/ctestp-rewrite2.cob, + test_suite/compile_tests/ctestp-search1.cob, + test_suite/compile_tests/ctestp-search2.cob, + test_suite/compile_tests/ctestp-set1.cob, + test_suite/compile_tests/ctestp-start1.cob, + test_suite/compile_tests/ctestp-string1.cob, + test_suite/compile_tests/ctestp-subtract1.cob, + test_suite/compile_tests/ctestp-subtract2.cob, + test_suite/compile_tests/ctestp-subtract3.cob, + test_suite/compile_tests/ctestp-unstring1.cob, + test_suite/compile_tests/ctestws01.cob, + test_suite/compile_tests/ctestws02.cob, + test_suite/compile_tests/ctestws03.cob, + test_suite/compile_tests/ctestws04.cob, + test_suite/compile_tests/ctestws05.cob, + test_suite/compile_tests/ctestws06.cob, + test_suite/compile_tests/ctestws07.cob, + test_suite/compile_tests/ctestws08.cob, + test_suite/compile_tests/ctestws09.cob, + test_suite/compile_tests/ctestws10.cob, + test_suite/compile_tests/ctestws11.cob, + test_suite/compile_tests/ctestws12.cob, + test_suite/compile_tests/sample.cob, + test_suite/format_tests/test01.cob, + test_suite/format_tests/test01c.cob, + test_suite/format_tests/test02a.cob, + test_suite/format_tests/test02b.cob, + test_suite/format_tests/test03a.cob, + test_suite/format_tests/test03b.cob, + test_suite/format_tests/test03c.cob, + test_suite/format_tests/test04.cob, + test_suite/format_tests/test05a.cob, + test_suite/format_tests/test08a.cob: Updated the TC version in the + configure script. Updated the configure script for MinGW. Added + configure script code to add host OS to the version info. Updated + PROGRAM-ID name scanner, parser code to check for valid characters + and allow name to be defined as literal. Changed 'test_suite' + programs to remove '-' character from program name. + +2004-09-21 04:05 dessex + + * configure, configure.in, htconfig.mingw.h, tconfig.mingw.sh, + compiler/Makefile.mingw, compiler/htcobemt.c, compiler/htcobol.y, + compiler/htglobals.c, compiler/scan.l, lib/Makefile.mingw, + lib/htcoblib.h: Updated the TC version in the configure script. + Updated the configure script, config header and make files for + MinGW. Removed C++ style comments from source code. + +2004-09-14 02:52 dessex + + * configure, configure.in, compiler/htcobol.y, + test.code/t05/test05d.cob: Updated the TC version in the configure + script. Code generation bug fix for the 'PERFORM ... VARYING INDEX + FROM INDEX ...' statement. Updated tests in 't05', to include test + for 'PERFORM ... VARYING identifier-1 FROM identifier-1 ...'. + +2004-09-13 02:29 dessex + + * test.code/t33/: Makefile, Makefile.mingw, Readme.txt, + dyntest.cob, dyntest1.cob, subrot1.cob, subrotc.c, subrots.cob: + Improved and updated tests in 't33', including test for WINAPI + call-convention (Win32 only). + +2004-09-10 20:28 dessex + + * Makefile.in, configure, configure.in, tconfig.mingw.sh, + compiler/htcobemt.c, lib/Makefile.mingw: Updated the configure + script (tconfig.mingw.sh) for MinGW. Code generation bug fix for + the dynamic CALL statement. + +2004-09-04 22:39 dessex + + * tconfig.mingw.sh, cobpp/Makefile.mingw, compiler/Makefile.mingw, + compiler/htcobemt.c, compiler/htcobol.y, compiler/htcoboly.h, + compiler/reswords.c, lib/Makefile.mingw, lib/dyncall.c, + lib/htcoblib.h, test.code/t33/rt.sh: Updated dynamic call for + STDCALL (WINAPI) on MinGW (Part II). Updated install section of + make files for MinGW. Added 'CALL-LOADLIB [literal | indentifier]' + statement (extention) which loads specific libraries. + +2004-09-03 03:14 dessex + + * configure, configure.in, htconfig.h.in, htconfig.mingw.h, + tconfig.mingw.sh, info/isetup/tcobol.iss.in, lib/Makefile.mingw, + lib/dlfcnwin32.h, lib/dyncall.c, lib/dyncall_ltdl.c, + lib/htcobolrt.rc.in, lib/ltdl.c, lib/ltdl.h: Updated dynamic call + for MinGW (Part I). Removed LTDL library code from RT. + +2004-08-23 21:08 hudsonreis + + * Makefile.in: Adding the cobpp directory in subdirs2 variable. + Now, make cleanall clean the directory cobpp. + +2004-08-21 17:29 hudsonreis + + * lib/Makefile.in: Little fix in Makefile.in adding the MKDIR + variable(MKDIR = mkdir -p). + +2004-08-21 03:17 dessex + + * configure, configure.in, compiler/htcobemt.c, + compiler/htcobgen.c, compiler/htcobol.y, compiler/reswords.c, + test.code/t25/Makefile, test.code/t25/Makefile.mingw, + test.code/t25/rt.sh, test.code/t25/test25.cob, + test.code/t25/test25c.c: Updated CALL statement grammar and GAS + generation for STDCALL (WINAPI) call-convention. Updated t25 to + run tests for both static and shared libraries. Added to t25 + optional test for STDCALL (WINAPI) call-convention (MinGW only). + Updated minor version number in configure script. + +2004-08-20 04:11 dessex + + * compiler/htcobemt.c, compiler/htcobol.y, compiler/reswords.c, + test.code/t25/Makefile.mingw, test.code/t25/test25.cob, + test.code/t25/test25b.c, test.code/t25/test25c.c, + test_suite/cobol_test.pl: Updated CALL statement grammar with + call-convention options. Win32 GAS generate fix to ensure proper + DEF file and DLL's creation. Added make file in t25 for MinGW + platform. + +2004-07-02 10:24 hudsonreis + + * test.code/tgui01/: Readme.txt, ReadmeNew.txt: Merged + ReadmeNew.txt into Readme.txt + +2004-03-14 15:40 ferranp + + * compiler/htcobemt.c: + Change the order of initialization of field to get the correct + value of decimal point. + + subbmited by Walter Garrote. + +2004-02-19 01:51 hudsonreis + + * test.code/tgui01/: ReadmeNew.txt, testgui01.cob, testgui02.c, + testgui03.tcl, testgui03a.tcl, testgui04.cob, testgui06.cob: New + improvements in tgui01 example. A better TC-Tcl interface are + avaliable. Added a new Readme file. + +2003-12-07 19:26 dessex + + * Makefile.in: Updated make files. + +2003-12-06 21:39 andrewcza + + * lib/fileio.c: Enable O_SYNC on Sequential and Relative files to + allow better Multi User Support. + +2003-12-06 19:50 andrewcza + + * lib/fileio.c: Fix Optional Statement on OPEN I-O and OPEN EXTEND + +2003-12-02 08:28 dessex + + * tconfig.mingw.sh: Updated configure script for MinGW. + +2003-12-02 08:28 dessex + + * compiler/htcobol.y: COBOL grammar fix for the CONTINUE statement. + Updated configure for MinGW. + +2003-12-02 03:05 dessex + + * compiler/htcobol.y, lib/Makefile.in, lib/Makefile.mingw, + lib/config.h: Updated grammar with PROGRAM-ID ... INITIAL + statement. Updated RTL config for MinGW. + +2003-11-25 01:47 dessex + + * cobpp/Makefile.0, compiler/Makefile.0, lib/Makefile.0, + test.code/Makefile.0, utils/Makefile.0, Makefile.0: Removed backup + make files. + +2003-11-24 17:06 dessex + + * lib/: Makefile.in, Makefile.mingw: Added configure and code for + external RT configure file (part 4). + +2003-11-24 17:06 dessex + + * htconfig.mingw.h: Added configure and code for external RT + configure file (part 5). + +2003-11-24 03:27 dessex + + * configure, configure.in: Added configure and code for external RT + configure file (part 3). + +2003-11-24 01:38 dessex + + * configure, configure.in, htconfig.h.in: Added configure and code + for external RT configure file (part 2). + +2003-11-24 01:38 dessex + + * lib/: Makefile.in, config.c, config.h, htrtconf: Added configure + and code for external RT configure file. + +2003-11-23 12:31 hudsonreis + + * ChangeLog, lib/Makefile.in: Minor modifications in + lib/Makefile.in and updated Changelog. + +2003-11-22 11:29 dessex + + * compiler/htcobemt.c: Updated 'SET.. TO TRUE' set statement + option. + +2003-11-22 11:29 dessex + + * configure.in: Minor update to configure.in file. + +2003-11-11 22:45 andrewcza + + * README, configure, configure.in, htconfig.0.h, htconfig.h.in, + lib/fileio.c: Add an option to force writing the data to disk after + every write/delete/rewrite for indexed io. This will help in + multiuser environments but will run much slower. The --enable-sync + option turns on this feature. + +2003-11-03 08:12 dessex + + * compiler/: htcobol.y, htglobals.c: Updated grammar with STOP + literal statement. Fixed GCC 3.x compiler error for MinGW + platform. + +2003-10-29 00:42 dessex + + * utils/cobf2f/: cobf2f.c, cobf2f.h, scanner.l: Updated cobf2f + utility. + +2003-10-26 16:11 ferranp + + * lib/: config.c, scr_curses.c, screenio.h: New options in runbtime + config file EDIT_CLEAR and EDIT_CLEAR_TOEND + +2003-10-22 16:31 dessex + + * compiler/Makefile.in, compiler/htcobol.y, compiler/htcobolrc.in, + lib/Makefile.mingw: Updated RECORD CONTAINS ... clauses. + +2003-10-19 17:14 ferranp + + * lib/: Makefile.in, config.c, config.h, scr_curses.c, screenio.h: + Preliminary configuration file for the runtime. By now it only + afects the key codes for the curses screen io. + +2003-10-15 00:38 hudsonreis + + * STATUS: Updates in STATUS + +2003-10-14 16:50 whydoubt + + * lib/basicio.c: Add true hundredths-of-a-second resolution in + ACCEPT --- FROM TIME. + +2003-10-11 17:22 hudsonreis + + * INSTALL.Win32, README: Update in README and INSTALL.Win32 file + +2003-09-23 11:43 dessex + + * compiler/htcobolrc.in, compiler/htcobolrc.mingw, + compiler/htglobals.c, compiler/htglobals.h, lib/Makefile.in: + Updated MinGW/Cygwin front end, so TC can build DLLs. Added + LD_FLAGS variable to the resource file and updated TC front end. + +2003-09-23 06:52 dessex + + * configure, configure.in, tconfig.mingw.sh: Updated configure + script to release version to 0.61.3. + +2003-09-23 06:38 dessex + + * compiler/htcobgen.c, compiler/htcobolrc.in, + compiler/htcobolrc.mingw, lib/Makefile.in, lib/Makefile.mingw, + lib/mcmath.c: Updated configure script to release version to + 0.61.3. Bug fix for 'DIVIDE ... REMAINDER'. Updated MinGW RTL + make file so it be can built as a DLL. + +2003-09-13 21:30 dessex + + * compiler/htcobol.y, lib/Makefile.mingw: MinGW make file fix. + Updated special names clauses. + +2003-09-11 02:19 dessex + + * ANNOUNCE, configure, configure.in, tinycobol.lsm: Update for 0.61 + release (part 2). + +2003-09-11 02:19 dessex + + * info/rpm/tinycobol-0.00.spec: Update for 0.61 release. + +2003-09-07 10:20 whydoubt + + * compiler/htcobemt.c, compiler/htcobgen.c, lib/basicio.c, + lib/strings.c, compiler/htcobol.y: Simplify ON SIZE ERROR + generating code. + +2003-09-07 04:08 whydoubt + + * compiler/htcobgen.c, test_suite/nist/NC.rpt, + test_suite/nist/nist.rpt: Improved DIVIDE ... REMAINDER results by + evaluating REMAINDER reference after GIVING value has been + calculated. + +2003-09-07 03:25 whydoubt + + * compiler/: htcobgen.c, htcobol.y: Continue bringing DIVIDE + statement in line with other math statements. + +2003-09-06 21:41 whydoubt + + * compiler/: htcobgen.c, htcobol.y, htcoboly.h: Start making DIVIDE + work more like the other math functions. + +2003-09-06 21:12 whydoubt + + * compiler/htcobgen.c: Make it clear in code and comments that + MATH_OPT_ON_SIZE_ERROR is used as a binary flag, rather than an + integer. + +2003-09-05 21:51 whydoubt + + * compiler/htcobol.y: Make on_size_error_opt truly *optional* and + treat it as such in other rules. + +2003-09-05 14:58 whydoubt + + * lib/mcmath.c: Simplify code for divide formats 4 and 5. + +2003-09-05 09:19 whydoubt + + * lib/mcmath.c: Remove all traces of afp_t. + +2003-09-04 21:35 whydoubt + + * lib/mcmath.c: Reduce afp2f code, and reduce usage of afp_t + structure. + +2003-09-03 20:33 whydoubt + + * lib/mcmath.c: Eliminated a confusing global variable in math + functions. + +2003-09-03 18:33 whydoubt + + * lib/mcmath.c: Simplify tcob_check_size_overflow function. + +2003-08-30 22:28 dessex + + * configure, configure.in, htconfig.h.in, htconfig.mingw.h: MinGW + configure update. + +2003-08-29 19:15 dessex + + * compiler/htcobol.y: Updated MERGE statement. + +2003-08-29 17:10 dessex + + * lib/scr_curses.c, configure, configure.in, htconfig.0.h, + htconfig.h.in, htconfig.mingw.h: MinGW configure update. + +2003-08-28 02:39 dessex + + * compiler/htcobol.y: Updated and cleaned parser. Standardized + optional clauses to use '_opt' SUFFIX. Corrected 'GOTO' statement + parser syntax. + +2003-08-27 22:43 dessex + + * compiler/htcobol.y: Updated parser. + +2003-08-27 20:39 dessex + + * ChangeLog, Makefile.mingw, configure, configure.in, + tconfig.mingw.sh: MinGW and Cygwin configure update. + +2003-08-26 21:54 andrewcza + + * lib/fileio.c: Fixed BUG ID 567452 Problem when reading indexed + files + +2003-08-26 08:24 andrewcza + + * lib/flckclient.c: Modify flckclient to return Not-Implemented for + the Username under MINGW32 + +2003-08-25 23:35 andrewcza + + * lib/flckclient.c, test.code/t36/test36l.cob: Update flckclient + and test36l to show the PID and Username who have a record locked. + +2003-08-25 23:10 dessex + + * cobpp/test.code/r.sh, compiler/htcobol.y: Updated parser. + +2003-08-25 19:29 andrewcza + + * compiler/htcobgen.c: FIX BUG ID 567382 Read Next For External + Indexed Files + +2003-08-25 13:59 whydoubt + + * compiler/htglobals.c: Convert C++ comment to C. + +2003-08-19 23:44 whydoubt + + * compiler/htcobol.y: Modify rule to correct behavior in some + versions of bison. + +2003-08-19 16:50 andrewcza + + * lib/fileio.c, test.code/t08/Readme.txt: Fix Sort Using in + fileio.c + +2003-08-17 21:11 ferranp + + * compiler/htcobgen.c, compiler/htcobol.y, lib/rterrors.c, + lib/rterrors.h, lib/screenio.c: New options for display at + line/position with a variable. + +2003-08-17 03:06 whydoubt + + * compiler/: htcobol.y, reswords.c: Improved REPORT section syntax + parsing. + +2003-08-15 22:37 dessex + + * compiler/htcobgen.c: Updated RETURN-CODE picture to S9(6). + +2003-08-15 11:41 whydoubt + + * compiler/htcobol.y: Improve ISO/IEC conformance of screen ACCEPT. + +2003-08-15 11:05 whydoubt + + * test_suite/nist/: NC.rpt, nist.rpt: Update NIST results to + reflect improvements David Essex made to 'Edited' moves. + +2003-08-14 06:23 dessex + + * compiler/: htcobgen.c, htcobol.y, htcoboly.h: Removed stack + referencing pointers from var_list non-teminal, INITIALIZE, SORT + statements code. Updated parser with INITIALIZE statement clauses. + +2003-08-13 15:04 hudsonreis + + * STATUS: Update in STATUS + +2003-08-11 16:48 whydoubt + + * compiler/htcobol.y: Change rule name for readability. + +2003-08-11 16:42 whydoubt + + * compiler/htcobol.y: Correct minor LINAGE syntax issue. + +2003-08-11 08:41 dessex + + * lib/: cobmove.c, cobmove_c_.c, cobmove_e_.c: Bug fix for + de-editing move functions in RTL. + +2003-08-11 03:17 dessex + + * compiler/htcobol.y: Removed bug due to parser stack referencing + pointers from the 'INPUT/OUTPUT PROCEDURE' code. + +2003-08-10 20:09 andrewcza + + * README: Update Readme + +2003-08-10 12:18 bgiroud + + * info/tc.ebnf, info/tc.ps, utils/make_sd.sh, utils/xtr_rw, + utils/y2l: Added files for creating the TC syntax diagrams, and the + resulting files. + +2003-08-10 03:56 dessex + + * lib/: Makefile.in, cobmove.c, cobmove_e_.c, htcoblib.h: Addition + of de-editing move functions to RTL. + +2003-08-09 14:56 whydoubt + + * lib/cobmove_b_.c, test_suite/nist/NC.rpt, + test_suite/nist/nist.rpt: Add simple scaling for BINARY to BINARY + move. + +2003-08-09 11:18 whydoubt + + * lib/cobmove_9_.c, test_suite/nist/NC.rpt, + test_suite/nist/nist.rpt: Fix some bugs and add 'P' scaling support + in tcob_move_9_x. + +2003-08-09 01:45 whydoubt + + * lib/strings.c, test_suite/nist/NC.rpt, test_suite/nist/nist.rpt: + Corrected deficiencies in the library code for the INSPECT + statement. + +2003-08-07 20:47 andrewcza + + * README: Update Readme file + +2003-08-07 19:56 dessex + + * compiler/: htcobol.y, htglobals.c: Parser bug fix for the 'FILE + SECTION ... VALUE OF file-id' clause. + +2003-08-06 21:25 whydoubt + + * lib/cobmove_9_.c: Added name to cobmove_9_.c to reflect + contributions made recently. Changed C++ style comments to C style + comments. + +2003-08-06 14:59 hudsonreis + + * AUTHORS: Changes in style + +2003-08-06 14:47 dessex + + * compiler/htcobemt.c, compiler/htcobgen.c, compiler/htcobol.y, + test.code/t16/Makefile, test.code/t16/test16a.cob: Bug fix for + 'GOTO DEPENDING' using indexed indentifier. + +2003-08-06 14:37 hudsonreis + + * README: Updates in links of README file + +2003-08-06 08:59 whydoubt + + * lib/cobmove_9_.c: Remove some -W warnings I had introduced in + changing tcob_move_9_* functions. + +2003-08-05 23:00 whydoubt + + * lib/strings.c: Trivial code reduction in tcob_unstring. + +2003-08-05 20:50 whydoubt + + * lib/cobmove_9_.c: Code simplifications in tcob_move_9_c. + +2003-08-05 05:03 dessex + + * compiler/htcobemt.c, compiler/htcobgen.c, compiler/htcobol.y, + compiler/reswords.c, test.code/ReportGen/Makefile, + test.code/t00/Makefile, test.code/t02/Makefile, + test.code/t02/test02.cob, test.code/t03/Makefile, + test.code/t08/Makefile, test.code/t08/test08.cob, + test.code/t10/Makefile, test.code/t13/Makefile, + test.code/t29/Makefile, test.code/tdb01/Makefile, + test.code/tdb02/Makefile, test.code/tdb03/Makefile, + test_suite/compile_tests/ctest01b.cob: Updated parser with MERGE + statement. Removed from strings in yyerror calls. + +2003-08-04 22:25 hudsonreis + + * test.code/t36/: test36.cob, test36i.cob, test36l.cob: Fix in + AUTHOR clause in test36.cob, test36i.cob and test36l.cob + +2003-08-04 12:52 whydoubt + + * lib/cobmove_9_.c: Simplified code for numeric DISPLAY to + COMPUTATIONAL move. Removed some MOVE ALL code that violated + standards. + +2003-08-04 10:14 whydoubt + + * lib/: basicio.c, cobmove_9_.c, htcoblib.h, mcmath.c, pictures.c, + screenio.c: Change meaning of tcob_picCompLength to returning the + number of _stored_ digits. + +2003-08-04 07:34 dessex + + * compiler/htcobol.y, compiler/reswords.c, + test.code/esql/esql.create.ecob, test.code/esql/esql.insert.ecob, + test.code/esql/esql.list.ecob, test.code/esql/esql.rollback.ecob, + test.code/esql/esql.table.ecob, test.code/esql/esql.trans.ecob, + test.code/t00/teste.cob, test.code/t01/test01a.cob, + test.code/t01/test01b.cob, test.code/t01/test01c.cob, + test.code/t01/test01d.cob, test.code/t01/test01e.cob, + test.code/t02/test02.cob, test.code/t02/test02a.cob, + test.code/t03/test03.cob, test.code/t05/test05a.cob, + test.code/t05/test05b.cob, test.code/t05/test05c.cob, + test.code/t05/test05d.cob, test.code/t05/test05e.cob, + test.code/t05/test05f.cob, test.code/t07/cobsub.cob, + test.code/t07/test07.cob, test.code/t08/test08.cob, + test.code/t15/test15e.cob, test.code/t15/test15g.cob, + test.code/t15/test15h.cob, test.code/t15/test15i.cob, + test.code/t15/test15j.cob, test.code/t15/test15k.cob, + test.code/t16/test16.cob, test.code/t17/test17.cob, + test.code/t20/test20a.cob, test.code/t20/test20a_at.cob, + test.code/t20/test20b.cob, test.code/t20/test20d.cob, + test.code/t21/test21.cob, test.code/t22/test22.cob, + test.code/t23/test23.cob, test.code/t23/test23a.cob, + test.code/t23/test23b.cob, test.code/t24/test24.cob, + test.code/t26/test26.cob, test.code/t28/test28.cob, + test.code/t29/test29m.cob, test.code/t30/test30a.cob, + test.code/t32/test32.cob, test.code/t32/test32a.cob, + test.code/t34/aaaa.cob, test.code/t34/bbbb.cob, + test.code/t35/test35.cob, test.code/tdb03/tdb03.cob, + test_suite/cobol_test.pl, test_suite/call_tests/ptest01.cob, + test_suite/call_tests/ptest02.cob, + test_suite/call_tests/ptest03.cob, + test_suite/call_tests/ptest04.cob, + test_suite/call_tests/ptest05.cob, + test_suite/call_tests/stest01.cob, + test_suite/call_tests/stest02.cob, + test_suite/call_tests/stest03.cob, + test_suite/call_tests/stest04.cob, + test_suite/compile_tests/ctest01a.cob, + test_suite/compile_tests/ctest01b.cob, + test_suite/compile_tests/ctest01c.cob, + test_suite/compile_tests/ctest01d.cob, + test_suite/compile_tests/ctest01e.cob, + test_suite/compile_tests/ctest04.cob, + test_suite/compile_tests/ctest05.cob, + test_suite/compile_tests/ctest06.cob, + test_suite/compile_tests/ctested01.cob, + test_suite/compile_tests/ctested02.cob, + test_suite/compile_tests/ctested03.cob, + test_suite/compile_tests/ctested04.cob, + test_suite/compile_tests/ctested05.cob, + test_suite/compile_tests/ctested06.cob, + test_suite/compile_tests/ctestp-accept1.cob, + test_suite/compile_tests/ctestp-accept2.cob, + test_suite/compile_tests/ctestp-add1.cob, + test_suite/compile_tests/ctestp-add2.cob, + test_suite/compile_tests/ctestp-add3.cob, + test_suite/compile_tests/ctestp-compute1.cob, + test_suite/compile_tests/ctestp-continue1.cob, + test_suite/compile_tests/ctestp-divide1.cob, + test_suite/compile_tests/ctestp-divide2.cob, + test_suite/compile_tests/ctestp-divide3.cob, + test_suite/compile_tests/ctestp-divide4.cob, + test_suite/compile_tests/ctestp-divide5.cob, + test_suite/compile_tests/ctestp-goto1.cob, + test_suite/compile_tests/ctestp-initialize1.cob, + test_suite/compile_tests/ctestp-multiply1.cob, + test_suite/compile_tests/ctestp-multiply2.cob, + test_suite/compile_tests/ctestp-search1.cob, + test_suite/compile_tests/ctestp-search2.cob, + test_suite/compile_tests/ctestp-set1.cob, + test_suite/compile_tests/ctestp-string1.cob, + test_suite/compile_tests/ctestp-subtract1.cob, + test_suite/compile_tests/ctestp-subtract2.cob, + test_suite/compile_tests/ctestp-subtract3.cob, + test_suite/compile_tests/ctestp-unstring1.cob, + test_suite/compile_tests/ctestws01.cob, + test_suite/compile_tests/ctestws02.cob, + test_suite/compile_tests/ctestws03.cob, + test_suite/compile_tests/ctestws04.cob, + test_suite/compile_tests/ctestws05.cob, + test_suite/compile_tests/ctestws06.cob, + test_suite/compile_tests/ctestws07.cob, + test_suite/compile_tests/ctestws08.cob, + test_suite/compile_tests/ctestws09.cob, + test_suite/compile_tests/ctestws10.cob, + test_suite/compile_tests/ctestws11.cob, + test_suite/compile_tests/ctestws12.cob, + test_suite/compile_tests/sample.cob, + test_suite/condition_tests/cond01.cob, + test_suite/condition_tests/cond03.cob, + test_suite/format_tests/test01.cob, + test_suite/format_tests/test01a.cob, + test_suite/format_tests/test01b.cob, + test_suite/format_tests/test01c.cob, + test_suite/format_tests/test02a.cob, + test_suite/format_tests/test02b.cob, + test_suite/format_tests/test03a.cob, + test_suite/format_tests/test03b.cob, + test_suite/format_tests/test03c.cob, + test_suite/format_tests/test03d.cob, + test_suite/format_tests/test04.cob, + test_suite/format_tests/test05a.cob, + test_suite/format_tests/test05b.cob, + test_suite/format_tests/test06a.cob, + test_suite/format_tests/test08a.cob, + test_suite/perform_tests/perf01.cob, + test_suite/perform_tests/perf02.cob, + test_suite/perform_tests/perf03.cob, + test_suite/perform_tests/perf04.cob, + test_suite/perform_tests/perf05.cob, + test_suite/search_tests/test20a.cob: Updated parser 'INPUT-OUTPUT + SECTION' to conform to standard. + +2003-08-02 22:27 whydoubt + + * lib/cobmove_9_.c: Simpler and faster library code for numeric to + numeric move. + +2003-08-01 21:35 dessex + + * compiler/: htcobol.y, reswords.c: File description entry parser + update. + +2003-07-31 14:22 whydoubt + + * compiler/htcobol.y: Paramaterize a common compiler error message. + +2003-07-31 13:25 whydoubt + + * compiler/htcobol.y: Marginal simplification of CLOSE options + grammar. + +2003-07-31 03:04 dessex + + * compiler/: htcobol.y, reswords.c: Updated parser with CLOSE + statement clauses UNIT REEL REWIND. + +2003-07-30 03:50 whydoubt + + * lib/cobmove_x_.c, test_suite/nist/NC.rpt, + test_suite/nist/nist.rpt: Make caWork length in tcob_move_x_9 + dynamic. + +2003-07-29 18:44 andrewcza + + * lib/fileio.c, lockserver/lockserver.c: Fix the Problem where the + second Ignore lock did not work. + +2003-07-29 02:54 whydoubt + + * lib/cobmove_x_.c: Several simplifications in tcob_move_x_9. + +2003-07-29 02:54 whydoubt + + * lib/cobmove_x_.c: I meant memcpy, not memset. + +2003-07-29 02:50 whydoubt + + * lib/cobmove_x_.c: Remove unused pointer in tcob_move_x_9. + +2003-07-28 18:51 whydoubt + + * lib/cobmove_9_.c: In moving numeric to numeric, test for + signedness of variables only once. Handle additional cases in + moving numeric to numeric. + +2003-07-28 16:27 whydoubt + + * compiler/htcobol.y: Fixed a small syntax bug that was causing + many warnings in the NIST test suite. + +2003-07-28 16:07 whydoubt + + * compiler/htcobgen.c, test_suite/nist/NC.rpt, + test_suite/nist/nist.rpt: PICTURE was being improperly overwritten + when INDEXED BY was specified. + +2003-07-27 22:09 dessex + + * lib/mcmath.c: Bug fix [777992] for numeric test for group items. + +2003-07-27 22:09 dessex + + * configure: Configure script update. + +2003-07-27 15:13 dessex + + * compiler/htcobol.y: Update to parsee relating to CONTINUE and + NEXT SENTENCE statements. + +2003-07-27 12:02 hudsonreis + + * test.code/t17/test17.cob: Some bugfixes in test17.cob + +2003-07-26 19:16 dessex + + * compiler/htcobol.y: Major update to parser to reduce shift/reduce + conflicts. + +2003-07-26 18:41 dessex + + * lockserver/: Makefile.0.mingw, Makefile.in, Makefile.mingw: Minor + lockserver update. + +2003-07-26 14:09 andrewcza + + * lib/fileio.c: Fix a problem discovered by David with Ingore Lock + +2003-07-26 13:39 andrewcza + + * lib/fileio.c, lib/flckclient.c, test.code/t36/test36i.cob, + test.code/t36/test36l.cob: Change File Status IO Codes + +2003-07-26 12:03 andrewcza + + * lib/flckclient.c, lockserver/lockserver.c: Make More changes so + that Locking with Indexed IO now also works with Mingw + +2003-07-26 10:36 dessex + + * AUTHORS, configure.in: Configure.in duplicate option fix. + +2003-07-26 10:36 dessex + + * compiler/htcobolrc.in, test.code/t00/Makefile, + test.code/t01/Makefile, test.code/t04/Makefile, + test.code/t04/test04.cob, test.code/t04/test04i.cob, + test.code/t04/test04r.cob, test.code/t05/Makefile, + test.code/t05/test05a.cob, test.code/t05/test05b.cob, + test.code/t05/test05c.cob, test.code/t05/test05d.cob, + test.code/t05/test05e.cob, test.code/t05/test05f.cob, + test.code/t06/Makefile, test.code/t06/index01.cob, + test.code/t06/test06.cob, test.code/t06/test06i.cob, + test.code/t06/test06r.cob, test.code/t06/test06s.cob, + test.code/t06/test06v.cob, test.code/t07/Makefile, + test.code/t07/cobsub.cob, test.code/t07/test07.cob, + test.code/t08/Makefile, test.code/t08/test08.cob, + test.code/t08/test08g.cob, test.code/t08/test08u.cob, + test.code/t08/test08ug.cob, test.code/t09/Makefile, + test.code/t09/upro.cob, test.code/t10/Makefile, + test.code/t10/test10.cob, test.code/t11/Makefile, + test.code/t11/test11.cob, test.code/t12/Makefile, + test.code/t12/test12.cob, test.code/t12/test12i.cob, + test.code/t12/test12ls.cob, test.code/t12/test12r.cob, + test.code/t12/test12s.cob, test.code/t13/Makefile, + test.code/t13/include1.cpy, test.code/t13/include2.cpy, + test.code/t13/include3.cpy, test.code/t13/test13.cob, + test.code/t14/Makefile, test.code/t14/test14c.cob, + test.code/t15/Makefile, test.code/t16/Makefile, + test.code/t16/test16.cob, test.code/t17/Makefile, + test.code/t17/test17.cob, test.code/t18/Makefile, + test.code/t18/test18.cob, test.code/t18/test18i.cob, + test.code/t18/test18r.cob, test.code/t19/Makefile, + test.code/t19/test19.cob, test.code/t19/test19a.cob, + test.code/t19/test19b.cob, test.code/t20/Makefile, + test.code/t20/test20e.cob, test.code/t21/Makefile, + test.code/t22/Makefile, test.code/t22/test22.cob, + test.code/t23/Makefile, test.code/t23/test23.cob, + test.code/t23/test23b.cob, test.code/t24/Makefile, + test.code/t24/test24.cob, test.code/t25/Makefile, + test.code/t26/Makefile, test.code/t26/test26.cob, + test.code/t27/Makefile, test.code/t27/test27.cob, + test.code/t28/Makefile, test.code/t28/test28.cob, + test.code/t28/test28a.cob, test.code/t29/Makefile, + test.code/t29/test29m.cob, test.code/t30/Makefile, + test.code/t30/test30a.cob, test.code/t31/Makefile, + test.code/t31/test31.cob, test.code/t32/Makefile, + test.code/t33/Makefile, test.code/t34/Makefile, + test.code/t34/aaaa.cob, test.code/t34/bbbb.cob, + test.code/t35/Makefile, test.code/t35/test35.cob, + test.code/t36/Makefile, test.code/t36/test36.cob, + test.code/t36/test36i.cob, test.code/t36/test36l.cob, + test.code/tdb01/tdb01a.cob, test.code/tdb02/tdb02.cob, + test.code/tdb03/tdb03.cob, + test_suite/compile_tests/ctestp-goto1.cob: Updated sample test + code. Configure.in duplicate option fix. + +2003-07-26 00:14 andrewcza + + * lib/flckclient.c: Fix an error in flckclient to do with mingw32 + +2003-07-25 23:33 andrewcza + + * lib/Makefile.mingw, lib/flckclient.c, lib/flckclient.h, + lockserver/lockserver.c: Finish off Locking code for Mingw. Now + ready for testing + +2003-07-25 15:55 andrewcza + + * configure, lib/flckclient.c, lib/flckclient.h, + lockserver/Makefile.in, lockserver/Makefile.mingw, + lockserver/lockserver.c, lockserver/syslog.h: Start to change the + Locking code to include support for Mingw32 + +2003-07-25 14:35 whydoubt + + * lib/strings.c: Comment INSPECT REPLACING code and replace + offset_substr with memcmp where appropriate. + +2003-07-25 12:39 whydoubt + + * configure.in: Clean up some configure messages. + +2003-07-24 01:03 dessex + + * lib/: basicio.c, cobmove.c, cobmove_9_.c, cobmove_b_.c, + cobmove_c_.c, intrinsic.c: Several RTS patches from Paolo Bizzarri. + +2003-07-23 17:52 whydoubt + + * lib/general.c: Tweak code for removing trailing whitespace in + tcob_chain. + +2003-07-23 17:45 whydoubt + + * lib/general.c: Correct which string to search in for trailing + whitespace. + +2003-07-23 17:40 whydoubt + + * lib/general.c: Reducing whitespace-removal code in tcob_cancel. + +2003-07-23 16:46 dessex + + * lib/: Makefile.in, fileio.c, flckclient.c, flckclient.h, + htcoblib.h: Separated file lock client code into separate file. + +2003-07-22 18:22 ferranp + + * lib/general.c: Correct cancel statement. Now it works with the + routine name in a variable. + +2003-07-20 22:09 dessex + + * lib/htcoblib.h, lockserver/Makefile, lockserver/Makefile.0: + Configuration for lock server. + +2003-07-20 22:09 dessex + + * Makefile.in, configure.in, htconfig.h.in, htconfig.mingw.h: + Configuration for lock server (part 2). + +2003-07-20 20:43 andrewcza + + * lib/fileio.c, test.code/t36/Makefile, test.code/t36/test36l.cob: + Add new test example and remove warnings from compile when + USE_LOCKSERVER is not defined. + +2003-07-20 11:57 dessex + + * lib/fileio.c, lib/htcoblib.h, lockserver/lockserver.c: Bug fix + for 'WRITE ...ADVANCING' part 1. Minor modifications to lock + server. + +2003-07-18 23:59 hudsonreis + + * INSTALL, INSTALL.BeOS, INSTALL.bin: changes about resource files + option + +2003-07-18 21:56 andrewcza + + * STATUS: Update Status to show READ .. WITH IGNORE LOCK NOW + IMPLEMENTED + +2003-07-18 21:50 andrewcza + + * compiler/htcobgen.c, compiler/htcobol.y, lib/fileio.c, + test.code/t36/test36i.cob: Implement Compiler and Library code for + READ .. WITH IGNORE LOCK + +2003-07-18 00:10 dessex + + * utils/cobf2f/: cobf2f.c, cobf2f.h: Minor update to cobf2f + utility. + +2003-07-15 13:49 whydoubt + + * lib/strings.c: Reworked the INSPECT REPLACING TRAILING code. + +2003-07-15 12:15 whydoubt + + * lib/strings.c: In comparand structure, changed the component name + 'stop' to 'state'. Also made the default state 'go' instead of + 'wait'. + +2003-07-15 11:54 whydoubt + + * lib/strings.c: Make (struct comparand *)->stop comparisons + explicit. More work on cleaning up INSPECT REPLACING library code. + +2003-07-15 11:07 whydoubt + + * lib/strings.c: Correct signed/unsigned variable comparison. + +2003-07-15 09:07 whydoubt + + * lib/fileio.c: Fixed a memory leak and a buffer overflow in + reworking LINE SEQUENTIAL writing. + +2003-07-13 17:14 bgiroud + + * compiler/hthelp.h.in, info/htcobol_en.man, info/htcobol_fr.man, + info/htcobol_man_fr.html: Added option -t in french documentation. + +2003-07-12 11:38 dessex + + * compiler/htcobol.y, compiler/reswords.c, test.code/t12/Makefile: + Added "WITH IGNORE LOCK" phrase to the read statement. + +2003-07-11 22:05 andrewcza + + * lib/fileio.c: Added Code to make the DELETE Statement release a + Locked Record if it gets deleted. + +2003-07-11 21:56 andrewcza + + * test.code/t36/test36i.cob: Add Simple Indexed IO Lock Sample + +2003-07-11 21:34 andrewcza + + * README, STATUS, lib/fileio.c, lib/htcoblib.h, + lockserver/lockserver.c, test.code/t36/Makefile: Make final changed + for Beta Version of Record Locking on Indexed IO. Now We need + People to test. + +2003-07-10 22:54 andrewcza + + * lib/fileio.c, lockserver/INSTALL, lockserver/LICENSE, + lockserver/Makefile, lockserver/PROTOCOL, lockserver/README, + lockserver/TODO, lockserver/VERSION, lockserver/hosts, + lockserver/lockserver.c: Write more code to support record Locking + on READ and REWRITE + +2003-07-04 00:03 andrewcza + + * compiler/htcobol.y, lib/fileio.c, lib/htcoblib.h, + test.code/t12/test12.cob, test.code/t12/test12i.cob: Wrote more + code for Record Locking. + +2003-07-03 21:58 andrewcza + + * lib/: fileio.c, htcoblib.h: Continue to Add code to implement + record locking. + +2003-07-02 17:38 dessex + + * compiler/: htcobol.y, reswords.c: Updated report parser grammar. + +2003-07-02 07:53 dessex + + * compiler/htcobol.y: Updated and improved declaratives parser + grammar. + +2003-07-01 22:46 andrewcza + + * lib/: fileio.c, htcoblib.h: Write more routines towards the + implemention of record locking on ISAM files. + +2003-07-01 12:07 hudsonreis + + * info/: htcobol_it.man, htcobol_man_it.html: Update htcobol + manpages(italian language) + +2003-06-28 16:47 andrewcza + + * lib/: fileio.c, htcoblib.h: Start Adding routines to call + Lockserver for Record Locking. + +2003-06-28 15:17 ferranp + + * compiler/htcobemt.c, compiler/htcobgen.c, + test_suite/cobol_test.pl: Correct problems initializing variables. + +2003-06-28 06:51 reidrac + + * info/: htcobol_es.man, htcobol_man_es.html: added the -t switch + +2003-06-28 00:30 hudsonreis + + * info/: htcobol.man, htcobol_en.man, htcobol_man.html, + htcobol_man_en.html, htcobol_man_pt_BR.html, htcobol_pt_BR.man: + Adding -t switch in htcobol manpage(english and portuguese + language) + +2003-06-27 23:09 andrewcza + + * lib/fileio.c: Added the Cobol 85 File Status Codes. + +2003-06-25 20:03 ferranp + + * compiler/: htcobemt.c, htcobgen.c: Changes initializing fields. + Code cleanup, do not initialize values in linkage section. + Initialize all numeric fields to 0 and text fields to spaces. + +2003-06-21 07:09 dessex + + * lib/fileio.c: File IO bug fixes. + +2003-06-19 03:36 dessex + + * AUTHORS, htconfig.mingw.h, tconfig.mingw.sh: Updated MinGW setup + script. Updated scanner and parser tokens. (Part 2) + +2003-06-19 03:36 dessex + + * compiler/: htcobgen.c, htcobol.y, htcoboly.h, reswords.c: Updated + MinGW setup script. Updated scanner and parser tokens. + +2003-06-17 14:57 whydoubt + + * lib/cobmove.c: Paolo Bizzarri: It is intended to clarify the + meaning of a particular state in the function tcob_move_edited. In + the original code it was expressed as a int value. Now is an enum, + with possibly significant symbolic names. Jeff Smith: Modified the + symbolic names slightly. + +2003-06-17 04:30 dessex + + * compiler/: htcobemt.c, htcobgen.c, htcobol.y, htcoboly.h, + htglobals.c, htglobals.h, reswords.c, scan.l: Updated scanner and + parser with new tokens. Enhanced error reporting to print error + token. + +2003-06-08 00:19 dessex + + * compiler/htcobemt.c, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htcoboly.h, compiler/reswords.c, compiler/reswords.h, + lib/fileio.c, test.code/t02/Makefile, test.code/t03/Makefile, + test.code/t33/Makefile: Updated parser with standardized tokens. + Removed 'SEVERITY_ERROR' define conflict on MinGW platform. + +2003-05-30 14:10 whydoubt + + * lib/strings.c, test_suite/nist/NC.rpt, test_suite/nist/nist.rpt: + Fixed some bugs in INSPECT TALLYING library code. Cleaned up a + couple of near-by memory leaks. + +2003-05-19 10:23 hudsonreis + + * info/: htcobol_it.man, htcobol_man_it.html: Put in CVS update of + italian manfiles(Thanks Mario) + +2003-05-17 01:24 dessex + + * configure, configure.in, htconfig.h.in: Added MF compatibility + options (part 2). + +2003-05-17 01:24 dessex + + * lib/fileio.c, test.code/t19/Makefile, test.code/t19/test19b.cob: + Added MF compatibility configure option and some MF compatibility + features - external file IO. + +2003-05-16 23:19 hudsonreis + + * info/: htcobol.man, htcobol_man.html: Updating htcobol.man and + htcobol_man.html about the modification of cobopt word to htcobolrc + word. + +2003-05-16 15:47 whydoubt + + * compiler/htcobol.y: Improve parsing of SORT statement. + +2003-05-16 15:47 whydoubt + + * test_suite/nist/: IX.rpt, SM.rpt, nist.rpt: Get NIST reports up + to date. + +2003-05-16 14:33 whydoubt + + * compiler/htcobol.y: Improve parsing of SORT statement. + +2003-05-16 13:42 whydoubt + + * test_suite/nist/make_pop_linux.txt: Added SORT filename cards. + +2003-05-16 13:34 whydoubt + + * test_suite/nist/Makefile_trail.h: Clean up for RTE files in NIST + testing. + +2003-05-15 15:45 whydoubt + + * test_suite/nist/: nist_IX.rpt, nist_IX_prev.rpt, nist_NC.rpt, + nist_NC_prev.rpt: Putting some old reports in the attic. + +2003-05-15 15:10 whydoubt + + * test_suite/nist/: NC.rpt, nist.rpt: Get NC report up to date. + +2003-05-15 14:41 whydoubt + + * lib/: fileio.c, htcoblib.h, strings.c: Eliminated some C++ + comments, eliminated movebytes, cleaned up SORT code. + +2003-05-15 14:10 whydoubt + + * compiler/htglobals.c: Keeping C++-style comments out of the + compiler code. + +2003-05-15 11:10 reidrac + + * info/htcobol_es.man: little fix + +2003-05-15 11:04 reidrac + + * info/htcobol_es.man: clarified the htcobolrc part + +2003-05-11 02:50 dessex + + * test.code/: Readme.txt, t15/Makefile, t15/test15k.cob, + t15/test15l.c, t32/Makefile, t32/test32a.cob, t36/test36.cob: Added + COBOL source samples in the 'test.code' directory. + +2003-05-08 19:44 dessex + + * Makefile.in, Makefile.mingw, configure, configure.in, + htconfig.h.in, htconfig.mingw.h, tconfig.mingw.sh: Simplified + configure for command line help language option (part 2). + +2003-05-08 19:27 dessex + + * cobpp/tcpphelp.h, cobpp/tcpphelp.h.in, compiler/hthelp.h, + compiler/hthelp.h.in, test.code/Readme.txt, + test_suite/cobol_test.pl: Simplified configure for command line + help language option. + +2003-05-07 03:02 dessex + + * lib/fileio.c, test.code/t15/Makefile, test.code/tdb01/Makefile, + test.code/tdb01/tdb01.c: Win32 binary flag fix for BDB. Small setup + fix for BDB in tdb01. + +2003-05-05 01:49 bgiroud + + * compiler/htcobgen.c, test_suite/test.baseline: Corrected filler + SCREEN checking symptom. Recovered test_suite level. + +2003-05-04 14:32 ferranp + + * compiler/htcobol.y, lib/htcoblib.h, lib/strings.c: New option for + inspect, INSPECT .... REPLACING TRAILING .... + +2003-05-01 03:05 hudsonreis + + * info/: htcobol_en.man, htcobol_man_en.html: Updated english + manfiles + +2003-04-29 16:22 dessex + + * info/isetup/: image3e.bmp, image3e1.bmp, license.txt, + tcobol.iss.in: Fix for Inno setup script. Set binary flag for + bitmap + +2003-04-29 05:30 dessex + + * Makefile.mingw, tconfig.mingw.sh: MinGW config scritp update + +2003-04-29 04:33 dessex + + * info/isetup/Readme.isetup.txt, info/isetup/image3e.bmp, + info/isetup/tcobol.bat, info/isetup/tcobol.iss.in, + lib/Makefile.mingw, test_suite/nist/Makefile, + test_suite/nist/Makefile_head.h: MinGW update and addtion of Inno + setup script + +2003-04-28 13:30 reidrac + + * info/htcobol_es.man: cobopt deprecated + +2003-04-27 16:20 bgiroud + + * compiler/htcobemt.c, compiler/htcobol.y, compiler/reswords.c, + compiler/reswords.h, info/htcobol_fr.man, info/htcobol_man_fr.html: + Added dialect field for reserved words. Changed cobopt into + htcobolrc in documentation. + +2003-04-26 12:44 hudsonreis + + * compiler/htcobolrc.mingw, lib/Makefile.mingw: Updating the files + to mingw TC install + +2003-04-26 11:03 hudsonreis + + * compiler/cobopt: removed cobopt file + +2003-04-26 01:06 hudsonreis + + * info/: htcobol_man_pt_BR.html, htcobol_pt_BR.man: Updating the + brazilian manfiles(changing the word "cobopt" to "htcobolrc" in + htcobol_pt_BR.man and htcobol_man_pt_BR.html) + +2003-04-26 00:53 hudsonreis + + * configure: updating configure script(regenerated with autoconf) + +2003-04-14 17:51 whydoubt + + * compiler/htcobol.y: Removed token special_name_class_literal. + +2003-04-13 14:31 bgiroud + + * configure.in, cobpp/tcpphelp.h.in, compiler/hthelp.h.in, + compiler/reswords.c, info/htcobf2f_es.man, + info/htcobf2f_man_es.html, info/htcobol_es.man, + info/htcobol_man_es.html, info/htcobolpp_es.man, + info/htcobolpp_man_es.html: Addition of "es" translation (Thanks to + Juan). Ordering of reserved words to allow further qualification + for doc. + +2003-04-12 12:32 hudsonreis + + * test.code/tdb03/tdb03.cob: some bugfixes in tdb03.cob + +2003-04-11 10:35 bgiroud + + * compiler/: htcobemt.c, htcobgen.c, htcobol.c, htcobol.y, + htcoboly.h, reswords.c, scan.l: Added checks on value types and + length against picture. Added syntax of CLASS phrase. + +2003-04-09 19:21 ferranp + + * compiler/htcobgen.c: Initialize a field to avoid crashes. + +2003-04-08 15:09 ferranp + + * compiler/htcobemt.c: Some bugfixes that make the compiler seg + failt. + +2003-04-07 03:14 bgiroud + + * compiler/: htcobemt.c, htcobgen.c, htcobol.y, htcoboly.h, + htglobals.c: Correction of several little bugs mentionned by Hudson + Reis. + +2003-04-06 09:28 whydoubt + + * lib/: cobmove.c, general.c, rterrors.h: C++ -> C comments and + corrected some comments. + +2003-04-04 19:47 whydoubt + + * lib/: htcoblib.h, mcmath.c: Converting C++-style comments to + C-style comments in mcmath. + +2003-04-04 19:00 whydoubt + + * lib/: basicio.c, cobmove_f_.c, fileio.c, scr_curses.c, + screenio.c, strings.c: Lots of warnings when -W flag is used have + been cleaned up. Implemented library code for 4-digit years in + ACCEPT statement. + +2003-04-04 18:57 whydoubt + + * test_suite/nist/: NC.idx, make_pop_linux.txt: Minor nist test + suite updates. + +2003-04-03 13:18 ferranp + + * cobpp/scanner.l: Some bug fixes to aboid segmentation faults. + +2003-04-03 12:23 ferranp + + * cobpp/cobpp.h, cobpp/scanner.l, compiler/htcobemt.c, + compiler/htglobals.c, compiler/reswords.c, compiler/scan.l, + lib/dyncall.c, lib/general.c, lib/screenio.c: Some bug fixes to + avoid segmentation faults. + +2003-04-02 18:40 whydoubt + + * compiler/: Makefile.in, htcobemt.c, htcobgen.c, htglobals.c, + htglobals.h, scan.l: Added -pedantic to the flags for compiling the + compiler, and fixed most resulting warnings. + +2003-04-02 15:51 whydoubt + + * mwindows.h, compiler/htcobgen.c, compiler/htcobol.c, + compiler/htcoboly.h, compiler/htglobals.c, compiler/htglobals.h, + compiler/hthelp.h.in, compiler/reswords.c: More changing C++-style + comments to C-style comments in the compiler. + +2003-04-02 14:36 whydoubt + + * lib/htcoblib.h, compiler/htcobemt.c: Converting C++-style + comments to C-style comments, and cleaning up some of contents of + the comments in the process. + +2003-04-02 13:04 whydoubt + + * compiler/htcobemt.c: Cleaned up code generation ambiguity in + proc_trail. + +2003-04-02 12:20 whydoubt + + * compiler/htcobol.y: ADD CORRESPONDING requires 'TO'. + +2003-03-25 04:21 bgiroud + + * compiler/htcobemt.c, compiler/htcobgen.c, compiler/htcobol.y, + lib/fileio.c: Reset flag eof_hit also at tcob_start (thanks to + Alain Lucari). Suppressed call of data_trail from end if data + division (in case refmods in screen section). + +2003-03-23 14:59 ferranp + + * compiler/htcobemt.c, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htcoboly.h, compiler/reswords.c, lib/dyncall.c, + lib/general.c, lib/htcoblib.h, lib/rterrors.c, lib/rterrors.h, + lib/scr_curses.c, lib/screenio.c: New options UPPER , LOWER and + SIZE on screen fields. Correct a segmentation faults in som cases + involving call and cancel. + +2003-03-20 19:11 ferranp + + * compiler/htcobemt.c: Modification to detect variables in the + linkage section while compiling. + +2003-03-09 18:50 ferranp + + * lib/scr_curses.c: Now the left and right keys at the end of a + field finish an accept auto. + +2003-03-05 12:30 whydoubt + + * lib/cobmove.c: Fix non-elementary moves to meet standards. + +2003-03-05 00:25 whydoubt + + * compiler/: htcobgen.c, htcobol.y, htcoboly.h: Additional updates + to the chronological form of the ACCEPT statement. + +2003-03-04 17:44 whydoubt + + * compiler/htcobgen.c, lib/basicio.c, lib/htcoblib.h: Consolidating + code for chronological form of ACCEPT. + +2003-03-04 16:20 whydoubt + + * compiler/htcobol.y: Parse the ALPHABET phrase better. + +2003-02-28 09:25 bgiroud + + * configure.in, cobpp/parser.y, compiler/htcobol.y, lib/fileio.c: + Check-in changes from David Essex for skipping locking on MingW32. + Cleaned-up definitions in files .y for Bison 1.75. + +2003-02-25 02:36 whydoubt + + * cobpp/.cvsignore, compiler/.cvsignore, info/.cvsignore, + lib/.cvsignore, test.code/.cvsignore, + test.code/copybooks/.cvsignore, .cvsignore, utils/.cvsignore, + utils/cobf2f/.cvsignore: Adding .cvsignore entries into the + repository. + +2003-02-25 02:28 whydoubt + + * info/: Compiler-Overview.txt, VarStructure.Info.txt: + Documentation updates. + +2003-02-23 20:20 whydoubt + + * compiler/htcobol.y: Improve EVALUATE without END-EVALUATE case. + +2003-02-23 01:03 whydoubt + + * compiler/htcobol.y: Improving parse of file and sort descriptor + sections. + +2003-02-22 15:24 whydoubt + + * compiler/htcobgen.c: Fix occasional segfault in compiler when + creating a log file. + +2003-02-22 14:44 whydoubt + + * compiler/hthelp.h.in: Update compiler command-line help to + compile without errors. + +2003-02-21 13:49 whydoubt + + * compiler/: htcobol.y, reswords.c: Keyword 'ARE' is only valid if + the proceeding word is in plural form. + +2003-02-18 16:53 whydoubt + + * compiler/htcobol.y: Fix a parse error when 'ON' is missing from + an OCCURS DEPENDING clause. + +2003-02-18 13:24 whydoubt + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/htcoboly.h, + lib/htcoblib.h: Improving inheritance of group attributes to + subcomponents. + +2003-02-16 19:07 whydoubt + + * compiler/: htcobgen.c, htcoboly.h: Fix a problem with the + compiler sometimes allocating too much memory while generating code + for initializing groups with the OCCURS clause. + +2003-02-15 12:59 whydoubt + + * lib/: general.c, mcmath.c, rterrors.c: Fixes and improvements to + the run-time error reporting system. + +2003-02-15 12:42 whydoubt + + * compiler/htcobgen.c: Fixed compiler shortcoming that led to + values in group fields not being properly initialized (e.g. field + MOVE29A in NIST test NC104). + +2003-02-13 02:55 whydoubt + + * lib/pictures.c: Fixed some logic errors in counting the numeric + characters in a numeric edited picture. + +2003-02-07 12:25 bgiroud + + * config.guess, config.sub, configure, configure.in, tinycobol.lsm: + Last configure changes from Matt Verran for R0.60. + +2003-02-02 18:17 bgiroud + + * ANNOUNCE: Forgotten the principal for R0_60 ! + +2003-02-02 15:05 bgiroud + + * AUTHORS, ChangeLog, STATUS, configure.in, tinycobol.lsm, + compiler/htcobemt.c, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htglobals.c, info/rpm/tinycobol-0.00.spec, lib/fileio.c, + lib/general.c: Preparation of 0.60 release. + +2003-01-23 02:27 bgiroud + + * INSTALL.BeOS, configure, configure.in, htconfig.h.in, + compiler/htcobemt.c, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htglobals.c, lib/fileio.c, lib/general.c, lib/htcoblib.h: + Corrected write advancing, thanks to Alain Leucari's code. Changed + structure of files (needs a V4) to support access to File Status + from the RTL. Added Matt Verran's contributions to better support + BeOS. + +2003-01-07 03:18 bgiroud + + * compiler/: htcobemt.c, htcobgen.c, htcobol.y, htcoboly.h, + htglobals.c, htglobals.h: Corrected the handling of Invalid Key + clause for write and rewrite. + +2002-12-19 00:52 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y, + compiler/reswords.c, lib/fileio.c: Added UNLOCK statement. + +2002-12-18 23:50 rpragana + + * test.code/t36/: Makefile, test36.cob: Still some files missing... + +2002-12-18 13:01 rpragana + + * lib/fileio.c: Oops! No t36 commited. Small bug fix in + lib/fileio.c/lock_record(). + +2002-12-17 14:24 rpragana + + * ChangeLog, compiler/htcobemt.c, compiler/htcobgen.c, + compiler/htcoboly.h, lib/fileio.c, lib/htcoblib.h: Added test.code + (t36) for record locks. Modified implementation for allowing + multiple reads with/without locks in the same process. Return code + for already locked files is 99 (temporary error code). + +2002-12-17 10:23 rpragana + + * ChangeLog, compiler/htcobemt.c, compiler/htcobgen.c, + compiler/htcobol.y, compiler/htcoboly.h, lib/htcoblib.h, + test.code/t01/Makefile, test.code/tdb03/tdb03.cob: Start WITH LOCK + clause implementation (READ verb). + +2002-11-05 04:04 bgiroud + + * configure, configure.in, compiler/htcobemt.c, + compiler/htcobgen.c, compiler/htcoboly.h, compiler/htglobals.c, + compiler/htglobals.h: Integrated first lot of support for BeOS in + configuration. + +2002-10-30 17:02 bgiroud + + * configure, lib/fileio.c, test_suite/test.baseline, + test_suite/sortio_tests/srtio05.cob, + test_suite/sortio_tests/srtio06.cob, + test_suite/sortio_tests/srtio07.cob, + test_suite/sortio_tests/srtio08.cob, + test_suite/sortio_tests/srtio09.cob, + test_suite/sortio_tests/srtio10.cob, + test_suite/sortio_tests/test.script: Sort with line sequential + files now should work. Added a few other tests. + +2002-10-29 04:09 bgiroud + + * configure.in, tinycobol.lsm, test_suite/Makefile, + test_suite/cobol_test.pl, test_suite/test.baseline, + test_suite/sortio_tests/srtio01.cob, + test_suite/sortio_tests/srtio02.cob, + test_suite/sortio_tests/srtio03.cob, + test_suite/sortio_tests/srtio04.cob, + test_suite/sortio_tests/test.script: Added sortio tests. + +2002-10-23 15:15 whydoubt + + * cobpp/tcpphelp.h.in: Fixing escaped newlines in Italian help + messages. + +2002-10-20 05:16 bgiroud + + * ANNOUNCE, ChangeLog, INSTALL, configure, configure.in, + tinycobol.lsm, info/rpm/tinycobol-0.00.spec, lib/Makefile.in, + lib/basicio.c: Updates for release 0.59. + +2002-10-16 11:27 whydoubt + + * Makefile.0, Makefile.in: Clean up two new generated files during + distclean. + +2002-10-15 03:12 bgiroud + + * cobpp/tcpphelp.h, compiler/hthelp.h: Removed two generated help + files. + +2002-10-13 16:47 bgiroud + + * ChangeLog, cobpp/tcpphelp.h, cobpp/tcpphelp.h.in, + compiler/hthelp.h, compiler/hthelp.h.in, + info/htcobolpp_man_fr.html: Added missing files from David Essex + concerning internationalization. + +2002-10-13 02:03 whydoubt + + * INSTALL, Makefile.0, Makefile.in, info/debian/rules, + test.code/Makefile.0, test.code/Makefile.in, utils/Makefile.0, + utils/Makefile.in: Adding standard make target 'distclean'. + +2002-10-11 10:49 bgiroud + + * configure, configure.in, cobpp/cobpp.c, cobpp/cobpp.h, + compiler/htglobals.c, compiler/htglobals.h, info/Makefile.in, + lib/basicio.c, lib/cobmove_b_.c: Incorporated David Essex changes + for intl. of man files. Corrected the way + tcob_accept_{date,time,day} would fill a char field from a BININT + one. + +2002-10-04 10:41 bgiroud + + * compiler/htcobgen.c, info/htcobf2f_man_fr.html, + info/htcobol_man_fr.html, lib/basicio.c, lib/cobmove.c, + lib/cobmove_9_.c, lib/cobmove_b_.c, lib/cobmove_c_.c, + lib/cobmove_f_.c, lib/cobmove_x_.c, lib/htcoblib.h, + lib/intrinsic.c, lib/mcmath.c, lib/pictures.c, lib/screenio.c, + lib/strings.c: tcob_ prefix changes phase III. + +2002-09-27 11:04 bgiroud + + * compiler/htcobemt.c, compiler/htcobgen.c, lib/cobmove.c, + lib/cobmove_9_.c, lib/cobmove_b_.c, lib/cobmove_c_.c, + lib/cobmove_x_.c, lib/fileio.c, lib/htcoblib.h, lib/intrinsic.c, + lib/mcmath.c, lib/scr_curses.c, lib/screenio.c, lib/screenio.h, + lib/strings.c, test.code/Readme.txt, test.code/t00/Makefile, + test.code/t17/Makefile, test.code/t17/Readme.txt, + test.code/t23/Makefile, test.code/t26/Makefile: Changing RTS names + phase II. + +2002-09-27 03:22 bgiroud + + * compiler/htcobemt.c, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htcobolrc.in, compiler/htcobolrc.mingw, lib/basicio.c, + lib/cobmove.c, lib/cobmove_9_.c, lib/cobmove_b_.c, + lib/cobmove_c_.c, lib/cobmove_f_.c, lib/cobmove_x_.c, lib/fileio.c, + lib/general.c, lib/htcoblib.h, lib/intrinsic.c, lib/mcmath.c, + lib/rterrors.c, lib/scr_curses.c, lib/screenio.c, lib/strings.c, + test_suite/nist/NC.idx: Changed or added prefix "tcob_" phase I. + +2002-09-16 05:00 bgiroud + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/htcoboly.h, + lib/fileio.c, test.code/t08/Readme.txt: Corrected several bugs in + sort, and added prefix tcob_ for sort entry points. + +2002-09-10 03:59 bgiroud + + * compiler/htcobgen.c, compiler/htcobol.y, lib/basicio.c, + lib/htcoblib.h, test.code/t08/test08u.cob: Added the correct + handling of implied numeric move in accept_* routines. Also + renamed the modified routines with a prefix of tcob_. + +2002-09-09 05:23 bgiroud + + * Makefile.in, cobpp/Makefile.in, cobpp/Makefile.mingw, + compiler/Makefile.in, compiler/Makefile.mingw, compiler/htcobemt.c, + compiler/htcobgen.c, info/Makefile.in, lib/Makefile.in, + lib/Makefile.mingw, test.code/Makefile.in: Added devel tag in + Makefiles. Made SORT-RETUN defined. Gives an error if assigned + name in SELECT is not defined. + +2002-08-27 11:21 ferranp + + * compiler/htcobemt.c, compiler/htcobol.y, compiler/htglobals.c, + lib/Makefile.in, lib/Makefile.mingw, lib/dyncall.c, + lib/intrinsic.c, test.code/t02/test02.cob, test.code/t33/Makefile, + test_suite/cobol_test.pl: Unify the 2 libraries of the runtime in + one. By default create the runtime system as a shared object. + Some bug fixes. + +2002-08-12 14:28 bgiroud + + * TODO, compiler/htcobemt.c, compiler/htcobgen.c, + compiler/htcobol.y, compiler/htcoboly.h, info/htcobf2f_fr.man, + info/htcobol_fr.man, info/htcobolpp_fr.man, + test_suite/cobol_test.pl, test_suite/nist/IX.rpt, + test_suite/nist/SM.rpt, test_suite/nist/nist.rpt: Added french + translation. Updated cobol_test.pl for dynamic libs. + +2002-06-26 13:13 ferranp + + * compiler/htcobol.y, lib/dyncall.c, lib/general.c, lib/htcoblib.h, + lib/rterrors.h: Preliminary cancel statement. Unify the way dyncall + works with dl and ltdl Some imprivements for NIST test suite. + +2002-06-26 08:10 ferranp + + * compiler/htcobemt.c, compiler/htcobgen.c, compiler/htcobol.y, + lib/screenio.c: Correct determination of size for fields without + picture. Correct parsing of nested progrmas (NIST IC test suite). + A little bug on screen. + +2002-06-25 23:13 dessex + + * info/: htcobf2f_it.man, htcobf2f_man_it.html, htcobol_it.man, + htcobol_man_it.html, htcobolpp_it.man, htcobolpp_man_it.html: Added + Italian versions MAN and HTML docs. + +2002-06-24 12:08 ferranp + + * compiler/htcobol.y, lib/basicio.c, lib/dyncall.c, lib/general.c, + lib/intrinsic.c, lib/rterrors.c, lib/rterrors.h, lib/screenio.c: + Changes on parser. Improvements on runtime error reporting. + +2002-06-21 06:36 ferranp + + * compiler/htcobgen.c, compiler/htcobol.y, lib/general.c, + lib/screenio.c: Some bug fixes. Clearer accept syntax. Now not + requires curses to be linked with any cobol program. + +2002-06-19 14:09 ferranp + + * compiler/: htcobemt.c, htcobol.y, htcoboly.h: A bug introduced on + one of the last modifications afecting the returninig of routines. + +2002-06-19 12:03 ferranp + + * lib/: general.c, htcoblib.h, intrinsic.c, scr_curses.c: NUMVAL-C + instrinsic function. (cobol 85 intrinsic functions complented). + Bug on the screen section accept (reported by Iker Etxebarria). + Restore the currency symbol when returning from a call. + +2002-06-17 22:29 rpragana + + * ChangeLog, compiler/htcobol.y: Flag as error level 78 variables. + +2002-06-16 17:59 ferranp + + * compiler/htcobemt.c, compiler/htcobgen.c, compiler/htcoboly.h, + compiler/reswords.c, lib/fileio.c, lib/general.c, lib/htcoblib.h, + lib/intrinsic.c, lib/rterrors.h: Fase 1 of the cancel statement. + NUMVAL intrinsic function. + +2002-06-16 03:32 dessex + + * compiler/htcobol.y: Bug fix for ACCEPT/DISPLAY grammar in parser. + +2002-06-14 13:10 ferranp + + * compiler/htcobol.y: Fix a bug that makes all the accepts via + curses. + +2002-06-13 04:17 dessex + + * cobpp/: parser.y, scanner.l: Updated pre-processor to allow + multi-line comment entries for AUTHOR, INSTALLATION, DATE-WRITTEN, + DATE-COMPILED, SECURITY statements. + +2002-06-12 18:46 dessex + + * compiler/htcobol.y, test_suite/nist/Readme.txt: Minor bug in main + parser. + +2002-06-12 13:35 ferranp + + * compiler/htcobol.y: An bug produced for deleting by error lines + from previous version. + +2002-06-12 06:12 ferranp + + * compiler/htcobemt.c, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htcoboly.h, compiler/reswords.c, lib/htcoblib.h, + lib/scr_curses.c, lib/screenio.c: Modification of the + accept/display on the parser to be closer to standards. Boback on + a rutine generates exit program, else stop run. A bug fix for SET. + +2002-06-10 21:39 dessex + + * info/: htcobf2f_en.man, htcobf2f_man_en.html, + htcobf2f_man_pt_BR.html, htcobf2f_pt_BR.man, htcobol.man, + htcobol_en.man, htcobol_man.html, htcobol_man_en.html, + htcobol_man_pt_BR.html, htcobol_pt_BR.man, htcobolpp_en.man, + htcobolpp_man_en.html, htcobolpp_man_pt_BR.html, + htcobolpp_pt_BR.man, rpm/tinycobol-0.00.spec: Updated man and HTML + docs for htcobol. + +2002-06-05 05:34 dessex + + * Readme.mingw32.txt, STATUS, htconfig.mingw.h, + info/rpm/tinycobol-0.00.spec, lib/Makefile.mingw, lib/scr_curses.c, + test.code/copybooks/Makefile.in: Minor make file fixes. Update to + scr_curses for pdcurses. + +2002-06-04 04:07 dessex + + * ANNOUNCE, AUTHORS, ChangeLog, Makefile.0, configure, + configure.in, htconfig.0.h, htconfig.mingw.h, tinycobol.lsm, + cobpp/Makefile.0, compiler/Makefile.0, compiler/htcobolrc.mingw, + compiler/htglobals.c, lib/Makefile.0, lib/Makefile.mingw, + lib/htcoblib.h, test.code/Makefile.0, utils/Makefile.0: Updates for + 0.58 release. + +2002-06-03 16:19 ferranp + + * lib/Makefile.in: Corrections on the symlinks for installing as + shared libs. + +2002-06-03 15:18 ferranp + + * compiler/htglobals.c: Bug that causes a seg fault with lib names + in the resource file like '$.so' + +2002-06-03 03:04 dessex + + * configure, configure.in, compiler/htcobolrc.in, + compiler/htglobals.c, compiler/htglobals.h, info/htcobol.man, + info/htcobol_man.html: Updated TC front end to pass linker options + (Part III). Minor update to configure script to add the static + libraries utilities to the TC resource file. Updated man and HTML + docs for htcobol. + +2002-06-02 22:36 dessex + + * compiler/: htcobolrc.in, htglobals.c, htglobals.h: Updated TC + front end to handle shared libraries (Part II). + +2002-06-02 13:44 ferranp + + * compiler/htcobemt.c, compiler/htcobol.y, lib/dyncall.c: Some + bugxs intreoduced when verifying paragraph and section names. Some + bugs on dynamic calls. + +2002-05-30 15:04 dessex + + * cobpp/parser.y, cobpp/scanner.l, compiler/htcobol.c, + compiler/htcobolrc.in, compiler/htcoboly.h, compiler/htglobals.c, + compiler/htglobals.h, test.code/config/COB.rules.in: More + pre-processor fixes and updates relating to REPLACE (Part I). + Updated TC front end to handle shared/static libraries (Part I). + +2002-05-22 17:38 whydoubt + + * lib/mcmath.c: Fixed a bug in 'DIVIDE f1 INTO f2 GIVING f3 + REMAINDER f4' where f3 is a numeric-edited non-integer. + +2002-05-22 14:53 ferranp + + * lib/Makefile.in: Update Makefile for creating and installig + (optional) shared libraries: + +2002-05-22 12:26 ferranp + + * lib/: scr_curses.c, screenio.c, screenio.h: Minor bugs on + screenio. + +2002-05-19 09:45 ferranp + + * compiler/htcobol.y, compiler/reswords.c, lib/htcoblib.h, + lib/scr_curses.c, lib/screenio.c, lib/screenio.h, + test.code/t23/test23b.cob: Improvements and cleanup on screenio. + end-accept clause. + +2002-05-18 11:46 ferranp + + * compiler/htcobemt.c, compiler/htcobol.y, + compiler/htcobolrc.mingw, compiler/htglobals.c, lib/Makefile.mingw, + lib/dyncall_ltdl.c, lib/screenio.c: Portability issues for mingw32 + including dynamic calls. Validate and print invalid paragraphs and + sections on compiler. + +2002-05-17 15:55 whydoubt + + * test_suite/nist/nc_extr.pl: Update nist/nc_extr.pl to simplify + and correct some problems working with the first and last modules, + CM and ST respectively. + +2002-05-17 14:42 whydoubt + + * test_suite/nist/Makefile_trail.h: Generate full nist.rpt report + from correct module reports. + +2002-05-17 09:39 ferranp + + * compiler/htcobemt.c: WHEN-COMPILED intrinsic function. + +2002-05-17 08:49 ferranp + + * compiler/htcobemt.c, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htcoboly.h, compiler/htglobals.c, compiler/htglobals.h, + compiler/reswords.c, compiler/reswords.h, lib/intrinsic.c: Fixes on + intrinsic functions. Option -m to compile as a module. + +2002-05-15 06:06 dessex + + * configure, configure.in: More updates to the configure script for + DB version 4. + +2002-05-15 04:56 dessex + + * configure, configure.in, htconfig.h.in, lib/htcoblib.h, + test_suite/cobol_test.pl: Updated configure script for DB version + 4. Updated test_suite Perl script to determine the DB library name + from the resource file(htcobolrc). + +2002-05-14 17:52 whydoubt + + * lib/strings.c: Small fix to INSPECT (TALLYING and REPLACING) that + was causing AFTER to not work as specified. + +2002-05-14 12:16 whydoubt + + * lib/strings.c: Implemented INSPECT CONVERTING + +2002-05-13 02:22 bgiroud + + * test_suite/nist/: Makefile_SM, SM.idx: Added SM support in nist + test_suite directory. + +2002-05-12 19:03 ferranp + + * compiler/htcobemt.c, compiler/htcobgen.c, compiler/htcobol.y, + lib/intrinsic.c, test.code/t35/test35.cob: More instrinsic + functions. some bug fixed. + +2002-05-09 17:52 whydoubt + + * lib/screenio.c: Fixing a kludge in display_curses that was + causing memory after a 'group' to be trampled when the group was + displayed. + +2002-05-05 16:43 ferranp + + * lib/screenio.c: Correct problems displaying edited fields with + blank when zero. Bug reported by Harold Norris. + +2002-05-05 15:51 ferranp + + * compiler/htcobgen.c: Correct a bug on last commit. + +2002-05-05 13:46 ferranp + + * compiler/htcobgen.c, lib/intrinsic.c, lib/screenio.c, + test.code/t35/test35.cob: Intrinsic functions, bug fixes and + updated test35. + +2002-05-03 23:54 dessex + + * test_suite/nist/nc_extr.pl: Update to the NIST test suite + extract. + +2002-05-03 08:29 ferranp + + * compiler/htcobemt.c, lib/intrinsic.c: More intrinsic functions. + +2002-05-03 06:40 bgiroud + + * compiler/htcobemt.c, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htcoboly.h, compiler/reswords.c, test_suite/Makefile, + test_suite/test.baseline, test_suite/nist/IX.idx, + test_suite/nist/IX.rpt, test_suite/nist/IX_prev.rpt, + test_suite/nist/Makefile_head.h, test_suite/nist/Makefile_trail.h, + test_suite/nist/NC.rpt, test_suite/nist/NC_prev.rpt, + test_suite/nist/SM.rpt, test_suite/nist/make_pop_linux.txt, + test_suite/nist/nc_extr.pl, test_suite/nist/nist.rpt, + test_suite/nist/nist_IX.rpt, test_suite/nist/nist_NC.rpt, + test_suite/nist/xtr_rpt.sh: Further enhancements to support IX + module. Added module SM. Changed names of .rpt files (suppressed + nist_ prefix). + +2002-04-30 04:30 ferranp + + * compiler/htcobemt.c, compiler/htcobgen.c, + test.code/t35/test35.cob: Some bugs on intrinsic functions and + generating temp fields. + +2002-04-29 09:22 ferranp + + * lib/cobmove_x_.c: A bug fix for a seg fault on move. + +2002-04-29 08:56 ferranp + + * compiler/htcobol.y, compiler/scan.l, lib/dyncall.c, + lib/screenio.c: Bug fixes. Remove code for copys from compiler. + +2002-04-28 19:16 dessex + + * cobpp/: scanner.l, test.code/ft1.cob, test.code/t1.cob: + Pre-processor update relating to SQL pre-processor. + +2002-04-28 18:36 ferranp + + * compiler/htcobemt.c, compiler/htcobgen.c, lib/intrinsic.c, + test.code/t35/test35.cob: More intrinsic functions. Some bug fixes. + +2002-04-28 15:51 ferranp + + * lib/intrinsic.c, test.code/Readme.txt, test.code/t35/Makefile, + test.code/t35/test35.cob: New Intrinsic functions. Added examples + for instinsic functions in test.code. + +2002-04-28 11:39 ferranp + + * compiler/htcobol.y, lib/intrinsic.c: Bugs on intrinsic function + current-date (instrinsics without params) + +2002-04-26 13:34 dessex + + * ChangeLog, configure, configure.in, cobpp/cobpp.c, cobpp/cobpp.h, + cobpp/parser.y, cobpp/scanner.l: Updated ChangeLog. Updated + configure script to handle dynamic loading. Updated configure + script dynamic loading RTS default. More pre-processor updates. + +2002-04-24 19:19 ferranp + + * compiler/htcobemt.c, compiler/htcobgen.c, compiler/htcoboly.h, + compiler/reswords.c, lib/intrinsic.c, lib/rterrors.c: + Implementation of some intrinsic functions. + +2002-04-22 19:59 andrewcza + + * lib/fileio.c, test_suite/test.baseline, + test_suite/seqio_tests/seqio02.cob, + test_suite/seqio_tests/seqio05.cob: Begin making changes so that + File Status in fileio.c will return Cobol 85 Status codes and not + Cobol 74. + +2002-04-21 16:07 ferranp + + * compiler/htcobemt.c, compiler/htcoboly.h, compiler/reswords.c, + compiler/reswords.h, compiler/scan.l, lib/Makefile.in, + lib/cobmove_f_.c, lib/intrinsic.c, lib/mcmath.c, lib/rterrors.c, + lib/scr_curses.c: Add skeleton for intrinsec functions.Added + example function ABS. Correct a bug on move float fields and a bug + on screen io. + +2002-04-16 22:39 andrewcza + + * compiler/htcobgen.c: Fix a problem with Relative IO for Write + From. + +2002-04-16 20:17 dessex + + * lib/: dyncall.c, dyncall_ltdl.c: Merged dynamic loading code in + RTS. + +2002-04-16 18:11 dessex + + * configure, configure.in, htconfig.0.h, compiler/htcobemt.c, + compiler/htcobolrc.in, lib/Makefile.in, lib/dyncall.c, + lib/htcoblib.h: Updated configure script to handle dynamic loading. + Merged dynamic loading code in RTS. + +2002-04-16 13:14 ferranp + + * lib/dyncall_ltdl.c: ome cleanup on dyncall_ltdl. + +2002-04-15 16:14 ferranp + + * compiler/htcobolrc.mingw: [no log message] + +2002-04-15 16:14 ferranp + + * cobpp/Makefile.mingw, lib/scr_curses.c, lib/screenio.c: Some + issues on mingw32 port. Colors work again with pdcurses. Bugs on + display ADVANCING/NO ADVANCING and on DISPLAY reported by Harold + Norris. + +2002-04-11 05:57 dessex + + * ChangeLog, configure, configure.in, htconfig.h.in, + cobpp/test.code/ft1.cob, compiler/htcobol.y, lib/Makefile.in, + lib/Makefile.mingw, lib/dyncall.c, lib/dyncall_ltdl.c, + lib/scr_curses.c, test.code/t33/Makefile, test.code/t33/Readme.txt, + test.code/t33/rt.sh: Minor fix to htcobol.y. Updated configure + script to handle dynamic loading (using the ltdl library or RTS + default). Minor fix to screenio to handle old versions of the + ncurses libraries. + +2002-04-10 19:39 ferranp + + * lib/: cobmove_x_.c, screenio.c: Correct move right justified + fields (strip trailing spaces from source field). Now accept just + right works as expected. + +2002-04-10 03:19 bgiroud + + * compiler/htcobemt.c, test_suite/Makefile, + test_suite/nist/Makefile_head.h, test_suite/nist/Makefile_nc, + test_suite/nist/nc.idx, test_suite/nist/nist.rpt, + test_suite/nist/nist_IX.rpt, test_suite/nist/nist_IX_prev.rpt, + test_suite/nist/nist_prev.rpt: Corrected test for NOT INVALID KEY. + Further automate test suite. + +2002-04-08 02:59 bgiroud + + * compiler/htcobemt.c, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htcoboly.h, lib/pictures.c, test_suite/nist/NC.idx, + test_suite/nist/make_pop_linux.txt, test_suite/nist/nc.idx, + test_suite/nist/nist.rpt, test_suite/nist/nist_IX.rpt, + test_suite/nist/nist_NC.rpt, test_suite/nist/nist_NC_prev.rpt: + Further improvements for the handling of declaratives. Added cast + of int for va_args in pictures. + +2002-04-07 18:25 ferranp + + * configure, configure.in, compiler/htcobemt.c: The configure + script didn't give the correct defalut lib to linker. Correct the + stabs lines when using copybooks. + +2002-04-07 16:02 ferranp + + * lib/: Makefile.in, dyncall.c, ltdl.c: Dynamic call now uses ltdl + routines. + +2002-04-05 01:02 andrewcza + + * compiler/htcobgen.c, lib/fileio.c, test.code/config/COB.rules.in: + Correct a problem with WRITE FROM + +2002-04-02 18:51 ferranp + + * compiler/htcobemt.c, compiler/htcobgen.c, lib/Makefile.in, + lib/Makefile.mingw, lib/htcoblib.h, lib/scr_curses.c, + lib/screenio.c, lib/screenio.h: Separate all the functions related + to curses on a file. Correct a bug displaying GROUP fileds in + curses. BLANK SCREEN now uses colors. + +2002-04-01 19:06 andrewcza + + * lib/fileio.c: Fixed a bug in Rewrite for Sequential IO + +2002-04-01 04:53 bgiroud + + * compiler/htcobgen.c, compiler/htcobol.y, test_suite/Makefile, + test_suite/nist/nist.rpt, test_suite/nist/nist_IX.rpt, + test_suite/nist/nist_NC.rpt, test_suite/nist/nist_NC_prev.rpt: + Corrected the behavior of one format of DIVIDE statement. Corrected + the generation of READ when used sequentially. + +2002-03-30 23:12 dessex + + * ChangeLog, INSTALL, STATUS, configure, configure.in, + cobpp/Makefile.in, cobpp/cobpp.c, cobpp/cobpp.h, cobpp/parser.y, + cobpp/scanner.l, cobpp/test.code/ft1.cob, cobpp/test.code/ft2.cob, + cobpp/test.code/r.sh, cobpp/test.code/t2.cob, + cobpp/test.code/t3.cob, test_suite/nist/Makefile: Updated + pre-processor and added code to handle tabs, inline comments, + concatination. Updated ChangeLog and configure script files. + +2002-03-29 14:23 whydoubt + + * STATUS, lib/strings.c: Out-of-bounds bug fix to STRING statement. + +2002-03-27 04:22 bgiroud + + * compiler/htcobemt.c, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htcoboly.h, test_suite/nist/IX.idx, + test_suite/nist/nist.rpt, test_suite/nist/nist_IX.rpt, + test_suite/nist/nist_NC.rpt: Phase I of declaratives semantics. + +2002-03-24 13:53 ferranp + + * lib/screenio.c: Correct bugs on screenio. + +2002-03-23 16:23 whydoubt + + * lib/strings.c: Corrected small bug in STRING statement. + +2002-03-22 05:26 bgiroud + + * compiler/htcobol.y, test_suite/nist/Makefile_trail.h, + test_suite/nist/nist.rpt, test_suite/nist/nist_IX.rpt, + test_suite/nist/nist_IX_prev.rpt, test_suite/nist/nist_NC.rpt, + test_suite/nist/nist_prev.rpt: End of declaratives syntax (I hope). + Small correction for search. + +2002-03-21 19:37 andrewcza + + * STATUS, TODO, test.code/Readme.txt, test.code/esql/Readme: Update + some Status files to reflect the availability of Embedded SQL. + +2002-03-21 16:19 bgiroud + + * compiler/htcobol.y, test_suite/nist/nist_IX.rpt: Phase II of + declaratives: grammar is OK. The tests behind i/o statements are + still to be implemented. + +2002-03-19 03:33 bgiroud + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/reswords.c, + lib/mcmath.c, test_suite/nist/IX.idx, test_suite/nist/Makefile_IX, + test_suite/nist/Makefile_NC, test_suite/nist/Makefile_head.h, + test_suite/nist/Makefile_trail.h, test_suite/nist/NC.idx, + test_suite/nist/Readme.txt, test_suite/nist/make_pop_linux.txt, + test_suite/nist/nist.rpt, test_suite/nist/nist_IX.rpt, + test_suite/nist/nist_IX_prev.rpt, test_suite/nist/nist_NC.rpt, + test_suite/nist/nist_NC_prev.rpt, test_suite/nist/nist_prev.rpt, + test_suite/nist/xtr_rpt.sh: Phase I of declaratives. Enhancements + for the NIST test suite. Correction of level-88 bug. + +2002-03-15 13:01 andrewcza + + * test.code/esql/: esql.list.ecob, esql.trans.ecob: Update examples + to demonstrate BASED ON and HOST VARIABLES. + +2002-03-13 19:50 ferranp + + * lib/screenio.c: Correct bug of accept line/position. + +2002-03-12 23:01 andrewcza + + * test.code/esql/: Build, Makefile.rollback, Makefile.trans, + esql.list.ecob, esql.rollback.ecob, esql.trans.ecob: Added More + examples using Transactions and Rollback + +2002-03-12 22:05 andrewcza + + * test.code/esql/: Makefile.create, Makefile.insert, Makefile.list, + Makefile.table, Readme: Update test code for Firebird Release 1.0 + +2002-03-08 18:51 dessex + + * compiler/: htcobol.y, htcobolrc.in, htglobals.c, htglobals.h: + Minor update to better document the grammar. More updates to main + compiler user options. + +2002-03-08 17:50 bgiroud + + * compiler/htcobemt.c, lib/fileio.c, lib/htcoblib.h, + test_suite/nist/make_pop_linux.txt: Corrected spurious lines in + line sequential writes, INVALID KEY tests and various parameters in + NIST test suite. + +2002-03-08 02:04 dessex + + * compiler/htcobemt.c, info/htcobol.man, info/htcobol_man.html, + info/htcobolpp.man, info/htcobolpp_man.html: Updated htcobolpp + reference MAN and HTML files. Changed code generation label from + 'tiny_cobol_compiled' to 'tinycobol_compiled'. + +2002-03-07 15:57 ferranp + + * compiler/htcobemt.c, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htcoboly.h, lib/screenio.c: Screen section enhacementsw + and new features. Print all the DEBUG_COMPILER info on the source + file Some comments on the compiler. + +2002-03-06 09:08 dessex + + * AUTHORS, configure, configure.in, cobpp/AUTHORS, cobpp/cobpp.c, + cobpp/cobpp.h, cobpp/scanner.l, cobpp/test.code/ft1.cob, + cobpp/test.code/r.sh, cobpp/test.code/t1.cob, + compiler/htcobolrc.in, compiler/htglobals.c, compiler/htglobals.h: + Added preliminary code to support the 'D' type lines, include + source debugging line option. + +2002-03-05 23:31 andrewcza + + * test.code/esql/: Build, Makefile.list, esql.create.ecob, + esql.list.ecob: Added a example of a ESQL Program using EXEC SQL + FETCH + +2002-03-05 01:13 dessex + + * ChangeLog, compiler/htcobgen.c, compiler/htglobals.c: Updated + ChangeLog file. More updates to main compiler user options. + +2002-03-04 22:00 andrewcza + + * test.code/esql/: Build, Makefile.create, Makefile.insert, + Makefile.table, Readme, esql.create.ecob, esql.insert.ecob, + esql.table.ecob, fixit: Added example files for Firebird ESQL + Support. + +2002-03-04 20:48 ferranp + + * lib/: dyncall.c, rterrors.c, screenio.c: New error reporting, + code cleanup. + +2002-03-04 20:21 ferranp + + * lib/: dyncall.c, screenio.c: Some enhacements and code cleanup. + +2002-03-03 12:40 bgiroud + + * compiler/htcobemt.c, compiler/htcobgen.c, compiler/htcoboly.h, + compiler/htglobals.c, lib/cobmove_b_.c, test_suite/nist/nist.rpt, + test_suite/nist/nist_prev.rpt: Corrected signed binary to unsigned + display or binary move. Suppressed compile erreors with #ifdef + FIXME directives. + +2002-03-02 05:34 dessex + + * ChangeLog, configure, configure.in, compiler/Makefile.mingw, + compiler/htcobgen.c, compiler/htcobolrc.in, compiler/htglobals.c, + compiler/htglobals.h, info/Makefile.in, + info/rpm/tinycobol-0.00.spec, info/rpm/tinycobol.rpm4.spec: Updated + ChangeLog file. More updates to main compiler user options. + +2002-03-01 10:19 whydoubt + + * lib/cobmove.c, test_suite/nist/nist.rpt, + test_suite/nist/nist_prev.rpt: Significant changes to move_edited. + Should perform much more like is specified in standards. + +2002-02-27 20:17 ferranp + + * compiler/: htcobol.y, htglobals.c: More error reporting on the + parser. By default dissable the option of all calls dynamic. + +2002-02-26 14:37 whydoubt + + * lib/screenio.c: Simplified several loops. Introduced addch_set() + function, for accomplishing addch multiple times on the same + character. + +2002-02-26 13:45 ferranp + + * cobpp/scanner.l, compiler/htcobol.y, compiler/scan.l, + lib/dyncall.c: Error to preprocesoor that gives bad line numbers. + Debug files/lines on scanner. New errors reported. On dynamic + calls, search for a file named .so. + +2002-02-25 15:00 ferranp + + * compiler/htcobemt.c, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htglobals.c, compiler/htglobals.h, lib/screenio.c: Support + for non standard display at 9999/accept at 9999. A new compiler + option to treat all call statements on the program as dynamic + calls. + +2002-02-25 05:32 dessex + + * ANNOUNCE, ChangeLog, Makefile.in, configure, configure.in, + htconfig.0.h, htconfig.h.in, htconfig.mingw.h, tinycobol.lsm, + cobpp/cobpp.c, compiler/Makefile.in, compiler/htcobol.c, + compiler/htcobolrc.in, compiler/htglobals.c, compiler/htglobals.h, + test.code/Readme.txt, test.code/makrc: Updated ChangeLog file. + Added resource script to set the environment variables file. More + updates to main compiler user options. Updates for 0.57 release. + +2002-02-23 07:31 bgiroud + + * compiler/: htcobemt.c, htcobgen.c, htcoboly.h, reswords.c, + scan.l: Preliminary support of COMP-X and COMP-5. + +2002-02-21 17:24 whydoubt + + * lib/pictures.c: Making picCreate and picAppend check that they do + not run past the end of the buffer they are passed. + +2002-02-21 08:37 ferranp + + * compiler/: htcobgen.c, htcobol.y, reswords.c: Bug that make a + segmentation fault when initialize a field on a redefinition. + Using the cancel statement report only a warning. + +2002-02-20 16:58 ferranp + + * cobpp/scanner.l, lib/screenio.c: Bug on precompiler for copy + replacing on fixed format files. Accept from inkey (to get + keyboard status with curses) + +2002-02-18 14:21 ferranp + + * lib/htcoblib.h, lib/screenio.c, lib/screenio.h, + test.code/copybooks/screen.cpy: Changes on screenio to make it + easier to accept edited fields + +2002-02-17 23:04 whydoubt + + * compiler/htcobemt.c, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htcoboly.h, test_suite/nist/nist.rpt, + test_suite/nist/nist_prev.rpt: Allowing sign clause in group item + to be inherited by subordinate items. Moved some handling of usage + out of htcobol.y (parser) into htcobgen.c. + +2002-02-17 04:55 dessex + + * ChangeLog, Makefile.in, configure, configure.in, + compiler/Makefile.in, compiler/cobopt, compiler/htcobolrc.in, + compiler/htglobals.c, compiler/htglobals.h, + test_suite/cobol_test.pl: Updates to main compiler user options + defaults. Updated ChangeLog file. Added htcobolrc.in and updated + configure to generate user options defaults resource file. The + generated file htcobolrc replaces cobopt file as the user options + defaults resource file. Updated test_suite Perl script to use + TCOB_OPTIONS_PATH environment variable to set the resource file + location. + +2002-02-15 16:40 whydoubt + + * compiler/: htcobol.y, htcoboly.h, reswords.c: Aligning the method + used for getting the USAGE type. + +2002-02-15 12:43 whydoubt + + * compiler/htcobol.y: Reformatting and reorganizing a few rules. + +2002-02-15 10:43 bgiroud + + * compiler/htcobol.y, compiler/scan.l, lib/mcmath.c, + test_suite/test.baseline, test_suite/nist/nist.rpt, + test_suite/nist/nist_prev.rpt: Now accepts underscores in variable + names, doesn't choke anymore on GLOBAL clause, and a little + enhancement in arith precision. + +2002-02-15 07:53 dessex + + * compiler/: cobopt, htcobol.y, htglobals.c, htglobals.h: More + updates to main compiler user options. + +2002-02-13 20:26 ferranp + + * lib/screenio.c: Map cobol colors from standard to curses colors. + +2002-02-13 20:03 ferranp + + * lib/screenio.c: More screen updates and cleanup. + +2002-02-12 00:30 whydoubt + + * lib/cobmove_c_.c: Continuing move to 'pic' interface. + +2002-02-10 19:16 whydoubt + + * lib/screenio.c: Simplifying/improving performance of + free_scr_fields(). + +2002-02-10 15:04 ferranp + + * compiler/htcobemt.c, compiler/htcobgen.c, compiler/htcobol.y, + compiler/reswords.c, lib/screenio.c, lib/screenio.h: Preliminary + support for cusror clause on special names, as shown on COBOL 2001 + Draft. + +2002-02-10 13:45 bgiroud + + * compiler/htcobgen.c, test_suite/nist/nc.idx, + test_suite/nist/nist.rpt: Added support for subtract corresponding. + +2002-02-09 13:42 dessex + + * compiler/cobopt, compiler/htglobals.c, compiler/htglobals.h, + lib/basicio.c: Minor bug fix for ACCEPT (stdin) statement. More + updates to main compiler front end options. + +2002-02-09 00:35 whydoubt + + * compiler/: htcobemt.c, htcobgen.c: Fixed a problem in the + compiler with accepting to a indexed variable. + +2002-02-08 16:37 ferranp + + * lib/: screenio.c, screenio.h: Unify all the curses display/accept + to one. To make it easier to maintain. + +2002-02-08 01:43 whydoubt + + * compiler/htcobol.y: Fixed a break in the field_description rule + when opt_def_name is NULL. + +2002-02-07 14:33 ferranp + + * configure, configure.in, info/Makefile.in, lib/Makefile.in, + lib/screenio.c, lib/screenio.h: Bug that make the accept of screen + item crash. Begin screeio reorganization. Configuration and + makefiles for easy creation of debian packages. + +2002-02-06 10:25 whydoubt + + * lib/screenio.c: Fix to SCREEN processing. + +2002-02-06 05:39 dessex + + * compiler/: cobopt, htcobol.y, htglobals.c, htglobals.h: + Preliminary update to main compiler to auto detect required link + libraries. + +2002-02-05 17:21 bgiroud + + * compiler/htcobemt.c, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htcoboly.h, compiler/reswords.c, lib/mcmath.c, + test_suite/compile_tests/ctestp-subtract3.cob, + test_suite/nist/nc.idx, test_suite/nist/nist.rpt, + test_suite/nist/nist_prev.rpt, test_suite/nist/xtr_rpt.sh: Added + support for subtract corresponding. Preliminary work for RENAMES. + Applied the fix for qualified variables provided by Gerard Hollard. + +2002-02-05 05:33 dessex + + * ChangeLog, Readme.cygwin.txt, Readme.mingw32.txt, + compiler/Makefile.0, compiler/cobopt, compiler/htcobol.c, + compiler/htglobals.c, compiler/htglobals.h: Changed Cygwin version + to use the GNU GetOpt function. Updated ChangeLog file. + +2002-02-05 00:58 whydoubt + + * compiler/htcobgen.c: Fix for pic_save_char, when PIC contains + characters 0x80-0xFF. + +2002-02-03 01:35 whydoubt + + * lib/: cobmove_c_.c, mcmath.c, screenio.c: Removing some + now-unnecessary COMP-3 code. + +2002-02-02 15:40 whydoubt + + * compiler/: htcobgen.c, htcobol.y, htcoboly.h: Cleaned some + compiler code for PIC strings, and a problem with 'P' scaling. + +2002-02-01 23:35 whydoubt + + * compiler/htcobgen.c, lib/cobmove_9_.c, lib/cobmove_c_.c, + lib/mcmath.c: Continuing improvements to COMP-3 datatype: making + certain SIGN IS ... SEPARATE does not affect length. + +2002-02-01 04:09 bgiroud + + * compiler/htcobemt.c, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htcoboly.h, lib/cobmove.c, lib/htcoblib.h, + test_suite/nist/nist.rpt, test_suite/nist/nist_prev.rpt: Full + support for ADD CORRESPONDING ... ON SIZE ERROR. + +2002-02-01 00:52 whydoubt + + * compiler/htcobemt.c, compiler/htcobgen.c, lib/basicio.c, + lib/cobmove.c, lib/cobmove_b_.c, lib/cobmove_f_.c, + lib/cobmove_x_.c, lib/fileio.c, lib/general.c, lib/htcoblib.h, + lib/mcmath.c, lib/screenio.c, lib/strings.c: Switching method for + specifying datatype in most locations from '9','X',... to + DTYPE_DISPLAY,DTYPE_ALPHANUMERIC,... + +2002-01-31 10:13 whydoubt + + * lib/: basicio.c, cobmove.c, screenio.c: Fixes in display and + display_curses for decimal point placement and decimal point is + comma. + +2002-01-30 01:47 whydoubt + + * compiler/htcobemt.c, info/VarStructure.Info.txt, lib/basicio.c, + lib/cobmove.c, lib/cobmove_9_.c, lib/cobmove_b_.c, + lib/cobmove_f_.c, lib/cobmove_x_.c, lib/general.c, lib/htcoblib.h, + lib/mcmath.c, lib/pictures.c, lib/screenio.c, lib/strings.c, + test.code/t07/test07.cob, test_suite/nist/nist.rpt, + test_suite/nist/nist_prev.rpt: New pic* interface: picElemVal, + picElemLen, picCreate, picAppend, picReqLen. Fixes and + factorization of code in and relating to move_edited. + DECIMAL-POINT IS COMMA fix. + +2002-01-29 09:12 dessex + + * ANNOUNCE, AUTHORS, INSTALL, configure, configure.in, + cobpp/AUTHORS, cobpp/COPYRIGHT, compiler/htcobgen.c, + info/rpm/tinycobol-0.00.spec, info/rpm/tinycobol.rpm4.spec: Updates + for 0.56 release. More bug fixes for ADVANCING clauses in WRITE + statement. + +2002-01-28 00:57 dessex + + * ANNOUNCE, ChangeLog, STATUS, mwindows.h, cobpp/cobpp.h, + cobpp/scanner.l, compiler/htcobol.c, compiler/htglobals.h, + lib/fileio.c: More Win32 (Mingw32) updates. More bug fixes for + ADVANCING clauses in WRITE statement. Updates for 0.56 release. + +2002-01-27 04:39 dessex + + * cobpp/cobpp.c, cobpp/cobpp.h, cobpp/scanner.l, + cobpp/test.code/Makefile, cobpp/test.code/ft3.cob, + cobpp/test.code/r.sh, compiler/htcobgen.c, compiler/htcobol.c, + compiler/htcobol.y, compiler/htcoboly.h, compiler/htglobals.c, + compiler/htglobals.h, lib/fileio.c, test.code/config/COB.rules.in: + Update to accept a max of 1024 * 4 byte for include paths. More + bug fixes for ADVANCING clauses in WRITE statement. + +2002-01-25 11:08 dessex + + * compiler/htcobgen.c, compiler/htcobol.c, compiler/htglobals.c, + compiler/htglobals.h, test.code/config/COB.build.tmpl.in, + test.code/config/COB.build.tmpl.t.in: More compiler options + updates. preliminary bug fix for ADVANCING clauses in WRITE + statement. + +2002-01-25 03:21 dessex + + * ChangeLog, configure, configure.in, mwindows.h, tinycobol.lsm, + compiler/Makefile.in, compiler/htcobol.y, compiler/htglobals.c, + compiler/htglobals.h, compiler/reswords.c, info/Makefile.in: More + compiler options updates. Updated ChangeLog file. Separated WRITE + and RELEASE statements. + +2002-01-24 03:12 dessex + + * mwindows.h, cobpp/cobpp.c, compiler/htglobals.c, + compiler/htglobals.h, lib/mcmath.c: Minor Win32 (Mingw32) update. + +2002-01-24 02:28 whydoubt + + * lib/general.c, lib/htcoblib.h, lib/mcmath.c, + test_suite/nist/nist.rpt, test_suite/nist/nist_prev.rpt: Fixing + ROUNDED problems and related issues in the math routines. + +2002-01-24 01:30 whydoubt + + * test_suite/nist/: Makefile, Makefile_nc: Changing Makefiles in + NIST test suite directory to accommodate changes in compiler + options. + +2002-01-23 08:51 dessex + + * info/: Makefile.in, htcobf2f.man, htcobol.man, htcobol_man.html, + htcobolpp.man, htcobolpp_man.html: Updated htcobol and htcobf2f MAN + files. Added a MAN and HTML file for htcobolpp. + +2002-01-23 05:50 dessex + + * ChangeLog, compiler/cobopt, compiler/htcobol.c, + compiler/htcoboly.h, compiler/htglobals.c, compiler/htglobals.h, + info/htcobf2f_man.html, info/htcobol_man.html, + test.code/config/COB.rules.in, test_suite/cobol_test.pl: Main + compiler options update. Updated ChangeLog file. Updated man + files in HTML format. + +2002-01-21 02:28 whydoubt + + * compiler/htcobgen.c, compiler/htcobol.y, lib/strings.c, + test_suite/nist/nist.rpt, test_suite/nist/nist_prev.rpt: Updated + STRING statement: Fixed segmentation fault, POINTER IN, and + DELIMITED BY. + +2002-01-19 00:37 whydoubt + + * compiler/htcobol.y, lib/strings.c, test_suite/nist/nist.rpt, + test_suite/nist/nist_prev.rpt: Fixed UNSTRING statement. Fixed a + few rules where ON is optional. Fixed problem when NOT ON OVERFLOW + present, but ON OVERFLOW not present. + +2002-01-15 17:55 whydoubt + + * lib/: dyncall.c, fileio.c, general.c, htcoblib.h, mcmath.c, + rterrors.c, screenio.c, strings.c: Tightened up several loops and + removed some redundant code in the run-time library. + +2002-01-14 16:10 whydoubt + + * compiler/htcobemt.c, lib/basicio.c, lib/cobmove.c, + lib/cobmove_x_.c, lib/dyncall.c, lib/mcmath.c, lib/rterrors.c, + lib/screenio.c, lib/strings.c: Tightening the scope and changing + names for several global variables in the runtime library. + +2002-01-14 00:03 dessex + + * ChangeLog, compiler/Makefile.mingw, lib/strings.c, + test_suite/cobol_test.pl: Added gcc-2.96 patch update. + +2002-01-13 16:42 bgiroud + + * compiler/htcobemt.c, test_suite/nist/nist.rpt, + test_suite/nist/nist_prev.rpt: Yet another index correction. + +2002-01-11 10:26 bgiroud + + * compiler/Makefile.in, compiler/htcobemt.c, compiler/htcobgen.c, + compiler/htcoboly.h, compiler/htglobals.h, + test_suite/nist/nist_prev.rpt: Split htcobgen.c; all asm dependent + code goes into htcobemt.c. + +2002-01-10 21:14 dessex + + * lib/Makefile.in, lib/basicio.c, test_suite/nist/Readme.txt, + test_suite/nist/nc_exec85.pl, test_suite/nist/nc_extr.pl, + test_suite/nist/nc_report.pl, test_suite/nist/xtr_rpt.sh: Minor + update to NIST test suite. + +2002-01-09 02:19 whydoubt + + * lib/cobmove_9_.c, test_suite/nist/nist.rpt: Corrected accounting + for separate_sign in cob_move_9_b. + +2002-01-08 15:49 whydoubt + + * compiler/htcobgen.c, test_suite/nist/nist.rpt: Changed default + value of decimals from -1 to 0 (NC135A now passes). + +2002-01-08 13:29 ferranp + + * lib/general.c, lib/rterrors.c, lib/screenio.c, + test.code/Makefile.in, test.code/Readme.txt, + test.code/t34/Makefile, test.code/t34/aaaa.cob, + test.code/t34/bbbb.cob: Support for colors without color_set + (pdcurses/win32) Some support for chain on mingw32. Added CHAIN + examples. + +2002-01-08 09:49 whydoubt + + * compiler/htcobgen.c, test_suite/nist/nist.rpt: Fixed a problem + with some negative literals in the compiler. Fixed a problem with + the BLANK WHEN ZERO code in the compiler, that had been causing + pseudo-random segmentation faults in the NIST suite. + +2002-01-07 04:21 dessex + + * htconfig.h.in, htconfig.mingw.h, cobpp/Makefile.mingw, + compiler/Makefile.mingw, lib/Makefile.mingw, lib/htcoblib.h, + lib/rterrors.c, lib/strings.c: More Win32 (Mingw32) updates. + Removed min() function conflict found in Win32 (Mingw32). + +2002-01-05 08:57 dessex + + * ChangeLog, INSTALL, INSTALL.Win32, INSTALL.bin, README, + Readme.mingw32.txt, STATUS, configure, configure.in, htconfig.h.in, + mwindows.h, cobpp/Makefile.0, cobpp/Makefile.in, + compiler/Makefile.0, compiler/Makefile.in, compiler/htcobol.c, + lib/Makefile.0, lib/Makefile.in, lib/general.c, lib/ltdl.c, + lib/ltdl.h, test.code/maktc.bat, test.code/config/COB.rules.in, + test.code/t04/Makefile, test_suite/cobol_test.pl, + test_suite/nist/Readme.txt: # More Win32 (Mingw32) updates. # + Added preliminary version of generic dynamic load code. # Updated + to ChangeLog and some documentation files. + +2002-01-01 16:48 whydoubt + + * lib/: basicio.c, cobmove.c, dyncall.c, fileio.c, mcmath.c, + screenio.c, strings.c: Tightening the scope for several functions + in the library. + +2001-12-28 13:36 bgiroud + + * compiler/htcobgen.c, compiler/scan.l, test_suite/test.baseline, + test_suite/nist/nist.rpt: More index corrections. + +2001-12-23 17:42 bgiroud + + * compiler/htcobgen.c, compiler/htcobol.y, test_suite/nist/nc.idx, + test_suite/nist/nist.rpt, test_suite/search_tests/test20a.cob: More + corrections for indexes. + +2001-12-20 16:19 whydoubt + + * lib/: basicio.c, screenio.c: Removed a couple of unnecesary case + checks on PIC strings. Compiler already makes certain they are + uppercase. + +2001-12-19 11:51 whydoubt + + * lib/mcmath.c: Refining signedness changes to compare function. + +2001-12-19 04:12 bgiroud + + * compiler/htcobgen.c, lib/htcoblib.h, lib/mcmath.c, + test_suite/nist/Makefile_nc, test_suite/nist/nc.idx, + test_suite/nist/nist.rpt: Further corrections for the NIST + programs. + +2001-12-19 02:38 whydoubt + + * lib/: basicio.c, general.c, htcoblib.h, mcmath.c: Removed old + accept_env_var1 and accept_cmd_line1 functions. Refined pic + strings for generics. + +2001-12-17 16:31 ferranp + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/htcoboly.h, + compiler/reswords.c, lib/general.c: Fixes for bugs from the + previous commit. Preliminary CHAIN statement. + +2001-12-15 10:08 ferranp + + * lib/: rterrors.c, rterrors.h: New module on library to handle + runtime errors. + +2001-12-15 10:03 ferranp + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/reswords.c, + lib/Makefile.in, lib/screenio.c, lib/screenio.h: Some bugfixes and + cleanup. Preparing CHAIN statement. + +2001-12-14 05:07 bgiroud + + * compiler/htcobgen.c, lib/mcmath.c, test_suite/nist/nist.rpt: + Modified generic pic string to always have a counted byte for the + sign. + +2001-12-14 03:41 bgiroud + + * compiler/htcobgen.c, test_suite/nist.rpt, + test_suite/nist_prev.rpt, test_suite/nist/nc.idx, + test_suite/nist/nist.rpt, test_suite/nist/nist_prev.rpt, + test_suite/nist/xtr_rpt.sh: Another correction for NIST pgms + (getting indexed data in perform count). Further improvements in + NIST report tool. + +2001-12-13 23:22 whydoubt + + * lib/strings.c: Cleaned up some pointer math in + cob_inspect_replacing and cob_inspect_tallying. + +2001-12-12 20:15 whydoubt + + * lib/basicio.c: Documentation for accept_cmd_line and + accept_env_var. + +2001-12-12 18:30 whydoubt + + * lib/pictures.c: Hopefully improved mc_picexpand's code. + +2001-12-12 17:57 whydoubt + + * lib/: basicio.c, cobmove_9_.c, general.c, htcoblib.h, mcmath.c, + screenio.c: Corrected a subtle flaw in the logic of picCompLength. + +2001-12-12 15:50 whydoubt + + * lib/: cobmove.c, cobmove_9_.c, cobmove_b_.c, cobmove_c_.c, + cobmove_f_.c, cobmove_x_.c, general.c, htcoblib.h, mcmath.c: Made + the cobmove functions more internally consistent. Improved the + handling of signedness and type conversions in the library. + +2001-12-12 00:58 dessex + + * INSTALL.Win32, mwindows.h, compiler/htcoboly.h, + compiler/htglobals.c, lib/basicio.c, lib/general.c, lib/htcoblib.h, + lib/screenio.c, lib/strings.c: Update to Run-Time, main compiler + and PP code for Win32 support. + +2001-12-11 03:44 dessex + + * ChangeLog, compiler/htcobgen.c, compiler/htglobals.c: Updated + ChangeLog file. Update to main compiler code for Win32 support. + Both PP and compiler will now compile and run suing Mingw32. + +2001-12-10 14:29 dessex + + * cobpp/tcppversion.h.in: Updated pre-processor with version file. + +2001-12-08 14:50 bgiroud + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/htcoboly.h, + lib/mcmath.c, lib/screenio.c, test_suite/test.baseline, + test_suite/nist/Makefile, test_suite/nist/Makefile_nc, + test_suite/nist/Readme.txt, test_suite/nist/nc.idx, + test_suite/nist/nc_extr.pl, test_suite/nist/nist.rpt, + test_suite/nist/xtr_rpt.sh: Added tools to test NIST programs. + Modified usage of INDEX and long subscripts. + +2001-12-08 09:06 dessex + + * cobpp/Makefile.0, compiler/Makefile.0, compiler/Makefile.in, + compiler/htcobgen.c, compiler/htcobol.c, compiler/htcoboly.h, + compiler/reswords.c, compiler/reswords.h, compiler/scan.l: Compiler + directory files update. + +2001-12-06 03:52 dessex + + * test_suite/nist/: Makefile, mak.sh, nc_exec85.pl, nc_extr.pl: + Update to NIST test suite. + +2001-12-05 20:43 dessex + + * mwindows.h, cobpp/cobpp.c, cobpp/test.code/Makefile: Update to + pre-processor code for Win32. + +2001-12-05 04:59 dessex + + * compiler/: htcobgen.c, htglobals.c: Fix for renamed defines from + PGM_COMPILER to TCOB_PGM_COMPILER. + +2001-12-05 04:23 dessex + + * Makefile.in, configure, configure.in, mwindows.h, + cobpp/Makefile.in, cobpp/cobpp.c, cobpp/cobpp.h, + cobpp/createver.sh, cobpp/scanner.l, compiler/createver.sh, + compiler/htglobals.c, compiler/htversion.h.in: Added some + preliminary native Win32 support for Mingw32. Updated + pre-processor code. + +2001-12-05 04:04 bgiroud + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/htcoboly.h, + compiler/scan.l, lib/basicio.c, lib/cobmove.c, lib/htcoblib.h, + lib/mcmath.c, test_suite/nist.rpt, test_suite/nist_prev.rpt: Added + support for BLANK WHEN ZERO in compiler. Added GOBACK statement. + Corrected detection of pure numeric labels. + +2001-12-04 23:50 dessex + + * configure, configure.in, compiler/htcoboly.h, + test.code/copybooks/Makefile.in, test_suite/nist/Makefile, + test_suite/nist/Readme.txt, test_suite/nist/make_pop_linux.txt, + test_suite/nist/nc_exec85.pl, test_suite/nist/nc_extr.pl: Set Bison + and -g compile option as defaults in configure script. Added + preliminary version of NIST test suite. + +2001-11-30 17:04 ferranp + + * compiler/htcobgen.c, test.code/copybooks/screen.cpy: Permit + variable line/column/colors to be any kind of field. Some error + messages. Add screen.cpy to copybooks. + +2001-11-27 22:53 rpragana + + * compiler/htcobol.y: Changed again REDEFINES to allow any order of + the clauses. + +2001-11-27 22:06 rpragana + + * ChangeLog, compiler/htcobol.y: Change in parser to allow (again) + REDEFINES to work. + +2001-11-26 19:23 whydoubt + + * lib/mcmath.c: Improve behavior of fldtod and dtofld when dealing + with variables that have a separate sign and/or leading sign. + +2001-11-26 17:52 whydoubt + + * lib/cobmove_9_.c: Changes to cob_move_9_* functions to correct a + bug when converting from a number where SIGN IS TRAILING SEPARATE. + +2001-11-26 16:10 bgiroud + + * compiler/htcobgen.c, compiler/htcobol.y, lib/basicio.c, + lib/cobmove_9_.c, lib/cobmove_b_.c, lib/cobmove_f_.c, lib/fileio.c, + lib/strings.c, test_suite/nist.rpt: Phase II of INITIAL. Clean-up + to avoid warnings with -O2. + +2001-11-23 04:40 bgiroud + + * compiler/htcobol.y: Oops! Forgotten to remove trace. + +2001-11-23 04:33 bgiroud + + * compiler/: htcobgen.c, htcobol.y: Increased max number of char in + picture (standard says 50). + +2001-11-21 03:57 bgiroud + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/htcoboly.h, + compiler/scan.l, lib/fileio.c, lib/htcoblib.h, + test_suite/call_tests/ptest05.cob, + test_suite/call_tests/stest04.cob, + test_suite/call_tests/test.script: Phase I of INITIAL code. + Corrected PICTURE \n sequence bug in scan.l. + +2001-11-20 15:33 whydoubt + + * lib/: cobmove_9_.c, cobmove_c_.c, mcmath.c: Should now always + produce and store correct COMP-3 data. Allow to read correct + COMP-3 data, as well as most incorrect COMP-3 data (formerly) + occasionally produced by TC. + +2001-11-19 17:19 ferranp + + * cobpp/cobpp.c, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htglobals.c, compiler/scan.l, lib/screenio.c: Finish + screen section new features. Permit hexadecimal literals withe + x'..' (lowecase x). Add computational-x as computational (Not + standard but permited on some compilers). Permit path from + copifiles both with '\' or '/' as dir separator. + +2001-11-18 18:49 whydoubt + + * lib/cobmove_c_.c: Removed inconsistent implementation of SIGN + SEPARATE with USAGE COMP-3. + +2001-11-16 06:44 bgiroud + + * compiler/htcobgen.c: Removed WARNING issued when doing initial + values in REDEFINE'd groups. + +2001-11-15 14:59 ferranp + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/htcoboly.h, + compiler/scan.l, lib/htcoblib.h, lib/screenio.c, lib/screenio.h, + test.code/t23/test23b.cob: Variable Line/Column on screen section + (Phase II) Variable colors and new clause 'color' on screen + section. Modifies test23b to show the new features. + +2001-11-14 04:07 bgiroud + + * configure, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htcoboly.h, lib/general.c: Phase II of switches (SW1 to + SW9 only for the time beeing). + +2001-11-12 00:58 dessex + + * compiler/htcobol.y: Updated FD entry with 'RECORD CONTAINS n + CHARACTERS' clause. + +2001-11-09 14:45 dessex + + * configure, configure.in: Removed -O2 compile option from + configure script. + +2001-11-09 00:30 dessex + + * cobpp/: scanner.l, test.code/Makefile, test.code/r.sh: Fixed + format continuation and (single and double) quote PP update. + +2001-11-06 17:52 dessex + + * configure, configure.in: Configure option 'debug' bug fix. + +2001-11-05 16:05 ferranp + + * test.code/t23/test23b.cob: An example file for variable + line/column on screen section. + +2001-11-05 15:54 ferranp + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/htcoboly.h, + compiler/scan.l, test.code/t23/Makefile: Changes to support + variable line/column on screen section. + +2001-11-05 04:35 dessex + + * cobpp/: parser.y, scanner.l, test.code/Makefile, + test.code/ft3.cob, test.code/r.sh, test.code/t3.cob: Updated PP + with REPLACE statement fix. + +2001-11-04 17:08 bgiroud + + * cobpp/scanner.l, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htcoboly.h, compiler/scan.l, + test_suite/call_tests/ptest04.cob: Phase II of switches. Correction + of the OFF keyword disappearing. + +2001-11-03 03:34 dessex + + * configure, configure.in: Bug fix in configure script. + +2001-11-03 02:25 dessex + + * configure, configure.in, lib/Makefile.in: Updated configure + script to handle multiple versions library DB and compilers. + +2001-10-31 10:15 dessex + + * configure, configure.in, htconfig.0.h, htconfig.h.in, + lib/htcoblib.h: Added debug move-rts configure script option. + +2001-10-29 14:25 bgiroud + + * compiler/htcobol.y, compiler/scan.l, lib/htcoblib.h, + test_suite/nist.rpt: Phase I of switches and alphabet. + +2001-10-29 14:19 dessex + + * lib/screenio.c, utils/cobf2f/cobf2f.c, utils/cobf2f/cobf2f.h, + utils/cobf2f/scanner.l: Updated COPYRIGHT information for PP. + Updated screenio.c includes for Cygwin. + +2001-10-28 23:51 dessex + + * ANNOUNCE, BUGS, COPYRIGHT, ChangeLog, TODO, configure, + configure.in, htconfig.0.h, tinycobol.lsm, cobpp/COPYRIGHT, + cobpp/cobpp.c, cobpp/cobpp.h, cobpp/parser.y, cobpp/scanner.l, + compiler/htcobgen.c, compiler/htcobol.y, compiler/htcoboly.h, + compiler/htconfig.0.h, compiler/htglobals.c, compiler/htglobals.h, + compiler/scan.l, info/rpm/tinycobol-0.00.spec, + info/rpm/tinycobol.rpm4.spec, lib/basicio.c, lib/cobmove.c, + lib/cobmove_9_.c, lib/cobmove_b_.c, lib/cobmove_c_.c, + lib/cobmove_f_.c, lib/cobmove_x_.c, lib/dyncall.c, lib/fileio.c, + lib/general.c, lib/htcoblib.h, lib/mcmath.c, lib/pictures.c, + lib/screenio.c, lib/screenio.h, lib/strings.c, + test.code/Readme.txt, test.code/t23/test23a.cob: Updated COPYRIGHT + information. Updated ChangeLog and other changes relating to new + release. Updated the default htconfig.h file. Changed screen + status to CRT as per COBOL 200x draft. + +2001-10-26 04:56 bgiroud + + * compiler/htcobol.y, compiler/scan.l, lib/cobmove_9_.c, + lib/mcmath.c, test_suite/nist.rpt: Further corrections to move and + math routines for NIST programs. + +2001-10-26 00:50 dessex + + * AUTHORS, configure, configure.in, htconfig.h.in, lib/htcoblib.h, + lib/screenio.c, test.code/t00/teste.cob: Updated configure script + to handle multiple versions library DB. + +2001-10-24 03:16 bgiroud + + * compiler/htcobgen.c, lib/cobmove_f_.c, lib/htcoblib.h, + lib/mcmath.c, test_suite/nist.rpt, test_suite/test.baseline: + Corrected behavior of multiple MULTIPLY ... BY. Added first NIST + report. + +2001-10-23 23:18 dessex + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/scan.l, + lib/screenio.c, lib/screenio.h, test.code/t23/Makefile, + test.code/t23/test23a.cob: Updated screen status and function keys + for screenIO. Patch submitted by Ferran Pegueroles. + +2001-10-23 18:29 dessex + + * lib/: cobmove_9_.c, cobmove_b_.c, cobmove_c_.c, cobmove_f_.c: + More bug fixes in new MOVE Run-Time routines. + +2001-10-22 06:09 bgiroud + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/htcoboly.h, + compiler/scan.l, lib/cobmove.c, lib/cobmove_9_.c, lib/cobmove_b_.c, + lib/cobmove_f_.c, lib/cobmove_x_.c, lib/htcoblib.h, lib/mcmath.c: + Several changes to better support P's in picture. Renamed + implied_zeros for pscale to better indicate the purpose. + +2001-10-21 12:25 dessex + + * ChangeLog, lib/basicio.c, lib/cobmove.c, lib/cobmove_9_.c, + lib/cobmove_b_.c, lib/screenio.c: Bug fixes in new MOVE Run-Time + routines. + +2001-10-15 03:27 dessex + + * compiler/htcobgen.c, compiler/htcoboly.h, info/Makefile.in, + lib/basicio.c, lib/cobmove_9_.c, lib/cobmove_b_.c, + lib/cobmove_c_.c, lib/cobmove_f_.c, lib/cobmove_x_.c, + lib/htcoblib.h, lib/mcmath.c, lib/screenio.c: Changed Run-Time Math + routines to truncate on an overflow condition when '[NOT] ON SIZE + ERROR' is not specified. + +2001-10-11 05:15 dessex + + * lib/mcmath.c, test_suite/test.baseline, + test_suite/compile_tests/ctest01c.cob, + test_suite/compile_tests/test.script: Bug fix in math Run-Time. + Minor update in test_suite. + +2001-10-05 05:43 bgiroud + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/htcoboly.h, + lib/cobmove.c, lib/cobmove_9_.c, lib/cobmove_x_.c, lib/htcoblib.h, + lib/mcmath.c: Corrected several bugs in the new cob_move_... + routines. Added one byte in the fld_desc struct to fully support + 'P' in pictures. + +2001-10-04 01:31 dessex + + * ChangeLog, compiler/htcobol.y: Updated DEBUGGING MODE clause to + turn on stabs generation. Updated ChangeLog file. + +2001-10-02 01:03 jmnoeth + + * lib/htcoblib.h: Changed the definitions for the cobmove routines + to reflect the broken out source code. Jim Noeth + +2001-10-02 01:03 jmnoeth + + * lib/Makefile.in: Changed to reflect the changes made for the + cobmove routines. + + Jim Noeth + +2001-10-02 00:51 jmnoeth + + * lib/cobmove_c_.c: Split out from the oringinal cobmove.c. This + routine handles moves where the source field is of type packed + decimal. + + Jim Noeth + +2001-10-02 00:51 jmnoeth + + * lib/cobmove_9_.c: Split out from the origininal cobmove.c, this + source handles all moves where the source field is of type display. + + Jim Noeth + +2001-10-02 00:51 jmnoeth + + * lib/cobmove_x_.c: Split out from cobmove.c, this routine handles + moves where the source field is of type alphanumeric. + + Jim Noeth + +2001-10-02 00:51 jmnoeth + + * lib/cobmove_f_.c: Split out from cobmove.c, this routine handles + moves where the source field is of type floating point. + + Jim Noeth + +2001-10-02 00:51 jmnoeth + + * lib/cobmove.c: Changed to split out the various source field + types into source files of the format cobmove_?_.c, where ? is '9', + 'b', 'c', 'f', 'x' for display, binary, packed decimal, floating + point and character. + + Also added logic to handle leading and trailing signs. + +2001-10-02 00:51 jmnoeth + + * lib/cobmove_b_.c: Split out from the original cobmove routine, + this source code handles moves where the source field is of type + binary (comp). + + Jim Noeth + +2001-09-21 08:42 dessex + + * compiler/: htcobgen.c, htcobol.y, htcoboly.h, scan.l: Bug fix for + variables error detect. Updated grammar to handle multi-line + IDENTIFICATION division clauses. Updated grammar to properly + handle the SOURCE/OBJECT COMPUTER clauses. + +2001-09-21 02:51 bgiroud + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/htcoboly.h, + compiler/scan.l, lib/mcmath.c: Replaced the OSE subroutines calls + by jumps to allow GO TO in them. Also, the rounding is now done + before the overflow checking. + +2001-09-17 17:30 dessex + + * compiler/: htcobgen.c, htcobol.y, scan.l: Bug fix for file + variables error detect. + +2001-08-18 04:54 knishida + + * compiler/htcobgen.c: Use push_immed where appropriate. + +2001-08-18 04:48 knishida + + * info/Makefile.in: Don't ask overwriting. + +2001-08-18 04:32 knishida + + * compiler/htcobgen.c: Remove unnecessary declarations. + +2001-08-17 21:07 knishida + + * compiler/htglobals.c: Initialize global variables. + +2001-08-17 05:38 knishida + + * compiler/: htcobgen.c, htcobol.y, htcoboly.h, htglobals.c, + htglobals.h, scan.l: Put original source file names and lines in + debugging stabs. The compiler no longer holds temporary + preprocessed files after compilation. + +2001-08-17 03:10 knishida + + * compiler/: htcoboly.h, htglobals.c, scan.l: Allocate the copy + file stack dynamically. Remove global variable + include_full_filename. + +2001-08-14 19:57 knishida + + * compiler/: htcobgen.c, htcobol.y, htcoboly.h: Fixed a + reduce/reduce conflict in READ statement. + +2001-08-11 21:09 dessex + + * ChangeLog, configure, configure.in, cobpp/Makefile.0, + compiler/Makefile.0, compiler/htcobgen.c: Updated reference + listings to handle long qualified variable names. Added default + Makefile for cobpp directory. Updated ChangeLog. + +2001-08-11 17:44 knishida + + * compiler/htcobgen.c: (spe_sy_x, spe_sy_9): Removed. Use + spe_sym_XX instead. (gen_init_str): Use gen_move for + initialization. + +2001-08-11 15:12 knishida + + * compiler/: htcobgen.c, htcoboly.h: (gen_init_str): Take only + three arguments. (memref, memrefat, memrefd): Take only one + argument. (MEMREF, MEMREFAT, MEMREFD): Removed. (memref2): + Removed. Use memref. + +2001-08-10 19:25 dessex + + * INSTALL, configure, configure.in, cobpp/Makefile.in, + cobpp/test.code/Makefile, compiler/Makefile.in, compiler/htcobol.y, + test.code/ReportGen/report.cob, test.code/t06/index01.cob, + test.code/t09/move-test.cob, test.code/t09/subscripts.cob, + test.code/t09/upro.cob, test.code/t09/var+perform.cob, + test.code/tdb02/tdb02.cob, test.code/tdb03/tdb03.cob, + test.code/tgui01/testgui01.cob, test.code/tgui01/testgui04.cob: + Updated configure script and Makefile.in files to handle Bison. + Removed REMARKS from test.code programs. + +2001-08-08 15:30 knishida + + * compiler/htglobals.c: New function init_env. Clean up + environment variables initialization. + +2001-08-08 14:29 knishida + + * compiler/htglobals.c: Remove turn_off_list_mode, + turn_on_list_mode, turn_off_xref, and turn_on_xref. Set global + variables directly. + +2001-08-08 14:21 knishida + + * compiler/: htglobals.c, htglobals.h: Define global variables in + htglobals.c, not in htglobals.h. Include htcoboly.h in + htglobals.c. Remove unnecessary external declarations. + +2001-08-08 14:17 knishida + + * compiler/htcoboly.h: Put `extern' in declarations. + +2001-08-06 16:41 knishida + + * cobpp/parser.y, compiler/htcobol.y: Allow compilation with using + Bison. + +2001-08-06 16:31 knishida + + * compiler/scan.l: Count "# ..." lines as real lines. + +2001-07-24 08:19 dessex + + * configure, configure.in, compiler/htcobol.y: Configure script + update, to handle yacc193. Updated grammar to handle DISPLAY ... + LINE/COLUMN clause. + +2001-07-23 17:33 bgiroud + + * lib/fileio.c: Forgotten the trace. + +2001-07-23 17:15 bgiroud + + * compiler/htcobgen.c, compiler/htcobol.y, lib/fileio.c, + lib/mcmath.c, test_suite/seqio_tests/seqio07.cob, + test_suite/seqio_tests/seqio08.cob: Corrected a few bugs regarding + moves and compares. Added 2 programs for SELECT OPTIONAL clause. + +2001-07-22 09:16 dessex + + * compiler/: htcobol.y, scan.l: Updated DISPLAY ... ERASE clause. + +2001-07-22 07:08 dessex + + * compiler/: htcobol.y, htcoboly.h, htglobals.c, scan.l: Updated + preprocessor spawn exit status to ensure job abort on error. + Updated scanner parser for SD entry and SORT ... INPUT/OUTPUT + clauses. Changed scanner parser for OPEN mode clauses, to use + seperate tokens. + +2001-07-21 19:18 dessex + + * compiler/htcobol.y, test.code/t09/test09.cob, + test.code/t14/test14a.cob, test.code/t14/test14b.cob, + test.code/t14/test14c.cob, test.code/t14/test14d.cob, + test.code/t15/test15.cob, test.code/t15/test15a.cob, + test.code/t15/test15e.cob, test.code/t15/test15i.cob, + test.code/t15/test15j.cob, test.code/t20/Makefile, + test.code/tdb01/tdb01.c, test.code/tdb01/tdb01a.cob: Removed milti + line statements for ID, in test programs. Bug fix for line number + error reporting. + +2001-07-21 08:27 dessex + + * compiler/htcobgen.c, compiler/htcoboly.h, test.code/t06/Makefile, + test.code/t07/Makefile, test.code/t12/Makefile, + test.code/t18/Makefile: Changed xrefrence listing to use qsort + function. + +2001-07-20 14:08 rpragana + + * ChangeLog, lib/mcmath.c: Temporary work-around for + cob_check_numeric, as refmoded variables have a NULL picture. + (Refmods should come with a valid picture.) + +2001-07-20 08:13 dessex + + * cobpp/scanner.l, compiler/htcobgen.c: Added sort to cross + refrence listing. Changed PP listing line multiplier to 1. + +2001-07-19 08:32 dessex + + * compiler/htcobgen.c, compiler/htcoboly.h, compiler/scan.l, + utils/cobf2f/cobf2f.h: Added variable cross refrence listing + report. + +2001-07-18 20:57 knishida + + * compiler/: htcobgen.c, htcobol.y, htcoboly.h: Allow ROUNDED + option in ADD/SUBTRACT CORR ... statements. + +2001-07-18 20:41 whydoubt + + * lib/: basicio.c, screenio.c: Some small additions to fix a couple + breaks caused by the recent changes to the fld_desc structure. + +2001-07-18 20:32 knishida + + * compiler/htcobol.y: Set HTG_RETURN_CODE in the default case in + yyerror. + +2001-07-17 00:35 dessex + + * compiler/htcobol.y: Updated parser error print routines. + +2001-07-16 19:13 knishida + + * lib/screenio.c: Remove unused variables _iDefAttr_ and _iDefPair_ + from cob_accept_screen(). + +2001-07-16 19:05 knishida + + * compiler/scan.l: Removed unnecessary variable `is'. + +2001-07-16 01:51 dessex + + * Makefile.in, configure, configure.in, info/Makefile.in, + info/rpm/tinycobol-0.00.spec, info/rpm/tinycobol.rpm4.spec: Added + RPM4 spec file, and man install makefiles. + +2001-07-16 00:34 bgiroud + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/htcoboly.h, + compiler/scan.l, lib/cobmove.c, lib/fileio.c, lib/htcoblib.h, + lib/mcmath.c, test_suite/cobol_test.pl, test_suite/test.baseline, + test_suite/perform_tests/perf04.cob, + test_suite/seqio_tests/test.script: Added support for OPTIONAL + files. Corrected get_index when negative. Updated test suite. + +2001-07-15 17:34 dessex + + * AUTHORS, configure, configure.in, htconfig.h.in, cobpp/cobpp.c, + cobpp/parser.y, cobpp/test.code/r.sh, compiler/htcobgen.c, + compiler/htcobol.y, compiler/scan.l: Updated FD entry with 'BLOCK + contains' and 'DATA record' clauses. Added more debug options to + the configure script. + +2001-07-13 10:12 rpragana + + * ChangeLog, compiler/htcobgen.c: Adjusted field length for + SEPARATE SIGN. + +2001-07-12 00:31 dessex + + * ANNOUNCE, AUTHORS, INSTALL.Win32, Readme.cygwin.txt, STATUS, + configure, configure.in, tinycobol.dsc, tinycobol.lsm: Version 0.54 + update. + +2001-07-12 00:31 dessex + + * compiler/htcobgen.c: Release 0.54 update. + +2001-07-10 23:26 dessex + + * info/: debian/README.Debian, debian/changelog, debian/copyright, + debian/rules, rpm/tinycobol-0.00.spec: Release 0.54 update. + +2001-07-09 01:42 dessex + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/htcoboly.h, + compiler/scan.l, lib/mcmath.c: Updated READ statement with full + '[NOT] AT END' clauses. Removed RETURN statements and NEXT, + PREVIOUS clauses from READ statement. Added full RETURN statement + syntax to grammar. Removed duplicate 'binFldSize' function from + run-time. + +2001-07-06 17:35 bgiroud + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/htcoboly.h, + test_suite/perform_tests/perf04.cob, + test_suite/perform_tests/test.script: Added check of loop counter + for PERFORM gname TIMES. + +2001-07-04 01:51 bgiroud + + * compiler/htcobgen.c, compiler/htcoboly.h, compiler/scan.l, + lib/fileio.c: Corrected spurious FS error in cob_write_adv. + Cleaned up a bit init code. Added first draft of table of + intrinsics. + +2001-07-04 00:12 rpragana + + * ChangeLog, lib/mcmath.c: Fixed bug with the new struct fld_desc + members. + +2001-07-03 11:42 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htcoboly.h, lib/htcoblib.h: Added syntax for [SIGN IS] + {LEADING/TRAILING} [SEPARATE] in variable definition. + +2001-07-03 05:07 knishida + + * test_suite/search_tests/test20a.cob: New test for multiple WHEN + clauses. + +2001-06-29 04:15 knishida + + * compiler/htcobol.y: Allow CONTINUE in search_when_statement. + +2001-06-28 11:08 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htcoboly.h, test.code/ReportGen/report.cob, + test.code/t25/test25.cob, test.code/t25/test25a.cob: Removed bug + with GO TO inside EVALUATE statement. (Thanks David Essex for + pointing a solution) + +2001-06-28 00:38 whydoubt + + * lib/screenio.c: Correct a small bug in accept_curses in + lib/screenio.c. + +2001-06-28 00:26 rpragana + + * ChangeLog, compiler/htcobol.y: Fixes for field_description + parsing and redefines. (Thanks Keisuke Nishida for reporting that) + +2001-06-27 22:25 knishida + + * compiler/htcobol.y: Allow multiple statements in + search_opt_at_end. + +2001-06-27 19:53 knishida + + * lib/dyncall.c: (cob_resolve_subr): Remove unnecessary spaces from + subroutine name. + +2001-06-27 18:29 knishida + + * compiler/htcobol.y: Recover from errors by `.' at + `procedure_decl', not at `statement'. + +2001-06-27 17:23 knishida + + * compiler/htcobol.y: Allow multiple WHEN clauses in SEARCH. + +2001-06-27 00:41 knishida + + * compiler/htcobol.y: [no log message] + +2001-06-27 00:17 knishida + + * compiler/htcobol.y: Bug fix again.. Accept SUBSCVAR in + redefines_clause. + +2001-06-27 00:13 knishida + + * test_suite/format_tests/test06a.cob: Test for redefines of occurs + tables. + +2001-06-26 23:43 knishida + + * compiler/htcobol.y: Use unqualified_var instead of variable in + redefines_clause. + +2001-06-26 23:19 knishida + + * compiler/htcobol.y: Support [NOT] INVALID KEY clauses correctly + in READ statements. + +2001-06-26 22:31 knishida + + * compiler/htcobol.y: Allow conditional statements (i.e., CONTINUE, + etc.) in WHEN cases. + +2001-06-26 22:08 knishida + + * compiler/htcobol.y: Use `variable' instead of `VARIABLE' in + redefines_clause. + +2001-06-26 21:04 knishida + + * compiler/htcobol.y: Exit/stop-run statements clean up. + +2001-06-26 20:59 knishida + + * compiler/htcobol.y: Go to statement clean up. + +2001-06-26 20:00 knishida + + * compiler/htcobol.y: Delete/start statements clean up. + +2001-06-26 19:52 knishida + + * compiler/htcobol.y: Rewrite statement clean up. + +2001-06-26 19:40 knishida + + * compiler/htcobol.y: Write statement clean up. + +2001-06-26 19:36 knishida + + * compiler/htcobol.y: Read statement clean up. + +2001-06-26 19:17 knishida + + * compiler/htcobol.y: Move statement clean up. + +2001-06-26 19:14 knishida + + * compiler/htcobol.y: Compute/add/subtract statements clean up. + +2001-06-26 19:03 knishida + + * compiler/htcobol.y: Multiply statement clean up. + +2001-06-26 18:57 knishida + + * compiler/htcobol.y: Devide statement clean up. New function + `assert_numeric_sy'. + +2001-06-26 18:36 knishida + + * compiler/htcobol.y: Accept statement clean up. + +2001-06-26 18:14 knishida + + * compiler/htcobol.y: Display statement clean up. + +2001-06-26 18:01 knishida + + * compiler/htcobol.y: Close statement clean up. + +2001-06-26 17:58 knishida + + * compiler/htcobol.y: Open statement clean up. + +2001-06-26 16:47 dessex + + * cobpp/cobpp.c, cobpp/scanner.l, compiler/htcobgen.c, + compiler/htcobol.y, compiler/htglobals.c, compiler/htglobals.h, + compiler/scan.l, test.code/t07/Makefile, test.code/t29/Makefile, + test.code/t33/Makefile, test_suite/compile_tests/ctest03.cob: Added + modified version of Keisuke Nishida's line directives patch. + Updated regression test for minimum division/statement + requirements. + +2001-06-26 14:40 knishida + + * compiler/: scan.l, htcobol.y, htcoboly.h: Break up the old + CONNECTIVE token into several distinct tokens. + +2001-06-25 23:30 rpragana + + * compiler/: htcobol.y, htcoboly.h: Removed reduce/reduce conflict + and updates of function prototypes in htcoboly.h. + +2001-06-25 16:51 knishida + + * compiler/htcobgen.c: Simplify push_selection_subject_copy. + +2001-06-25 16:41 knishida + + * compiler/htcobgen.c: Integrated subject_stack_size into + push_selection_subject_copy. + +2001-06-24 11:38 bgiroud + + * compiler/htcobgen.c: Corrected a bug in value_to_eax introduced + by cleanup warnings. + +2001-06-22 05:26 bgiroud + + * compiler/htcobgen.c, compiler/htcobol.y, lib/cobmove.c, + lib/mcmath.c, test_suite/cobol_test.pl, test_suite/test.baseline, + test_suite/condition_tests/cond01.cob, + test_suite/format_tests/test05a.cob: Added a routine to do + comparison of strings when all flag used. Suppressed special + all_literals. Cleaned-up the test suite. + +2001-06-21 15:52 knishida + + * compiler/htcobol.y: Clarified INVALID KEY sentences. + +2001-06-21 14:49 knishida + + * compiler/htcobol.y: KEY is optional in read_clauses. + +2001-06-21 14:49 knishida + + * compiler/htcobol.y: Allows multiple read clauses. + +2001-06-21 14:35 knishida + + * compiler/htcobol.y: Use `opt_at' in read_clauses. + +2001-06-21 08:32 knishida + + * compiler/htglobals.c: Use remove() instead of system("rm ..."). + +2001-06-21 05:15 knishida + + * cobpp/scanner.l: New macros DEBUG_RTN and DEBUG_RTN_NL. Replaced + regular calls to debug_rtn by them. + +2001-06-21 01:45 dessex + + * compiler/htglobals.h, test_suite/compile_tests/ctestws06.cob, + test_suite/compile_tests/test.script: Removed compiler warning from + htglobals.c. Added compile test to regression test suite for + floating point types. + +2001-06-21 00:00 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcoboly.h, + compiler/htglobals.h: Removed all warnings when compiling htcobol. + +2001-06-20 23:10 dessex + + * cobpp/Makefile.in, cobpp/cobpp.c, cobpp/cobpp.h, cobpp/scanner.l, + compiler/Makefile.in, compiler/htglobals.c: Removed most of '-Wall' + flag warnings. Removed '-Wall' flag from Makefiles for scanner and + parser generated code. + +2001-06-20 21:11 andrewcza + + * lib/fileio.c: + Fix a problem where Indexed IO was not returning a status 23 for + key not found. + +2001-06-20 19:54 dessex + + * cobpp/Makefile.in, compiler/Makefile.in, compiler/htcobgen.c, + compiler/htcobol.y, compiler/htcoboly.h, compiler/scan.l, + test_suite/call_tests/ptest01.cob, + test_suite/call_tests/ptest02.cob, + test_suite/call_tests/ptest03.cob, + test_suite/call_tests/ptest04.cob, + test_suite/call_tests/stest01.cob, + test_suite/call_tests/stest02.cob, + test_suite/call_tests/stest03.cob, + test_suite/compile_tests/ctest01a.cob, + test_suite/compile_tests/ctest01b.cob, + test_suite/compile_tests/ctest01c.cob, + test_suite/compile_tests/ctest01d.cob, + test_suite/compile_tests/ctest01e.cob, + test_suite/compile_tests/ctest04.cob, + test_suite/compile_tests/ctest05.cob, + test_suite/compile_tests/ctested01.cob, + test_suite/compile_tests/ctested02.cob, + test_suite/compile_tests/ctested03.cob, + test_suite/compile_tests/ctested04.cob, + test_suite/compile_tests/ctested05.cob, + test_suite/compile_tests/ctested06.cob, + test_suite/compile_tests/ctestfc01.cob, + test_suite/compile_tests/ctestfc02.cob, + test_suite/compile_tests/ctestp-open1.cob: Changed scanner/parser + logic for DIVISIONs to ANS COBOL 85 standard. Added '-Wall' flag + to Makefiles. + +2001-06-20 17:55 whydoubt + + * lib/mcmath.c: Removed a line I meant for testing only + +2001-06-20 17:55 whydoubt + + * lib/mcmath.c: A little touch-up to lib/mcmath.c + +2001-06-19 02:45 dessex + + * lib/mcmath.c: Bug fix in RTS math routines to handle COMP + (binary) types sizes. + +2001-06-18 22:03 rpragana + + * ChangeLog, compiler/htcobgen.c: Removed bug with subscript + manipulations. (Thanks Alan-eurlix for reporting) + +2001-06-18 16:06 dessex + + * compiler/htcobol.y, lib/basicio.c, lib/cobmove.c, lib/htcoblib.h, + test_suite/Makefile: Updated RTS move routines to handle COMP-1/2 + floating point types. + +2001-06-18 06:24 knishida + + * compiler/scan.l: Changed "END-STRINGCMD" to "END-STRING". + +2001-06-14 06:07 knishida + + * compiler/htcobgen.c: Fixed a bug in gen_subscripted() that + overwrote %eax. + +2001-06-14 00:59 dessex + + * compiler/htcobol.y, compiler/scan.l, lib/cobmove.c: Added support + for FLOAT-LONG (COMP-2), FLOAT-SHORT (COMP-1) floating point types. + Updated RTS relating to COMP-1/2 floating point types. + +2001-06-13 01:27 rpragana + + * ChangeLog, test.code/tdb01/Makefile, test.code/tdb01/tdb01.c, + test.code/tdb01/tdb01a.cob: Test for libdb with multiple indexes + and separate data/index files. + +2001-06-11 18:37 whydoubt + + * lib/: fileio.c, strings.c: ... cleaning ... restructuring ... + +2001-06-11 04:53 rpragana + + * ChangeLog, compiler/htcobgen.c: Fixed bug with performing a full + section, inserting gen_exit(0) at the end of each section. (Thanks + Keisuke for reporting this!) + +2001-06-10 12:59 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htcoboly.h, compiler/scan.l, lib/strings.c: Added + INSPECT...CONVERTING statement parsing/codegen (as requested by + Mariusz). + +2001-06-08 17:12 dessex + + * cobpp/scanner.l, compiler/htcobol.y: Pre-processor bug fix curtsy + of Keisuke Nishida. + +2001-06-06 22:13 rpragana + + * ChangeLog, compiler/htcobgen.c: Patch to allow WHEN ... ALSO ANY + in evaluate statement. Thanks Keisuke Nishida for the contribution. + +2001-06-06 19:22 whydoubt + + * lib/: basicio.c, dyncall.c, general.c, screenio.c: More cleaning + and restructuring... + +2001-06-06 08:23 dessex + + * lib/cobmove.c: Preliminary move routines from/to COMP-1/2 + floating point types. + +2001-06-05 13:23 dessex + + * compiler/htcobgen.c, compiler/htcoboly.h, + info/rpm/tinycobol-0.00.spec, lib/general.c, + test.code/copybooks/Makefile.in: Updates relating to COMP-1/2 + floating point types. + +2001-06-05 09:13 rpragana + + * ChangeLog, compiler/htcobgen.c: Quick fix in init_field_val() to + not initialize variables with a NULL sy->value. (eg: PROCEDURE + DIVISION USING ... variables ) + +2001-06-05 07:15 andrewcza + + * lib/fileio.c: + Change fileio.c to correctly return file status 22 for duplicate + keys. + +2001-06-04 20:25 whydoubt + + * lib/cobmove.c: Numerous little clean-ups, primarily to cob_move. + +2001-06-02 13:13 rpragana + + * ChangeLog, compiler/htcobgen.c: Removed bug with sch_convert(), a + function to truncate large literal strings in comments _only_! (it + was corrupting the actual string) + +2001-05-30 18:56 andrewcza + + * lib/fileio.c: + Fix fileio.c so that OPEN EXTEND works correctly. + +2001-05-30 18:09 rpragana + + * ChangeLog, compiler/htcobgen.c: Bug fix for picture length + calculation of large literals. + +2001-05-29 23:15 andrewcza + + * lib/fileio.c: + Fix Cob Write to make sure that the primary key is Unique and not + overwritten. + +2001-05-29 09:46 rpragana + + * ChangeLog, compiler/htcobgen.c: Small change to allow LINKAGE + SECTION variables in the main program. + +2001-05-29 09:11 dessex + + * Readme.cygwin.txt, STATUS, info/Compiler-Overview.txt, + info/rpm/tinycobol-0.00.spec: Updates to relating to version 0.53 + release. + +2001-05-29 01:21 dessex + + * ANNOUNCE, INSTALL.Win32, Makefile.in, STATUS, configure, + configure.in, tinycobol.dsc, tinycobol.lsm, info/htcobf2f.man, + info/htcobol.man, info/rpm/tinycobol-0.00.spec, + test_suite/compile_tests/test.script: Updates to relating to + version 0.53 release. + +2001-05-28 16:54 bgiroud + + * compiler/htcobgen.c: Changed refmod's attribute to 'G' so that + RTL doesn't crash in looking at pictures. Also, changed the + initialization of display vars to ALL ZERO. + +2001-05-28 13:50 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y: Fixes for + pictures with currency symbol. + +2001-05-28 07:25 dessex + + * compiler/htcobol.y, lib/cobmove.c, lib/general.c, lib/htcoblib.h, + lib/mcmath.c, test_suite/cobol_test.pl: Updates to math run-time + and regression test script. + +2001-05-27 11:24 dessex + + * compiler/htcobgen.c, compiler/htcobol.y, lib/mcmath.c: More + updates to COMP-1/2 floating point types. + +2001-05-27 08:11 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y, lib/mcmath.c: + Several changes to accomodate COMP-1/-2 types, complementing what + David Essex have done. + +2001-05-26 23:35 dessex + + * cobpp/scanner.l, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htcoboly.h, compiler/scan.l, info/Compiler-Overview.txt, + lib/cobmove.c, lib/htcoblib.h, lib/mcmath.c: Updates to COMP-1/2 + floating point types. + +2001-05-26 19:54 rpragana + + * ChangeLog, test_suite/cobol_test.pl: Remove -t switch from + test_suite perl script (as it was eliminated from the compiler). + +2001-05-26 02:50 whydoubt + + * lib/basicio.c: Changed accept_time, adding two characters for + hundredths of a second, so that the ACCEPT FROM TIME call meets + standards. The characters are simply being set to zeroes, but this + is acceptable by the standards. + +2001-05-26 02:01 whydoubt + + * lib/: basicio.c, cobmove.c, mcmath.c, strings.c: A little + cleaning and straightening, mainly to lib/basicio.c and + lib/cobmove.c. + +2001-05-24 22:41 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/scan.l: Better error + reporting and removed core dump in large tokens detection. + +2001-05-24 21:54 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/scan.l, + utils/htcobviscomp.tcl: Fixed serious buffer overflow in scanning + literals. Changes in viscomp.tcl to use temp.XXXX.cob preprocessed + source, instead of original. + +2001-05-24 08:11 dessex + + * compiler/htcobol.y, compiler/htcoboly.h, compiler/htglobals.c, + compiler/scan.l, lib/pictures.c: Added COMP-1 (float 4 bytes) and + COMP-2 (double 8 bytes) floating point types (preliminary). + +2001-05-24 02:57 whydoubt + + * lib/: mcmath.c, pictures.c, strings.c: Extensive changes in + lib/mcmath.c and started documenting. Changes include reducing use + of global variables and 'pointer math'. Also simplified a number + of if else and other structures. Everthing should still work the + same as before. + +2001-05-22 09:03 dessex + + * compiler/htcobol.y, lib/fileio.c, lib/htcoblib.h, + test.code/t19/Readme.txt, test.code/t19/test19.cob, + test.code/t19/test19b.cob: Added the EXTERNAL clause in the SELECT + statement. + +2001-05-22 01:36 dessex + + * AUTHORS, Makefile.in, compiler/Makefile.in, compiler/htcobgen.c, + compiler/htcobol.y, compiler/htcoboly.h, compiler/htglobals.c, + compiler/htglobals.h, compiler/scan.l, lib/basicio.c, + lib/dyncall.c, lib/htcoblib.h, test.code/mak.sh, + test.code/t17/Readme.txt, test.code/t17/test17.cob: Updated ACCEPT + statement and Run-Time for command line and environment variables. + +2001-05-17 01:42 whydoubt + + * lib/mcmath.c: A small bit of straightening up the code in + lib/mcmath.c. + +2001-05-15 20:36 whydoubt + + * lib/mcmath.c: Removing some more stuff left over connected with + the cob_list structure. + +2001-05-15 15:29 whydoubt + + * lib/mcmath.c: Several small changes (none affecting operation) in + lib/mcmath.c. Primary reason: to remove cob_list related code, + which is not being used. + +2001-05-15 14:20 rpragana + + * ChangeLog, compiler/htcobgen.c: Changed to store all characters + in picture converted to uppercase. + +2001-05-15 01:54 bgiroud + + * compiler/htcobgen.c, test.code/t10/test10.cob: Corrected yet + another bug in INITIALIZE code. + +2001-05-15 01:07 whydoubt + + * lib/: basicio.c, cobmove.c, dyncall.c, fileio.c, general.c, + mcmath.c, pictures.c, screenio.c, strings.c: Adding comment section + before each library function in anticipation of documentation. + Also helps readability. No operational changes. + +2001-05-14 22:52 whydoubt + + * compiler/htcobgen.c, lib/Makefile.0, lib/Makefile.in: Simple + reduction in make process for shared version of library. + +2001-05-14 21:49 rpragana + + * compiler/: htcobgen.c, htcobol.y: Added implementations of ADD + CORR and SUBTRACT CORR. + +2001-05-14 01:01 rpragana + + * lib/: basicio.c, cobmove.c, screenio.c: Fixes for displaying + variables with 'P's in the picture. + +2001-05-13 20:19 rpragana + + * ChangeLog, compiler/htcobgen.c: Fixed bug with gen_subscripted() + (index/subscripting generation). + +2001-05-13 15:37 rpragana + + * compiler/htcobol.y, lib/screenio.c: Added options ERASE SCREEN, + ERASE LINE, to DISPLAY (curses version, with LINE...POSITION...). + As requested by Harold Norris. + +2001-05-13 14:50 rpragana + + * ChangeLog, compiler/htcobgen.c: Fixed trouble with symlen() + calculation for literals. + +2001-05-13 01:19 rpragana + + * ChangeLog, compiler/htcobgen.c, lib/basicio.c, + test.code/t29/Makefile: Fixed a problem with addressing at the + linkage section. Also re-fixed "display" library function (my + previous fix disapeared!). + +2001-05-13 00:04 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y: Bug fixes + with REDEFINES. Changed length of default POINTER picture. + +2001-05-12 23:40 dessex + + * lib/: basicio.c, dyncall.c: Cleaned code in Run-Time library. + +2001-05-12 22:36 dessex + + * Makefile.0, Makefile.in, configure, configure.in, + compiler/Makefile.0, compiler/Makefile.in, compiler/htglobals.c, + compiler/htversion.h.in, lib/Makefile.0, lib/Makefile.in, + lib/basicio.c, lib/dyncall.c, test.code/t01/Makefile, + test.code/t07/Makefile, test.code/t16/Makefile, + test.code/t17/Makefile, test.code/t24/Makefile, + test.code/t28/Makefile, test.code/t32/Makefile, + test.code/t33/Makefile, test.code/t33/Readme.txt, + test.code/t33/rt.sh: Added version to configure script. Separated + dynamic CALL from primary Run-Time into second library. + +2001-05-12 19:18 dessex + + * tinycobol.dsc: Added Debian description file. + +2001-05-12 19:08 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htcoboly.h, compiler/scan.l, lib/basicio.c, lib/cobmove.c, + lib/mcmath.c: Added types BINARY-CHAR, BINARY-SHORT, BINARY-LONG + and BINARY-DOUBLE. They are distinct from COMP types. + +2001-05-12 17:53 dessex + + * info/debian/: README.Debian, changelog, control, copyright, + cron.d.ex, dirs, docs, emacsen-install.ex, emacsen-remove.ex, + emacsen-startup.ex, ex.doc-base.package, init.d.ex, manpage.1.ex, + menu.ex, postinst.ex, postrm.ex, preinst.ex, prerm.ex, rules, + watch.ex: Added Debian scripts and information files. + +2001-05-12 01:13 rpragana + + * compiler/htcobgen.c: Eliminated a few bugs with linkage section + variables address computations. + +2001-05-11 23:01 rpragana + + * lib/strings.c: More bug fixes for UNSTRING statement. + +2001-05-11 21:39 rpragana + + * ChangeLog, lib/strings.c: Fixed bug with pointer in unstring. + +2001-05-11 21:27 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htcoboly.h, test.code/t00/teste.cob: Fixed bug with + variables that would need qualification. + +2001-05-11 17:21 bgiroud + + * compiler/htcobgen.c, compiler/htcobol.y, + test_suite/test.baseline, test_suite/format_tests/test05a.cob, + test_suite/format_tests/test05b.cob, + test_suite/idxio_tests/idxio03.cob: Differentiate between Fig. + Const. and ALL Fig. Const. + +2001-05-11 10:19 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y, + compiler/scan.l: Added statements fo prototyping new statements + under TC. Small fix with stabs. + +2001-05-10 17:49 rpragana + + * compiler/htcobgen.c, test.code/t07/Makefile: More changes to + allow us to refer to another source file (gdb) as in: (gdb) b + temp.010154.cobsub.cob:36 to setup a breakpoint in line 36 of that + cobol file. It would be far more interesting if the preprocessor + made its output sources like "cobsub.cb1" for instance. + +2001-05-10 15:49 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y, + compiler/scan.l, test.code/t01/Makefile, test.code/t07/Makefile: + Changes to allow a better interface with gdb. Introduced a TOKDUMMY + to mark the end of each statement (read comments in htocobl.y). + +2001-05-10 00:49 rpragana + + * compiler/htcobgen.c: Modifications to allow gdb work with cobol + compiled programs. + +2001-05-09 23:01 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y, + test.code/t16/Makefile: Made optional the ON in "GO TO DEPENDING + ON". Other small fixes. + +2001-05-09 10:23 rpragana + + * ChangeLog, lib/screenio.c, test.code/t24/Makefile, + test.code/t28/Makefile, test.code/t32/Makefile, + test.code/t33/rt.sh: Changes in accept_curses() (RM/Cobol + compatible version), for justifying right. + +2001-05-09 00:44 dessex + + * lib/basicio.c, test.code/t33/Makefile, test.code/t33/Readme.txt, + test.code/t33/dyntest.cob, test.code/t33/rt.sh: Updated tests for + dynamic CALL statement. + +2001-05-08 21:18 dessex + + * AUTHORS, lib/basicio.c, test.code/Readme.txt, + test.code/t33/Makefile, test.code/t33/Readme.txt, + test.code/t33/rt.sh: Added run script and information file. + +2001-05-08 11:59 rpragana + + * lib/basicio.c, test.code/t33/dyntest.cob: Optimization of our + dynamic CALL to not search again what was searched before. + +2001-05-08 10:01 rpragana + + * ChangeLog, lib/mcmath.c, test.code/t17/Makefile: Yet a change in + cob_check_numeric() for PIC X(nn) with a number right padded with + spaces. + +2001-05-08 09:01 rpragana + + * lib/: basicio.c, fileio.c: Changes in cob_resolve_subr() to have + libraries to be search in COB_LIBS. Modified #ifdef + WANT_DYNAMIC_LIBS to WANT_ALL_DYNAMIC_LIBS for all other libraries, + except for dynamic calls (CALL ). + +2001-05-07 22:38 swconnolly + + * test.code/t25/rt.sh, test_suite/cobol_test.pl: Added -ldl to + cobol_test suite, for all compiled programs. Should not affect + things if not required + +2001-05-07 16:37 rpragana + + * ChangeLog, lib/mcmath.c: Removed bug in cob_check_numeric() when + the sumber have an embedded sign (one character from + "}ABCDEFGHI{JKLMNOPQR"). + +2001-05-07 15:48 rpragana + + * lib/basicio.c, test.code/t33/Makefile, test.code/t33/dyntest.cob, + test.code/t33/subrots.cob: Changes again in cob_resolve_subr() to + search first at the libraries linked with our object program. + +2001-05-07 15:01 rpragana + + * ChangeLog, compiler/htcobgen.c, lib/basicio.c: Changes to try + making cob_resolve_subr() work. (blindly!) + +2001-05-07 10:58 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htcoboly.h, lib/basicio.c: Modified CALL + {NOT} ON EXCEPTION/OVERFLOW to execute on the condition + was not found in libraries. + +2001-05-06 22:05 rpragana + + * compiler/htcobol.y, test.code/t33/Makefile: Added ON OVERFLOW and + {NOT} ON EXCEPTION to the CALL statement. Both will execute the + sentence following the condition test if RETURN-CODE is (or NOT is) + zero in the called subroutine. (requested by David Essex) + +2001-05-06 20:49 rpragana + + * ChangeLog, lib/basicio.c: Fixed a short sized malloc() request in + cob_resolve_subr(). + +2001-05-06 18:39 rpragana + + * ChangeLog, lib/basicio.c, test.code/t33/Makefile: Small changes + to try to find whe Alain's cob_resolve_subr() crashes. + +2001-05-05 20:30 rpragana + + * lib/basicio.c: New calling (runtime named subroutines) made + smarter, by storing the handles for previously opened libraries in + a list. This also speed up the search. (the list is never cleaned + up, though) + +2001-05-05 00:21 swconnolly + + * test.code/t20/Makefile, + test_suite/compile_tests/ctestp-read3.cob, + test_suite/compile_tests/ctestsl05.cob, + test_suite/compile_tests/ctestsl06.cob, + test_suite/compile_tests/ctestsl08.cob: fixes to certain test in + test_suite + +2001-05-05 00:09 rpragana + + * ChangeLog, compiler/htcobol.y, lib/screenio.c: Added JUST RIGHT + in accept_curses(). (as requested by Harold Norris) Removed AUTO + from ON EXCEPTION phrase (ACCEPT statement). + +2001-05-04 22:32 rpragana + + * lib/screenio.c: Correction for ERASE in accept_curses(). + +2001-05-04 21:54 rpragana + + * ChangeLog, lib/basicio.c: Modified cob_resolve_subr (call by name + resolving) to search (1) in current directory, (2) in all + directories listed in LD_LIBRARY_PATH (delimited by ":"). + +2001-05-04 12:31 rpragana + + * ChangeLog, lib/screenio.c: Changes for accept_curses() line + editing. + +2001-05-04 09:54 swconnolly + + * lib/cobmove.c: fixed move_edited + +2001-05-04 04:56 whydoubt + + * compiler/htcobgen.c, lib/basicio.c, lib/cobmove.c, lib/mcmath.c, + lib/pictures.c, lib/screenio.c: First step in cleaning up style. + From: int func ( x ) int x; { ... } To : int func ( int x ) { + ... } + +2001-05-04 04:05 whydoubt + + * compiler/: htcoboly.h, scan.l: Added SECURITY and INSTALLATION as + comment paragraphs available in the IDENTIFICATION DIVISION. + +2001-05-04 01:28 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y, + lib/basicio.c, lib/htcoblib.h, lib/screenio.c, + test.code/t33/dyntest.cob: Some cleaning of call by name. Fixes for + display_curses(). + +2001-05-03 16:38 bgiroud + + * compiler/htcobgen.c, test_suite/format_tests/test.script, + test_suite/format_tests/test08a.cob: Correction of INITIALIZE for a + struct with an elementary field with occurs. Addition of a test + program for UNSTRING. + +2001-05-03 15:52 rpragana + + * compiler/htcobgen.c, compiler/htcobol.y, lib/basicio.c, + test.code/t00/Makefile, test.code/t00/teste.cob, + test.code/t33/Makefile, test.code/t33/dyntest.cob, + test.code/t33/subrots.cob: Added call by name to cobol subroutines. + +2001-05-02 22:40 rpragana + + * lib/screenio.c: Modified again accept_curses() to limit input + field size. + +2001-05-02 22:20 rpragana + + * ChangeLog, lib/screenio.c: Added rudimentar line editing to + accept_curses() function. + +2001-05-02 21:31 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y, + lib/screenio.c: Changes in accept_curses() to allow ON EXCEPTION + for every non-printable key. No line editing yet. + +2001-05-01 13:03 dessex + + * utils/cobf2f/scanner.l: Bug fix in cobf2f to handle col 73-80. + +2001-05-01 01:02 dessex + + * compiler/htcobol.y, lib/Makefile.in, lib/basicio.c, + lib/htcoblib.h, lib/mccntrl.s, lib/mcfrlsf.c, lib/screenio.c, + test.code/t20/test20e.cob: Moved RLBUF_SIZE defines to htcoblib.h. + Updated conditional in SEARCH ALL statement. Updated sample test + code for SEARCH ALL conditional. Removed some unused files from + Run-Time library. + +2001-04-28 21:13 whydoubt + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/htcoboly.h, + compiler/scan.l, lib/basicio.c, lib/htcoblib.h: Changes made so + that these statements would work: ACCEPT variable FROM DAY. + ACCEPT variable FROM DAY-OF-WEEK. + +2001-04-27 13:45 swconnolly + + * test_suite/compile_tests/ctestp-search2.cob: Further updates to + tests + +2001-04-27 03:36 bgiroud + + * compiler/: htcobgen.c, htcoboly.h, scan.l: Corrected new value + scheme with fields subordinate to REDEFINES. Added detection of + special intrinsic LENGTH. + +2001-04-26 22:18 swconnolly + + * test_suite/format_tests/test07a.cob: Mods to test_suite + +2001-04-26 21:23 dessex + + * Readme.cygwin.txt, cobpp/scanner.l, cobpp/test.code/ft3.cob, + test.code/t03/test03.cob: Preprocessor bug fix. Added sample test + in for hex VALUE clause. + +2001-04-26 11:10 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y, + compiler/scan.l: Added EJECT, SKIPx (as comments). Modified SEARCH + ALL to accept subscripted variables in WHEN clause. Other minor + fixes. + +2001-04-26 09:41 rpragana + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/htcoboly.h, + compiler/scan.l, lib/mcmath.c: Added code for allowing an arbritary + hex string (eg: X'000012A5'). TODO: check previously defined + literals, to avoid duplicates. (must check "all" and sign too) + +2001-04-26 01:57 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/scan.l: Modified to + allow general X"" and X'' of any length for + VALUEs. + +2001-04-26 00:35 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y, + compiler/scan.l: Changes for allowing a numeric-only label + (paragraph/section). Also some changes for optional keywords in + several places, and introduction of the LENGTH OF operator in MOVE + statements (MOVE LENGTH OF A TO B). Code generation for this last + yet pending. + +2001-04-24 22:32 rpragana + + * compiler/htcobol.y: Added optional separator (comma) to + label_list non-terminal. Affects GO TO .. DEPENDING ON... + +2001-04-24 21:41 dessex + + * ANNOUNCE, AUTHORS, INSTALL, README, STATUS, configure, + configure.in, htconfig.h.in, tinycobol.lsm, cobpp/cobpp.c, + cobpp/cobpp.h, compiler/createver.sh, compiler/htglobals.c, + compiler/htglobals.h, info/rpm/tinycobol-0.00.spec, + test.code/Readme.txt, test.code/mak.sh, + test.code/ReportGen/Makefile, test.code/ReportGen/report.cob, + test.code/config/COB.build.tmpl.in, + test.code/config/COB.build.tmpl.t.in, test.code/t00/Makefile, + test.code/t00/Readme.txt, test.code/t00/r.sh, + test.code/t01/Makefile, test.code/t01/Readme.txt, + test.code/t01/r.sh, test.code/t02/Makefile, + test.code/t02/Readme.txt, test.code/t02/r.sh, + test.code/t02/test02.cob, test.code/t03/Makefile, + test.code/t03/Readme.txt, test.code/t03/r.sh, + test.code/t04/Makefile, test.code/t04/Readme.txt, + test.code/t04/r.sh, test.code/t05/Makefile, + test.code/t05/Readme.txt, test.code/t05/r.sh, + test.code/t06/Makefile, test.code/t06/Readme.txt, + test.code/t06/r.sh, test.code/t07/Makefile, + test.code/t07/Readme.txt, test.code/t07/r.sh, + test.code/t08/Makefile, test.code/t08/Readme.txt, + test.code/t08/r.sh, test.code/t09/Makefile, + test.code/t09/Readme.txt, test.code/t09/r.sh, + test.code/t10/Makefile, test.code/t10/Readme.txt, + test.code/t10/r.sh, test.code/t11/Makefile, + test.code/t11/Readme.txt, test.code/t11/r.sh, + test.code/t12/Makefile, test.code/t12/Readme.txt, + test.code/t12/r.sh, test.code/t13/Makefile, + test.code/t13/Readme.txt, test.code/t13/r.sh, + test.code/t14/Makefile, test.code/t14/Readme.txt, + test.code/t14/r.sh, test.code/t15/Makefile, + test.code/t15/Readme.txt, test.code/t15/r.sh, + test.code/t16/Makefile, test.code/t16/Readme.txt, + test.code/t16/r.sh, test.code/t17/Makefile, + test.code/t17/Readme.txt, test.code/t17/r.sh, + test.code/t18/Makefile, test.code/t18/Readme.txt, + test.code/t18/r.sh, test.code/t19/Makefile, + test.code/t19/Readme.txt, test.code/t19/r.sh, + test.code/t20/Makefile, test.code/t20/Readme.txt, + test.code/t20/r.sh, test.code/t21/Makefile, + test.code/t21/Readme.txt, test.code/t21/r.sh, + test.code/t22/Makefile, test.code/t22/Readme.txt, + test.code/t22/r.sh, test.code/t23/Makefile, + test.code/t23/Readme.txt, test.code/t23/r.sh, + test.code/t24/Makefile, test.code/t24/Readme.txt, + test.code/t24/r.sh, test.code/t25/Makefile, + test.code/t25/Readme.txt, test.code/t25/r.sh, test.code/t25/rt.sh, + test.code/t26/Makefile, test.code/t26/Readme.txt, + test.code/t26/r.sh, test.code/t27/Makefile, + test.code/t27/Readme.txt, test.code/t27/r.sh, + test.code/t28/Makefile, test.code/t28/Readme.txt, + test.code/t28/r.sh, test.code/t29/Makefile, + test.code/t29/Readme.txt, test.code/t29/r.sh, + test.code/t30/Makefile, test.code/t30/Readme.txt, + test.code/t30/r.sh, test.code/t31/Makefile, + test.code/t31/Readme.txt, test.code/t31/r.sh, + test.code/t32/Makefile, test.code/t32/Readme.txt, + test.code/t32/r.sh, test.code/tdb01/Makefile, + test.code/tdb01/tdb01.c, test.code/tdb02/Makefile, + test.code/tdb03/Makefile, test.code/tgui01/Makefile, + test.code/tgui01/r.sh: Updated LSM RPM-spec STATUS ANNOUNCE files. + Removed redundant Readme.txt files. Replaced test.code make shell + scripts r.sh by one mak.sh. Updated htglobals to read TCOB_* + enviromental variables. + +2001-04-23 22:25 swconnolly + + * test_suite/: format_tests/test.script, format_tests/test03c.cob, + format_tests/test04.cob, format_tests/test07a.cob, + perform_tests/perf06.cob, perform_tests/test.script: Added + qualified data item tests plus others + +2001-04-23 10:22 rpragana + + * ChangeLog, lib/cobmove.c: Applied patches by Sean Burford to + lib/cobmove.c (Thanks Sean for your effort!). + +2001-04-21 10:37 dessex + + * configure, configure.in, lib/mcmove-orig.c, lib/mcmove.c, + test.code/Makefile.in, test_suite/cobol_test.pl, utils/Makefile.in, + utils/Readme.txt, utils/cobf2f/Makefile.in, utils/cobpp/AUTHORS, + utils/cobpp/COPYING, utils/cobpp/COPYRIGHT, utils/cobpp/Makefile.0, + utils/cobpp/Makefile.in, utils/cobpp/Readme.txt, + utils/cobpp/ansi_setup.h, utils/cobpp/cobpp.h, + utils/cobpp/get_util.c, utils/cobpp/get_util.h, + utils/cobpp/list_util.c, utils/cobpp/list_util.h, + utils/cobpp/main.c, utils/cobpp/opt_util.c, utils/cobpp/opt_util.h, + utils/cobpp/scanner.l, utils/cobpp/str_util.c, + utils/cobpp/str_util.h, utils/cobpp/support.c, + utils/cobpp/vperror.c, utils/cobpp/vperror.h: Updated configure. + Removed old cobf2f utility and old RTS move files. + +2001-04-21 05:44 bgiroud + + * compiler/htcobgen.c: Revert back to OLDINIT method due to + numerous core dumps. + +2001-04-19 06:25 bgiroud + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/htcoboly.h, + test_suite/test.baseline, test_suite/call_tests/ptest02.cob, + test_suite/call_tests/stest9xx.c, + test_suite/format_tests/test05b.cob: Code for SYNC fields. New + value strategy. Integration of Stephen's tests in test.baseline and + some more tests for values. + +2001-04-18 22:01 rpragana + + * ChangeLog, compiler/htcobgen.c, lib/cobmove.c: Disabled NEWINIT + (until fixed) and restored symbols dumping, broken when was changed + the resolving of paragraphs/sections. + +2001-04-18 12:03 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y: Fixed the + labels (paragraphs/sections) problem. + +2001-04-17 19:04 rpragana + + * compiler/htcobol.y: Temporary fix for multiple indexes (INDEXED + BY) so it may parse those occurs. + +2001-04-17 18:54 rpragana + + * compiler/: htcobgen.c, htcobol.y: Temporary fix for storage + allocation (isptr). + +2001-04-16 18:59 rpragana + + * ChangeLog, lib/mcmath.c, test.code/tdb01/tdb01.c: Small change to + increase (a little) the precision of COMP-3 converted variables. + +2001-04-16 14:47 rpragana + + * compiler/: htcobgen.c, htcobol.y: Fix for not generating errors + with functions (scanned as LABELSTR) identifiers. + +2001-04-16 12:03 rpragana + + * lib/mcmath.c: Bug fixes for COMP-3 conversion routines (in fldtod + and dtofld). + +2001-04-16 07:05 dessex + + * configure, configure.in, htconfig.h.in, compiler/htglobals.c, + compiler/htglobals.h, test.code/Readme.txt, + test.code/t01/test01e.cob, test.code/t31/Readme.txt, + test.code/t31/phone.dat, test.code/t31/r.sh, + test.code/t32/Makefile, test.code/t32/Readme.txt, + test.code/t32/r.sh, test.code/t32/test32.cob, + utils/cobf2f/Makefile.in, utils/cobf2f/cobf2f.c, + utils/cobf2f/cobf2f.h, utils/cobf2f/scanner.l: Minor update to + htglobals and configure. Updated configure to abort if LEX/YACC + not found. Added initial tests for variable arrays. Removed + phone.dat file, as it is created in test program. Added test for + exponatiation in COMPUTE statement. + +2001-04-15 22:31 rpragana + + * ChangeLog, compiler/htcobol.y: Bug in opt_next removed (was the + reason of several problems with indexed files). + +2001-04-15 21:05 rpragana + + * compiler/htcobgen.c: Removed bug with push_expr(). It was not + returning its status, so EVALUATE (and possibly other statements) + was not working when comparing strings. + +2001-04-15 19:14 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y: Check for the + apropriate kind of decimal point (comma or period) in configuration + section and flag as error any numerica literal not following it. + +2001-04-14 17:32 rpragana + + * compiler/htcobgen.c: Removed bugs with multiple labels + (paragr/sections) in a multi-segment program. + +2001-04-13 22:26 rpragana + + * compiler/htcobol.y: Change to generate an error when a table is + used without subscripts/indexes. + +2001-04-13 19:19 rpragana + + * lib/mcmath.c: Still a minor bug found (it was working, but this + is safer). + +2001-04-13 18:58 rpragana + + * ChangeLog, compiler/htcobgen.c, lib/mcmath.c: Modified + cob_adjust_length() at the library and adjust_desc_length() at code + generation, so we don't need to call malloc() anymore, to store the + temporary structure we need. + +2001-04-13 18:20 rpragana + + * lib/mcmath.c: Removed a bug with get_index(), in lib/mcmath.c. + This bug affects several kinds of numeric variables, when used as + subscripts. + +2001-04-13 16:37 rpragana + + * compiler/htcobgen.c, compiler/htcoboly.h, lib/mcmath.c, + test.code/tdb03/tdb03.cob: Variable-sized tables code generation + and runtime. + +2001-04-12 23:52 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y: Changes to + allow OCCURS..DEPENDING compile. + +2001-04-12 23:08 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htcoboly.h: Mostly cosmetic changes, preparing to + implement OCCURS...DEPENDING ON... + +2001-04-11 22:01 dessex + + * compiler/htglobals.c: Removed debug trace from htglobals. + +2001-04-11 21:05 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y, + test.code/t31/phone.dat: Bug fixes for reporting an error in + paragraphs/sections. (Thanks Harold Norris) Also correction pending + for the exponentiation operator. + +2001-04-11 07:40 dessex + + * AUTHORS, compiler/htglobals.c, test.code/t31/Makefile, + test.code/t31/test31.cob: Minor update to htglobals, AUTHORS, + test31 files. + +2001-04-09 20:33 andrewcza + + * compiler/htcobgen.c, lib/fileio.c, lib/htcoblib.h, + test.code/t31/phone.dat, test.code/t31/test31.cob: + Modify fileio.c to get READ and WRITE to work for variable IO. + +2001-04-09 02:31 dessex + + * compiler/: htglobals.c, htglobals.h: Removed full path from + output file names. + +2001-04-08 21:37 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y, + compiler/scan.l, lib/mcmath.c: Added exponentiation operator. + +2001-04-08 03:19 dessex + + * AUTHORS, tinycobol.lsm, lib/mcmath.c, utils/cobf2f/AUTHORS, + utils/cobf2f/COPYING, utils/cobf2f/COPYRIGHT, + utils/cobf2f/Makefile.in, utils/cobf2f/Readme.txt, + utils/cobf2f/cobf2f.c, utils/cobf2f/cobf2f.h, + utils/cobf2f/scanner.l: Added initial updated cobf2f format + conversion utility. Minor file maintenace. + +2001-04-07 20:10 rpragana + + * compiler/htcobgen.c: Removed bug when freeing the expression list + (free_expr()). Thanks David Essex, for reporting this. + +2001-04-07 10:17 rpragana + + * compiler/htcobgen.c: Oooops! Removed some bugs left in the last + commit. + +2001-04-07 09:43 rpragana + + * compiler/htcobgen.c: Modified function calling of cob_write and + several other runtime functions to pass an additional argument (the + DEPENDING ON ... variable). (requested by Andrew Cameron) + +2001-04-06 22:42 rpragana + + * ChangeLog, compiler/htcobol.y: Flag as an error if we try to READ + a record variable, instead of a file. (the compiler was core + dumping in such case) + +2001-04-06 10:56 rpragana + + * compiler/htcobgen.c: Changed to not allow listing ouput in + unexpected ways (someone moved dump_symbols() from its original + place). + +2001-04-06 02:00 rpragana + + * ChangeLog, compiler/htcobgen.c, lib/strings.c: Merged code for + INSPECT TALLYING, done by Mariusz Stakowski (Thanks Mariusz!). + +2001-04-05 20:18 rpragana + + * compiler/htcobgen.c: Removed bug introduced in last commit + (paragraphs _defined_ were not being detected). + +2001-04-05 16:58 rpragana + + * compiler/: htcobgen.c, htcobol.y: Fixed bug with error reporting + paragraph/section or variable not found. + +2001-04-05 11:46 rpragana + + * ChangeLog, lib/mcmath.c: Trap divide by zero, aborting the + program. + +2001-04-04 22:32 dessex + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/htglobals.c, + compiler/htglobals.h, compiler/scan.l, lib/Makefile.0, + lib/Makefile.in, test.code/t17/test17.cob, + test.code/t19/test19.cob, test.code/t19/test19b.cob, + test.code/t20/test20a.cob, test.code/t20/test20a_at.cob, + test.code/t20/test20b.cob, test.code/t20/test20c.cob, + test.code/t20/test20d.cob: Minor update to remove from files. + +2001-04-04 03:16 bgiroud + + * compiler/htcobgen.c: Corrected rep/movsb sequence in + gen_init_str. Added code to handle REDEFINES in build_init_str. + +2001-04-03 22:34 swconnolly + + * test_suite/compile_tests/: ctestp-read1.cob, ctestp-read2.cob, + ctestp-read3.cob, ctestp-read4.cob, ctestp-rewrite1.cob, + ctestp-rewrite2.cob, ctestp-search1.cob, ctestp-search2.cob, + ctestp-set1.cob, ctestp-start1.cob, ctestp-string1.cob, + ctestp-unstring1.cob, ctestsl01.cob, ctestsl02.cob, ctestsl03.cob, + ctestsl04.cob, ctestsl05.cob, ctestsl06.cob, ctestsl07.cob, + ctestsl08.cob, test.script: Further updates to compile_tests + +2001-04-03 20:21 rpragana + + * ChangeLog, compiler/htcobgen.c: Applied patch submitted by Sean + Bufford, to fix indexed file index offset calculation. + +2001-04-02 21:43 swconnolly + + * test_suite/compile_tests/: ctestp-accept1.cob, + ctestp-accept2.cob, ctestp-add1.cob, ctestp-add2.cob, + ctestp-add3.cob, ctestp-close1.cob, ctestp-compute1.cob, + ctestp-continue1.cob, ctestp-delete1.cob, ctestp-divide1.cob, + ctestp-divide2.cob, ctestp-divide3.cob, ctestp-divide4.cob, + ctestp-divide5.cob, ctestp-goto1.cob, ctestp-initialize1.cob, + ctestp-multiply1.cob, ctestp-multiply2.cob, ctestp-open1.cob, + ctestp-read1.cob, ctestp-read2.cob, ctestp-subtract1.cob, + ctestp-subtract2.cob, ctestp-subtract3.cob, test.script: begin + adding compile_tests files for PROCEDURE DIVISION verbs . + +2001-04-02 16:27 rpragana + + * ChangeLog, lib/mcmath.c: Removed bug when testing 88-variables + with type 'B' (COMP). + +2001-04-02 16:18 bgiroud + + * compiler/: htcobgen.c, htcobol.y: Phase II of static init with + occurs. + +2001-04-02 03:15 bgiroud + + * compiler/htcobgen.c, compiler/htcoboly.h, + test_suite/cobol_test.pl, test_suite/seqio_tests/seqio02.cbl, + test_suite/seqio_tests/seqio02.cob: Static init with OCCURS Phase + I. Converted seqio02 for free-format. + +2001-04-02 02:07 dessex + + * configure, configure.in, htconfig.h.in, cobpp/cobpp.c, + compiler/cobopt, compiler/htglobals.c, compiler/htglobals.h, + utils/cobpp/main.c: Minor updates to configure and htglobals. + +2001-04-01 14:26 rpragana + + * compiler/: htcobgen.c, htcobol.y, htcoboly.h: Corrections for + multiple records definitions in FDs. (now it is like a REDEFINES) + +2001-03-31 22:59 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htcoboly.h: Implemented FD with multiple records (level + 01). + +2001-03-29 23:37 rpragana + + * ChangeLog, compiler/htcobol.y, compiler/scan.l, + test.code/t17/test17.cob, test.code/t19/test19.cob, + test.code/t19/test19b.cob, test.code/t20/test20a.cob, + test.code/t20/test20a_at.cob, test.code/t20/test20b.cob, + test.code/t20/test20d.cob: Bug fixes at configuration section + (SOURCE/OBJECT-COMPUTER) and some clean up. + +2001-03-29 22:48 andrewcza + + * lib/fileio.c, test.code/t31/test31.cob: + Modify READ to return the Number of Bytes read for a VARYING length + READ. + +2001-03-29 14:46 rpragana + + * ChangeLog, compiler/htcobgen.c, lib/fileio.c: Modified again + gen_read, so the reclen desc/buf is passed just after the file + descriptor. + +2001-03-29 12:57 rpragana + + * compiler/htcobgen.c: Added reclen argument to cob_read, so it may + change the variable's value when a varying size record don't read + full reclen size. + +2001-03-29 02:33 andrewcza + + * compiler/htcobgen.c: + Fix a problem in code generation I created while changing for + VARYING LENGTH IO + +2001-03-29 02:17 andrewcza + + * compiler/htcobgen.c, lib/fileio.c, lib/htcoblib.h, + test.code/t31/Makefile, test.code/t31/Readme.txt, + test.code/t31/phone.dat, test.code/t31/r.sh, + test.code/t31/test31.cob: + Implement a quick and dirty RECORD IS VARYING .. DEPENDING ON .. + See t31 for an Example + +2001-03-28 21:53 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htcoboly.h, lib/fileio.c: RECORD VARYING ... DEPENDING ON + ... implemented (parsing/code generation). + +2001-03-28 01:41 rpragana + + * ChangeLog, compiler/htcobol.y, compiler/htcoboly.h, + compiler/scan.l: Removed several bugs as reported by Stephen + Connolly: IS after PIC in variable declarations, the "." in a line + with multiple statements, DATE-COMPILED (we don't support it yet, + but it will flag as an error). + +2001-03-28 00:38 rpragana + + * ChangeLog, compiler/htcobol.y: Made FILLER optional in variable + declarations. + +2001-03-27 06:12 dessex + + * cobpp/cobpp.c, compiler/htglobals.c, test.code/t02/Makefile, + test.code/t23/Makefile, test_suite/cobol_test.pl: Updated new + pre-processor to handle TABS internally. Set the the TABS expand + default to 8 spaces. + +2001-03-27 03:30 dessex + + * test_suite/: Makefile, cobol_test.pl: Added fix in test suite for + program name change, and tab handling in pre-processor. + +2001-03-27 02:52 bgiroud + + * compiler/: htcobgen.c, htcoboly.h: Corrected bug introduced with + pgm_segment in relation with refmod's and calls (should not have + happened if test_suite were used!!). + +2001-03-27 01:48 bgiroud + + * compiler/htcobgen.c, test_suite/cobol_test.pl, + test_suite/test.baseline, test_suite/call_tests/ptest02.cob, + test_suite/format_tests/test.script, + test_suite/format_tests/test05b.cob, + test_suite/idxio_tests/idxio01.cob: Few enhancements to the test + suite. + +2001-03-27 01:19 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcoboly.h: Bugfix in + MOVE CORR (do not allow OCCURS in both source and destination). + +2001-03-26 09:58 rpragana + + * ChangeLog, compiler/htcobol.y: Small bugfix in opt_end_program + (it was not optional :) + +2001-03-26 08:37 rpragana + + * compiler/htcobgen.c: Added more complex cases to MOVE + CORRESPONDING. + +2001-03-26 07:54 rpragana + + * compiler/htcobgen.c, compiler/htcobol.y, + test.code/ReportGen/report.cob, test.code/t30/test30a.cob: Various + bugfixes with multiple program segments. + +2001-03-26 05:08 dessex + + * cobpp/copybooks/TEST02E.cpy, cobpp/copybooks/fTEST02E.cpy, + test.code/Readme.txt, test.code/t29/Makefile, + test.code/t29/Readme.txt, test.code/t29/r.sh, + test.code/t29/test29m.cob, test.code/t30/Makefile, + test.code/t30/Readme.txt, test.code/t30/r.sh, + test.code/t30/test30a.cob: Added test code for CORRESPONDING option + of MOVE statement. Added test code for nested source programs and + sequence of source programs. + +2001-03-26 00:37 rpragana + + * ChangeLog, compiler/htcobgen.c, test.code/t14/test14d.cob: Fixed + bugs with stabs (debug) and listing, after the changes for multi + program segments. + +2001-03-25 23:34 rpragana + + * compiler/: htcobgen.c, htcobol.y: Added options to compile + multiple program segments (main plus subroutines) in the same + source file. + +2001-03-25 17:41 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htcoboly.h, test.code/t00/teste.cob, + test.code/t03/test03.cob, test.code/t04/test04.cob, + test.code/t04/test04i.cob, test.code/t04/test04r.cob, + test.code/t08/test08.cob, test.code/t08/test08g.cob, + test.code/t08/test08u.cob, test.code/t08/test08ug.cob: Added clause + BLANK WHEN ZERO in variable declarations. + +2001-03-25 16:42 rpragana + + * ChangeLog, compiler/htcobgen.c: Removed bug with checking + pictures in elementary items. Converted all symbols (except + literals) to uppercase, so the compiler becomes case independent. + Adjusted listing of paragraph/secions to handle large symbols. + +2001-03-25 15:35 rpragana + + * ChangeLog, compiler/htcobgen.c: Added code to check for a null + picure. + +2001-03-24 22:00 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y, + compiler/scan.l: Preliminary version of MOVE CORRESPONDING. + +2001-03-24 20:58 rpragana + + * compiler/htcobgen.c, test.code/ReportGen/displayable.cpy, + test.code/ReportGen/report.cob, test.code/t01/test01a.cob, + test.code/t01/test01b.cob, test.code/t01/test01d.cob: Modified + appearance of paragraphs and sections in listings. (Also changes + in in some files, because of troubles with htcobpp) + +2001-03-24 19:33 dessex + + * compiler/htcobgen.c: Added fix for paragraphs and sections debug + trace information. + +2001-03-24 04:50 dessex + + * ANNOUNCE, ChangeLog, INSTALL, INSTALL.Win32, README, + tinycobol.lsm, cobpp/Readme.txt, info/rpm/tinycobol-0.00.spec, + test.code/t23/Makefile, utils/Makefile.in, utils/dispcv.tcl, + utils/htcobdispcv.tcl, utils/htcobviscomp.tcl, utils/viscomp.tcl, + utils/cobpp/Makefile.0, utils/cobpp/Makefile.in: Updated LSM STATUS + INSTALL.Win32 INSTALL ANNOUNCE ChangeLog files. + +2001-03-22 05:17 dessex + + * tinycobol.lsm, cobpp/scanner.l, cobpp/test.code/ft1.cob, + cobpp/test.code/t1.cob, compiler/createver.sh, + test.code/t02/Makefile, test.code/t02/test02b.cob, + test.code/t05/Makefile, test.code/t05/test05f.cob: Added bug fix in + new pre-processor relating to scanning identifiers. + +2001-03-21 01:22 rpragana + + * ChangeLog, compiler/htcobol.y: Removed still a bug with + paragraphs/sections. + +2001-03-21 00:41 dessex + + * compiler/htglobals.c, test.code/t02/Makefile, + test.code/t02/test02b.cob: Updated PERFORM tests for procedures + (paragraphs/sections). Changed tabs defualt to zero to conpensate + for bug in Cygwin popen() function. + +2001-03-20 23:18 rpragana + + * ChangeLog, compiler/htcobgen.c, test.code/t02/test02b.cob: Fixed + small bug introduced earlier in section closing code. Also changed + the test code for this. + +2001-03-20 17:15 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y: Added back + check for undefined paragraphs/sections, now working full. + +2001-03-20 16:49 rpragana + + * ChangeLog, compiler/htcobgen.c: Removed wrong check for + paragraphs/sections that are undefined. + +2001-03-20 13:28 dessex + + * test.code/t02/: Makefile, test02b.cob: Added PERFORM tests for + procedures (paragraphs/sections). + +2001-03-20 11:12 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y: Fix for + paragraph qualifying. + +2001-03-20 09:50 rpragana + + * ChangeLog, compiler/htcobol.y: Temporary fix for + paragraph/section bug. + +2001-03-20 08:55 dessex + + * cobpp/parser.y, cobpp/scanner.l, cobpp/test.code/Makefile, + cobpp/test.code/ft1.cob, cobpp/test.code/t2.cob, + test.code/config/COB.build.tmpl.t.in, test.code/t02/TEST02.cpy, + test.code/t02/TEST02A.cpy, test.code/t02/test02.cob: Added bug fix + in new pre-processor relating to the use of a comma delimiter. + +2001-03-19 00:54 rpragana + + * ChangeLog, utils/viscomp.tcl: Modified the visual parsing tool, + because the preprocessor (htcobpp) don't allow us to enter a full + source pathname. + +2001-03-19 00:05 rpragana + + * compiler/: htcobgen.c, htcobol.y: Fixed bug with several + paragraphs with the same name in different sections. + +2001-03-18 01:22 rpragana + + * ChangeLog, compiler/htcobol.y: Added optional RECORD in "READ ... + NEXT RECORD ...". + +2001-03-18 00:41 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y: Bugfix for + inverted class check conditions (eg: IF NOT IS NUMERIC VAR). + +2001-03-17 23:01 rpragana + + * compiler/htcobgen.c: Modified gen_set so "set condition-var + (idx1, idx2,...) to true" works. (88-conditions with arrays) + +2001-03-17 21:46 andrewcza + + * cobpp/cobpp.c, test.code/t18/test18.cob, + test.code/t18/test18i.cob, test.code/t18/test18r.cob, + test_suite/cobol_test.pl: + Fix a problem with the preprocessor not working on Cygwin Fix a + problem with the test_suite not working on Cygwin Fix some logic + problems with the t18 test programs + +2001-03-17 15:01 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y: Modified + gen_condition to allow condition-name variables (level 88) in + arrays. + +2001-03-17 10:14 dessex + + * compiler/htcobgen.c, compiler/htglobals.c, compiler/htglobals.h, + compiler/scan.l, test.code/ReportGen/Makefile, + test.code/config/COB.build.tmpl.in, test.code/t00/Makefile, + test.code/t01/Makefile, test.code/t02/Makefile, + test.code/t03/Makefile, test.code/t04/Makefile, + test.code/t05/Makefile, test.code/t06/Makefile, + test.code/t07/Makefile, test.code/t08/Makefile, + test.code/t09/Makefile, test.code/t10/Makefile, + test.code/t11/Makefile, test.code/t12/Makefile, + test.code/t13/Makefile, test.code/t14/Makefile, + test.code/t15/Makefile, test.code/t16/Makefile, + test.code/t17/Makefile, test.code/t18/Makefile, + test.code/t19/Makefile, test.code/t20/Makefile, + test.code/t21/Makefile, test.code/t22/Makefile, + test.code/t23/Makefile, test.code/t24/Makefile, + test.code/t25/Makefile, test.code/t26/Makefile, + test.code/t27/Makefile, test.code/t28/Makefile, + test.code/tdb01/Makefile, test.code/tdb02/Makefile, + test.code/tdb03/Makefile, test.code/tgui01/Makefile, + test_suite/cobol_test.pl: Integrated new pre-processor into main + compiler. Updated program/error listing code. + +2001-03-16 21:48 rpragana + + * compiler/htcobgen.c: A debugging statement left on the code broke + the compiler. Removed. + +2001-03-16 18:08 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y, + compiler/scan.l, test.code/t27/test27.cob: emoved bugs in parsing + of qualified variables. It as not allowing qualification when the + variable haven't clones and was interacting with subscripting. + +2001-03-15 22:41 rpragana + + * compiler/: htcobgen.c, htcobol.y: Solve a problem with combining + VAR IN/OF VAR with subscripting. + +2001-03-15 07:33 dessex + + * BUGS, tinycobol.lsm, compiler/createver.sh, compiler/htcobgen.c, + compiler/htcobol.y, test.code/t01/test01a.cob: Added fix in ADD .. + GIVING statements to conform to COBOL 85 standard. + +2001-03-15 01:02 rpragana + + * compiler/htcobgen.c, lib/htcoblib.h, lib/mcmath.c: Changes to + other arith statements to pass pointers to actual arguments. + +2001-03-15 00:42 rpragana + + * compiler/htcobgen.c, lib/mcmath.c: Changes for making arith + statements work with new gcc pre-3.0. + +2001-03-13 10:16 rpragana + + * ChangeLog, compiler/htcobgen.c: A blind try to make our code + generation of arithmetic statements less C-compiler dependant. + (push_double/assign_double) + +2001-03-13 02:48 bgiroud + + * test_suite/: cobol_test.pl, test.baseline, + condition_tests/cond01.cob, condition_tests/cond03.cob, + condition_tests/test.script, format_tests/test06a.cob: Added + condition_tests directory with cond01.cob and cond03.cob converted + from test.code/t22/test22.cob and t24/test24.cob. Updated + test.baseline. + +2001-03-12 11:27 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htcoboly.h, compiler/scan.l, + test.code/ReportGen/tclwrapper.c: Reimplemented expressions code to + allow recalling it during complex conditions code generation. + +2001-03-12 10:09 dessex + + * cobpp/cobpp.h, cobpp/createver.sh, cobpp/scanner.l, + cobpp/copybooks/fTEST02D.cpy, cobpp/test.code/r.sh, lib/mcmath.c, + test.code/t02/TEST02C.cpy, test.code/t02/Test02.cpy, + test.code/t02/test02.cob, test.code/t02/test02a.cob, + test.code/t04/Makefile, test.code/t05/test05e.cob, + test.code/t07/Makefile, test.code/t08/Makefile, + test.code/t08/gen_data.c, test.code/t08/r.sh, + test.code/t10/Makefile, test.code/t15/r.sh, test.code/t20/Makefile, + test.code/t20/test20e.cob, test.code/t21/Makefile, + test.code/t22/test22.cob, test.code/t24/test24.cob: Updated + pre-processor to handle as found in DOS type files. Added fix + in math RTS to remove compiler warnings. Updated tests using + abbreviated relational conditionals. + +2001-03-11 18:39 bgiroud + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/htcoboly.h, + test_suite/cobol_test.pl, test_suite/format_tests/test05b.cob: + Corrected behaviour of INITIALIZE with variables in occurs. Added + test to handle RH 7.0 in automated test suite. Added more format + tests. + +2001-03-09 16:45 rpragana + + * ChangeLog, compiler/htcobgen.c: Eliminated bug with null string + literals. (Was generating code rejected by the assembler) + +2001-03-09 16:24 rpragana + + * ChangeLog, compiler/htcobol.y: Changes for removing the + reduce/reduce conflict in conditions. + +2001-03-09 12:34 rpragana + + * ChangeLog, compiler/htcobol.y: Bug fix in conditions. + +2001-03-09 10:21 dessex + + * test.code/: Readme.txt, t05/Makefile, t05/test05e.cob, + t09/.gdbinit, t13/.gdbinit, t14/.gdbinit, t14/Makefile, + t14/Readme.txt, t14/noeth-test.cob, t14/r.sh, t14/string.cob, + t14/test14.cob, t14/test14a.cob, t14/test14b.cob, t14/test14c.cob, + t14/test14d.cob, t14/unstring.cob: Added tests for STRING, + UNSTRING, PERFORM's using abbreviated relational conditionals. + +2001-03-09 00:20 rpragana + + * ChangeLog, compiler/htcobol.y: Added invalid key condition to + WRITE, REWRITE, START, and DELETE statements. + +2001-03-08 22:40 rpragana + + * compiler/htcobol.y: Modified STRING statement to allow special + variables as operands. + +2001-03-08 21:48 rpragana + + * compiler/htcobol.y: Removed several reduce/reduce conflicts with + the implicit operand/operator in conditions. + +2001-03-08 14:14 rpragana + + * ChangeLog, compiler/htcobol.y: Made comma separator in subscripts + (multidimensional arrays) optional. + +2001-03-08 10:18 rpragana + + * compiler/htcobgen.c: Fixed bug in encoding signed literals. + +2001-03-08 10:03 dessex + + * lib/mcmath.c, test.code/t01/test01d.cob: Added bug fix for divide + statement with remainder option. + +2001-03-08 09:13 rpragana + + * ChangeLog, compiler/htcobol.y, compiler/htcoboly.h: Added + conditions with both implied first operand and operator, but only + with OR, like that: if X >= Y or Z or T. + +2001-03-06 19:47 rpragana + + * ChangeLog, compiler/scan.l: Modified the scanner again to allow + labels such as 3-5 (but not as variables or filenames, &c). + +2001-03-06 13:24 rpragana + + * ChangeLog, compiler/scan.l: Changes to disallow things like + 123-456 as a valid identifier. + +2001-03-06 10:27 rpragana + + * ChangeLog, compiler/htcobol.y, compiler/scan.l: Fixed bugs with + variables begining with digits and is/are in value clauses. + +2001-03-06 03:53 dessex + + * compiler/htcobol.y: Added bug fix for math verbs optional comma + separator. + +2001-03-06 02:12 jmnoeth + + * lib/screenio.c: Change the line mode accept to properly handle + the NO-ECHO flag. This is a temporary fix untill all attributes + (passed via the flag parameter) to the routine are handled + properly. Jim Noeth + +2001-03-05 19:52 andrewcza + + * test.code/t06/: test06.cob, test06i.cob, test06r.cob, + test06s.cob: + Remove UPDATE from ACCEPT Verb. + +2001-03-05 16:49 rpragana + + * ChangeLog, compiler/htcobol.y, lib/basicio.c, + test.code/ReportGen/trans.tex, test.code/t04/test04.cob, + test.code/t04/test04i.cob, test.code/t04/test04r.cob: Changes for + the ACCEPT statement (eliminated WITH UPDATE option). + +2001-03-03 00:51 andrewcza + + * README: + Add info About Win32 + +2001-03-03 00:51 andrewcza + + * compiler/htcobgen.c: + Modify htcobgen.c so that call Using works for win32 platforms. + +2001-03-02 23:42 andrewcza + + * compiler/htcobgen.c: + Fix htcobgen Fix htcobgen so that the decimal_comma runtime will be + seen as _decimal_comma for Win32 Systems.c so that the + decimal_comma runtime will be seen as _decimal_comma for Win32 + Systems. + +2001-03-02 23:05 andrewcza + + * lib/mccntrl.s: + Change code to compile on a Win32 Platform + +2001-03-02 22:38 andrewcza + + * INSTALL.Win32, cobpp/createver.sh, compiler/createver.sh, + compiler/htcobgen.c, lib/mccntrl.s: + Change code to allow TinyCobol to work on Windows Based Systems + using the Cygwin Development kit at http://www.cygwin.com. + + Note that although the Test programs will compile and run there + seems to be a problem currently with the maths routines under + Win32. + +2001-03-02 21:06 rpragana + + * compiler/: htcobgen.c, htcobol.y: Added SET ... TO TRUE (88 + conditions). + +2001-03-02 17:59 rpragana + + * ChangeLog, test.code/ReportGen/reportGen.tcl, + test.code/ReportGen/tclwrapper.c: Removed bug with TeX encoding of + some special characters. + +2001-03-02 10:19 rpragana + + * ChangeLog, compiler/htcobgen.c, test.code/ReportGen/Makefile, + test.code/t22/test22.cob: Removed a bug with NUMERIC class check (I + hope, if I understood it well). + +2001-03-01 13:46 rpragana + + * compiler/htcobgen.c: Removed bug that prevented use of "indexed + by" with linkage variables. + +2001-03-01 08:55 dessex + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/htcoboly.h, + test.code/t01/test01a.cob, test.code/t01/test01b.cob, + test.code/t01/test01c.cob, test.code/t01/test01d.cob, + test.code/t01/test01e.cob: Updated math verbs ON SIZE ERROR option + to COBOL 85 standard. + +2001-02-28 15:15 rpragana + + * ChangeLog, compiler/htcobgen.c: Removed a bug in "value_to_eax" + routine (htcobgen.c) that was causing troubles with arrays. That + function shall generate code to return in register %eax the value + of a variable, and NOT its address. I have not made it handle all + cases (please Bernard, look there your code!). + +2001-02-28 14:07 rpragana + + * ChangeLog, test.code/ReportGen/report.layout, + test.code/ReportGen/reportGen.tcl: Added -rotate option for report + headers/footers (to print sideways). + +2001-02-26 22:29 rpragana + + * ChangeLog, test.code/t28/test28a.cob: Modified our test.code/t28 + to show arrays at the linkage section. + +2001-02-26 07:30 dessex + + * compiler/htcobol.y, lib/mcmath.c, test.code/t01/test01a.cob, + test.code/t01/test01b.cob: Added bug fix for floating point + truncation in math RTS. + +2001-02-25 23:38 rpragana + + * test.code/ReportGen/: displayable.cpy, report.cob, report.layout: + Oops! Sent my working files instead of the cleaned up. + +2001-02-25 20:02 rpragana + + * test.code/ReportGen/: Makefile, displayable.cpy, report.cob, + report.layout, reportGen.tcl: More bugfixes, now with file paths + for tex, dvips, ps2pdf. + +2001-02-25 13:49 rpragana + + * test.code/ReportGen/: Readme.txt, report.cob, report.layout, + reportGen.tcl, sales.dat: Removed a bug with font/color settings in + Detail option for reports. + +2001-02-24 15:46 rpragana + + * test.code/ReportGen/: bird.epsf, displayable.cpy, report.layout, + reportGen.tcl: Added Copy command to get the copybook (same from + cobol source) in reports. Added picture that was left out in the + last commit. + +2001-02-22 22:30 rpragana + + * compiler/htcobgen.c, test.code/ReportGen/report.cob, + test.code/ReportGen/report.layout, + test.code/ReportGen/reportGen.tcl, test.code/ReportGen/sales.dat: + Added option -nextline for generating detail records in several + lines. + +2001-02-22 12:52 rpragana + + * test.code/ReportGen/: report.layout, reportGen.tcl: Added + automatic line wrapping when column contents width exceed required + column width. + +2001-02-21 07:59 dessex + + * compiler/htcobgen.c, test.code/Readme.txt, + test.code/t09/test09.cob, test.code/t24/test24.cob, + test.code/t28/Makefile, test.code/t28/Readme.txt, + test.code/t28/r.sh: Added code to trap calls to undefined + paragraphs/sections. Enhanced the EVALUATE tests in t24. Added + tests for MOVE verb with reference modification. + +2001-02-20 23:50 rpragana + + * compiler/htcobgen.c: Still one more change to bypass the stack + cleanup when the range test passed (EVALUATE statement). I hope it + is correct now. + +2001-02-20 23:41 rpragana + + * compiler/htcobgen.c: Still a mistake in EVALUATE¸ removed. + +2001-02-20 23:33 rpragana + + * compiler/htcobgen.c, test.code/ReportGen/report.layout: Removed + bug with range tests in EVALUATE. (Thanks David Essex for + reporting) + +2001-02-19 20:37 rpragana + + * test.code/ReportGen/: Readme.txt, report.layout, reportGen.tcl: + Added -hrule option to the report layout. + +2001-02-19 17:58 rpragana + + * ChangeLog, test.code/ReportGen/Makefile, + test.code/ReportGen/report.layout, + test.code/ReportGen/reportGen.tcl, test.code/ReportGen/sales.dat: + Clean up in the code for reportGen. Bug fix in spacings. + +2001-02-19 15:01 rpragana + + * ChangeLog, test.code/ReportGen/Makefile, + test.code/ReportGen/Readme.txt, test.code/ReportGen/report.cob, + test.code/ReportGen/report.layout, + test.code/ReportGen/reportGen.tcl, test.code/ReportGen/sales.dat: + Added options for including images and barcodes in the report. + +2001-02-19 01:06 rpragana + + * test.code/ReportGen/: report.cob, report.layout, reportGen.tcl: + Modified layout to allow more control, added web delivery (mime + type application/pdf) of the report output. + +2001-02-18 17:25 bgiroud + + * TODO, cobpp/cobpp.h, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htcoboly.h, test_suite/call_tests/ptest02.cob, + test_suite/format_tests/test06a.cob: Second parm of refmod's made + optional. Corrected bugs in manipulating call_mode when parm by + value was the last in a series and handling of picture affecting + "CURRENCY SIGN IS" clause. Phase I of EXTERNAL semantics. + +2001-02-17 21:06 rpragana + + * ChangeLog, test.code/ReportGen/Readme.txt, + test.code/ReportGen/report.layout, + test.code/ReportGen/reportGen.tcl: Added a short readme + (incomplete) to reportGen. + +2001-02-17 08:39 rpragana + + * test.code/ReportGen/: Makefile, report.cob, report.layout, + reportGen.tcl, sales.dat, tclwrapper.c: Added a TeX report + generator for TinyCobol. + +2001-02-16 22:52 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y, + compiler/scan.l, lib/htcoblib.h, test.code/t00/teste.cob: Changes + for allowing ACCEPT ... ON EXCEPTION AUTO and several + screen attributes, as RM Cobol. (as requested by Harold) + +2001-02-14 18:42 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y, + test.code/t25/test25.cob, test.code/tgui01/testgui01.cob: Removed a + serious bug with nested IFs, defining a single_stat_sentece + non-terminal. + +2001-02-11 01:01 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y: Changes to + allow arrays of pointers and generic variables in pointer + operations. + +2001-02-10 22:57 rpragana + + * compiler/htcobgen.c: Removed a bug with setting a pointer to + NULL. + +2001-02-10 21:25 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y, + test.code/t28/test28.cob, test.code/t28/test28a.cob: Changes in the + linkage section to allow defining variables which are not passed as + arguments from the calling program. + +2001-02-10 16:36 rpragana + + * compiler/htcobol.y, test.code/t28/test28.cob, + test.code/t28/test28a.cob: Small change in pointers to allow + pointer arithmetic. + +2001-02-10 16:07 rpragana + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/htcoboly.h, + compiler/scan.l, test.code/t28/Makefile, test.code/t28/r.sh, + test.code/t28/test28.cob, test.code/t28/test28a.cob: Added POINTER + types (usage pointer, type 'B' with pic 9(9)) and a sample cobol + source test.code/t28. + +2001-02-09 18:37 rpragana + + * compiler/htcobgen.c: Ooops! Forgot to check compiler after last + changes. + +2001-02-09 16:25 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htcoboly.h: More report section stuff: defining structures + to hold report info. + +2001-02-08 20:07 rpragana + + * ChangeLog, utils/dispcv.tcl: Updated conversion tool to account + for "VAR1 in/of VAR2 ...", arrays and refmods and also to process + both DISPLAY and ACCEPT statements. + +2001-02-08 06:15 dessex + + * ChangeLog, tinycobol.lsm, compiler/createver.sh, + test.code/Readme.txt, test.code/t27/Makefile, test.code/t27/r.sh, + test.code/t27/t27.cob, test.code/t27/test27.cob, utils/Readme.txt: + Updated Changelog LSM files. + +2001-02-08 03:45 dessex + + * ANNOUNCE, ChangeLog, STATUS, tinycobol.lsm, + info/rpm/tinycobol-0.50.spec, test.code/t00/.gdbinit, + test.code/t01/test01a.cob, test.code/t01/test01b.cob, + test.code/t02/.gdbinit, test.code/t03/.gdbinit, + test.code/t11/test11.cob, test.code/t15/Makefile, + test.code/t15/Readme.txt, test.code/t15/test15f.c, + test.code/t15/test15i.cob, test.code/t15/test15j.cob: Added test + code for 'CALL BY CONTENT' Added new rpm spec file. Updated + Changelog LSM STATUS files. + +2001-02-08 00:15 rpragana + + * ChangeLog, utils/dispcv.tcl: Added tool (dispcv.tcl) to convert + old "DISPLAY (X, Y) ..." statements to our syntax. + +2001-02-07 20:38 jmnoeth + + * lib/cobmove.c: On 2/8/2001 changed cobmove.c to fix a bug that + caused the results of a 'Move all' to a signed numeric field not to + be signed. Jim Noeth + +2001-02-07 20:38 jmnoeth + + * compiler/htcobgen.c: + On 2/8/2001, changed htcobgen.c to fix the problem with + display/accept of fields with occurs. The problem caused the + compiler to get a segmentation fault. The change was to the + gen_display module to include a check for sy->litflg != 2 - + otherwise it thought that it was doing screen section + display/accept. Jim Noeth + +2001-02-07 14:43 rpragana + + * ChangeLog, utils/viscomp.tcl: Enhancements in viscomp.tcl tool. + +2001-02-07 12:44 rpragana + + * ChangeLog, compiler/htcobol.y: Solved problem with "decimals" in + variable definition. (as reported by Stewart) + +2001-02-07 11:10 rpragana + + * compiler/scan.l: Corrected LISTSEP "," scanning. + +2001-02-07 08:16 dessex + + * compiler/Makefile.in, compiler/createver.sh, compiler/htcobol.y, + lib/mcmath.c, test.code/t01/test01b.cob, test.code/t11/Makefile, + test.code/t11/test11.cob, test.code/t24/Makefile, + test.code/t24/test24.cob: #Updated file OPEN/CLOSE statements to + the COBOL 85 standard, without the extra options. + +2001-02-07 01:03 rpragana + + * ChangeLog, compiler/htcobgen.c, utils/viscomp.tcl: Fixed bugs + related to literal sinthetizing, when both sign and decimal part + were present. Also fixed the is_numeric() function to check + subscripted vars too. + +2001-02-06 12:04 rpragana + + * compiler/htcobgen.c, test.code/t24/Makefile, + test.code/t24/test24.cob: Fixed bugs with EVALUATE (Thanks David + for reporting). + +2001-02-06 05:40 dessex + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/htcoboly.h, + compiler/scan.l, lib/htcoblib.h, lib/mcmath.c, + test.code/Readme.txt, test.code/t01/.gdbinit, + test.code/t01/Makefile, test.code/t01/Readme.txt, + test.code/t01/r.sh, test.code/t01/test01.cob, + test.code/t01/test01a.cob, test.code/t01/test01b.cob, + test.code/t01/test01c.cob, test.code/t01/test01d.cob, + test.code/t01/test01e.cob, test.code/t24/test24.cob: Updated math + verbs to COBOL 85 standard. + +2001-02-06 01:39 rpragana + + * ChangeLog, utils/viscomp.tcl: Added display of mid-of-rule + actions in viscomp.tcl, so we don't need to have a listing + (parser.y/.c) for looking at them. + +2001-02-05 23:32 rpragana + + * compiler/: htcobgen.c, htcobol.y, htcoboly.h: Modified EVALUATE + statement to allow string (non-numeric) comparations. + +2001-02-05 17:49 rpragana + + * ChangeLog, utils/viscomp.tcl: Updates on viscomp.tcl (breakpoints + added) to show more details of parsing. + +2001-02-05 15:41 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y, + lib/cobmove.c: Changes to allow pictures greater than 255, also + changes in cob_move to make moves of fields with length greater + than 255. + +2001-02-04 22:33 rpragana + + * compiler/: htcobgen.c, htcobol.y, htcoboly.h: Added + syntax/semantics for EVALUATE with ßeveral WHEN cases with the same + action. (requested by David Essex) + +2001-02-04 18:43 rpragana + + * ChangeLog, compiler/htcobgen.c: Fixed bug with offset calculation + at linkage section. + +2001-02-04 16:04 rpragana + + * compiler/htcobgen.c: Again removing a bug in evaluate statement + (my previous upgrade mysteriously vanished...). + +2001-02-03 23:44 rpragana + + * utils/viscomp.tcl: Small bug fixes in the visual parser tool. + +2001-02-03 22:44 rpragana + + * utils/viscomp.tcl: Added lval stack viewing to viscomp.tcl. + +2001-02-03 19:15 rpragana + + * utils/: Readme.txt, viscomp.tcl: Added a developers's tool, + viscomp.tcl that works as a visual parser and a gdb frontend. + +2001-02-03 16:08 rpragana + + * compiler/: Makefile.in, htcobgen.c: Modified htcobol.c definition + to have it's line numbers known to gdb. (I need that because of my + visual debugger. Anyway, it does not change nothing more) Removed + also a small bug with refmods that were not allowing the code + generated in some cases to compile. + +2001-01-31 22:24 rpragana + + * compiler/htcobgen.c: Removed well hidden bug in EVALUATE + statement. (thanks to Eric Oliveira and Afonso Bione for reporting + that) + +2001-01-25 15:19 rpragana + + * ChangeLog, lib/fileio.c, test.code/tdb03/Makefile: Modified + lib/fileio.c to eliminate if's with errno, because this variable is + set only _after_ a system call is made. It was making the compiler + return the same error as the previous system call on cob_open, for + instance: if two files were opened, the first of them in error, the + second would return the same error condition. + +2001-01-24 23:57 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y, + test.code/t00/.gdbinit, test.code/t09/.gdbinit, + test.code/t09/test09.cob: Added code to validate a variable + (non-terminal gname) so it will report an error when other objects + are used instead. Example: "display filesel" (where filesel was + declared in a "select"). + +2001-01-24 23:47 andrewcza + + * STATUS, lib/fileio.c, test.code/t10/test10.cob, + test.code/t12/test12ls.cob: + Change the READ and WRITE statement for LINE SEQUENTIAL IO. The + Read Statement will now read a variable length record and pad it + with spaces upto the record length. The Write Statement will + remove all the spaces at the end of a line before writing it out. + + The Line Delimiter is NewLine for all Line Sequential IO. + + Line Sequential files can No longer be opened in IO Mode and as a + result REWRITE is no longer valid for Line Sequential files. + +2001-01-23 17:16 rpragana + + * test.code/tdb03/: cgi-util.c, form.html, tdb03.cob, tdb03a.c: + Modified again cgi-util and CGI example for a clever way to pass + strings from cobol to C. + +2001-01-23 14:56 rpragana + + * ChangeLog, test.code/tdb03/form.html, test.code/tdb03/tdb03.cob: + Finished my toy CGI/postgresql example program. + +2001-01-22 19:39 rpragana + + * compiler/htcobgen.c, test.code/tdb03/tdb03.cob: Fixed a bug in + gen_display that dumped core when processing refmoded variables. + +2001-01-22 16:16 rpragana + + * ChangeLog, lib/fileio.c, test.code/tdb03/Makefile, + test.code/tdb03/cgi-util.c, test.code/tdb03/cgi-util.h, + test.code/tdb03/form.html, test.code/tdb03/tdb03.cob, + test.code/tdb03/tdb03a.c: Added a simple CGI processing example, + with an adapted C library (GPLed). + +2001-01-22 10:57 rpragana + + * lib/fileio.c: Fixed bugs with cob_read library function, for + reading line sequential files. + +2001-01-21 18:31 rpragana + + * test.code/tdb02/: tdb02.cob, tdb02a.c: Improved API for + interfacing to postgresql. + +2001-01-20 23:50 rpragana + + * ChangeLog, test.code/tdb02/Makefile, test.code/tdb02/loja.sql, + test.code/tdb02/tdb02.cob, test.code/tdb02/tdb02a.c: Added + PostgreSQL interface example and supporting C code, using libpq. + The example files, including 'loja.sql' may be found at + test.code/tdb02. + +2001-01-19 20:22 rpragana + + * ChangeLog, compiler/htcobgen.c: More changes to fix the bug with + signed literals. + +2001-01-18 19:57 rpragana + + * ChangeLog, compiler/htcobgen.c: Small changes at gen_display to + allow an empty display statement, to advance to a new line (needed + in CGI programming). + +2001-01-16 08:50 rpragana + + * compiler/htcobgen.c, lib/htcoblib.h: Fixed problem with struct + file_desc size computation, that caused crashes when opening + several indexed files. + +2001-01-12 21:21 rpragana + + * lib/screenio.c, test.code/tgui01/testgui05.c: Fixed bug in + accept_curses library function. It was truncating 1 char at the end + of input. + +2001-01-07 17:12 rpragana + + * ChangeLog, test.code/tgui01/Readme.txt: Added instructions for + testing the example tgui01/testgui04. + +2001-01-07 16:48 rpragana + + * test.code/tgui01/: Makefile, testgui01.cob, testgui04.cob, + testgui05.c, testgui06.cob: dded more example interfaces + tcl<-->cobol, including an interpreter main loop written in cobol, + and how to call cobol from tcl, by creating a tcl command. + +2001-01-06 21:15 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y, + compiler/scan.l: Changed scanner and parser for not confusing + expressions like "X+2" as two tokens "X" and "+2" (a literal signed + integer). Now it is correctly parsed, and even expressions like + X++1 ("X" "+" "+1") work. + +2001-01-06 08:58 dessex + + * test.code/: Readme.txt, t27/Makefile, t27/Readme.txt, t27/r.sh, + tgui01/Makefile, tgui01/Readme.txt, tgui01/r.sh: Updated Readme.txt + and r.sh files to t27 and tgui01 directories. + +2001-01-05 22:49 rpragana + + * test.code/tgui01/: cobtools.tcl, testgui01.cob, testgui02.c, + testgui03.tcl, testgui03a.tcl: Incorporated cobtools.tcl script + into C module to avoid "source" command in tcl scripts (speed + enhancement). + +2001-01-05 21:34 rpragana + + * test.code/tgui01/: cobtools.tcl, testgui01.cob, testgui02.c, + testgui03.tcl, testgui03a.tcl: Modified the example GUI for a more + practical multi-forms application. + +2001-01-05 20:21 rpragana + + * ChangeLog, test.code/tgui01/testgui02.c, + test.code/tgui01/testgui03.tcl: Improvements on the interface + tcl/tk and passing arguments from Cobol to tcl. + +2001-01-05 18:59 rpragana + + * ChangeLog, test.code/t27/sales.dat, test.code/t27/t27.cob, + test.code/tgui01/Makefile, test.code/tgui01/testgui01.cob, + test.code/tgui01/testgui02.c, test.code/tgui01/testgui03.tcl: + Example GUI for data entry from tcl/tk library. + +2000-12-19 03:53 bgiroud + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/htcoboly.h, + compiler/scan.l, info/Compiler-Overview.txt, + test_suite/test.baseline, test_suite/call_tests/ptest01.cob, + test_suite/call_tests/stest01.cob, + test_suite/call_tests/stest03.cob, + test_suite/call_tests/stest9xx.c: Added code for call by content + for variables. + +2000-12-18 13:06 rpragana + + * ChangeLog, compiler/htcobol.y, compiler/scan.l, + test.code/t27/Makefile, test.code/t27/sales.dat, + test.code/t27/t27.cob: Added report statements and expanded the t27 + test program for reports. + +2000-12-09 13:55 bgiroud + + * INSTALL, TODO, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htcoboly.h, compiler/scan.l, lib/cobmove.c, + lib/htcoblib.h, test_suite/format_tests/test01.cob, + test_suite/search_tests/test20a.cob: Added JUST RIGHT in data + clause. + +2000-12-08 15:09 dessex + + * tinycobol.lsm, cobpp/cobpp.c, cobpp/scanner.l, + cobpp/copybooks/fTEST02D.cpy, cobpp/test.code/ft3.cob, + compiler/htglobals.c: Added fix for pre-processor and htglobals + bugs. + +2000-12-06 23:16 rpragana + + * test.code/t27/: Makefile, t27.cob: Added test.code/t27, a report + section example. + +2000-12-06 23:09 rpragana + + * compiler/: htcobgen.c, htcobol.y, scan.l: Fixed parsing of report + section. + +2000-12-06 17:20 rpragana + + * compiler/htcobgen.c, test.code/t08/test08g.cob, + test.code/t08/test08u.cob: Added SORT-RETURN register for SORT + GIVING/USING return statuses. + +2000-12-05 23:47 andrewcza + + * lib/fileio.c, test.code/t08/test08g.cob: + Implement SORT GIVING. + +2000-12-05 23:32 rpragana + + * ChangeLog, compiler/htcobol.y: Fixed bug with the report section + (it may be optional, of course). + +2000-12-05 22:21 rpragana + + * compiler/: htcobol.y, scan.l: First steps at the cobol "report + generator" facility. Only parsing for now. + +2000-12-05 22:10 dessex + + * STATUS: Updated STATUS file. + +2000-12-05 21:51 dessex + + * ANNOUNCE, ChangeLog, INSTALL, tinycobol.lsm, cobpp/createver.sh, + compiler/createver.sh, info/rpm/tinycobol-0.4.spec: Added new rpm + spec file. Updated Changelog LSM files. + +2000-12-04 01:22 dessex + + * cobpp/Readme.txt, cobpp/scanner.l, cobpp/copybooks/fTEST02D.cpy, + cobpp/test.code/ft3.cob, compiler/htglobals.c, + compiler/htglobals.h, test.code/t02/Makefile: Added fix for + copybook tab handling in the pre-processor. Improved pre-processor + exec call to better fit main cmd line. + +2000-12-03 20:00 dessex + + * INSTALL, Makefile.in, configure, configure.in, htconfig.h.in, + tinycobol.lsm, cobpp/AUTHORS, cobpp/COPYING, cobpp/COPYRIGHT, + cobpp/Makefile.in, cobpp/Readme.txt, cobpp/cobpp.c, cobpp/cobpp.h, + cobpp/createver.sh, cobpp/parser.y, cobpp/scanner.l, + cobpp/copybooks/TEST02.cpy, cobpp/copybooks/TEST02A.cpy, + cobpp/copybooks/TEST02B.cpy, cobpp/copybooks/TEST02C.cpy, + cobpp/copybooks/fTEST02.cpy, cobpp/copybooks/fTEST02A.cpy, + cobpp/copybooks/fTEST02B.cpy, cobpp/copybooks/fTEST02C.cpy, + cobpp/test.code/Makefile, cobpp/test.code/Readme.txt, + cobpp/test.code/ft1.cob, cobpp/test.code/ft2.cob, + cobpp/test.code/ft3.cob, cobpp/test.code/r.sh, + cobpp/test.code/t1.cob, cobpp/test.code/t2.cob, + compiler/Makefile.in, compiler/htglobals.c, compiler/htglobals.h, + test.code/Makefile.in, test.code/copybooks/Makefile.in, + test.code/t02/TEST02.cpy, test.code/t02/TEST02A.cpy, + test.code/t02/TEST02B.cpy, test.code/t02/Test02.cpy, + test.code/t13/include1.cpy, test.code/t13/include2.cpy: Added the + pre-processor. Removed tabs from copybooks. + +2000-12-03 01:38 andrewcza + + * lib/fileio.c: + Implement SORT USING. See Test08u.cob for an Example + +2000-12-01 00:25 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y: Changed + gen_close_sort, so gen_sort_using/giving find a completed sort + description to make available to the runtime library routines. + +2000-11-30 21:35 andrewcza + + * lib/fileio.c: + Start writing cob_sort_using routine + +2000-11-28 01:44 rpragana + + * ChangeLog, compiler/htcobol.y: Removed a bug with sort + using/giving code generation. + +2000-11-27 11:56 rpragana + + * ChangeLog, compiler/htcobgen.c: Modifications on the arguments + passed to cob_sort_using and cob_sort_giving, as requested by + Andrew. + +2000-11-24 14:27 andrewcza + + * lib/fileio.c, test.code/t08/test08u.cob: + Define cob_sort_using and cob_sort_giving paramaters. Modify + test08u.cob to have two files in the sort using. + +2000-11-20 03:37 dessex + + * configure, configure.in: Added bug fix in cofigure script for db + library version check in header db.h. + +2000-11-18 22:31 rpragana + + * compiler/htcobgen.c, compiler/htcobol.y, lib/fileio.c, + test.code/t08/test08g.cob, test.code/t08/test08ug.cob: Changes to + fix some coredumps found by Andrew in the new SORT verb + implementation. Thanks Andrew. + +2000-11-18 17:26 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htcoboly.h: Added parameters in code generation of + gen_sort_using and gen_sort_giving (SORT verb). + +2000-11-18 05:55 bgiroud + + * compiler/htcobgen.c, compiler/htcoboly.h, lib/cobmove.c, + test.code/t20/test20a_at.cob, test_suite/cobol_test.pl, + test_suite/test.baseline, test_suite/format_tests/test.script, + test_suite/format_tests/test01c.cob, + test_suite/format_tests/test03c.cob, + test_suite/format_tests/test04.cob, + test_suite/format_tests/test06a.cob, + test_suite/search_tests/TCtable1.cpy, + test_suite/search_tests/test.script, + test_suite/search_tests/test20a.cob: Added semantics for RefMod's, + test example for search statement. Cleaned-up format_tests for new + behavior of display statement. Updated automated test baseline. + +2000-11-18 00:00 andrewcza + + * lib/fileio.c: + Change fileio.c to return file status 35 is the file to be opened + does not exist. + +2000-11-17 22:25 andrewcza + + * test.code/t08/: Makefile, test08g.cob, test08u.cob, test08ug.cob: + + Add the Test code for testing SORT USING and SORT GIVING. The + library code still needs to be written and so these programs will + not link yet. + +2000-11-17 21:41 andrewcza + + * compiler/htcobol.y: + Change htcobol.y to correct a problem where it was not correctly + calling gen_read_next and gen_return. Added logic to determine + which to call. This resulted in SORT not working correctly as well + as READ NEXT with ALTERNATE KEYS not working correctly. + +2000-11-17 00:28 andrewcza + + * compiler/htcobol.y, test.code/t08/test08.cob: + Change htcobol.y to fix gen_release so the sort will work again. + Currently only SORT -- RELEASE and RETURN work. Use test08.cob for + testing ie make gen_data ./gen_data >Raw.dat ./test08 + +2000-11-16 22:07 andrewcza + + * lib/fileio.c, test.code/t19/test19b.cob: + Fix Open statement in fileio.c to return a file status if the file + cannot be opened correctly. + + Modifiled test19b.cob to show how FILE STATUS should be used. + +2000-11-12 10:40 dessex + + * compiler/: htcobgen.c, htcobol.y: Added lower case to PIC clause + syntax. Added optional 'WITH' to 'DISPLAY ... WITH NO ADVANCING' + statement. + +2000-11-11 19:59 dessex + + * test.code/: Readme.txt, config/COB.build.tmpl.in, + config/COB.build.tmpl.t.in, t16/Makefile, t16/Makefile.new, + t16/r.sh, t16/test16.cob: Added test program for 'GO TO ... + DEPENDING ON ...' statement. + +2000-11-11 14:55 rpragana + + * compiler/: htcobgen.c, htcobol.y, htcoboly.h, scan.l: Added GO TO + ... DEPENDING. + +2000-11-10 22:02 rpragana + + * compiler/htcobgen.c: Added code to generate an error, when no + file name was given both in FD and SELECT, as asked by David Essex. + +2000-11-10 19:45 dessex + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/htcoboly.h, + compiler/scan.l, test.code/t19/Makefile, test.code/t19/Readme.txt, + test.code/t19/test19b.cob: Added external file name non-standard + extensions in SELECT and FD statements. + +2000-11-09 01:00 rpragana + + * ChangeLog, compiler/htcobgen.c: Fixed screen items with value but + without picture. The picture is synthesized from the "value" + literal given. + +2000-11-08 22:38 rpragana + + * compiler/: htcobgen.c, htcobol.y: Still more bugfixes at screen + section. Removed zero sized storage alloc (.space). Modified parser + to allow "TO" without "FROM" in screen section items. + +2000-11-08 22:19 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y: Several + bugfixes at screen section. Now it accepts items without filler or + other explicit variable declaration. + +2000-11-08 12:06 rpragana + + * compiler/htcobol.y: Minor changes at screen section parsing to + allow screen items (BLANK SCREEN) without explicit storage + declaration. + +2000-11-08 03:16 dessex + + * Makefile.in, configure, configure.in, test.code/Makefile, + test.code/Makefile.0, test.code/Makefile.in: Updated configure + script to generate Makefile in test.code directory. + +2000-11-08 00:49 dessex + + * INSTALL, configure, configure.in, htconfig.h.in: Added tests for + db library names libdb libdb1 libdb2 in configure script. + +2000-11-06 22:31 dessex + + * ChangeLog, test.code/Readme.txt, test.code/t02/test02a.cob, + test.code/t26/Readme.txt, test.code/t26/r.sh: Updated Changelog + file. Added r.sh Readme.txt file in test.code/t26. + +2000-11-04 05:51 bgiroud + + * compiler/: htcobgen.c, htcobol.y, htcoboly.h: Corrected + detecttion of subscripted variable for search statement. + +2000-11-04 02:24 rpragana + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/scan.l, + lib/screenio.c, test.code/t26/test26.cob: Changes for "LINE ... + POSITION ..." in DISPLAY and ACCEPT statements, with arbitrary + expressions as coordinates. Removed old syntax "DISPLAY (R, C) + ...". + +2000-11-03 02:28 rpragana + + * test.code/t26/: Makefile, test26.cob: Added test.code/t26 to + exercise display/accept with cursor positioning. + +2000-11-03 02:10 rpragana + + * compiler/htcobgen.c, compiler/htcobol.y, lib/screenio.c: + Restaured "display (row, col) ..." and "accept (row, col) ..." + syntax, and added library routine to make it run with ncurses. + +2000-10-31 17:25 bgiroud + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/htcoboly.h, + compiler/scan.l, test_suite/call_tests/ptest02.cob, + test_suite/call_tests/ptest04.cob, + test_suite/call_tests/test.script: Modified grammar and scanner for + RefMod's as per an idea from Rildo. Added first intrinsic + functions (Length and Ord). + +2000-10-24 23:38 dessex + + * configure, configure.in: Added bug fix for configure script. + +2000-10-23 23:10 dessex + + * ANNOUNCE, compiler/createver.sh, info/rpm/tinycobol-0.3.spec: + Updated ANNOUNCE file. Added tinycobol-0.3.spec file. + +2000-10-22 22:58 dessex + + * ChangeLog: Updated Changelog file. + +2000-10-22 22:44 dessex + + * STATUS, configure, configure.in, htconfig.h.in, tinycobol.lsm, + compiler/scan.l, lib/screenio.c, test.code/t15/Makefile, + test.code/t15/test15.cob, test.code/t15/test15b.c, + test.code/t15/test15e.cob, test.code/t15/test15f.c, + test.code/t15/test15g.cob, test.code/t15/test15h.cob, + test.code/t22/test22.cob: Added test for ncurses library color_set + function in cofigure script. Added test15g.cob test15h.cob to test + static variables. Updated Changelog LSM STATUS files. + +2000-10-19 17:39 dessex + + * compiler/scan.l: Removed debug trace printf in lex_fgets. + +2000-10-19 16:54 dessex + + * compiler/htcobgen.c, compiler/scan.l, test.code/t02/Makefile, + test.code/t02/test02.cob, test.code/t02/test02a.cob: Added bug fix + for SEARCH ALL statement. + +2000-10-12 00:05 dessex + + * test.code/: t02/test02.cob, t21/test21.cob, t25/Makefile, + t25/test25.cob, t25/test25a.cob, t25/test25b.c: Added fix for tests + for static and shared libraries. + +2000-10-11 16:38 bgiroud + + * compiler/: htcobgen.c, htcoboly.h, scan.l: Temporary correction + for RefMod's before following an idea from Rildo. + +2000-10-11 03:17 bgiroud + + * compiler/: htcobgen.c, htcobol.y, scan.l: Added first phase of + syntax for RefMod and intrinsic functions. + +2000-10-10 20:44 dessex + + * test.code/: Readme.txt, t24/test24.cob, t25/Makefile, + t25/Readme.txt, t25/r.sh, t25/test25.cob, t25/test25a.cob, + t25/test25b.c: Added tests for static and shared libraries. + +2000-10-10 16:45 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y, + compiler/scan.l: Minor fixes for gen_when_check (EVALUATE + statement). Added tokens for REPORT SECTION. + +2000-10-10 13:25 rpragana + + * compiler/: htcobgen.c, htcoboly.h: Finished code generating for + EVALUATE statement. Now it checks for compatible selection + subjects/objects and generate code for all cases. + +2000-10-10 01:08 jmnoeth + + * lib/basicio.c: Fixed logic to allow both period and comma as + decimal point. + + Also, put hypen in front of displayed number if negative. + +2000-10-10 01:08 jmnoeth + + * lib/cobmove.c: Added logic to allow scaling and precision with + binary integers. + +2000-10-10 00:03 rpragana + + * compiler/htcobgen.c: EVALUATE implementation: tests with ranges + (value1 THRU value2) fixed. + +2000-10-09 23:41 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htcoboly.h: EVALUATE implementation progress. Some tests + already working, much yet to be done. + +2000-10-09 17:05 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htcoboly.h, test.code/t24/Makefile: Implemented part of + EVALUATE code generation. + +2000-10-08 21:27 dessex + + * tinycobol.lsm, test.code/t24/test24.cob: Added another test to + the EVALUATE test code. Added new LSM file. + +2000-10-08 10:01 rpragana + + * compiler/htcobol.y, test.code/t24/test24.cob: Modified EVALUATE + parsing, so all test24 (Thanks David) work. + +2000-10-08 02:54 dessex + + * test.code/: Readme.txt, t24/Makefile, t24/Readme.txt, t24/r.sh, + t24/test24.cob: Added EVALUATE test code + +2000-10-08 00:01 rpragana + + * ChangeLog, compiler/htcobol.y, compiler/scan.l: Introduced + EVALUATE syntax. + +2000-10-06 16:06 bgiroud + + * compiler/htcobgen.c, test_suite/call_tests/ptest02.cob: Recovered + the call by value of long long. + +2000-10-05 16:07 rpragana + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/htcoboly.h, + test.code/t08/Makefile: Added "sort...using...giving..." syntax and + code generation, as requested by Andrew. (the other "sort" with + input/output procedures were already implemented). Changes to the + start_record (at struct file_desc), now present in all file + organizations. + +2000-10-04 21:34 dessex + + * ChangeLog, compiler/htcobgen.c, test.code/t15/test15e.cob, + test.code/t15/test15f.c: Modified test15e for retrun variable + tests. Updated Changelog file. + +2000-10-04 03:16 bgiroud + + * compiler/htcobol.y, test_suite/cobol_test.pl, + test_suite/seqio_tests/foobar.dat, + test_suite/seqio_tests/input.dat, + test_suite/seqio_tests/lineseq.dat, + test_suite/seqio_tests/nofile.dat, + test_suite/seqio_tests/test06.dat: Oops! Forgot to add the + definition of token RETURNING. Some cleanup. + +2000-10-04 02:54 bgiroud + + * Makefile.in, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htcoboly.h, compiler/scan.l, + test_suite/call_tests/ptest02.cob, + test_suite/call_tests/stest9xx.c: Added RETURNING clause for CALL + statement:only for short and long for the time being. Changed the + order of cleaning in cleanall target. + +2000-10-03 14:09 rpragana + + * lib/mcmath.c: Modified mcmath.c (library) to handle various kind + of "comp" data. + +2000-10-03 13:38 rpragana + + * compiler/htcobgen.c: Fixed stabs for "long long" (comp with 8 + bytes) data types. + +2000-10-03 12:20 rpragana + + * ChangeLog, compiler/htcobgen.c: Fixed most stabs generation, + (only comp with 8 bytes remain to be fixed) both for static and + stack-based variables. + +2000-10-03 09:54 rpragana + + * ChangeLog, compiler/htcobgen.c: Yet another little optimization + in gen_subscripted(), to remove a "pushl %eax" followed by "popl + %eax". + +2000-10-03 08:53 rpragana + + * ChangeLog, compiler/htcobgen.c: Modified gen_subscripted to + generate an optimized code for indexes/subscripts computations + (with a kind of "lazy" generation). + +2000-10-02 18:20 bgiroud + + * compiler/htcobgen.c, test_suite/call_tests/ptest02.cob, + test_suite/call_tests/stest9xx.c: Completed code for call by value + for long long literal and variable. + +2000-09-30 01:30 dessex + + * test.code/: t00/r.sh, t11/Makefile, t11/test11.cob, + t15/test15e.cob, t15/test15f.c, t17/Makefile, t18/Makefile, + t21/test21.cob: Modified test15e for variable length COMP fields. + +2000-09-30 00:30 rpragana + + * compiler/htcobgen.c: Fixed bug at value_to_eax(), as reported by + DEssex. + +2000-09-29 21:55 rpragana + + * compiler/htcobgen.c: Fixed a "movsll" generated instruction as + reported by David Essex (though I didn't find where, I found why). + +2000-09-29 17:47 bgiroud + + * compiler/htcobgen.c: Corrected dumping twice the working storage. + +2000-09-29 17:33 bgiroud + + * compiler/htcobgen.c, info/Compiler-Overview.txt, + test_suite/Makefile, test_suite/call_tests/ptest02.cob, + test_suite/call_tests/stest9xx.c: Fixed bug of RETURN-CODE not + being fetched from the static segment on return from main. + Corrected some code in load_adress to load in %eax and not %ebx. + Added Makefile in test_suite for better handling of regression + tests. + +2000-09-28 21:28 andrewcza + + * lib/fileio.c, test.code/t18/test18.cob: + Finish START VERB for Indexed IO. + +2000-09-28 01:01 dessex + + * AUTHORS, ChangeLog, info/rpm/tinycobol-0.2.spec, + test.code/Makefile: Added new spec file Updated Changelog file. + +2000-09-27 02:52 dessex + + * utils/cobpp/Makefile.in: Fixed bug in Makefile.in in util/cobpp. + +2000-09-25 11:11 rpragana + + * compiler/htcobgen.c, test.code/t02/test02.cob: Replaced movb --> + movsbl (sign extending to long), movw --> movswl at several code + generating places, so tables with variable-sized binary types + (comp) works again. + +2000-09-24 02:34 rpragana + + * compiler/htcobgen.c, lib/cobmove.c: Fixed bugs with + variable-sized binary (comp) translating some statements + (movl,addl,subl,...) to movb,movw,movl, acoording the size. There + were bugs also introduced with static memory allocation ('leal' is + not the same as 'movl'a). Changes to cob_move to cope with + variable-sized binary objects. + +2000-09-23 22:57 dessex + + * compiler/createver.sh, compiler/htcobgen.c, compiler/htcobol.y, + lib/general.c, test.code/t08/Makefile, test.code/t22/Makefile, + test.code/t23/Makefile: Moved 'do_scrio_finish' call from general.c + to htcobgen.c. This removed curses library requirement from all but + programs using a 'SCREEN SECTION. + +2000-09-23 20:08 dessex + + * ANNOUNCE, test.code/t08/Makefile, test.code/t08/Raw.dat, + test.code/t08/Readme.txt, test.code/t18/Readme.txt, + test.code/t23/Makefile, test.code/t23/Readme.txt, + test.code/t23/r.sh, test.code/t23/test23.cob: Removed large data + file Raw.dat. + +2000-09-23 18:14 rpragana + + * ChangeLog, compiler/htcobgen.c, test.code/t12/Makefile: Fixed bug + with wrong alternate key offset, introduced when we changed to + static variables. + +2000-09-22 12:44 rpragana + + * compiler/: htcobgen.c, scan.l: More bugfixes for stabs. + +2000-09-22 00:15 rpragana + + * compiler/: htcobol.y, scan.l: Changed back stabs_line() call. It + works only (breakpoints or single steps) within a "sentence", not a + "statement" as it should. The reason is we have to call + stabs_line() _before_ the corresponding code generation for each + line in procedure division. It was broken when "sentence" + non-terminal was added. This is a temporary solution!! + +2000-09-21 23:18 rpragana + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/scan.l, + lib/htcoblib.h, test.code/t02/Makefile, test.code/t02/test02.cob, + test.code/t21/Makefile, test.code/t22/Makefile: Many mysterious bug + fixes. Stabs now working again. Static memory allocation almost + working. + +2000-09-21 01:58 jmnoeth + + * test.code/Readme.txt: Added t23 for screenIO stuff + +2000-09-21 01:58 jmnoeth + + * lib/: cobmove.c, general.c, htcoblib.h, screenio.c: changed + covmove.c to incorporate the data type DTYPE_ACCEPT_DISPLAY to be + handled the same as for DTYPE_ALPHANUMERIC + + changed screenio.c to add the screen oriented I/O capabilities + + changed general.c to reset the screen mode upon stop run. + + Changed htcoblib.h to add data type DTYPE_ACCEPT_DISPLAY and also + add the prototypes for the screenio.c routines. + +2000-09-21 01:58 jmnoeth + + * test.code/t23/: Makefile, r.sh, test23.cob: The files for test23, + the screen IO test stuff + +2000-09-21 01:58 jmnoeth + + * lib/screenio.h: Added screenio.h + +2000-09-21 01:54 jmnoeth + + * compiler/htcobgen.c: Changed htcobgen.c for screen oriented I/O. + Changed to generate calls Inline to describe each field to be + displayed or accepted. + +2000-09-20 17:23 bgiroud + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/htcoboly.h, + test_suite/call_tests/ptest02.cob, + test_suite/call_tests/ptest03.cob, + test_suite/call_tests/stest02.cob, + test_suite/call_tests/stest9xx.c: + Phase 2 of static variables (i.e. static but still initialized at + run time). Readded the possibility to have a SPECIAL-NAMES clause + empty. + +2000-09-19 17:25 rpragana + + * ChangeLog, info/Compiler-Overview.txt: Extended our + info/Compiler_Overview.txt to include some notes on memory + allocation. + +2000-09-19 02:59 rpragana + + * compiler/htcobgen.c, test.code/t15/test15e.cob: Fixed problem in + pic_digits() at htcobgen.c for computing digits of literals. + +2000-09-18 21:21 rpragana + + * compiler/htcobgen.c: Modified type 'B' (binary) data types to + handle variable-sized storage, depending on picture: 1, 2, 4 or 8 + bytes (this last a "long long" type). + +2000-09-18 20:42 andrewcza + + * lib/fileio.c, test.code/t18/Makefile, test.code/t18/test18.cob, + test.code/t18/test18i.cob, test.code/t18/test18r.cob: + Finish of the implementation of the START VERB for Relative files. + +2000-09-17 22:20 rpragana + + * ChangeLog, compiler/htcobgen.c, lib/htcoblib.h, + test.code/t08/Raw.dat: Modified struct file_desc to add + start_record pointer, as requested by Andrew, to implement the + start verb in some conditions. The pointer is initialized to NULL. + +2000-09-17 06:39 dessex + + * STATUS, compiler/createver.sh, compiler/scan.l, lib/cobmove.c, + lib/htcoblib.h, lib/screenio.c, test.code/t01/Makefile, + test.code/t02/Makefile, test.code/t02/test02a.cob, + test.code/t15/Makefile, test.code/t15/test15e.cob, + test.code/t16/Makefile, test.code/t16/Makefile.new: Added USAGE IS + PACKED-DECIMAL clauses to scanner. Moved decimal_char from + screenio.c to cobmove.c, thus removing curses library requirement. + +2000-09-17 01:01 rpragana + + * ChangeLog, lib/basicio.c: Changes in display library function, so + we don't need to link with ncurses, when screen i/o is not needed. + Basically, we need decimal_char (setup at compile time). + +2000-09-16 22:54 dessex + + * compiler/scan.l, lib/cobmove.c, test.code/t02/Makefile, + test.code/t02/r.sh, test.code/t02/test02.cob, + test.code/t02/test02a.cob, test.code/t15/Makefile, + test.code/t19/test19a.cob, test.code/t22/test22.cob: Added sample + test program test02a.cob. Added USAGE IS BINARY, USAGE IS COMP-5 + clauses to scanner. + +2000-09-15 21:52 rpragana + + * lib/basicio.c: Minor corrections to the "display" library + function. + +2000-09-15 21:24 rpragana + + * compiler/htcobgen.c: Fixed problem with compressed picture + pointer. + +2000-09-15 00:20 rpragana + + * compiler/htcobgen.c, lib/basicio.c, lib/htcoblib.h, + test.code/t01/Makefile, test.code/t02/Makefile: Changes at the + display library function for handling binary data items comp and + comp-3. + +2000-09-14 19:37 rpragana + + * lib/mcmath.c: Fixed bugs at check_condition (lib/mcmath.c) for + alpha 88-conditionals. + +2000-09-14 18:01 dessex + + * lib/basicio.c, test.code/t19/Makefile, test.code/t19/r.sh, + test.code/t19/test19a.cob, test.code/t22/test22.cob: Updated sample + test program test09a.cob, test22.cob. Fixed compiler warning in + RTL module basicio.c. + +2000-09-14 14:25 rpragana + + * ChangeLog, lib/basicio.c: Modified fgets call in lib/basicio.c. + It was inserting the newline '\n' char at the end of buffer, so + many errors came from runtime checks. + +2000-09-14 13:48 rpragana + + * compiler/htcobol.y: Removed all reduce/reduce conflicts, all of + them caused by an error check in the "variable" nonterminal. + +2000-09-13 21:44 rpragana + + * compiler/htcobol.y, compiler/scan.l, test.code/t06/Makefile, + test.code/t19/test19a.cob: Eliminated a reduce/reduce conflict and + extended the conditionals for allowing stuff like IF A > B OR < D + OR = E ... + +2000-09-13 11:32 rpragana + + * compiler/htcobol.y, test.code/t06/test06.cob, + test.code/t13/test13.cob: Bug fixed at arithmetic expressions. + Changes at some test code. + +2000-09-12 23:47 dessex + + * ANNOUNCE, ChangeLog, STATUS, tinycobol.lsm, + test.code/t22/test22.cob: Updated sample test program in + test.code/t22, and ChangeLog. + +2000-09-12 13:27 rpragana + + * ChangeLog, lib/mcmath.c: Modified check_condition source at + lib/mcmath.c. It was not correctly checking (a big OR) all + conditions, and breaking too fast. + +2000-09-12 01:37 rpragana + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/htcoboly.h, + test.code/t22/Makefile: Many changes to accomodate all kind of + conditionals. There were a problem with reduce/reduce conflict on + the parsing of the token NOT. To avoid increasing the lookahead + (and as a consequence, the complexity of the scanning process), I + have changed instead the "expr" non-terminal. + +2000-09-11 15:19 rpragana + + * compiler/: htcobgen.c, htcobol.y, scan.l: Temporary fix for an + annoying reduce/reduce problem with NOT token. Some conditions as + "if ws-var is not alphabetic" don't work, but "if not ws-var is + alphabetic" works. + +2000-09-11 14:06 dessex + + * Makefile.in, test.code/t20/r.sh, test.code/t21/Makefile, + test.code/t22/test22.cob: Updated sample test program test22.cob in + test.code/t22. + +2000-09-11 12:55 rpragana + + * compiler/htcobol.y, lib/mcmath.c: Fixed some class condition bugs + and implemented the runtime library check routines. + +2000-09-11 01:12 rpragana + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/htcoboly.h, + compiler/scan.l, lib/htcoblib.h, lib/mcmath.c, + test.code/t22/test22.cob: Modified 88-variables to support more + than one range or lists of values, or combinations. + +2000-09-10 20:15 rpragana + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/htcoboly.h, + lib/mcmath.c: Implemented most of class conditionals. There are + four small runtime tests to be done, skeletons already in place + (who wants to? I'm bored now :) + +2000-09-10 19:23 dessex + + * test.code/t22/: Makefile, test22.cob: Updated sample test program + test22.cob in test.code/t22. + +2000-09-10 14:17 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y, lib/mcmath.c: + Added general arithmetic-expressions conditionals. Please test + everything that use the nonterminal "expr". Now "expr" have a type + (read comments at htcobol.y), so will be easier to test if a + expression is well-formed. + +2000-09-10 00:52 rpragana + + * compiler/htcobol.y, compiler/scan.l, test.code/t18/Makefile, + test.code/t19/Makefile, test.code/t21/Makefile, + test.code/t22/Makefile: Parsing of sign conditions and class + conditions. Code generation for sign conditions (but not yet for + class conditions). + +2000-09-09 22:24 dessex + + * test.code/: Readme.txt, t22/Makefile, t22/Readme.txt, t22/r.sh, + t22/test22.cob: Added sample test programs in test.code/t22. + +2000-09-09 20:49 rpragana + + * ChangeLog, lib/basicio.c: Change gets to fgets in terminal i/o to + remove a compiler warning (dangerous if more than 8192 bytes read). + +2000-09-09 20:22 dessex + + * INSTALL, configure, configure.in, compiler/scan.l: Changed + configure script options. + +2000-09-09 17:06 bgiroud + + * Makefile.in, compiler/Makefile.in, compiler/htcobgen.c, + compiler/htcoboly.h, test_suite/test.baseline, + test_suite/call_tests/ptest03.cob, + test_suite/call_tests/test.script, + test_suite/format_tests/test.script: + Phase I of static working-storage. Minor changes for better + handling of test suite. + +2000-09-09 11:44 rpragana + + * compiler/htcobgen.c, compiler/htcobol.y, lib/basicio.c: Fixed + parsing of cond_op, so the IF and other statements with + conditionals now work with conditions like "X GREATER THAN OR EQUAL + TO Y". + +2000-09-07 14:47 dessex + + * ANNOUNCE, STATUS, tinycobol.lsm, test.code/Readme.txt, + test.code/t15/Makefile, test.code/t15/Readme.txt, + test.code/t15/r.sh, test.code/t15/test15e.cob, + test.code/t15/test15f.c: Added sample test programs in + test.code/t15. Added ANNOUNCE, STATUS files. + +2000-08-31 03:03 dessex + + * AUTHORS, info/rpm/tinycobol-20000830.spec, + test.code/t05/Readme.txt: Added new rpm spec file. + +2000-08-29 17:48 bgiroud + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/htcoboly.h, + test_suite/cobol_test.pl, test_suite/call_tests/ptest01.cob, + test_suite/call_tests/ptest02.cob, + test_suite/call_tests/stest01.cob, + test_suite/call_tests/stest9xx.c, + test_suite/call_tests/test.script: + Added Call By REFERENCE, By VALUE. + +2000-08-29 06:16 dessex + + * ChangeLog, tinycobol.lsm, compiler/createver.sh: Updated + Changelog file. + +2000-08-25 03:44 dessex + + * compiler/: createver.sh, htcobgen.c, htglobals.c, htglobals.h: + Minor modifications to version info and code generation on + compiler. + +2000-08-24 03:45 dessex + + * compiler/: createver.sh, htglobals.c, htglobals.h: Updated + version info on compiler cmd line. + +2000-08-22 23:49 dessex + + * ChangeLog: Updated Changelog file. + +2000-08-22 19:49 rpragana + + * lib/: mcmath.c, pictures.c: Updated the runtime error for + mcmath.c, to better identify an overflow error, as reported by + Luciano Cerda (Conectiva Linux, Brasil). + +2000-08-22 10:30 dessex + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/htcoboly.h, + test.code/t05/Makefile, test.code/t05/r.sh, + test.code/t05/test05d.cob: Added code for PERFORM ... VARYING ... + AFTER statements. All PERFORM statements are be now completed. + +2000-08-18 02:25 dessex + + * compiler/htcobol.y, test.code/t05/test05b.cob, + test.code/t05/test05c.cob: Added code for WITH TEST AFTER/BEFORE + option in in-line PERFORM statements. + +2000-08-15 07:10 dessex + + * AUTHORS, BUGS, CHANGES, ChangeLog, HISTORY, INSTALL, INSTALL.bin, + README, TODO, configure, configure.in, htconfig.h.in, + tinycobol.lsm, info/Compiler-Overview.txt, + info/VarStructure.Info.txt, info/compiler-design-future.txt: + Updated text files after ispell check. + +2000-08-14 06:49 dessex + + * ChangeLog, tinycobol.lsm: Updated Changelog. + +2000-08-14 06:35 dessex + + * AUTHORS, tinycobol.lsm, compiler/htcobol.y, test.code/Readme.txt, + test.code/t02/test02.cob, test.code/t05/Makefile, + test.code/t05/Readme.txt, test.code/t05/test05.cob, + test.code/t05/test05a.cob, test.code/t05/test05b.cob, + test.code/t05/test05c.cob, utils/cobpp/main.c: Added 'WITH TEST + AFTER/BEFORE' options to PERFORM statements. Added test code + test05[abc].cob and removed test05.cob. + +2000-08-09 04:35 bgiroud + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/htcoboly.h, + compiler/scan.l, test_suite/compile_tests/test.script, + test_suite/format_tests/test.script, + test_suite/format_tests/test03d.cob, + test_suite/format_tests/test05b.cob: + Added INITIALIZE statement with tests. First phase of CALL + extensions. Cleaned up currency sign tests. + +2000-08-03 09:47 bgiroud + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/scan.l, + test_suite/format_tests/test.script, + test_suite/format_tests/test03d.cob: + Added support for currency sign (euro sign will follow). + +2000-07-27 16:17 dessex + + * ChangeLog: Updated Changelog. + +2000-07-25 01:00 bgiroud + + * test_suite/: idxio_tests/idxio02.cob, perform_tests/perf01.cob, + perform_tests/perf02.cob, perform_tests/perf03.cob, + perform_tests/perf04.cob, seqio_tests/seqio03.cob, + seqio_tests/seqio04.cob, seqio_tests/seqio05.cob, + seqio_tests/seqio06.cob, seqio_tests/seqls01.cob, + seqio_tests/seqls02.cob: + Changed all programs in test_suite still named TEST. + +2000-07-23 16:50 bgiroud + + * compiler/htcobol.y, test_suite/seqio_tests/seqio01.cob, + test_suite/seqio_tests/seqio02.cbl: + Made keyword MODE in ACCESS MODE IS optional too. Changed + Program-id from TEST to SEQIOnn. + +2000-07-11 06:38 dessex + + * AUTHORS, ChangeLog, tinycobol.lsm: Updated Changelog. + +2000-07-10 10:41 dessex + + * compiler/htcobol.y, compiler/scan.l, test.code/t21/Readme.txt, + test.code/t21/test21.cob: Added NEXT SENTENCE, CONTINUE statements + in IF/ELSE conditional statements. Added CONTINUE in statements in + in-line PERFORM statement. Removed END-PERFORM scope terminator + option from standard PERFORM statement. + +2000-07-09 13:38 dessex + + * ChangeLog, test_suite/cobol_test.pl: Added bug fix in + test_suite/cobol_test.pl. Updated Changelog. + +2000-07-09 13:21 dessex + + * compiler/htcobol.y, compiler/scan.l, lib/htcoblib.h, + lib/mcmath.c, lib/strings.c, test.code/Readme.txt, + test.code/t00/teste.cob, test.code/t05/test05.cob, + test.code/t07/test07.cob, test.code/t10/test10.cob, + test.code/t18/test18.cob, test.code/t18/test18i.cob, + test.code/t18/test18r.cob, test.code/t21/test21.cob: Added bug fix + in PROGRAM-ID statement. Added Added in-line PERFORM statement. + +2000-07-01 08:45 dessex + + * ChangeLog, compiler/htcobol.y, compiler/scan.l, + test.code/t21/Makefile, test.code/t21/test21.cob: Added bug fix in + parser for perform statement. Added initial parser code for the + 'with test BEFORE/AFTER' perform option. Updated Changelog. + +2000-06-30 23:16 dessex + + * compiler/htcobol.y, compiler/scan.l, lib/htcoblib.h, + test.code/Readme.txt, test.code/t21/Makefile, + test.code/t21/Readme.txt, test.code/t21/r.sh, + test.code/t21/test21.cob: Added COBOL-85 code for scope delemiters + (END-*). Added t21 test.code files to test COBOL-85 scope + delemiters (END-*) code. + +2000-06-10 22:02 dessex + + * ChangeLog: Updated Changelog. + +2000-06-09 01:19 dessex + + * lib/cobmove.c, test.code/t15/test15.cob, + test.code/t15/test15a.cob, test.code/t15/test15b.c: Fixed bug in + move from type 9 COMP to type 9 DISPLAY fields. + +2000-06-06 23:20 dessex + + * ChangeLog, tinycobol.lsm, test.code/t19/test19a.cob: Updated + Changelog. + +2000-06-01 20:46 andrewcza + + * lib/: fileio.c, htcoblib.h: + Fix fileio.c so that INDEXED IO works again. + + Please note that the START VERB will not work yet. I will try to + finish this code soon. + +2000-05-23 18:49 dessex + + * lib/Makefile.in, test.code/t19/Makefile: Added Makfile code for + dynamic library build. + +2000-05-13 14:06 dessex + + * ChangeLog: Updated Changelog. + +2000-05-13 13:57 dessex + + * tinycobol.lsm, lib/htcoblib.h, test.code/t15/test15.cob, + test.code/t15/test15a.cob, test.code/t15/test15b.c, + test.code/t15/test15d.c, test_suite/compile_tests/oracle1.cob, + test_suite/compile_tests/oracle2.cob, + test_suite/compile_tests/oracle3.cob, utils/cobpp/AUTHORS, + utils/cobpp/COPYRIGHT: Removed oracle[123].cob files in + test_suite/compile_tests. Added tinycobol.lsm file. + +2000-05-11 10:18 dessex + + * ChangeLog, INSTALL, compiler/cobopt, test.code/t20/Makefile, + test.code/t20/TCfile3.txt, test.code/t20/test20e.cob: Added test in + test.code/t20 for 2-diamentional table in SEARCH/SEARCH ALL + statements. + +2000-05-08 04:12 dessex + + * ChangeLog: Updated and fixed Changelog. + +2000-05-07 23:05 dessex + + * ChangeLog: Updated Changelog. + +2000-05-07 02:42 rpragana + + * ChangeLog: Updated Changelog. + +2000-05-06 20:40 dessex + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/htcoboly.h, + compiler/scan.l, test.code/Readme.txt, test.code/t20/Makefile, + test.code/t20/Readme.txt, test.code/t20/TCfile1.txt, + test.code/t20/TCfile2.txt, test.code/t20/TCtable1.cpy, + test.code/t20/TCtable2.cpy, test.code/t20/TCtable3.cpy, + test.code/t20/TCtable4.cpy, test.code/t20/TCtable5.cpy, + test.code/t20/mktab.sh, test.code/t20/r.sh, + test.code/t20/test20a.cob, test.code/t20/test20b.cob, + test.code/t20/test20c.cob, test.code/t20/test20d.cob: Added code + for SEARCH and SEARCH ALL statements. Added test.code/t20 SEARCH + COBOL test code. + +2000-04-08 04:28 dessex + + * utils/: Readme.txt, cobpp/COPYRIGHT, cobpp/Makefile.0, + cobpp/Makefile.in, cobpp/Readme.txt, cobpp/cobpp.h, cobpp/main.c, + cobpp/scanner.l, cobpp/support.c: Minor update to cobpp. + +2000-03-29 05:19 dessex + + * test.code/t06/test06-variable-names.cob: Renamed + test06-variable-names.cob to test06v.cob in test.code/t06. + +2000-03-25 18:40 dessex + + * test.code/: Makefile.2.tmpl, Makefile.3.tmpl, Makefile.tmpl, + t00/Makefile, t01/Makefile, t02/Makefile, t03/Makefile, + t04/Makefile, t06/Makefile, t07/Makefile, t10/Makefile, + t11/Makefile, t12/Makefile, t13/Makefile, t14/Makefile, + t15/Makefile, t18/Makefile, t19/Makefile: Changed makefiles in + test.code directory to have debug feature set on. + +2000-03-25 03:39 dessex + + * compiler/cobopt, compiler/htcobgen.c, compiler/htglobals.c, + compiler/htglobals.h, compiler/scan.l, test.code/Makefile, + test.code/Makefile.2.tmpl, test.code/Makefile.3.tmpl, + test.code/Makefile.tmpl, test.code/config/C.rules.in, + test.code/config/COB.build.tmpl.in, + test.code/config/COB.build.tmpl.t.in, + test.code/copybooks/CMDLine.cpy, test.code/copybooks/CMDLine1.cpy, + test.code/copybooks/ENVAR1.cpy, test.code/t00/Makefile, + test.code/t01/Makefile, test.code/t02/Makefile, + test.code/t03/Makefile, test.code/t04/Makefile, + test.code/t04/test04.cob, test.code/t04/test04i.cob, + test.code/t04/test04r.cob, test.code/t05/Makefile, + test.code/t05/test05.cob, test.code/t06/Makefile, + test.code/t06/Readme.txt, test.code/t06/index01.cob, + test.code/t06/test06.cob, test.code/t06/test06i.cob, + test.code/t06/test06r.cob, test.code/t06/test06s.cob, + test.code/t06/test06v.cob, test.code/t07/Makefile, + test.code/t07/Makefile.orig, test.code/t07/cobsub.cob, + test.code/t07/test07.cob, test.code/t08/Makefile, + test.code/t08/test08.cob, test.code/t09/Makefile, + test.code/t09/r.sh, test.code/t09/test09.cob, + test.code/t10/Makefile, test.code/t10/Readme.txt, + test.code/t10/test10.cob, test.code/t11/Makefile, + test.code/t11/Readme.txt, test.code/t11/test11.cob, + test.code/t12/Makefile, test.code/t12/Readme.txt, + test.code/t12/test12.cob, test.code/t12/test12i.cob, + test.code/t12/test12ls.cob, test.code/t12/test12r.cob, + test.code/t12/test12s.cob, test.code/t13/Makefile, + test.code/t13/Readme.txt, test.code/t13/r.sh, + test.code/t13/test13.cob, test.code/t14/Makefile, + test.code/t14/Readme.txt, test.code/t14/r.sh, + test.code/t14/test14.cob, test.code/t15/Makefile, + test.code/t15/Readme.txt, test.code/t15/test15.cob, + test.code/t15/test15a.cob, test.code/t15/test15b.c, + test.code/t15/test15d.c, test.code/t16/Makefile.new, + test.code/t16/Readme.txt, test.code/t16/r.sh, + test.code/t16/test16.cob, test.code/t17/CMDLine.cpy, + test.code/t17/CMDLine1.cpy, test.code/t17/ENVAR1.cpy, + test.code/t17/Makefile, test.code/t18/Makefile, + test.code/t18/test18.cob, test.code/t18/test18i.cob, + test.code/t19/CMDLine1.cpy, test.code/t19/Makefile: Fixed the leaks + (spaces, LF, etc.) in the scanner (lex). Added the include + (-Ipath) compiler option to define search paths for copybooks. + Added the -v (verbose), -z (very verbose), compiler options. + +2000-03-24 13:18 rpragana + + * compiler/htcobgen.c: More changes to gen_loadvar where we may + find problems with subscripts. + +2000-03-24 07:17 rpragana + + * compiler/htcobgen.c: Fixed obscure bug at gen_compare function. + We must use gen_loadvar to make sure subscripted variables are + correctly defined. + +2000-03-23 11:39 rpragana + + * test.code/t16/Makefile: Looking for variable allocation bug. + +2000-03-21 16:04 rpragana + + * ChangeLog: Updated ChangeLog. + +2000-03-21 12:47 rpragana + + * compiler/htcobol.y, test.code/t16/Makefile, + test.code/t16/test16.cob: Commented the "is_variable" call in the + parser, until I fix it. + +2000-03-21 10:11 rpragana + + * compiler/htcobol.y, test.code/t16/test16.cob: Change to avoid + null list in "var_list" productions. + +2000-03-21 09:51 rpragana + + * compiler/htcobgen.c, compiler/htcobol.y, + test.code/t16/test16.cob: Avoid statements like "move 123 to + undefined-1" with undefined-1 being defined as a paragraph. The + function "is_variable" was defined to enforce this condition. + +2000-03-21 05:48 dessex + + * COPYING.LIB, COPYRIGHT, compiler/htcobgen.c, + test.code/Makefile.old, test.code/Makefile.tmpl, + test.code/Readme.txt, test.code/r.sh, test.code/r.sh.tmpl, + test.code/config/COB.build.tmpl.in, + test.code/config/COB.build.tmpl.t.in, + test.code/config/COB.rules.in, test.code/t00/Makefile, + test.code/t01/Makefile, test.code/t01/compile, + test.code/t01/test01.2.cob, test.code/t01/test2.cob, + test.code/t02/Makefile, test.code/t03/Makefile, + test.code/t04/Makefile, test.code/t05/Makefile, + test.code/t06/Makefile, test.code/t08/Makefile, + test.code/t09/Makefile, test.code/t10/Makefile, + test.code/t11/Makefile, test.code/t12/Makefile, + test.code/t13/Makefile, test.code/t14/Makefile, + test.code/t16/Makefile, test.code/t17/Makefile, + test.code/t18/Makefile, test.code/t19/CMDLine1.cpy, + test.code/t19/Makefile, test.code/t19/Readme.txt, + test.code/t19/r.sh, test.code/t19/test.in.txt, + test.code/t19/test19.cob, test.code/t19/test19a.cob: Fixed bug in + file I/O record define code generation. Enhanced makefiles in + test.code directory. Added test.code t19 for run time file I/O + testing. + +2000-03-12 20:41 dessex + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/htcoboly.h, + compiler/scan.l, test.code/Readme.txt, test.code/t17/ENVAR1.cpy, + test.code/t17/GETENV1.cpy, test.code/t17/test17.cob: I have added + the ability to set a return a positive integer from a COBOL program + using the MOVE ... TO RETURN-CODE statement. Changed environment + variables copybook. + +2000-02-27 10:20 dessex + + * test.code/t17/GETENV1.cpy: Added the read environment variables + copybook. + +2000-02-27 10:15 dessex + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/htcoboly.h, + compiler/scan.l, lib/basicio.c, lib/htcoblib.h, + test.code/Readme.txt, test.code/t17/CMDLine.cpy, + test.code/t17/CMDLine1.cpy, test.code/t17/Makefile, + test.code/t17/test17.cob: I have added the ability to read + environment variables using the ACCEPT verb. + +2000-02-26 08:18 dessex + + * INSTALL, configure, configure.in, htconfig.h.in, + compiler/htcobgen.c, lib/htcoblib.h, test.code/Readme.txt, + test.code/t11/Makefile: Changed configure to to enable use of + library db version 2.xx or later. Fixed bug in user SECTION + defined name, so that gas can asseble it. + +2000-02-08 17:20 andrewcza + + * lib/fileio.c, lib/htcoblib.h, test.code/t18/test18.cob, + test.code/t18/test18r.cob: + Implement START ... GREATER THAN for Relative files. + +2000-01-27 05:36 dessex + + * INSTALL, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htcoboly.h, compiler/scan.l, lib/basicio.c, + lib/htcoblib.h, test.code/t02/test02.cob, test.code/t03/Makefile, + test.code/t03/test03.cob, test.code/t18/Makefile: I have changed + the compiler so that all variable names will be displayed without + the '-' to '_' replacement. I have enhanced the DISPLAY verb to + enable to direct output to stdout/stderr. The default is the + CONSOLE, which is stdout. + +2000-01-13 00:42 rpragana + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/scan.l, + lib/htcoblib.h: Small change in token OVERFLOW, because of clash + with math.h include. + +2000-01-12 16:08 dessex + + * compiler/htcobol.y, compiler/scan.l, lib/htcoblib.h, + test.code/t02/test02.cob, test.code/t03/Makefile, + test.code/t03/r.sh: Added READY/RESET TRACE to scanner. Added + htconfig.h includes in htcoblib.h file. + +2000-01-12 08:11 dessex + + * configure.in: Added configure.in file. + +2000-01-12 08:11 dessex + + * utils/cobpp/: ansi_setup.h, cobpp.h, get_util.c, get_util.h, + list_util.c, list_util.h, main.c, opt_util.c, opt_util.h, + scanner.l, str_util.c, str_util.h, support.c, vperror.c, vperror.h: + Added utils/cobpp files. + +2000-01-12 06:22 dessex + + * INSTALL, Makefile.in, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htglobals.c, compiler/scan.l, lib/cobmove.c: Added ability + to switch debugging(stabs) on/off in code generation. Small fix in + scanner to scan ',' and/or blanks. Changed compiler macro switch + from DEBUGGING to DEBUG_RTS in cobmove. + +2000-01-12 04:50 dessex + + * INSTALL, Makefile, Makefile.0, Makefile.in, configure, + htconfig.h.in, install-sh, compiler/Makefile, compiler/Makefile.0, + compiler/Makefile.in, compiler/htconfig.0.h, compiler/htconfig.h, + lib/Makefile, lib/Makefile.0, lib/Makefile.in, utils/Makefile, + utils/Makefile.0, utils/Makefile.in, utils/cobpp/Makefile, + utils/cobpp/Makefile.0, utils/cobpp/Makefile.in, + utils/cobpp/cobpp/Makefile, utils/cobpp/cobpp/cobpp.h, + utils/cobpp/cobpp/main.c, utils/cobpp/cobpp/scanner.l, + utils/cobpp/cobpp/support.c, utils/cobpp/lib/Makefile, + utils/cobpp/lib/ansi_setup.h, utils/cobpp/lib/get_util.c, + utils/cobpp/lib/get_util.h, utils/cobpp/lib/list_util.c, + utils/cobpp/lib/list_util.h, utils/cobpp/lib/opt_util.c, + utils/cobpp/lib/opt_util.h, utils/cobpp/lib/str_util.c, + utils/cobpp/lib/str_util.h, utils/cobpp/lib/vperror.c, + utils/cobpp/lib/vperror.h: Added configure files. Changed cobpp + directories and moved files to one directory. + +2000-01-10 17:04 andrewcza + + * test_suite/cobol_test.pl: + Fix cobpp path + +2000-01-10 16:29 andrewcza + + * lib/fileio.c, test.code/t18/test18.cob, + test.code/t18/test18r.cob: + Fix Prototype for cob_start in fileio.c. + +2000-01-07 13:47 andrewcza + + * lib/fileio.c, test.code/t18/test18.cob, + test.code/t18/test18i.cob: + Modify fileio.c to start implementing START fo relative files + +2000-01-06 02:13 jmnoeth + + * test_suite/format_tests/test.script: Added entry for program + test01c (tests COMP data types) + +2000-01-06 02:13 jmnoeth + + * test_suite/format_tests/test01c.cob: New program to test COMP (4 + byte binary integer) data types + +2000-01-06 02:13 jmnoeth + + * test_suite/format_tests/test05a.cob: fixed the test for high/low + values + +2000-01-06 01:56 jmnoeth + + * test_suite/test.baseline: Added section for new program + format_tests/test05a to test COMP data types. + +2000-01-06 01:51 jmnoeth + + * lib/htcoblib.h: Added DTYPE_GROUP for cobmove routines + +2000-01-06 01:51 jmnoeth + + * lib/cobmove.c: Added logic to handle COMP and INDEX data types (4 + byte binary integer) + +2000-01-04 17:01 andrewcza + + * lib/fileio.c, lib/htcoblib.h, test.code/t18/Makefile, + test.code/t18/Readme.txt, test.code/t18/r.sh, + test.code/t18/test18.cob: + Create test18 and modify fileio.c and htcoblib.h to implement the + start command for an indexed file using the primary key where the + condition is = to the key. + +2000-01-04 16:18 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htcoboly.h, lib/Makefile, lib/htcoblib.h, lib/screenio.c, + test.code/t16/test16.cob: Added generation of screen section + accepts/displays (not the library functions yet). + +2000-01-04 12:47 rpragana + + * compiler/scan.l, test.code/t16/test16.cob: Added "D" + comment/debug syntax, controlled by variable source_debug (scan.l), + as queried by Glen. + +2000-01-04 00:19 glen + + * compiler/scan.l: Added scan rule to allow floating asterisk for + comment + +2000-01-03 16:00 rpragana + + * compiler/: htcobgen.c, htcobol.y, htcoboly.h: Modified "start" + statement syntax and code generation to allow conditions and + alternate keys (as required by Andrew). + +2000-01-03 05:58 dessex + + * compiler/Makefile, compiler/scan.l, + utils/cobpp/cobpp/scanner.1.l: Added -DDEBUG_SCANNER flag in + compiler/Makefile and removed it from scan.l. Removed excess file + scanner.1.l from cobpp. + +2000-01-03 05:24 dessex + + * INSTALL, INSTALL.bin, README, info/rpm/Readme.txt, + info/rpm/rpm-KickStart-HOWTO-13.txt, + info/rpm/tinycobol-0.19991230.spec, utils/Makefile, + utils/cobpp/Makefile, utils/cobpp/cobpp/Makefile: Added info/rpm + directory which contains info and spec file. Added INSTALL.bin + file for binary distribution. Added make install for cobpp. + Enhanced INSTALL and README files. + +2000-01-02 01:02 glen + + * test_suite/test.baseline: Updates for new move library results + +2000-01-02 00:37 glen + + * test_suite/format_tests/: test01a.cob, test01b.cob: Correct + display to allow test to run in test_suite + +1999-12-31 01:14 jmnoeth + + * test_suite/format_tests/test05a.cob: Changed to not test for + low/high values, as this test didn't appear to work. Instead, + created a routine _DUMP_, which places a hex representation of data + for one field into another field. The Hex values were displayed for + comparison. Also added code to check the move of figurative zero, + high and low values to a numeric (display) field. + + The _DUMP_ is called like: WORKING-STORAGE. 01 WS-DUMP-INPUT + PIC X(n). 01 WS-DUMP-OUTPUT PIC + X(n * 2). 01 WS-DUMP-COUNT PIC 9(4) VALUE n. + + PROCEDURE DIVISION. + CALL "_DUMP_" USING + WS-DUMP-INPUT + WS-DUMP-COUNT + WS-DUMP-OUTPUT. + +1999-12-31 01:14 jmnoeth + + * test_suite/format_tests/test04.cob: Added code to test the 'CR' + and 'DB' edit types. + +1999-12-31 01:14 jmnoeth + + * test_suite/format_tests/test02b.cob: Moving a 4 digit number to a + $$$9 field will result in 3 digits (left most digit will get + truncated), preceeded by the currency sign. Floating insertion + characters always require one more character than necessary to hold + all the digits, the extra character is for the insertion character + itself if all digits are non zero. + +1999-12-31 01:14 jmnoeth + + * test_suite/format_tests/test03c.cob: The compiler seems to have a + problem with pictures like 9(nn)V9(nn), it is generating a field + definition stating that there is only one decimal position + regardless of what the picture states. This bug applies to the + display of field WS-X3. Added code to test asterisk insertion. + +1999-12-31 01:14 jmnoeth + + * test_suite/format_tests/test03b.cob: The result for test AE08 + should really be "3 45" instead of "3 46" because the blank is + inserted into the result. The same is true with the slash (/) (test + AS08) insertion, the result should be "3/45" instead of "3/46". + +1999-12-31 01:14 jmnoeth + + * test_suite/format_tests/test03a.cob: The compiler is not properly + generating numeric constants that contain decimal points. For the + purposes of this test, the numeric constants containing decimal + points were changed to alphanumeric constants. + +1999-12-31 01:06 jmnoeth + + * lib/Makefile: Changed to use cobmove.c instead of mcmove.c + +1999-12-31 01:06 jmnoeth + + * test_suite/cobol_test.pl: Changed name of cobol library from + libcobol.a to libhtcobol.a + +1999-12-31 01:06 jmnoeth + + * lib/htcoblib.h: Inserted constants and definitions for cobmove + routines + +1999-12-31 01:06 jmnoeth + + * lib/mcmath.c: Changed logic to deal with sign characters of + packed numeric fields. + +1999-12-31 01:06 jmnoeth + + * lib/cobmove.c: New runtime move routines (replaces mcmove.c) + +1999-12-30 05:17 dessex + + * compiler/htconfig.h, test.code/t01/test01.2.cob: Added + htconfig.h, modified htglobals.c to use htconfig.h. Removed and + renamed some excess files. + +1999-12-30 05:12 dessex + + * BUGS, INSTALL, Makefile, README, cobopt, compiler/Makefile, + compiler/Makefile.0, compiler/cobopt, compiler/htcobgen.c, + compiler/htglobals.c, lib/Makefile, lib/Makefile.0, + lib/basicio.1.c, lib/basicio.2.c, lib/general.1.c, lib/mccntrl.0.h, + test.code/Readme.txt, test.code/t00/.gdbinit, + test.code/t00/Makefile, test.code/t00/gdbinit.0, + test.code/t00/r.sh, test.code/t00/teste.0.cob, + test.code/t00/teste.1.cob, test.code/t01/Makefile, + test.code/t01/r.sh, test.code/t01/test1.cob, + test.code/t01/test_pos.S, test.code/t02/Makefile, + test.code/t03/.gdbinit, test.code/t03/Makefile, + test.code/t03/gdbinit.1, test.code/t04/Makefile, + test.code/t04/r.sh, test.code/t05/Makefile, test.code/t05/r.sh, + test.code/t06/Makefile, test.code/t06/r.sh, test.code/t07/Makefile, + test.code/t07/Makefile.orig, test.code/t07/r.sh, + test.code/t08/Makefile, test.code/t08/r.sh, test.code/t09/Makefile, + test.code/t10/Makefile, test.code/t10/r.sh, test.code/t11/Makefile, + test.code/t11/r.sh, test.code/t12/Makefile, test.code/t12/r.sh, + test.code/t13/Makefile, test.code/t14/Makefile, + test.code/t15/Makefile, test.code/t16/Makefile, + test.code/t17/Makefile, test.code/tdb01/Makefile, + test.code/tdb01/Makefile.0: Added make install to Makefiles. Added + htconfig.h, modified htglobals.c to use htconfig.h. Changed the + name of libcobol to libhtcobol to avoid any future conflicts. + Removed some excess files. + +1999-12-29 16:20 andrewcza + + * lib/fileio.c: + Modified fileio.c to include sanity checks on the files open mode + to make sure that you cannot write to files opened in input mode or + read from files opened in output mode etc. + +1999-12-29 15:19 andrewcza + + * lib/fileio.c, test.code/t04/test04.cob, + test.code/t04/test04r.cob: + Modified fileio.c to implement Delete for Indexed files with + Alternate keys + +1999-12-29 14:51 andrewcza + + * lib/fileio.c, test.code/t04/Makefile, test.code/t04/test04.cob, + test.code/t04/test04i.cob: + Modify fileio.c to implement rewrite for Indexed files with + alternate keys + +1999-12-28 02:49 dessex + + * compiler/htcobol.y, compiler/scan.l, test.code/Readme.txt, + test.code/t02/TEST02.cpy, test.code/t02/TEST02A.cpy, + test.code/t02/test02.cob, test.code/t17/test17.cob: Fixed bug in + COPY/COPY REPLACING statements. + +1999-12-27 22:07 dessex + + * test.code/t17/: CMDLine.cpy, CMDLine1.cpy, Makefile, Readme.txt, + r.sh, test17.cob: Added program to test 'ACCEPT var FROM + COMMAND-LINE' clause. This COBOL 74 extention, gives COBOL the + ability to process the Linux(U*IX) command line. + +1999-12-27 22:02 dessex + + * INSTALL, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htcoboly.h, compiler/scan.l, lib/Makefile, lib/basicio.c, + lib/htcoblib.h, test.code/Makefile, test.code/Readme.txt, + test.code/t16/Makefile, test.code/t16/test16.cob: Added 'ACCEPT var + FROM COMMAND-LINE' clause. This COBOL 74 extention, gives COBOL the + ability to process the Linux(U*IX) command line. + +1999-12-26 01:02 glen + + * README: Added comments for $COBDIR/cobopt file + +1999-12-26 00:57 glen + + * test_suite/perform_tests/perf05.cob: Change file name + +1999-12-26 00:57 glen + + * test_suite/test.baseline: Add sequential read of indexed file + test + +1999-12-26 00:50 glen + + * cobopt, compiler/htglobals.c: Initial addition of $COBDIR/copopt + file for installation default behavior of the compiler. This file + allows specific default behaviors for the compiler to be saved in + the cobopt file instead of having to be entered each time a program + is compiled. + +1999-12-24 17:33 glen + + * compiler/htglobals.c: Add readline to LD link list + +1999-12-24 16:37 glen + + * test_suite/idxio_tests/: idxio03.cob, test.script: Add sequential + read of indexed file test + +1999-12-24 16:04 glen + + * lib/: fileio.c, screenio.c, strings.c: Changes for var args on + Solaris + +1999-12-24 15:47 glen + + * compiler/: htcobol.y, scan.l: Added conditional for + __builtin_va_alist for Solaris + +1999-12-24 15:30 glen + + * test_suite/compile_tests/oracle1.cob: Removed comments and other + noise from test program to get to the real cause of the failed + compile. Need to support multiple call arguments. + +1999-12-24 14:04 rpragana + + * ChangeLog, compiler/scan.l: Fixed bug with pictures parsing + introduced after changes for the screen section. (Thanks David) + +1999-12-21 17:53 rpragana + + * compiler/htcobgen.c, compiler/htcobol.y, + test.code/t16/test16.cob: Fixed fld_desc.len to have the correct + length of the numeric field, for comp-3 and comp variables. + +1999-12-21 09:18 rpragana + + * ChangeLog, compiler/Makefile, compiler/htcobol.y, + compiler/htcoboly.h, compiler/scan.l, test.code/t16/test16.cob: + Eliminated uneeded flex library, defining a correct yywrap + function. More advances toward screen section implementation: code + for from/to/using at the processing functions fixed. + +1999-12-21 00:49 glen + + * test_suite/cobol_test.pl: Added readline libraries to LD + parameters + +1999-12-20 20:01 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htcoboly.h, lib/basicio.c, lib/fileio.c, lib/general.c, + lib/htcoblib.h, lib/mcmove.c, lib/screenio.c, + test.code/t11/Makefile, test.code/t12/Makefile, + test.code/t16/Makefile, test.code/t16/test16.cob: Added control of + compilation with defines WANT_READLINE and WANT_DYNAMIC_LIBS. + Added routines for processing each screen section field (at + compilation time). + +1999-12-20 16:05 andrewcza + + * lib/Makefile, lib/fileio.c, test.code/t04/Makefile: + Modified fileio.c to fix a bud in read whereby it incorrectly + returned file status 23. Addec Screenio back to the Makefile + +1999-12-20 00:06 rpragana + + * lib/Makefile, lib/basicio.c, lib/fileio.c, lib/htcoblib.h, + test.code/t11/Makefile, test.code/t12/Makefile, + test.code/t16/Makefile, test.code/t16/test16.cob: Changes to make + smarter libraries loading. Now we have to link only with -lcobol + -lm and -ldl. All other libraries, including db, ncurses and + readline are only called when appropriate. Please note changes for + calling some functions. + +1999-12-19 16:37 andrewcza + + * test.code/t04/Makefile: + Add -lreadline to makefile so the program will link + +1999-12-18 20:07 rpragana + + * ChangeLog, compiler/htcobgen.c, test.code/t16/Makefile, + test.code/t16/test16.cob, test_suite/cobol_test.pl: Added level 77 + variables and some error detection for malformed data hierarchy. + +1999-12-18 01:45 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htcoboly.h, compiler/scan.l, lib/basicio.c, + lib/htcoblib.h, test.code/t11/test11.cob, test.code/t16/Makefile, + test.code/t16/test16.cob: More changes in the accept statement, now + that I understand it a little more. It is using readline if input + comes from a terminal, otherwise plain gets(). The ncurses calls + will be reserved for screen section items i/o. + +1999-12-16 21:07 rpragana + + * compiler/htcobgen.c, compiler/htcobol.y, lib/basicio.c, + test.code/t04/test04.cob, test.code/t16/test16.cob: Introduced a + selection for accept/display statements. If there is a + screensection declared (even without any items), it will force use + of ncurses for screen i/o. Otherwise, all terminal i/o is really + stdin/stout, so we can use a line sequential file redirected as + stdin, for instance. + +1999-12-16 20:15 rpragana + + * compiler/htcobol.y, lib/screenio.c, test.code/t06/test06.cob, + test.code/t16/test16.cob: Small changes in screenio code to avoid + core dumps. It's not finished, though. + +1999-12-16 17:18 andrewcza + + * lib/fileio.c: + Modify cob_read in fileio.c for alternate keys. + +1999-12-16 16:46 rpragana + + * compiler/htcobol.y: Fixed generation of cob_return instead of + cob_read_next. (Andrew request) + +1999-12-16 16:31 rpragana + + * compiler/: htcobol.y, htcoboly.h, htglobals.h: Check if indexed + file have a record key and generate error. Conditional definition + of TRUE and FALSE at htglobals.h (clash with the same symbols in + ncurses.h). + +1999-12-16 14:22 rpragana + + * compiler/htcobgen.c, lib/basicio.c, lib/mcmove.c, lib/screenio.c: + Changes to fix a bug in screen i/o with ncurses. Now all test.code + programs run (almost perfectly). + +1999-12-16 14:12 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htcoboly.h, compiler/scan.l, lib/Makefile, lib/basicio.c, + lib/cobmove.c, lib/general.c, lib/htcoblib.h, lib/mcmove.c, + lib/screenio.c, lib/strings.c, test.code/t01/Makefile, + test.code/t02/Makefile, test.code/t03/Makefile, + test.code/t04/Makefile, test.code/t05/Makefile, + test.code/t06/Makefile, test.code/t07/Makefile, + test.code/t08/Makefile, test.code/t09/Makefile, + test.code/t10/Makefile, test.code/t11/Makefile, + test.code/t12/Makefile, test.code/t13/Makefile, + test.code/t14/Makefile, test.code/t15/Makefile, + test.code/t16/Makefile: Changes to use ncurses for screen i/o. + +1999-12-15 17:16 andrewcza + + * lib/fileio.c, test.code/t04/test04.cob: + Amend fileio.c routine cob_read_next and cob_read_prev to handle + alternate keys. + +1999-12-15 16:47 rpragana + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/htcoboly.h, + compiler/scan.l, test.code/t13/test13.cob: Modified file_desc + generation when an indexed file don't have a key field (sequential + access). Modified the scanning of copy statement when the file + name is followed by a period (end of statement). + +1999-12-15 15:49 andrewcza + + * lib/fileio.c, test.code/t04/Makefile, test.code/t04/test04.cob, + test.code/t06/test06.cob: + Modify fileio.c cob_read to handle Reading via Alternate Keys. + +1999-12-14 23:12 glen + + * compiler/htglobals.c: Reformatted fole using indent to -gnu + format. Also changed default link directory order when compiling + with -x option + +1999-12-14 23:06 glen + + * test_suite/cobol_test.pl: Changed default path to point to + htcobol and libcobol as built in the development directory. This + should make it easier for users to run the test 'out of the box.' + +1999-12-14 19:01 rpragana + + * compiler/htcobgen.c, compiler/htcobol.y, lib/strings.c, + test.code/t14/test14.cob: Implemented library function + cob_inspect_replacing (part of inspect statement). + +1999-12-14 16:09 andrewcza + + * compiler/htcobgen.c, lib/fileio.c, test.code/t04/test04.cob: + Modify htcobgen.c to fix a problem in the definitions of Alternate + keys. Modify fileio.c so that the open routine, close route and + write routine will handle Alternate keys. + +1999-12-14 12:47 rpragana + + * compiler/htcobgen.c, lib/strings.c, test.code/t14/test14.cob, + test.code/t16/test16.cob: Yet more changes to the inspect stuff. + +1999-12-14 07:44 rpragana + + * compiler/htcobgen.c: Corrected problem with "perform" code gen. + +1999-12-14 02:27 glen + + * test_suite/idxio_tests/idxio03.cob: Add mixed mode sequential I-O + test program + +1999-12-14 02:15 glen + + * test_suite/idxio_tests/: idxio02.cob, test.script: Add indexed + sequienial read test + +1999-12-14 00:51 glen + + * test_suite/idxio_tests/test.script: Initial load of indexed IO + tests to repository + +1999-12-14 00:51 glen + + * test_suite/cobol_test.pl: Added indexed sequential file access + tests + +1999-12-14 00:51 glen + + * test_suite/idxio_tests/idxio01.cob: Initial addition to the + repository of indexed io test 01 + +1999-12-13 19:48 rpragana + + * compiler/htcobgen.c: Slowly moving into the "inspect" statement. + +1999-12-13 18:11 andrewcza + + * lib/fileio.c: + Modify close routine in fileio.c to close alternate key files. + +1999-12-13 17:54 andrewcza + + * lib/fileio.c, test.code/t04/test04.cob, test.code/t12/test12.cob: + + Modify the Open routine in fileio.c to open a file for each + Alternate Key. + +1999-12-13 16:06 rpragana + + * compiler/htcobgen.c, lib/htcoblib.h: Added a DB* field to + altkey_desc to allow to store a handle for the alternate key + auxiliary file. (another libdb file for each alt key) + +1999-12-13 15:33 rpragana + + * compiler/htcobgen.c, lib/htcoblib.h: Added a field to file_desc + (htcoblib.h) to store the current alternate key file descriptor + (solicited by Andrew), or NULL if master key is in use. + +1999-12-12 23:24 glen + + * test.code/: t00/Makefile, t01/Makefile, t04/Makefile, + t05/Makefile, t06/Makefile, t08/Makefile, t09/Makefile, + t10/Makefile, t11/Makefile, t12/Makefile, t13/Makefile, + t14/Makefile: Changed -l command line option to -P in cobol make + files + +1999-12-12 23:17 rpragana + + * compiler/htcobgen.c, test.code/t03/test03.cob, + test.code/t16/test16.cob: Another small fix at the stabs for doing + single stepping through "performs". + +1999-12-12 22:48 rpragana + + * ChangeLog, compiler/htcobgen.c, test.code/t03/Makefile, + test.code/t16/Makefile: Fixups for gdb stepping within performs. I + have tomake changes in the code generated, avoiding to use the + exit_paragraph function. + +1999-12-12 17:56 rpragana + + * compiler/htcobgen.c, compiler/htcobol.y, test.code/t16/Makefile, + test.code/t16/test16.cob: Tests with stabs (debugging info + embedded). + +1999-12-12 02:19 glen + + * compiler/: htglobals.c, htglobals.h: Changes to command line + processing: Removes -l option for program listings. This is now + replaced by the -P flag. Enabled -D for the output of 'debugging' + information to the ld process. Enabled the -B static|dynamic + option to control link mode. + + Changes to work file processing when the -D option is used to put + the intermediate assembler file in the same directory as the source + so the debugger can find it. + +1999-12-12 02:11 glen + + * test_suite/cobol_test.pl: Change -l flag for listing to -P flag + for listing. This is to allow the passing of link options in the + near future + +1999-12-11 17:44 rpragana + + * compiler/htcobgen.c, compiler/htcobol.y, + test.code/t16/test16.cob: Small advance with the gdb through + "performs" problem. + +1999-12-11 01:06 rpragana + + * lib/mcmath.c, test.code/t02/Makefile, test.code/t16/test16.cob: + Fixed bug in "compare" function that prevented "perform...varying" + from working. + +1999-12-11 00:03 rpragana + + * compiler/htcobgen.c: Fixed bug in gen_set (Thanks David), "break" + missing. + +1999-12-10 22:17 rpragana + + * compiler/htcobgen.c, test.code/t16/test16.cob: Still more data + types, comp and comp-3 (partial), for debugging. + +1999-12-10 19:16 rpragana + + * ChangeLog, compiler/htcobgen.c: Debugging update: display of + "usage is display" variables implemented. + +1999-12-10 16:34 rpragana + + * compiler/htcobgen.c, compiler/htcobol.y, test.code/t16/Makefile, + test.code/t16/test16.cob: Implemented debugging info (stabs) + generation in the assembly object. + +1999-12-09 21:29 rpragana + + * compiler/: htcobgen.c, htcobol.y, htcoboly.h: Implemented clause + "KEY IS " for the "read" statement. + +1999-12-09 18:55 rpragana + + * lib/Makefile, lib/mcmath.c, test.code/t16/Makefile, + test.code/t16/test16.cob: Fixes in the arithmetic routines for + "usage is comp" variables. + +1999-12-09 17:05 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htcoboly.h, test.code/t16/test16.cob: Binary variables as + indices. New SET statement implementation (changed from David's). + +1999-12-09 13:57 rpragana + + * ChangeLog, info/Compiler-Overview.txt, test.code/t16/Makefile: + Updated the Compiler-Overview.txt doc to explain how + subscripting/indexing is working. + +1999-12-09 05:01 dessex + + * test.code/: t02/.gdbinit, t02/Makefile, t02/gdbinit.1, + t02/gdbinit.2, t02/gdbinit.3, t02/r.sh, t02/test02.cob, + t15/Makefile, t15/r.sh, t15/test15.cob, t15/test15a.cob, + t15/test15b.c: Changed sources in t15. Removed some gdbinit files + in t02 + +1999-12-09 01:53 glen + + * compiler/htglobals.c: Compiler was core dumping if no source file + name was provided. Change to generate error message and return an + error code if no file name. + +1999-12-08 15:43 andrewcza + + * compiler/htcobgen.c, lib/fileio.c, test.code/t04/test04.cob, + test.code/t12/test12.cob: + Finish off Code for Relative IO. Start with the coding for + Alternate Keys. + +1999-12-08 09:41 rpragana + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/htcoboly.h, + lib/mcmove.c, test.code/t09/.gdbinit, test.code/t09/test09.cob: Bug + fixes with special literals (high-values, low-values, ...). + +1999-12-07 18:44 rpragana + + * test.code/t16/: Makefile, test16.cob: Added usage comp example + (was missing in previous cvs commit?!). + +1999-12-07 13:58 rpragana + + * compiler/htcobol.y, lib/mcmove.c, test.code/Makefile, + test.code/t07/cobsub.cob, test.code/t07/test07.cob: Implemented + usage is computational (binary) items. + +1999-12-07 12:16 rpragana + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/htcoboly.h, + test.code/t07/Makefile, test.code/t07/cobsub.cob, + test.code/t07/test07.cob: Fixed all bugs in linkage. Now both + Cobol and C subprograms work. Tests at test.code/t07. + +1999-12-07 09:50 rpragana + + * test.code/t07/: Makefile.orig, subrot.c: Added t07/subrot.c + (almost forgot it!) + +1999-12-07 09:46 rpragana + + * test.code/t07/: Makefile, test07.cob: Changed test.code/t07 to a + test of Cobol<->C interface. + +1999-12-07 08:46 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htcoboly.h, test.code/t07/test07.cob: Changed the + arguments to call a procedure (C function) so that only a pointer + (char *) is passed corresponding to each argument. (This will make + David happier :) + +1999-12-07 01:06 dessex + + * test.code/: Readme.txt, t15/Makefile, t15/test15.cob: Small fix + to test.code/t15 directory files. + +1999-12-06 21:48 rpragana + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/htcoboly.h, + compiler/scan.l, test.code/t09/test09.cob: Finished parsing of + "inspect" statement, in full. + +1999-12-06 21:06 rpragana + + * compiler/htcobgen.c, lib/htcoblib.h, test.code/t01/.gdbinit, + test.code/t01/test01.cob: Fixed size problem with large arrays. + Notice the change at fld_desc structure for all the library + routines, as size now is a long integer. -- DON'T USE short + integers to store it anymore. -- + +1999-12-06 20:13 rpragana + + * compiler/htcobgen.c: Update "delete" as requested by Andrew, to + pass the recno for relative files. + +1999-12-06 16:41 andrewcza + + * lib/fileio.c, test.code/t04/test04.cob: + Comment out a line of code which positions us one record before the + record we need to delete. + + Change test04.cob to use READ filename KEY IS ... + +1999-12-06 15:47 andrewcza + + * lib/fileio.c, test.code/t12/test12.cob: + Modify fileio.c to implement DELETE for Relative IO. The compiler + needs a change before this will work. + +1999-12-06 15:00 andrewcza + + * lib/fileio.c, test.code/t12/test12.cob: + Finish off the library routine for READ PREVIOUS for Relative IO. + +1999-12-06 13:56 rpragana + + * compiler/htcobgen.c, compiler/htcoboly.h, lib/htcoblib.h, + lib/strings.c, test.code/t14/.gdbinit, test.code/t14/test14.cob, + test.code/t14/unstring.cob: Bug fixes for the inspect statement + code generation. + +1999-12-05 16:29 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htcoboly.h: Partial implementation of "inspect". + +1999-12-05 11:08 dessex + + * BUGS, compiler/htcobgen.c, compiler/htcobol.y, compiler/scan.l, + lib/Makefile, test.code/Readme.txt, test.code/t02/.gdbinit, + test.code/t02/Makefile, test.code/t02/r.sh, + test.code/t02/test02.cob, test.code/t07/Makefile, + test.code/t15/Makefile, test.code/t15/Readme.txt, + test.code/t15/r.sh, test.code/t15/test15.cob, + test.code/t15/test15a.cob, test.code/t15/test15b.c: Added Set + statement. Not compleated. Found some reasons for smoe bugs. + Added t15 test programs to test calling C and COBOL programs from + COBOL. + +1999-12-05 01:50 glen + + * compiler/htglobals.c: Corrected problem with missing v and V + command line arguments + +1999-12-05 01:31 glen + + * lib/Makefile: make clean was not deleting .o files. This update + fixes the ld bug + +1999-12-05 01:31 glen + + * test_suite/test.baseline: Update regression test standard file + +1999-12-05 01:07 glen + + * compiler/htcobgen.c: Changes to compiler return codes and a few + compiler error message codess. Straightened up the compiler + summary flower box. + +1999-12-05 00:52 glen + + * test_suite/format_tests/test05a.cob: Changed test to check for + LOW-VALUES instead of a redefinition of the numeric target area. + The test is still failing however. The data field does contain + LOW-VALUES, it is the IF XXX = LOW-VALUES that is failing. + +1999-12-05 00:43 glen + + * compiler/htglobals.c: Added -o option to the command line to + specify executable file name. Also changed command line processing + to use standard getopt library routine. This makes the command + line options much more flexable. + +1999-12-04 16:57 rpragana + + * lib/strings.c, test.code/t14/.gdbinit, test.code/t14/test14.cob: + Finished (I hope) the unstring statement. + +1999-12-04 14:47 rpragana + + * compiler/htcobol.y, compiler/scan.l, lib/strings.c, + test.code/t14/test14.cob: Corrections for the parsing of "not on + overflow" clause. + +1999-12-04 13:18 rpragana + + * lib/strings.c, test.code/t14/.gdbinit, test.code/t14/test14.cob: + Partially implemented unstring (example at t14). + +1999-12-03 20:07 rpragana + + * lib/strings.c, test.code/t14/.gdbinit, + test.code/t14/noeth-test.cob, test.code/t14/string.cob: Added test + programs at t14. + +1999-12-03 16:37 rpragana + + * compiler/htcobol.y, compiler/scan.l, lib/strings.c, + test.code/t14/test14.cob: Some fix for unstring syntax and a little + test library. + +1999-12-02 21:10 rpragana + + * lib/strings.c, test.code/t04/test04.cob: Advanced a little more + the cob_unstrig library function. + +1999-12-02 18:19 andrewcza + + * compiler/htcobol.y, lib/fileio.c, test.code/t12/test12.cob: + Changed htcobol.y and fileio.c to implement READ NEXT for relative + file IO. READ PREV for relative IO is also implemented BUT I still + need to finish the code to detect the beginning of file. + +1999-12-02 17:13 andrewcza + + * lib/fileio.c: + Finished off the code for Read Next in relative mode. Read Previous + still needs some work. + +1999-12-02 16:26 andrewcza + + * lib/fileio.c, test.code/t06/test06.cob, test.code/t12/test12.cob, + test.code/t12/test12i.cob, test.code/t12/test12ls.cob, + test.code/t12/test12r.cob, test.code/t12/test12s.cob: + Modify all relative file io in fileio.c to use normal io and not + DB-1.85 as it does not work correctly. Work still needs to be done + on read next and read prev for relative io to skip the + blank/deleted records. + + Amend test programs for testing. + +1999-12-02 15:11 andrewcza + + * test.code/t11/test11.cob: + Modified test11.cob to work initialize the fields correctly. + +1999-12-02 13:15 rpragana + + * ChangeLog: Update ChangeLog to prepare a public release. + +1999-12-02 12:59 rpragana + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/htcoboly.h, + compiler/scan.l, lib/Makefile, lib/fileio.c, lib/htcoblib.h, + test.code/t04/test04.cob: Implemented "alternate record keys" for + indexed files. Modified test04 to show an example. Modified + cob_open (fileio.c) to show an example of access of the altkey_desc + structure. + +1999-12-02 01:37 glen + + * test_suite/: compile_tests/README, compile_tests/ctest02.cbl, + compile_tests/test.script, perform_tests/perf01.cob, + perform_tests/perf02.cob, perform_tests/perf03.cob, + perform_tests/perf04.cob, perform_tests/perf05.cob, + perform_tests/test.script, seqio_tests/foobar.dat, + seqio_tests/input.dat, seqio_tests/lineseq.dat, + seqio_tests/nofile.dat, seqio_tests/seqio01.cob, + seqio_tests/seqio02.cbl, seqio_tests/seqio03.cob, + seqio_tests/seqio04.cob, seqio_tests/seqio05.cob, + seqio_tests/seqio06.cob, seqio_tests/seqls01.cob, + seqio_tests/seqls02.cob, seqio_tests/test.script, + seqio_tests/test06.dat: Initial load to Repository + +1999-12-02 01:37 glen + + * test_suite/format_tests/: test.script, test01.cob, test01a.cob, + test01b.cob, test02a.cob, test02b.cob, test03a.cob, test03b.cob, + test03c.cob, test04.cob, test05a.cob, test_blank: Initial addition + to repository + +1999-12-02 01:34 glen + + * test_suite/compile_tests/: ctest01.cob, ctest01a.cob, + ctest01b.cob, ctest01c.cob, ctest01d.cob, ctest01e.cob, + ctest03.cob, ctest04.cob, ctest05.cob, ctest06.cob, ctested01.cob, + ctested02.cob, ctested03.cob, ctested04.cob, ctested05.cob, + ctested06.cob, ctestfc01.cob, ctestfc02.cob, ctestws01.cob, + ctestws02.cob, ctestws03.cob, ctestws04.cob, ctestws05.cob, + ctestws06.cob, ctestws07.cob, ctestws08.cob, ctestws09.cob, + ctestws10.cob, ctestws11.cob, ctestws12.cob, oracle1.cob, + oracle2.cob, oracle3.cob, sample.cob: Initial upload to repository + +1999-12-02 01:27 glen + + * test_suite/cobol_test.pl: Initial upload to Repository + +1999-12-02 01:27 glen + + * test_suite/test.baseline: Initial addition to repository + +1999-12-02 00:25 glen + + * lib/Makefile: add test suite + +1999-12-01 22:00 rpragana + + * info/Compiler-Overview.txt, test.code/t14/unstring.cob: Corrected + some mistakes in my Compiler-Overview description and added a nice + example of our context-dependant scanning strategy. + +1999-12-01 21:13 rpragana + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/htcoboly.h, + compiler/scan.l, test.code/t09/test09.cob, + test.code/t14/test14.cob: Nasty bug because of a reduce/reduce + conflict solved. I have to add a new state to the scanner, though + (EXCEPTION_ST), but at least it is working now. + +1999-12-01 18:33 rpragana + + * ChangeLog, test.code/t08/test08.cob, test.code/t10/test10.cob, + test.code/t11/test11.cob, test.code/t12/test12.cob, + test.code/t14/test14.cob: Fixed bugs in several programs + (test.code) that used COUNTER, areserved cobol word as an + identifier. (All except t08 compiles now) + +1999-12-01 17:43 rpragana + + * info/Compiler-Overview.txt: Added a compiler overview text in our + info directory, so the newcomers don't spend much time figuring + what it does. + +1999-12-01 01:49 glen + + * compiler/htcobol.y: Add return code processing and improve error + message display in listing + +1999-12-01 01:49 glen + + * compiler/htglobals.c: Set initial value for error code and + severity + +1999-12-01 01:43 glen + + * compiler/: htglobals.h, htcobgen.c, htcoboly.h: Add return code + processing and improve error message display in listing + +1999-12-01 00:47 glen + + * compiler/htglobals.c: Remove argc test that expected two command + line arguments + +1999-11-30 23:31 glen + + * compiler/: htglobals.h, htcobgen.c, htcobol.y, scan.l: Use + command line parsing in htglobals file Add command line options to + compile, assemble, and link from command line Return codes for + assemble and link errors + +1999-11-30 23:31 glen + + * compiler/htglobals.c: Use command line parsing in htglobals file + Add command line options to compile, assemble, and link from + command line Return codes for assemble and link errors CVS: + + CVS: CVS: + +1999-11-30 22:47 glen + + * compiler/: htcobol.y, htcobgen.c: Add storage for htglobal + variables + +1999-11-30 22:47 glen + + * compiler/scan.l: Add include for htglobals storage + +1999-11-30 22:34 glen + + * compiler/htglobals.c: Define __HTGLOBALS_H to include storage in + the htglobals module + +1999-11-30 22:34 glen + + * compiler/Makefile: Compile htglobals module + +1999-11-30 22:34 glen + + * compiler/htglobals.h: Change to test for __HTGLOBALS_H defined + instead of not defined. + +1999-11-30 22:19 rpragana + + * test.code/t14/test14.cob: Testing code generation of "unstring". + (many arguments!) + +1999-11-30 17:46 rpragana + + * compiler/htcobgen.c, compiler/htcobol.y, compiler/htcoboly.h, + lib/strings.c: Implemented code generation of "unstring" statement. + +1999-11-30 13:47 rpragana + + * BUGS, compiler/htcobol.y, compiler/scan.l, + test.code/t13/.gdbinit, test.code/t13/include1.cpy, + test.code/t13/test13.cob: Corrected bug in the replacement of + substrings (copy statement). Corrected (a warning) of yacc about + undefined value of a production. + +1999-11-30 12:34 rpragana + + * compiler/htcobol.y, compiler/scan.l, test.code/t14/test14.cob: + Added tokens and productions for the unstring statement. (no code + generation, nor library funtions yet) Changed "on_overflow" to + allow "not on overflow" too. Modified test t14 to reflect the + changes, with "string" statement. + +1999-11-30 05:14 dessex + + * test.code/: t02/test02.input, t03/test03.input: + test.code/t02/test02.input - Old test input + test.code/t03/test03.input - test input for test03.cob + +1999-11-30 04:29 dessex + + * BUGS, INSTALL, README, compiler/htglobals.c, compiler/scan.l, + test.code/t02/r.sh, test.code/t02/test02.cob, + test.code/t03/test03.cob: BUGS - Added new found bugs. INSTALL - + Changed some instructions. README - Changed home web page. + compiler/scan.l - Changed Copy Repacing to exclude comments, and + scan vars names properly. test.code/t02/test02.cob - Enhanced + tests and found bugs. test.code/t03/test03.cob - Moved ACCEPT from + std-in tests. test.code/t03/test03.input - test input for + test03.cob compiler/htglobals.c - N/C + +1999-11-29 22:15 rpragana + + * ChangeLog, compiler/htcobgen.c, compiler/htcobol.y, + compiler/htcoboly.h, compiler/scan.l, lib/Makefile, lib/strings.c, + test.code/Makefile, test.code/t09/test09.cob, + test.code/t13/include1.cpy, test.code/t13/test13.cob, + test.code/t14/Makefile, test.code/t14/test14.cob: Implemented + "string" statement including library functions. Changed the syntax + for more error checkings. Changed the scanner for better end of + statements detection. Now there should not be more than one + statement at the same line, except if the first is not followed by + EOS. + +1999-11-29 15:09 andrewcza + + * CHANGES, lib/fileio.c, lib/fileio1.c, lib/fileio2.c: + Changed fileio.c to return the correct File Status when an attempt + is made to read write delete close a file that is not open, as well + as to return an error when an attempt is make to open a file that + is already open. + +1999-11-28 23:28 glen + + * compiler/htglobals.h: added directories for temporary files and + updated variables for compiler return code handling. + +1999-11-28 23:28 glen + + * compiler/htglobals.c: dded improved command line processing and + system calls to assemble and link code if directed on the command + line. + +1999-11-28 19:21 rpragana + + * TODO: More required things submitted by Andrew: sort syntax + augmenting, alternate keys, string/unstring verbs. + +1999-11-28 17:48 rpragana + + * BUGS, ChangeLog: Added ChangeLog to report changes. + +1999-11-26 17:09 rpragana + + * CHANGES, TODO, compiler/htcobgen.c, lib/fileio.c, + test.code/t11/test11.cob: Merged Andrew's new version with Rildo's, + for the first change in this file already under cvs control. + +1999-11-25 23:53 rpragana + + * CHANGES, compiler/htcobol.y, compiler/scan.l, + test.code/t13/.gdbinit, test.code/t13/include1.cpy, + test.code/t13/test13.cob: [no log message] + +1999-11-25 23:19 rpragana + + * HISTORY, COPYING, Makefile, AUTHORS, BUGS, CHANGES, COPYRIGHT, + TODO, INSTALL, README, compiler/htcobgen.c, compiler/scan.l, + compiler/htcobol.y, compiler/Makefile, compiler/Makefile.0, + compiler/htcoboly.h, compiler/createver.sh, compiler/htglobals.c, + compiler/htglobals.h, lib/Makefile, lib/general.c, lib/basicio.c, + lib/mccntrl.s, lib/mcmath.c, lib/screenio.c, lib/Makefile.0, + lib/fileio.c, lib/htcoblib.h, lib/pictures.c, lib/basicio.2.c, + lib/basicio.1.c, lib/general.1.c, lib/mccntrl.0.h, lib/mcfrlsf.c, + lib/cobmove.c, lib/mcmove-orig.c, lib/mcmove.c, lib/fileio1.c, + lib/fileio2.c, test.code/Makefile, test.code/Readme.txt, + test.code/r.sh, test.code/t01/.gdbinit, test.code/t01/Makefile, + test.code/t01/test01.cob, test.code/t01/Readme.txt, + test.code/t01/compile, test.code/t01/r.sh, test.code/t01/test1.cob, + test.code/t01/test2.cob, test.code/t00/r.sh, + test.code/t00/teste.cob, test.code/t01/test_pos.S, + test.code/t00/Makefile, test.code/t00/Readme.txt, + test.code/t00/teste.1.cob, test.code/t00/.gdbinit, + test.code/t00/gdbinit.0, test.code/t00/teste.0.cob, + test.code/t03/Makefile, test.code/t03/Readme.txt, + test.code/t03/gdbinit.1, test.code/t03/r.sh, + test.code/t03/test03.cob, test.code/t02/.gdbinit, + test.code/t02/test02.cob, test.code/t02/Makefile, + test.code/t02/Readme.txt, test.code/t02/TEST02.cpy, + test.code/t02/TEST02A.cpy, test.code/t02/TEST02B.cpy, + test.code/t02/Test02.cpy, test.code/t02/gdbinit.1, + test.code/t02/gdbinit.2, test.code/t02/r.sh, + test.code/t02/gdbinit.3, test.code/t02/test02.input, + test.code/t04/Makefile, test.code/t04/Readme.txt, + test.code/t04/r.sh, test.code/t04/test04.cob, + test.code/t05/Makefile, test.code/t05/Readme.txt, + test.code/t05/r.sh, test.code/t05/test05.cob, + test.code/t06/Makefile, test.code/t06/Readme.txt, + test.code/t06/r.sh, test.code/t06/test06.cob, + test.code/t06/index01.cob, test.code/t06/test06i.cob, + test.code/t06/test06r.cob, test.code/t06/test06s.cob, + test.code/t06/test06-variable-names.cob, test.code/tdb01/Makefile, + test.code/tdb01/Makefile.0, test.code/tdb01/Readme.txt, + test.code/tdb01/tdb01.c, test.code/t07/Makefile, + test.code/t07/Readme.txt, test.code/t07/r.sh, + test.code/t07/test07.cob, test.code/t08/Makefile, + test.code/t08/Raw.dat, test.code/t08/Readme.txt, + test.code/t08/r.sh, test.code/t08/test08.cob, + test.code/t08/gen_data.c, test.code/t09/Makefile, + test.code/t09/test09.cob, test.code/t09/upro.cob, + test.code/t09/anlste.cob, test.code/t09/Readme.txt, + test.code/t09/var+perform.cob, test.code/t09/.gdbinit, + test.code/t09/move-test.cob, test.code/t09/subscripts.cob, + test.code/t10/Makefile, test.code/t10/r.sh, + test.code/t10/test10.cob, test.code/t11/Makefile, + test.code/t11/r.sh, test.code/t11/test11.cob, + test.code/t12/Makefile, test.code/t12/r.sh, + test.code/t12/test12.cob, test.code/t12/Readme.txt, + test.code/t12/test12i.cob, test.code/t12/test12ls.cob, + test.code/t12/test12s.cob, test.code/t12/test12r.cob, + test.code/t13/Makefile, info/Comments.old.txt, + test.code/t13/.gdbinit, test.code/t13/include1.cpy, + test.code/t13/include2.cpy, test.code/t13/include3.cpy, + test.code/t13/test13.cob, info/ProgramHeaders.Info.txt, + info/VarStructure.Info.txt, info/GAS.asm-i386.Info.txt, + info/compiler-design-future.txt, utils/Makefile, utils/Readme.txt, + utils/cobpp/AUTHORS, utils/cobpp/Makefile, utils/cobpp/Readme.txt, + utils/cobpp/COPYING, utils/cobpp/COPYRIGHT, + utils/cobpp/lib/vperror.h, utils/cobpp/lib/get_util.c, + utils/cobpp/lib/get_util.h, utils/cobpp/lib/Makefile, + utils/cobpp/lib/list_util.c, utils/cobpp/lib/list_util.h, + utils/cobpp/lib/opt_util.c, utils/cobpp/lib/opt_util.h, + utils/cobpp/lib/str_util.c, utils/cobpp/lib/str_util.h, + utils/cobpp/lib/ansi_setup.h, utils/cobpp/lib/vperror.c, + utils/cobpp/cobpp/cobpp.h, utils/cobpp/cobpp/main.c, + utils/cobpp/cobpp/Makefile, utils/cobpp/cobpp/scanner.l, + utils/cobpp/cobpp/support.c, utils/cobpp/cobpp/scanner.1.l: + Development files + +1999-11-25 23:19 rpragana + + * HISTORY, COPYING, Makefile, AUTHORS, BUGS, CHANGES, COPYRIGHT, + TODO, INSTALL, README, compiler/htcobgen.c, compiler/scan.l, + compiler/htcobol.y, compiler/Makefile, compiler/Makefile.0, + compiler/htcoboly.h, compiler/createver.sh, compiler/htglobals.c, + compiler/htglobals.h, lib/Makefile, lib/general.c, lib/basicio.c, + lib/mccntrl.s, lib/mcmath.c, lib/screenio.c, lib/Makefile.0, + lib/fileio.c, lib/htcoblib.h, lib/pictures.c, lib/basicio.2.c, + lib/basicio.1.c, lib/general.1.c, lib/mccntrl.0.h, lib/mcfrlsf.c, + lib/cobmove.c, lib/mcmove-orig.c, lib/mcmove.c, lib/fileio1.c, + lib/fileio2.c, test.code/Makefile, test.code/Readme.txt, + test.code/r.sh, test.code/t01/.gdbinit, test.code/t01/Makefile, + test.code/t01/test01.cob, test.code/t01/Readme.txt, + test.code/t01/compile, test.code/t01/r.sh, test.code/t01/test1.cob, + test.code/t01/test2.cob, test.code/t00/r.sh, + test.code/t00/teste.cob, test.code/t01/test_pos.S, + test.code/t00/Makefile, test.code/t00/Readme.txt, + test.code/t00/teste.1.cob, test.code/t00/.gdbinit, + test.code/t00/gdbinit.0, test.code/t00/teste.0.cob, + test.code/t03/Makefile, test.code/t03/Readme.txt, + test.code/t03/gdbinit.1, test.code/t03/r.sh, + test.code/t03/test03.cob, test.code/t02/.gdbinit, + test.code/t02/test02.cob, test.code/t02/Makefile, + test.code/t02/Readme.txt, test.code/t02/TEST02.cpy, + test.code/t02/TEST02A.cpy, test.code/t02/TEST02B.cpy, + test.code/t02/Test02.cpy, test.code/t02/gdbinit.1, + test.code/t02/gdbinit.2, test.code/t02/r.sh, + test.code/t02/gdbinit.3, test.code/t02/test02.input, + test.code/t04/Makefile, test.code/t04/Readme.txt, + test.code/t04/r.sh, test.code/t04/test04.cob, + test.code/t05/Makefile, test.code/t05/Readme.txt, + test.code/t05/r.sh, test.code/t05/test05.cob, + test.code/t06/Makefile, test.code/t06/Readme.txt, + test.code/t06/r.sh, test.code/t06/test06.cob, + test.code/t06/index01.cob, test.code/t06/test06i.cob, + test.code/t06/test06r.cob, test.code/t06/test06s.cob, + test.code/t06/test06-variable-names.cob, test.code/tdb01/Makefile, + test.code/tdb01/Makefile.0, test.code/tdb01/Readme.txt, + test.code/tdb01/tdb01.c, test.code/t07/Makefile, + test.code/t07/Readme.txt, test.code/t07/r.sh, + test.code/t07/test07.cob, test.code/t08/Makefile, + test.code/t08/Raw.dat, test.code/t08/Readme.txt, + test.code/t08/r.sh, test.code/t08/test08.cob, + test.code/t08/gen_data.c, test.code/t09/Makefile, + test.code/t09/test09.cob, test.code/t09/upro.cob, + test.code/t09/anlste.cob, test.code/t09/Readme.txt, + test.code/t09/var+perform.cob, test.code/t09/.gdbinit, + test.code/t09/move-test.cob, test.code/t09/subscripts.cob, + test.code/t10/Makefile, test.code/t10/r.sh, + test.code/t10/test10.cob, test.code/t11/Makefile, + test.code/t11/r.sh, test.code/t11/test11.cob, + test.code/t12/Makefile, test.code/t12/r.sh, + test.code/t12/test12.cob, test.code/t12/Readme.txt, + test.code/t12/test12i.cob, test.code/t12/test12ls.cob, + test.code/t12/test12s.cob, test.code/t12/test12r.cob, + test.code/t13/Makefile, info/Comments.old.txt, + test.code/t13/.gdbinit, test.code/t13/include1.cpy, + test.code/t13/include2.cpy, test.code/t13/include3.cpy, + test.code/t13/test13.cob, info/ProgramHeaders.Info.txt, + info/VarStructure.Info.txt, info/GAS.asm-i386.Info.txt, + info/compiler-design-future.txt, utils/Makefile, utils/Readme.txt, + utils/cobpp/AUTHORS, utils/cobpp/Makefile, utils/cobpp/Readme.txt, + utils/cobpp/COPYING, utils/cobpp/COPYRIGHT, + utils/cobpp/lib/vperror.h, utils/cobpp/lib/get_util.c, + utils/cobpp/lib/get_util.h, utils/cobpp/lib/Makefile, + utils/cobpp/lib/list_util.c, utils/cobpp/lib/list_util.h, + utils/cobpp/lib/opt_util.c, utils/cobpp/lib/opt_util.h, + utils/cobpp/lib/str_util.c, utils/cobpp/lib/str_util.h, + utils/cobpp/lib/ansi_setup.h, utils/cobpp/lib/vperror.c, + utils/cobpp/cobpp/cobpp.h, utils/cobpp/cobpp/main.c, + utils/cobpp/cobpp/Makefile, utils/cobpp/cobpp/scanner.l, + utils/cobpp/cobpp/support.c, utils/cobpp/cobpp/scanner.1.l: Initial + revision + diff --git a/Debug/cobpp/subdir.mk b/Debug/cobpp/subdir.mk new file mode 100644 index 0000000..ed0c732 --- /dev/null +++ b/Debug/cobpp/subdir.mk @@ -0,0 +1,24 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../cobpp/cobpp.c + +OBJS += \ +./cobpp/cobpp.o + +C_DEPS += \ +./cobpp/cobpp.d + + +# Each subdirectory must supply rules for building sources it contributes +cobpp/%.o: ../cobpp/%.c + @echo 'Building file: $<' + @echo 'Invoking: GCC C Compiler' + gcc -I"C:\MinGW\include" -I"C:\Tcl\include" -I"C:\PostgreSQL\include" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o"$@" "$<" + @echo 'Finished building: $<' + @echo ' ' + + diff --git a/Debug/cobroutines/subdir.mk b/Debug/cobroutines/subdir.mk new file mode 100644 index 0000000..c0173c2 --- /dev/null +++ b/Debug/cobroutines/subdir.mk @@ -0,0 +1,90 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +O_SRCS += \ +../cobroutines/dir.o \ +../cobroutines/files.o \ +../cobroutines/globals.o \ +../cobroutines/screen.o \ +../cobroutines/sql_clear_query.o \ +../cobroutines/sql_connect_db.o \ +../cobroutines/sql_disconnect_db.o \ +../cobroutines/sql_exec_query.o \ +../cobroutines/sql_free_memory.o \ +../cobroutines/sql_get_tuple.o \ +../cobroutines/sql_get_value.o \ +../cobroutines/sql_max_field.o \ +../cobroutines/sql_max_tuple.o \ +../cobroutines/sql_status_message.o \ +../cobroutines/system.o \ +../cobroutines/tctcl.o + +C_SRCS += \ +../cobroutines/case.c \ +../cobroutines/dir.c \ +../cobroutines/files.c \ +../cobroutines/globals.c \ +../cobroutines/screen.c \ +../cobroutines/sql_clear_query.c \ +../cobroutines/sql_connect_db.c \ +../cobroutines/sql_disconnect_db.c \ +../cobroutines/sql_exec_query.c \ +../cobroutines/sql_free_memory.c \ +../cobroutines/sql_get_tuple.c \ +../cobroutines/sql_get_value.c \ +../cobroutines/sql_max_field.c \ +../cobroutines/sql_max_tuple.c \ +../cobroutines/sql_status_message.c \ +../cobroutines/system.c \ +../cobroutines/tctcl.c + +OBJS += \ +./cobroutines/case.o \ +./cobroutines/dir.o \ +./cobroutines/files.o \ +./cobroutines/globals.o \ +./cobroutines/screen.o \ +./cobroutines/sql_clear_query.o \ +./cobroutines/sql_connect_db.o \ +./cobroutines/sql_disconnect_db.o \ +./cobroutines/sql_exec_query.o \ +./cobroutines/sql_free_memory.o \ +./cobroutines/sql_get_tuple.o \ +./cobroutines/sql_get_value.o \ +./cobroutines/sql_max_field.o \ +./cobroutines/sql_max_tuple.o \ +./cobroutines/sql_status_message.o \ +./cobroutines/system.o \ +./cobroutines/tctcl.o + +C_DEPS += \ +./cobroutines/case.d \ +./cobroutines/dir.d \ +./cobroutines/files.d \ +./cobroutines/globals.d \ +./cobroutines/screen.d \ +./cobroutines/sql_clear_query.d \ +./cobroutines/sql_connect_db.d \ +./cobroutines/sql_disconnect_db.d \ +./cobroutines/sql_exec_query.d \ +./cobroutines/sql_free_memory.d \ +./cobroutines/sql_get_tuple.d \ +./cobroutines/sql_get_value.d \ +./cobroutines/sql_max_field.d \ +./cobroutines/sql_max_tuple.d \ +./cobroutines/sql_status_message.d \ +./cobroutines/system.d \ +./cobroutines/tctcl.d + + +# Each subdirectory must supply rules for building sources it contributes +cobroutines/%.o: ../cobroutines/%.c + @echo 'Building file: $<' + @echo 'Invoking: GCC C Compiler' + gcc -I"C:\MinGW\include" -I"C:\Tcl\include" -I"C:\PostgreSQL\include" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o"$@" "$<" + @echo 'Finished building: $<' + @echo ' ' + + diff --git a/Debug/cobrun/subdir.mk b/Debug/cobrun/subdir.mk new file mode 100644 index 0000000..a4c3348 --- /dev/null +++ b/Debug/cobrun/subdir.mk @@ -0,0 +1,27 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +O_SRCS += \ +../cobrun/htcobrun.o + +C_SRCS += \ +../cobrun/htcobrun.c + +OBJS += \ +./cobrun/htcobrun.o + +C_DEPS += \ +./cobrun/htcobrun.d + + +# Each subdirectory must supply rules for building sources it contributes +cobrun/%.o: ../cobrun/%.c + @echo 'Building file: $<' + @echo 'Invoking: GCC C Compiler' + gcc -I"C:\MinGW\include" -I"C:\Tcl\include" -I"C:\PostgreSQL\include" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o"$@" "$<" + @echo 'Finished building: $<' + @echo ' ' + + diff --git a/Debug/compiler/subdir.mk b/Debug/compiler/subdir.mk new file mode 100644 index 0000000..3a1e20c --- /dev/null +++ b/Debug/compiler/subdir.mk @@ -0,0 +1,59 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +O_SRCS += \ +../compiler/htcobemt.o \ +../compiler/htcobgen.o \ +../compiler/htcobol.o \ +../compiler/htcobol.tab.o \ +../compiler/htglobals.o \ +../compiler/pp_parser.tab.o \ +../compiler/pp_scanner.o \ +../compiler/reswords.o \ +../compiler/scan.o + +C_SRCS += \ +../compiler/htcobemt.c \ +../compiler/htcobgen.c \ +../compiler/htcobol.c \ +../compiler/htcobol.tab.c \ +../compiler/htglobals.c \ +../compiler/pp_parser.tab.c \ +../compiler/pp_scanner.c \ +../compiler/reswords.c \ +../compiler/scan.c + +OBJS += \ +./compiler/htcobemt.o \ +./compiler/htcobgen.o \ +./compiler/htcobol.o \ +./compiler/htcobol.tab.o \ +./compiler/htglobals.o \ +./compiler/pp_parser.tab.o \ +./compiler/pp_scanner.o \ +./compiler/reswords.o \ +./compiler/scan.o + +C_DEPS += \ +./compiler/htcobemt.d \ +./compiler/htcobgen.d \ +./compiler/htcobol.d \ +./compiler/htcobol.tab.d \ +./compiler/htglobals.d \ +./compiler/pp_parser.tab.d \ +./compiler/pp_scanner.d \ +./compiler/reswords.d \ +./compiler/scan.d + + +# Each subdirectory must supply rules for building sources it contributes +compiler/%.o: ../compiler/%.c + @echo 'Building file: $<' + @echo 'Invoking: GCC C Compiler' + gcc -I"C:\MinGW\include" -I"C:\Tcl\include" -I"C:\PostgreSQL\include" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o"$@" "$<" + @echo 'Finished building: $<' + @echo ' ' + + diff --git a/Debug/lib/subdir.mk b/Debug/lib/subdir.mk new file mode 100644 index 0000000..86bf2aa --- /dev/null +++ b/Debug/lib/subdir.mk @@ -0,0 +1,110 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +O_SRCS += \ +../lib/basicio.o \ +../lib/cobmove.o \ +../lib/cobmove_9_.o \ +../lib/cobmove_b_.o \ +../lib/cobmove_c_.o \ +../lib/cobmove_e_.o \ +../lib/cobmove_f_.o \ +../lib/cobmove_x_.o \ +../lib/config.o \ +../lib/dyncall.o \ +../lib/fileio.o \ +../lib/flckclient.o \ +../lib/general.o \ +../lib/htcobolrt.o \ +../lib/intrinsic.o \ +../lib/mcmath.o \ +../lib/pictures.o \ +../lib/rterrors.o \ +../lib/scr_curses.o \ +../lib/screenio.o \ +../lib/strings.o + +C_SRCS += \ +../lib/basicio.c \ +../lib/cobmove.c \ +../lib/cobmove_9_.c \ +../lib/cobmove_b_.c \ +../lib/cobmove_c_.c \ +../lib/cobmove_e_.c \ +../lib/cobmove_f_.c \ +../lib/cobmove_x_.c \ +../lib/config.c \ +../lib/dyncall.c \ +../lib/fileio.c \ +../lib/filesql.c \ +../lib/flckclient.c \ +../lib/general.c \ +../lib/intrinsic.c \ +../lib/mcmath.c \ +../lib/pictures.c \ +../lib/rterrors.c \ +../lib/scr_curses.c \ +../lib/screen.c \ +../lib/screenio.c \ +../lib/strings.c + +OBJS += \ +./lib/basicio.o \ +./lib/cobmove.o \ +./lib/cobmove_9_.o \ +./lib/cobmove_b_.o \ +./lib/cobmove_c_.o \ +./lib/cobmove_e_.o \ +./lib/cobmove_f_.o \ +./lib/cobmove_x_.o \ +./lib/config.o \ +./lib/dyncall.o \ +./lib/fileio.o \ +./lib/filesql.o \ +./lib/flckclient.o \ +./lib/general.o \ +./lib/intrinsic.o \ +./lib/mcmath.o \ +./lib/pictures.o \ +./lib/rterrors.o \ +./lib/scr_curses.o \ +./lib/screen.o \ +./lib/screenio.o \ +./lib/strings.o + +C_DEPS += \ +./lib/basicio.d \ +./lib/cobmove.d \ +./lib/cobmove_9_.d \ +./lib/cobmove_b_.d \ +./lib/cobmove_c_.d \ +./lib/cobmove_e_.d \ +./lib/cobmove_f_.d \ +./lib/cobmove_x_.d \ +./lib/config.d \ +./lib/dyncall.d \ +./lib/fileio.d \ +./lib/filesql.d \ +./lib/flckclient.d \ +./lib/general.d \ +./lib/intrinsic.d \ +./lib/mcmath.d \ +./lib/pictures.d \ +./lib/rterrors.d \ +./lib/scr_curses.d \ +./lib/screen.d \ +./lib/screenio.d \ +./lib/strings.d + + +# Each subdirectory must supply rules for building sources it contributes +lib/%.o: ../lib/%.c + @echo 'Building file: $<' + @echo 'Invoking: GCC C Compiler' + gcc -I"C:\MinGW\include" -I"C:\Tcl\include" -I"C:\PostgreSQL\include" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o"$@" "$<" + @echo 'Finished building: $<' + @echo ' ' + + diff --git a/Debug/lockserver/subdir.mk b/Debug/lockserver/subdir.mk new file mode 100644 index 0000000..83e3350 --- /dev/null +++ b/Debug/lockserver/subdir.mk @@ -0,0 +1,24 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../lockserver/lockserver.c + +OBJS += \ +./lockserver/lockserver.o + +C_DEPS += \ +./lockserver/lockserver.d + + +# Each subdirectory must supply rules for building sources it contributes +lockserver/%.o: ../lockserver/%.c + @echo 'Building file: $<' + @echo 'Invoking: GCC C Compiler' + gcc -I"C:\MinGW\include" -I"C:\Tcl\include" -I"C:\PostgreSQL\include" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o"$@" "$<" + @echo 'Finished building: $<' + @echo ' ' + + diff --git a/Debug/makefile b/Debug/makefile new file mode 100644 index 0000000..91e8b7e --- /dev/null +++ b/Debug/makefile @@ -0,0 +1,63 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +-include ../makefile.init + +RM := rm -rf + +# All of the sources participating in the build are defined here +-include sources.mk +-include subdir.mk +-include utils/cobf2f/subdir.mk +-include test_suite/call_tests/subdir.mk +-include test.code/tgui02/subdir.mk +-include test.code/tgui01/subdir.mk +-include test.code/tdb03/subdir.mk +-include test.code/tdb02/subdir.mk +-include test.code/tdb01/subdir.mk +-include test.code/t33/subdir.mk +-include test.code/t25/subdir.mk +-include test.code/t15/subdir.mk +-include test.code/t08/subdir.mk +-include test.code/t07/subdir.mk +-include test.code/ReportGen/subdir.mk +-include test.code/00_FernandoWuthstrack/tcl/subdir.mk +-include lockserver/subdir.mk +-include lib/subdir.mk +-include compiler/subdir.mk +-include cobrun/subdir.mk +-include cobroutines/subdir.mk +-include cobpp/subdir.mk +-include objects.mk + +ifneq ($(MAKECMDGOALS),clean) +ifneq ($(strip $(C_DEPS)),) +-include $(C_DEPS) +endif +endif + +-include ../makefile.defs + +# Add inputs and outputs from these tool invocations to the build variables + +# All Target +all: tinycobol.exe + +# Tool invocations +tinycobol.exe: $(OBJS) $(USER_OBJS) + @echo 'Building target: $@' + @echo 'Invoking: MinGW C Linker' + gcc -o"tinycobol.exe" $(OBJS) $(USER_OBJS) $(LIBS) + @echo 'Finished building target: $@' + @echo ' ' + +# Other Targets +clean: + -$(RM) $(OBJS)$(C_DEPS)$(EXECUTABLES) tinycobol.exe + -@echo ' ' + +.PHONY: all clean dependents +.SECONDARY: + +-include ../makefile.targets diff --git a/Debug/objects.mk b/Debug/objects.mk new file mode 100644 index 0000000..224ef68 --- /dev/null +++ b/Debug/objects.mk @@ -0,0 +1,7 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +USER_OBJS := + +LIBS := diff --git a/Debug/sources.mk b/Debug/sources.mk new file mode 100644 index 0000000..41e8f19 --- /dev/null +++ b/Debug/sources.mk @@ -0,0 +1,36 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +O_SRCS := +C_SRCS := +S_UPPER_SRCS := +OBJ_SRCS := +ASM_SRCS := +OBJS := +C_DEPS := +EXECUTABLES := + +# Every subdirectory with source files must be described here +SUBDIRS := \ +utils/cobf2f \ +test_suite/call_tests \ +test.code/tgui02 \ +test.code/tgui01 \ +test.code/tdb03 \ +test.code/tdb02 \ +test.code/tdb01 \ +test.code/t33 \ +test.code/t25 \ +test.code/t15 \ +test.code/t08 \ +test.code/t07 \ +test.code/ReportGen \ +test.code/00_FernandoWuthstrack/tcl \ +lockserver \ +lib \ +compiler \ +cobrun \ +cobroutines \ +cobpp \ + diff --git a/Debug/test.code/00_FernandoWuthstrack/tcl/subdir.mk b/Debug/test.code/00_FernandoWuthstrack/tcl/subdir.mk new file mode 100644 index 0000000..1065470 --- /dev/null +++ b/Debug/test.code/00_FernandoWuthstrack/tcl/subdir.mk @@ -0,0 +1,27 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../test.code/00_FernandoWuthstrack/tcl/tctcl.c \ +../test.code/00_FernandoWuthstrack/tcl/teste.c + +OBJS += \ +./test.code/00_FernandoWuthstrack/tcl/tctcl.o \ +./test.code/00_FernandoWuthstrack/tcl/teste.o + +C_DEPS += \ +./test.code/00_FernandoWuthstrack/tcl/tctcl.d \ +./test.code/00_FernandoWuthstrack/tcl/teste.d + + +# Each subdirectory must supply rules for building sources it contributes +test.code/00_FernandoWuthstrack/tcl/%.o: ../test.code/00_FernandoWuthstrack/tcl/%.c + @echo 'Building file: $<' + @echo 'Invoking: GCC C Compiler' + gcc -I"C:\MinGW\include" -I"C:\Tcl\include" -I"C:\PostgreSQL\include" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o"$@" "$<" + @echo 'Finished building: $<' + @echo ' ' + + diff --git a/Debug/test.code/ReportGen/subdir.mk b/Debug/test.code/ReportGen/subdir.mk new file mode 100644 index 0000000..56f53a9 --- /dev/null +++ b/Debug/test.code/ReportGen/subdir.mk @@ -0,0 +1,24 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../test.code/ReportGen/tclwrapper.c + +OBJS += \ +./test.code/ReportGen/tclwrapper.o + +C_DEPS += \ +./test.code/ReportGen/tclwrapper.d + + +# Each subdirectory must supply rules for building sources it contributes +test.code/ReportGen/%.o: ../test.code/ReportGen/%.c + @echo 'Building file: $<' + @echo 'Invoking: GCC C Compiler' + gcc -I"C:\MinGW\include" -I"C:\Tcl\include" -I"C:\PostgreSQL\include" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o"$@" "$<" + @echo 'Finished building: $<' + @echo ' ' + + diff --git a/Debug/test.code/t07/subdir.mk b/Debug/test.code/t07/subdir.mk new file mode 100644 index 0000000..8ad0ae9 --- /dev/null +++ b/Debug/test.code/t07/subdir.mk @@ -0,0 +1,24 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../test.code/t07/subrot.c + +OBJS += \ +./test.code/t07/subrot.o + +C_DEPS += \ +./test.code/t07/subrot.d + + +# Each subdirectory must supply rules for building sources it contributes +test.code/t07/%.o: ../test.code/t07/%.c + @echo 'Building file: $<' + @echo 'Invoking: GCC C Compiler' + gcc -I"C:\MinGW\include" -I"C:\Tcl\include" -I"C:\PostgreSQL\include" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o"$@" "$<" + @echo 'Finished building: $<' + @echo ' ' + + diff --git a/Debug/test.code/t08/subdir.mk b/Debug/test.code/t08/subdir.mk new file mode 100644 index 0000000..63b227f --- /dev/null +++ b/Debug/test.code/t08/subdir.mk @@ -0,0 +1,24 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../test.code/t08/gen_data.c + +OBJS += \ +./test.code/t08/gen_data.o + +C_DEPS += \ +./test.code/t08/gen_data.d + + +# Each subdirectory must supply rules for building sources it contributes +test.code/t08/%.o: ../test.code/t08/%.c + @echo 'Building file: $<' + @echo 'Invoking: GCC C Compiler' + gcc -I"C:\MinGW\include" -I"C:\Tcl\include" -I"C:\PostgreSQL\include" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o"$@" "$<" + @echo 'Finished building: $<' + @echo ' ' + + diff --git a/Debug/test.code/t15/subdir.mk b/Debug/test.code/t15/subdir.mk new file mode 100644 index 0000000..8497b42 --- /dev/null +++ b/Debug/test.code/t15/subdir.mk @@ -0,0 +1,33 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../test.code/t15/test15b.c \ +../test.code/t15/test15d.c \ +../test.code/t15/test15f.c \ +../test.code/t15/test15l.c + +OBJS += \ +./test.code/t15/test15b.o \ +./test.code/t15/test15d.o \ +./test.code/t15/test15f.o \ +./test.code/t15/test15l.o + +C_DEPS += \ +./test.code/t15/test15b.d \ +./test.code/t15/test15d.d \ +./test.code/t15/test15f.d \ +./test.code/t15/test15l.d + + +# Each subdirectory must supply rules for building sources it contributes +test.code/t15/%.o: ../test.code/t15/%.c + @echo 'Building file: $<' + @echo 'Invoking: GCC C Compiler' + gcc -I"C:\MinGW\include" -I"C:\Tcl\include" -I"C:\PostgreSQL\include" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o"$@" "$<" + @echo 'Finished building: $<' + @echo ' ' + + diff --git a/Debug/test.code/t25/subdir.mk b/Debug/test.code/t25/subdir.mk new file mode 100644 index 0000000..e992196 --- /dev/null +++ b/Debug/test.code/t25/subdir.mk @@ -0,0 +1,27 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../test.code/t25/test25b.c \ +../test.code/t25/test25c.c + +OBJS += \ +./test.code/t25/test25b.o \ +./test.code/t25/test25c.o + +C_DEPS += \ +./test.code/t25/test25b.d \ +./test.code/t25/test25c.d + + +# Each subdirectory must supply rules for building sources it contributes +test.code/t25/%.o: ../test.code/t25/%.c + @echo 'Building file: $<' + @echo 'Invoking: GCC C Compiler' + gcc -I"C:\MinGW\include" -I"C:\Tcl\include" -I"C:\PostgreSQL\include" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o"$@" "$<" + @echo 'Finished building: $<' + @echo ' ' + + diff --git a/Debug/test.code/t33/subdir.mk b/Debug/test.code/t33/subdir.mk new file mode 100644 index 0000000..87d57b6 --- /dev/null +++ b/Debug/test.code/t33/subdir.mk @@ -0,0 +1,24 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../test.code/t33/subrotc.c + +OBJS += \ +./test.code/t33/subrotc.o + +C_DEPS += \ +./test.code/t33/subrotc.d + + +# Each subdirectory must supply rules for building sources it contributes +test.code/t33/%.o: ../test.code/t33/%.c + @echo 'Building file: $<' + @echo 'Invoking: GCC C Compiler' + gcc -I"C:\MinGW\include" -I"C:\Tcl\include" -I"C:\PostgreSQL\include" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o"$@" "$<" + @echo 'Finished building: $<' + @echo ' ' + + diff --git a/Debug/test.code/tdb01/subdir.mk b/Debug/test.code/tdb01/subdir.mk new file mode 100644 index 0000000..bff1102 --- /dev/null +++ b/Debug/test.code/tdb01/subdir.mk @@ -0,0 +1,24 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../test.code/tdb01/tdb01.c + +OBJS += \ +./test.code/tdb01/tdb01.o + +C_DEPS += \ +./test.code/tdb01/tdb01.d + + +# Each subdirectory must supply rules for building sources it contributes +test.code/tdb01/%.o: ../test.code/tdb01/%.c + @echo 'Building file: $<' + @echo 'Invoking: GCC C Compiler' + gcc -I"C:\MinGW\include" -I"C:\Tcl\include" -I"C:\PostgreSQL\include" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o"$@" "$<" + @echo 'Finished building: $<' + @echo ' ' + + diff --git a/Debug/test.code/tdb02/subdir.mk b/Debug/test.code/tdb02/subdir.mk new file mode 100644 index 0000000..37093f0 --- /dev/null +++ b/Debug/test.code/tdb02/subdir.mk @@ -0,0 +1,24 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../test.code/tdb02/tdb02a.c + +OBJS += \ +./test.code/tdb02/tdb02a.o + +C_DEPS += \ +./test.code/tdb02/tdb02a.d + + +# Each subdirectory must supply rules for building sources it contributes +test.code/tdb02/%.o: ../test.code/tdb02/%.c + @echo 'Building file: $<' + @echo 'Invoking: GCC C Compiler' + gcc -I"C:\MinGW\include" -I"C:\Tcl\include" -I"C:\PostgreSQL\include" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o"$@" "$<" + @echo 'Finished building: $<' + @echo ' ' + + diff --git a/Debug/test.code/tdb03/subdir.mk b/Debug/test.code/tdb03/subdir.mk new file mode 100644 index 0000000..6f5a16f --- /dev/null +++ b/Debug/test.code/tdb03/subdir.mk @@ -0,0 +1,27 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../test.code/tdb03/cgi-util.c \ +../test.code/tdb03/tdb03a.c + +OBJS += \ +./test.code/tdb03/cgi-util.o \ +./test.code/tdb03/tdb03a.o + +C_DEPS += \ +./test.code/tdb03/cgi-util.d \ +./test.code/tdb03/tdb03a.d + + +# Each subdirectory must supply rules for building sources it contributes +test.code/tdb03/%.o: ../test.code/tdb03/%.c + @echo 'Building file: $<' + @echo 'Invoking: GCC C Compiler' + gcc -I"C:\MinGW\include" -I"C:\Tcl\include" -I"C:\PostgreSQL\include" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o"$@" "$<" + @echo 'Finished building: $<' + @echo ' ' + + diff --git a/Debug/test.code/tgui01/subdir.mk b/Debug/test.code/tgui01/subdir.mk new file mode 100644 index 0000000..01a70b1 --- /dev/null +++ b/Debug/test.code/tgui01/subdir.mk @@ -0,0 +1,27 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../test.code/tgui01/testgui02.c \ +../test.code/tgui01/testgui05.c + +OBJS += \ +./test.code/tgui01/testgui02.o \ +./test.code/tgui01/testgui05.o + +C_DEPS += \ +./test.code/tgui01/testgui02.d \ +./test.code/tgui01/testgui05.d + + +# Each subdirectory must supply rules for building sources it contributes +test.code/tgui01/%.o: ../test.code/tgui01/%.c + @echo 'Building file: $<' + @echo 'Invoking: GCC C Compiler' + gcc -I"C:\MinGW\include" -I"C:\Tcl\include" -I"C:\PostgreSQL\include" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o"$@" "$<" + @echo 'Finished building: $<' + @echo ' ' + + diff --git a/Debug/test.code/tgui02/subdir.mk b/Debug/test.code/tgui02/subdir.mk new file mode 100644 index 0000000..fee44b2 --- /dev/null +++ b/Debug/test.code/tgui02/subdir.mk @@ -0,0 +1,27 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../test.code/tgui02/wprog01.c \ +../test.code/tgui02/wprog02.c + +OBJS += \ +./test.code/tgui02/wprog01.o \ +./test.code/tgui02/wprog02.o + +C_DEPS += \ +./test.code/tgui02/wprog01.d \ +./test.code/tgui02/wprog02.d + + +# Each subdirectory must supply rules for building sources it contributes +test.code/tgui02/%.o: ../test.code/tgui02/%.c + @echo 'Building file: $<' + @echo 'Invoking: GCC C Compiler' + gcc -I"C:\MinGW\include" -I"C:\Tcl\include" -I"C:\PostgreSQL\include" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o"$@" "$<" + @echo 'Finished building: $<' + @echo ' ' + + diff --git a/Debug/test_suite/call_tests/subdir.mk b/Debug/test_suite/call_tests/subdir.mk new file mode 100644 index 0000000..0ed5d6a --- /dev/null +++ b/Debug/test_suite/call_tests/subdir.mk @@ -0,0 +1,24 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../test_suite/call_tests/stest9xx.c + +OBJS += \ +./test_suite/call_tests/stest9xx.o + +C_DEPS += \ +./test_suite/call_tests/stest9xx.d + + +# Each subdirectory must supply rules for building sources it contributes +test_suite/call_tests/%.o: ../test_suite/call_tests/%.c + @echo 'Building file: $<' + @echo 'Invoking: GCC C Compiler' + gcc -I"C:\MinGW\include" -I"C:\Tcl\include" -I"C:\PostgreSQL\include" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o"$@" "$<" + @echo 'Finished building: $<' + @echo ' ' + + diff --git a/Debug/utils/cobf2f/subdir.mk b/Debug/utils/cobf2f/subdir.mk new file mode 100644 index 0000000..6c24eb7 --- /dev/null +++ b/Debug/utils/cobf2f/subdir.mk @@ -0,0 +1,24 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../utils/cobf2f/cobf2f.c + +OBJS += \ +./utils/cobf2f/cobf2f.o + +C_DEPS += \ +./utils/cobf2f/cobf2f.d + + +# Each subdirectory must supply rules for building sources it contributes +utils/cobf2f/%.o: ../utils/cobf2f/%.c + @echo 'Building file: $<' + @echo 'Invoking: GCC C Compiler' + gcc -I"C:\MinGW\include" -I"C:\Tcl\include" -I"C:\PostgreSQL\include" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o"$@" "$<" + @echo 'Finished building: $<' + @echo ' ' + + diff --git a/HISTORY b/HISTORY new file mode 100644 index 0000000..b20cbaf --- /dev/null +++ b/HISTORY @@ -0,0 +1,22 @@ +Hi fellow hacker! + +This is not a full-featured product, but rather historic sources of my own tool: a Cobol compiler I have done from scratch and found it floating around my +"spare parts" box. It may be useful as a skeleton for a new project, or just a +grab bag of ideas for your own work. +This is supposed to work with my "HandTerm" and "MT-100" micro-terminals, some +hardware projects I used to manufacture some years ago¸ but it's not produced +anymore. +I wouldn't even try to compile this sources again, because it's so dependent on +the environment (micro-terminal, msdos, and specific C compiler) and I don't +remember how to make all things go smooth. Please don't ask me how to remake +this. +Included there is a full compiler (almost ANSI 76 compliant, if I remember +well), the runtime library, and a nice source-level debugger written mostly in +prolog. When compiled and linked, the object is a TSR (Terminate and Stay +Resident) program for msdos. + +This is released as GPL licensed. Please see the enclose file COPYING. + +I hope you enjoy. + +Rildo Pragana diff --git a/INSTALL.BeOS b/INSTALL.BeOS new file mode 100644 index 0000000..c9ae465 --- /dev/null +++ b/INSTALL.BeOS @@ -0,0 +1,200 @@ +The TinyCOBOL Project. + +TinyCOBOL supports the IA32 (x86) architecture and the following platforms. + +- FreeBSD using the GCC compiler. +- Linux using the GCC compiler. +- Win32 using the GCC MinGW (Mingw32) compiler. +- Win32 using the GCC Cygwin compiler and POSIX emulation layer. +- BeOS with a bit of luck! + +See 'INSTALL.Win32' file notes for information on the Win32 platforms. + +------------------------------------------------------------------------------- + +Release Notes: BeOS + +Sleepycat's Berkeley DB 4.1.25 compiles perfectly on BeOS with 'configure --enable-compat185 --prefix=/boot/home/config' + +do 'make', and 'make install' + +Once you have Berkeley DB, continue to build TinyCOBOL + +The configure script will attempt to properly configure such systems. + +However due to the number of permutations the configure script may +fail to configure for Berkeley's DB library. + +If the normal configure fails to properly detect Berkeley's lib DB on +your system, try the following option: + ./configure --prefix=/boot/home/config --with-libdb=4 + +If the '--with-libdb=4' option fails to properly detect Berkeley's DB +on your system, then some temporary links may be used to circumvent +this problem. + ln -s libdb1.so.xx libdb.so + ln -s db1/db.h db.h + +Also, copy the ncurses headers to /boot/home/config/include + +------------------------------------------------------------------------------- + +Requirements: + +GCC tool set (GCC, AS, LD): +This compiler generates GAS compatible assembler code for the i386 Linux platform. +The final compilation and linkage can be done by GCC, or by htcobol +using the -x option. + +Bison or Berkeley's YACC (byacc) version 1.9.3 is required to compile +the TC parser. +Berkeley's YACC version 1.9.3 (byacc) can be downloaded only from the +TC 'snapshot' web page. +Previous versions will not work, as the table size is inadequate to handle +the large COBOL grammar. + +Library DB (version db-1.85.4 or later): +This library is used to access indexed files. It is available on iBiblio(1), +or at Sleepycat(2). +Note that version 1.85 and 2.0 may be named -ldb or -ldb1. Version 2.xx, 3.yy +(xx > 0) may be named -ldb or -ldb2. + +Note that later versions of libdb, such as 3.0.55, have a compatibility to +version 1.85 option, when configured with '--enable-compat185' (DB 1.85 +compatibility API). + +Note that the configure script will try to determine and test for the +library db version using various library names (-ldb -ldb1 -ldb2). However +the test.code and test_suite directory Makefiles will require minor manual +modifications if library db is named as libdb1, libdb2 or libdb3 on your system. +This will be changed at a later date. + +The current configure script will try to determine which version of library +db is been used, assuming the library is called libdb.so*, libdb.a. +It does so by checking for the existence of the headers and library, and then +performs the following tests: +- If header db_185.h is found, it does a test compile with libdb, to ensure + that the compatibility to version 1.85 option set. +- If header db_185.h is not found, it searches for header db.h. +- If header db.h is found, it does a test to ensure that the header belongs + to version 1.85 of libdb, and finally it does a test compile, to ensure + it is version 1.85 of libdb. + +Note that database file formats are incompatible between version 1.85.4 and 2.xx +and later. Thus indexed files created by a COBOL program using version 1.85.4 of db, +will not be readable by any COBOL program using later versions of db. + + +1) iBiblio (formerly known as Metalab, Sunsite) + http://www.ibiblio.org/pub/linux/libs/db + db-1.85.4-bin-ELF.tar.gz - shared lib of db 1.85.4 + db-1.85.4-src.tar.gz - full source tree for db 1.85.4 + +2) Sleepycat Software + http://www.sleepycat.com/ + versions 2.xx and later (current 4.xx series) + +ncurses: +The ncurses library is required. Used in screen I/O. + +readline: +The realine library version 2 is optional. Set by WANT_READLINE build option. + +------------------------------------------------------------------------------- + +To build: + +./configure +make +make install (su access required) + +Note that the test programs found in test_suite and test.code directories, +can be compiled and run without installing htcobol. + +configure options: +--enable and --with options recognized: + --with-compiler=[ARG] use compiler [gcc/kgcc/egcs default=gcc] + --with-yacc=[ARG] use YACC [yacc193 default=bison] + --enable-debug set C compiler debug option on [-g] + --enable-debug-all enable all debug options + --enable-debug-comp enable compiler and scanner debug options + --enable-debug-compiler enable compiler debug option + --enable-debug-scanner enable scanner debug option + --enable-debug-rts enable debug Run-Time option + --enable-debug-rts-move enable debug Run-Time Move routines option + --enable-debug-pp enable debug pre-processor option + --with-libdb=[ARG] use DB library version [2 3] + --with-readline use readline library + --with-dl use dynamic loader for RTS libraries + + +Note: +The '--enable-debug-comp' configure option will enable the compiler trace +information generated by the compiler, and used to debug the compiler itself. +It will not effect compiler debug option '-D', which adds debugging data to +the generated binary. + +Unless you are a developer, or are planning to debug the compiler itself, or +like to look at substantial amounts of trace data, it is recommended that the +above configure option be omitted. + +To clean: +Type make clean to clean lib and compiler. + +Type make cleanall to clean lib, compiler, utils, test.code. + +Type make distclean to clean lib and compiler and config.cache config.status +config.log Makefiles. + +Some test programs can be found in test.code directory. + +The utils directory contains some utility programs. + +cobf2f (Option, not installed by default): +Converts to/from fixed and free-form COBOL formats. + +------------------------------------------------------------------------------- + +The TinyCOBOL pre-processor. + +What it does. +- convert from fixed to free-form COBOL format. +- Process the COPY command. +- Process the REPLACE command (not functional in current version). + +The pre-processor is now part of the main compiler. + +------------------------------------------------------------------------------- + +Environmental variables: + +The 'TCOB_OPTIONS_PATH' environment variable sets the directory where the compiler options +file 'htcobolrc' can be found. + +The 'TCOBRT_CONFIG_DIR' environment variable sets the directory where the run-time options +file 'htrtconf' can be found. + +The 'TCOB_LD_LIBRARY_PATH' and 'LD_LIBRARY_PATH' environment variables sets the Dynamically loaded +shared libraries search path (excluding Win32). + +------------------------------------------------------------------------------- + +To install: + +If necessary edit directories and filenames htconfig.h, Makefile in compiler directory, +and Makefile in lib directory to suit. + +Edit the compiler resource file called htcobolrc found in the compiler directory. + +The compiler resource file name can be set in htconfig.h. +This file contains installation specific default information. + +As su, in the root directory type make install. + +------------------------------------------------------------------------------- + +Reported problems: + +Please email me at matt@verranm.fsnet.co.uk + +send me your config.log and a screen print, with a description of your problems diff --git a/INSTALL.Win32 b/INSTALL.Win32 new file mode 100644 index 0000000..c7947d1 --- /dev/null +++ b/INSTALL.Win32 @@ -0,0 +1,14 @@ +TinyCOBOL On Win32 + +Note that the Win32 release has not been fully tested on all Win32 platforms. +As a result you may not get the full functionality of the UN*X version. + +TinyCOBOL MinGW (Mingw32) edition (Win32 native port) +----------------------------------------------------------------------------- +See 'Readme.mingw32.txt' file. + + +TinyCOBOL Cygwin edition (using the Cygwin UN*X / POSIX emulation layer) +----------------------------------------------------------------------------- +See 'Readme.cygwin.txt' file. + diff --git a/INSTALL.bin b/INSTALL.bin new file mode 100644 index 0000000..722308a --- /dev/null +++ b/INSTALL.bin @@ -0,0 +1,39 @@ +The TinyCOBOL Project. + +Binaries install instructions: +------------------------------------------------------------------------------- +LINUX and BSD: + +Release Notes for Linux and FreeBSD. + +Requirements: + +GCC: +Since this compiler generates GAS compatible assembler code, the final +compilation and linkage is done by GCC. + +db-1.85.4: +This library is used to access indexed files. It is available on Metalab(1), +both as a libc5 ELF binary and as source. + +1) Ibiblio (formely known as Sunsite Metalab) + http://www.ibiblio.org/pub/linux/libs/db + db-1.85.4-bin-ELF.tar.gz - shared lib of db 1.85.4 + db-1.85.4-src.tar.gz - full source tree for db 1.85.4 + +ncurses: +The ncurses library is required. Used in screen I/O. + + +To install(su access required): + +As su, in the root directory type make install. + +Note: +Test programs found in test.code directories can be build and run without +installing Tiny COBOL. See Readme.txt files in test.code directories for instructions. + +Binaries in utils directories are not installed by main make install. To install +utils use utils directory Makefile. + +------------------------------------------------------------------------------- diff --git a/KNOWN-BUGS.txt b/KNOWN-BUGS.txt new file mode 100644 index 0000000..e3037cc --- /dev/null +++ b/KNOWN-BUGS.txt @@ -0,0 +1,11 @@ +Bug na movimentação de campos com pic Z: +---------------------------------------- + +VAR1 PIC ZZZ.ZZZ.ZZZ,ZZ +VAR2 PIC ZZZ.ZZZ.ZZZ,ZZ + +MOVE 1234,56 TO VAR1 +MOVE VAR1 TO VAR2 +DISPLAY VAR2 + +mostra 1234,00 quando deveria ser 1.234,56 \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..307fca8 --- /dev/null +++ b/Makefile @@ -0,0 +1,45 @@ +SHELL=/bin/sh + + + +prefix=/usr/local +exec_prefix=${prefix} +subdirs=compiler lib cobrun cobroutines +subdirs1=compiler lib cobrun cobpp cobroutines +subdirs2=compiler +subdirs3=lib + +all: + @for i in ${subdirs}; do \ + echo Making all in $$i ; \ + (cd $$i; ${MAKE} all) ; \ + done + +devel: + @for i in ${subdirs2}; do \ + echo Making all in $$i ; \ + (cd $$i; ${MAKE} all) ; \ + done + @for i in ${subdirs3}; do \ + echo Making devel in $$i ; \ + (cd $$i; ${MAKE} all) ; \ + done + +install: + @for i in ${subdirs}; do \ + echo Installing in $$i ; \ + (cd $$i; ${MAKE} install) ; \ + done + +clean: + @for i in ${subdirs1}; do \ + echo Cleaning in $$i ; \ + (cd $$i; ${MAKE} clean) ; \ + done + +distclean cleandist: clean + @rm -f config.cache config.status config.log htconfig.h tcobol.iss Makefile \ + compiler/htversion.h compiler/htcobolrc compiler/Makefile \ + cobpp/tcppversion.h cobpp/Makefile \ + lib/htcobolrt.rc lib/Makefile + diff --git a/Makefile-tiny.mk b/Makefile-tiny.mk new file mode 100644 index 0000000..e137db5 --- /dev/null +++ b/Makefile-tiny.mk @@ -0,0 +1,109 @@ +# +# There exist several targets which are by default empty and which can be +# used for execution of your targets. These targets are usually executed +# before and after some main targets. They are: +# +# .build-pre: called before 'build' target +# .build-post: called after 'build' target +# .clean-pre: called before 'clean' target +# .clean-post: called after 'clean' target +# .clobber-pre: called before 'clobber' target +# .clobber-post: called after 'clobber' target +# .all-pre: called before 'all' target +# .all-post: called after 'all' target +# .help-pre: called before 'help' target +# .help-post: called after 'help' target +# +# Targets beginning with '.' are not intended to be called on their own. +# +# Main targets can be executed directly, and they are: +# +# build build a specific configuration +# clean remove built files from a configuration +# clobber remove all built files +# all build all configurations +# help print help mesage +# +# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and +# .help-impl are implemented in nbproject/makefile-impl.mk. +# +# Available make variables: +# +# CND_BASEDIR base directory for relative paths +# CND_DISTDIR default top distribution directory (build artifacts) +# CND_BUILDDIR default top build directory (object files, ...) +# CONF name of current configuration +# CND_PLATFORM_${CONF} platform name (current configuration) +# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration) +# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration) +# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration) +# CND_PACKAGE_DIR_${CONF} directory of package (current configuration) +# CND_PACKAGE_NAME_${CONF} name of package (current configuration) +# CND_PACKAGE_PATH_${CONF} path to package (current configuration) +# +# NOCDDL + + +# Environment +MKDIR=mkdir +CP=cp +CCADMIN=CCadmin +RANLIB=ranlib + + +# build +build: .build-post + +.build-pre: +# Add your pre 'build' code here... + +.build-post: .build-impl +# Add your post 'build' code here... + + +# clean +clean: .clean-post + +.clean-pre: +# Add your pre 'clean' code here... + +.clean-post: .clean-impl +# Add your post 'clean' code here... + + +# clobber +clobber: .clobber-post + +.clobber-pre: +# Add your pre 'clobber' code here... + +.clobber-post: .clobber-impl +# Add your post 'clobber' code here... + + +# all +all: .all-post + +.all-pre: +# Add your pre 'all' code here... + +.all-post: .all-impl +# Add your post 'all' code here... + + +# help +help: .help-post + +.help-pre: +# Add your pre 'help' code here... + +.help-post: .help-impl +# Add your post 'help' code here... + + + +# include project implementation makefile +include nbproject/Makefile-impl.mk + +# include project make variables +include nbproject/Makefile-variables.mk diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 0000000..6746dd5 --- /dev/null +++ b/Makefile.in @@ -0,0 +1,98 @@ +SHELL=/bin/sh + +@SET_MAKE@ + +prefix=@prefix@ +exec_prefix=@exec_prefix@ +#subdirs=compiler lib utils +#subdirs=compiler lib utils cobpp test.code +subdirs=compiler lib cobrun test.code info +subdirs1=utils test.code +subdirs2=compiler lib cobrun utils test_suite test.code cobpp +#subdirs3=compiler lib +subdirs3=compiler lib cobrun cobpp info +subdirs4=compiler lib cobrun info utils +subdirs5=lockserver +subdirs6=compiler test.code info +subdirs7=lib + +all: + @for i in ${subdirs}; do \ + echo Making all in $$i ; \ + (cd $$i; ${MAKE} all) ; \ + done + +devel: + @for i in ${subdirs}; do \ + echo Making devel in $$i ; \ + (cd $$i; ${MAKE} devel) ; \ + done + +slibs: + @for i in ${subdirs6}; do \ + echo Making in $$i ; \ + (cd $$i; ${MAKE}) ; \ + done + @for i in ${subdirs7}; do \ + echo Making in $$i ; \ + (cd $$i; ${MAKE} shared-libs) ; \ + done + +install: + @for i in ${subdirs}; do \ + echo Installing in $$i ; \ + (cd $$i; ${MAKE} install) ; \ + done + +install-slibs: + @for i in ${subdirs6}; do \ + echo Installing in $$i ; \ + (cd $$i; ${MAKE} install) ; \ + done + @for i in ${subdirs7}; do \ + echo Installing in $$i ; \ + (cd $$i; ${MAKE} install-shared) ; \ + done + +lockserver: + @for i in ${subdirs5}; do \ + echo Making lock server in $$i ; \ + (cd $$i; ${MAKE} all) ; \ + done + +depend: + @for i in ${subdirs}; do \ + echo Depending in $$i ; \ + (cd $$i; ${MAKE} depend) ; \ + done + +clean: + @for i in ${subdirs4}; do \ + echo Cleaning in $$i ; \ + (cd $$i; ${MAKE} clean) ; \ + done + +distclean cleandist: + @for i in ${subdirs3}; do \ + echo Cleaning in $$i ; \ + (cd $$i; ${MAKE} clean; rm -f Makefile) ; \ + done + @for i in ${subdirs1}; do \ + echo Cleaning dist in $$i ; \ + (cd $$i; ${MAKE} distclean; rm -f Makefile) ; \ + done + @for i in ${subdirs5}; do \ + echo Cleaning in $$i ; \ + (cd $$i; ${MAKE} clean; rm -f Makefile) ; \ + done + @rm -f config.cache config.status config.log htconfig.h Makefile \ + compiler/htversion.h compiler/htcobolrc \ + cobpp/tcppversion.h lib/htcobolrt.rc + +cleanall: + @for i in ${subdirs2}; do \ + echo Cleaning in $$i ; \ + (cd $$i; ${MAKE} clean) ; \ + done + rm -f config.cache config.status config.log +# find . -name Makefile -exec rm {} \; -print diff --git a/Makefile.mingw b/Makefile.mingw new file mode 100644 index 0000000..307fca8 --- /dev/null +++ b/Makefile.mingw @@ -0,0 +1,45 @@ +SHELL=/bin/sh + + + +prefix=/usr/local +exec_prefix=${prefix} +subdirs=compiler lib cobrun cobroutines +subdirs1=compiler lib cobrun cobpp cobroutines +subdirs2=compiler +subdirs3=lib + +all: + @for i in ${subdirs}; do \ + echo Making all in $$i ; \ + (cd $$i; ${MAKE} all) ; \ + done + +devel: + @for i in ${subdirs2}; do \ + echo Making all in $$i ; \ + (cd $$i; ${MAKE} all) ; \ + done + @for i in ${subdirs3}; do \ + echo Making devel in $$i ; \ + (cd $$i; ${MAKE} all) ; \ + done + +install: + @for i in ${subdirs}; do \ + echo Installing in $$i ; \ + (cd $$i; ${MAKE} install) ; \ + done + +clean: + @for i in ${subdirs1}; do \ + echo Cleaning in $$i ; \ + (cd $$i; ${MAKE} clean) ; \ + done + +distclean cleandist: clean + @rm -f config.cache config.status config.log htconfig.h tcobol.iss Makefile \ + compiler/htversion.h compiler/htcobolrc compiler/Makefile \ + cobpp/tcppversion.h cobpp/Makefile \ + lib/htcobolrt.rc lib/Makefile + diff --git a/README b/README new file mode 100644 index 0000000..0a42507 --- /dev/null +++ b/README @@ -0,0 +1,109 @@ +The TinyCOBOL Project: + +The TinyCOBOL project is a COBOL compiler being actively developed by +members of the free software community. + + +The long term goal is to produce a COBOL compiler which is 'COBOL 85 standard' +compliant, or at least as close as reasonably possible. + +TinyCOBOL supports the IA32 (x86) architecture and the following platforms. + +- FreeBSD using the GCC compiler. +- Linux using the GCC compiler. +- Win32 using the GCC MinGW (Mingw32) compiler. +- Win32 using the GCC Cygwin compiler and POSIX emulation layer. + +------------------------------------------------------------------------------- +BUILD AND INSTALL INSTRUCTIONS: + +See INSTALL for Linux and BSD build, install instructions. + +See INSTALL.bin for Linux binary install instructions. + +See INSTALL.Win32 for Win32 systems build, install instructions. + +For Record Locking on Indexed IO, follow these steps +- Use the option --enable-lockserv in configure script. +- Use the option --enable-sync if you want to ensure muliple users all see the same data. It will run much slower as every write will be forced to disk. +- Compile the Lockserver in the lockserver directory using the supplied +Makefile. +ex: +$ cd lockserver +$ make +$ make install +- Run the Lockserver process. (You can use ./lockserver -d for debugging) +- Build the Compiler as Normal. + +Notes about lockserver: +1). To start the lockserver. + cd + Then run the following command as root + $ ./lockserver +2). To debug the lockserver process use the "-d" switch + $ ./lockserver -d + This way, lockserver will not start as a daemon and will display + all output on the screen. +3). To stop the lockserver in debug mode press Control-C. + To stop the Lockserver in Daemon mode first get the pid. + Use the -SIGINT signal to shut it down gracefully. + $ kill -2 + remove the .lf file in the Lockserver Home is it exists. + +Notes about the Behavior of Locking in TC: + On All Indexed IO ALWAYS check the FILE STATUS + to make sure your IO was successfull. If a Record was locked it will + return FILE STATUS 51. You will need to repeat your IO until the FILE Status + is NOT 51 (Failure to have Recovery/Repeat Code will render the Results of + your IO to be Undefined and Unexpected results). If one of your programs + crashes all the locks it had will still be defined. In order to clear this + Stop the Lockserver and remove the lockdump and .lf files if they exist + in /usr/local/lockserver. Then restart the Lockserver. We plan to add code + to Ignore a lock on records of programs that have crashed. + WARNING Once you turn on Locking your programs will not run unless the + Lockserver process is running. + To lock a Record use:- + READ ... WITH LOCK + To Read a Record Ignoring Locking use:- + READ ... WITH IGNORE LOCK + To Unlock a Record use:- + REWRITE .... + UNLOCK + or + DELETE the record. + + +------------------------------------------------------------------------------- +LINKS: + +Home pages: +http://tiny-cobol.sourceforge.net/ +http://www.tinycobol.org/ +http://br.tinycobol.org/ + +Download: +http://tiny-cobol.sourceforge.net/download.html +http://www.ibiblio.org/pub/Linux/devel/lang/cobol/ +http://br.tinycobol.org/download.html + +Mailing lists: +http://lists.sourceforge.net/mailman/listinfo/tiny-cobol-users +http://listas.cipsga.org.br/cgi-bin/mailman/listinfo/cobol-br + +Mailing list archives: +http://www.geocrawler.com/redir-sf.php3?list=tiny-cobol-users +http://listas.cipsga.org.br/pipermail/cobol-br/ + +Old mailing list archives: +http://www.egroups.com/group/gnucobol/ + +------------------------------------------------------------------------------- +HOW TO DOWNLOAD A SOURCE SNAPSHOT FROM CVS: + +If you have CVS installed on your system, TinyCOBOL's CVS version can be +checked out via the anonymous CVS (pserver) server, using the following commands. +- cvs -d:pserver:anonymous@cvs.tiny-cobol.sourceforge.net:/cvsroot/tiny-cobol login +- When prompted for a password for anonymous, simply press the Enter key. +- cvs -d:pserver:anonymous@cvs.tiny-cobol.sourceforge.net:/cvsroot/tiny-cobol co development +- The module you wish to check out must be specified as the module-name (development). + diff --git a/Raw.dat b/Raw.dat new file mode 100644 index 0000000..31bf8c6 --- /dev/null +++ b/Raw.dat @@ -0,0 +1,11 @@ + +001aaaaaaaaab +002aaaaaaaaab +003aaaaaaaaab +004aaaaaaaaab +005aaaaaaaaab +006aaaaaaaaab +007aaaaaaaaab +008aaaaaaaaab +009aaaaaaaaab +010aaaaaaaaab \ No newline at end of file diff --git a/Readme.cygwin.txt b/Readme.cygwin.txt new file mode 100644 index 0000000..728e858 --- /dev/null +++ b/Readme.cygwin.txt @@ -0,0 +1,98 @@ +TinyCOBOL Cygwin (POSIX/UN*X emulation layer) edition for Win32 + +How to install and setup TinyCOBOL Cygwin edition using the binary distribution +----------------------------------------------------------------------------- + +To run TinyCOBOL Cygwin edition the following must be installed on your system: +- The Cygwin POSIX emulation layer from Cygnus. +- GCC Cygwin version. +- The Curses library (ncurses) Cygwin version. + Required by the SCREEN SECTION and some types of DISPLAY statements. +- Berkeley's DB library (version db-1.85.4 or later) Cygwin version. + Required for all file I/O. + +How to install the TinyCOBOL Cygwin binary: +- Install the binary files using one of the methods below. + Use the 'setup.exe' program, included with the Cygwin distribution, + and select the TinyCOBOL binary to install. + OR + Open a Cygwin command line and install the TinyCOBOL binaries using + the tar utility. + Example: + cd / + tar -xvzf tinycobol-x.xx-x.cygwin.tar.gz + + +- Edit the compiler resource file 'htcobolrc'. + Example (set your paths): + LD_PATH: -L/usr/lib -L/usr/local/lib +- Set the TinyCOBOL environment variables. + Example (DOS or CMD window): + set TCOB_OPTIONS_PATH=C:\cygwin\usr\local\share\htcobol + set TCOBRT_CONFIG_DIR=C:\cygwin\usr\local\share\htcobol + Example (shell resource file): + export TCOB_OPTIONS_PATH=/usr/local/share/htcobol + export TCOBRT_CONFIG_DIR=/usr/local/share/htcobol + + +How to build and install the TinyCOBOL Cygwin edition from the source code +----------------------------------------------------------------------------- +- The Cygwin POSIX emulation layer from Cygnus. +- GCC Cygwin version. +- make (make). +- flex (flex). +- Bison or Berkeley's YACC (byacc) version 1.9.3. + Earlier versions of Berkeley's YACC will not work. +- The Curses library (ncurses) Cygwin version. + Required by the SCREEN SECTION and some types of DISPLAY statements. +- Berkeley's DB library (version db-1.85.4 or later) Cygwin version. + Required for all file I/O. + +How to configure and compile TinyCOBOL Cygwin edition. +- Extract 'tinycobol-x.xx-x' TAR/GZIP archive. +- Run the configure script 'configure' (1). +- Type 'make' to compile the compiler and run-time (2). + +How to install TinyCOBOL Cygwin edition. +- Configure and compile TinyCOBOL Cygwin edition. +- Type 'make install' to install the compiler and run-time. + +Example: + ./configure + make + make install + +Notes: +1) + Use these variables to override the choices made by `configure' or to help + it to find libraries and programs with nonstandard names/locations. + Some influential environment variables: + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have + headers in a nonstandard directory +2) + To build shared libraries (DLL) use 'make devel'. + Note that this has not been tested for the Cygwin platform + and will require manual modifications to the make file + in the 'lib' directory. + + +Release notes +----------------------------------------------------------------------------- +To run the TinyCOBOL regression test suite for the Win32 MinGW release +requires the following to be installed on your system. +- Perl 5.x + +Binaries for BDB can be downloaded from the TinyCOBOL(1) page. + +The following are not included in binary distribution. +- Regression test suite sources. +- Utility programs binaries. +- Sample COBOL code sources. + +Links +----------------------------------------------------------------------------- +1) TinyCOBOL +http://tiny-cobol.sourceforge.net/download.html + diff --git a/Readme.mingw32.txt b/Readme.mingw32.txt new file mode 100644 index 0000000..6050b04 --- /dev/null +++ b/Readme.mingw32.txt @@ -0,0 +1,99 @@ +TinyCOBOL MinGW (Mingw32) edition for Win32 + + +How to install and setup TinyCOBOL MinGW edition using INNO setup +----------------------------------------------------------------------------- + +To run TinyCOBOL MinGW edition the following must be installed on your system: +- GCC MinGW version. +- Berkeley's DB library (MinGW) version 1.85. +- PDcurses library (MinGW) version 2.4 or later. + +Installation using the setup binary: +- Run the INNO setup (ex: tinycobol-0.62-1.mingw.exe) binary. +- Edit the compiler resource file 'htcobolrc'. + Example (set your paths): + LD_PATH: -L/usr/lib -LD:/TinyCOBOL +- Create a DOS or CMD window shortcut. +- Set the TinyCOBOL and PATH environment variables. + Win9x users (DOS): + Use the enclosed batch file 'tcobol.bat' as a template. + Set the initial environment memory to 4096. + Win2K/XP users (CMD): + Use the properties sheet to set the values. + +Example: + set TCOB_OPTIONS_PATH=C:\TinyCOBOL + set TCOBRT_CONFIG_DIR=C:\TinyCOBOL + set PATH=C:\TinyCOBOL;C:\mingw\bin;%PATH% + + +How to build and install the TinyCOBOL MinGW edition from the source code +----------------------------------------------------------------------------- + +To build TinyCOBOL Win32 MinGW release requires the following to be +installed on your system. +- MSYS or some sort of POSIX shell. +- GCC MinGW version. +- make (make). +- flex (flex). +- Bison or Berkeley's YACC (byacc) version 1.9.3. + Earlier versions of Berkeley's YACC will not work. +- Berkeley's DB library (MinGW) version 1.85. + Required for all file I/O. +- PDcurses library (MinGW) version 2.4 or later. + Required by the SCREEN SECTION and some types of DISPLAY statements. + +How to configure and compile TinyCOBOL MinGW edition. +- Extract 'tinycobol-x.xx-x' TAR/GZIP archive. +- Run the MinGW configure script 'tconfig.mingw.sh' using the '-i' option + to set the install directory (1) (2). + Example: + sh tconfig.mingw.sh -i 'D:/TinyCOBOL' +- Type 'make' to compile the compiler and run-time (3). + +How to install TinyCOBOL MinGW edition. +- Configure and compile TinyCOBOL MinGW edition. +- Type 'make install' to install the compiler and run-time (4). + + +Notes: +1) + Default install directory is 'C:/TinyCOBOL'. +2) + Running the UN*X 'configure' script will on MSYS + will not properly setup all the variables. +3) + To build the TC run-time as a static library and DLL use 'make devel'. +4) + The install directory is set in the configure, step 1. + + +How to create the TinyCOBOL MinGW edition INNO setup executable from the source code +----------------------------------------------------------------------------- + +- Configure and compile TinyCOBOL MinGW edition as described above. +- Use the INNO setup script 'tcobol.iss' to create the INNO setup executable. + + +Release notes +----------------------------------------------------------------------------- +To run the TinyCOBOL regression test suite for the Win32 MinGW release +requires the following to be installed on your system. +- Perl 5.x + +Binaries for BDB and PDcurses can be downloaded from the TinyCOBOL(1) or GNUwin32(2) pages. + +The following are not included in binary distribution. +- Regression test suite sources. +- Utility programs binaries. +- Sample COBOL code sources. + +Links +----------------------------------------------------------------------------- +1) TinyCOBOL +http://tiny-cobol.sourceforge.net/download.html + +2) GNUwin32 +http://gnuwin32.sourceforge.net/ + diff --git a/STATUS b/STATUS new file mode 100644 index 0000000..22e72f4 --- /dev/null +++ b/STATUS @@ -0,0 +1,119 @@ +The TinyCOBOL Project STATUS: + +TinyCOBOL supports the IA32 (x86) architecture and the following platforms. + +- FreeBSD using the GCC compiler. +- Linux using the GCC compiler. +- Win32 using the GCC MinGW (Mingw32) compiler. +- Win32 using the GCC Cygwin compiler and POSIX emulation layer. + +Currently the compiler will generate GNU assembler code. With the aid +of GNU assembler and linker, a executable binary can be created to run +on the above mentioned IA32 (x86) platforms. + +The compiler will work with COBOL sources which are in standard fixed +column or X/Open free form formats. A conversion utility to convert fixed +to free form COBOL source code is included in all sources. + +The term COBOL 85 standard as used by TinyCOBOL refers to the combination +of the following standards. +- ISO 1985.........: Programming Languages - COBOL. +- ISO 1989-1.......: Programming Languages - Intrinsic Function Module - COBOL. +- ANSI X3.23-1985..: Programming Languages - COBOL. +- ANSI X3.23a-1989.: Programming Languages - Intrinsic Function Module - COBOL. +- X/Open XPG3......: COBOL programming languages extensions. + +The current released snapshot has support for the following features and/or +COBOL syntax. + +- ACCEPT, DISPLAY (including stdin, stderr, stdout). +- ACCEPT, DISPLAY. + Line I/O (stdin, stderr, stdout). + Screen I/O (non COBOL 85 standard extension). + at LINE ... POSITION ... (non COBOL 85 standard extension). +- CALL (including dynamic load). + BY REFERENCE. + BY VALUE. + BY CONTENT. + RETURNING variable (non COBOL 85 standard extension). +- CHAIN (non COBOL 85 standard extension). +- CURRENCY SIGN, DECIMAL-POINT. +- Debugging facility using GDB (not fully functional). +- Embedded SQL using vendor supplied SQL Pre-Processor. +- External variables. +- EVALUATE. +- File I/O. + Includes OPEN, CLOSE, DELETE, READ, WRITE, REWRITE, START + READ .. WITH LOCK + READ .. WITH IGNORE LOCK + Variable record length file IO (preliminary). + Locking for relative files (preliminary). + Locking for Indexed files using Lockserver supplied (preliminary). +- Floating point types (USAGE IS [ FLOAT-LONG | COMP-2 | FLOAT-SHORT | COMP-1 ]). +- GO TO, GO TO ... DEPENDING ON. +- GOBACK (non COBOL 85 standard extension). +- IF/ELSE conditional statements (all options are implemented). +- INITIALIZE. +- INSPECT (not all options are implemented). +- Integrated COBOL pre-processor. + Supports free and fixed syntax formats. + Supports all COPY statements including the REPLACING clause. + The REPLACE statements are not implemented. +- Intrinsic Functions. +- Linux extensions (return code, command line, environmental variables). +- Math verbs (including [NOT] ON SIZE ERROR options). + ADD (including CORRESPONDING option). + COMPUTE (+ - * / ** operators implemented). + DIVIDE. + MULTIPLY. + SUBTRACT (including CORRESPONDING option). +- MOVE(including CORRESPONDING option). +- Multi dimensional arrays and tables. + Variable size arrays and tables (preliminary). +- NEXT SENTENCE, CONTINUE (does not conform to COBOL 85 standard). +- PERFORM (all options implemented). +- POINTER types (USAGE IS POINTER). +- Reference Modification. +- Scope terminators for COBOL 85 (END-IF .... END-PERFORM). +- Sequence of source programs. +- SCREEN SECTION (COBOL 2002 draft standard). +- SET. +- STRING (Not all options are implemented). +- SORT, RELEASE, RETURN. + USING and GIVING clauses only work on sequential files. + The sort work file is kept in memory and not written to disk. +- SEARCH. +- SEARCH ALL. +- SELECT ... ASSIGN (not all options are implemented). + Supports non-standard external file name assignment in SELECT and FD statements. +- Static variables. +- TRACE, READY/RESET (not functional). +- UNSTRING. +- UNLOCK. +- Variable length (1, 2, 4, 8) support for BINARY, COMP, COMP-5 fields. +- Variable record length file IO (preliminary) +- Variable size arrays (preliminary). + +The following features and/or COBOL syntax are currently under development. + +- CORRESPONDING options in the MOVE, ADD, SUBTRACT statements (preliminary). +- DEBUG lines. +- EXTERNAL semantics (preliminary). +- Inline comments (2002 draft standard). +- Intrinsic Functions (preliminary). +- PROCEDURE DIVISION DECLARATIVES (preliminary). +- The REPORT SECTION (preliminary). +- Variable record length file IO (preliminary). +- Variable size arrays (preliminary). + +The following features and/or COBOL syntax are not currently supported: + +- Any portion of the COMMUNICATION SECTION. +- Non native IA32 types (big-endian). +- Support for 33 digit precision for temporary variables in RTS. +- Nested sequence of source programs. + +The following features and/or COBOL syntax are not likely to ever be +supported. +- The ALTER statement. + diff --git a/TODO b/TODO new file mode 100644 index 0000000..cb8ffac --- /dev/null +++ b/TODO @@ -0,0 +1,5 @@ +* Include the sources of db-1.85 in our distribution to become + easier the life for users of RedHat, Caldera, and others Linux + distributions. + To avoid clashes with previous libdb installed, we could rename + our own library (?). diff --git a/cbl2cob/cbl2cob.cob b/cbl2cob/cbl2cob.cob new file mode 100644 index 0000000..01bf225 --- /dev/null +++ b/cbl2cob/cbl2cob.cob @@ -0,0 +1,599 @@ + * + * Copyright (C) 2003, Hudson Reis, + * Infocont Sistemas Integrados Ltda. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2, + * or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software; see the file COPYING. + * If not, write to the Free Software Foundation, Inc., 59 Temple + * Place, Suite 330, Boston, MA 02111-1307 USA + * + identification division. + program-id. cbl2cob. + author. Hudson Reis. + date-written. 03/05/2003. + * + * Front-end para pré-processar o fonte de entrada e chamar o + * parser selecionado, mediante a escolha do usuário. + * + environment division. + configuration section. + input-output section. + file-control. + copy "entrada.sl". + copy "intermed.sl". + copy "saida.sl". + + data division. + file section. + copy "entrada.fd". + copy "intermed.fd". + copy "saida.fd". + + working-storage section. + copy "globals.ws". + copy "globals.ls". + 77 filler pic x(001) value spaces. + * Linha de comando para pegar a string digitada pelo usuario. + 77 ws77-linha-comando pic x(512) value spaces. + * Variáveis que serão usadas para quebrar a frase + * passada na linha de comando, pelo usuário. + * O número máximo argumentos supotados é 8. + 01 ws01-args. + 02 ws02-arg-a pic x(256) value spaces. + 02 ws02-arg-b pic x(256) value spaces. + 02 ws02-arg-c pic x(256) value spaces. + 02 ws02-arg-d pic x(256) value spaces. + 02 ws02-arg-e pic x(256) value spaces. + 02 ws02-arg-f pic x(256) value spaces. + 02 ws02-arg-g pic x(256) value spaces. + 02 ws02-arg-h pic x(256) value spaces. + * Lugar temporário para a switch do dialeto selecionado. + 77 ws77-dialeto-selecionado pic x(256) value spaces. + * Variáveis para os dialetos. + 77 ws77-dialeto-entrada pic x(003) value spaces. + 88 ws88-microbase value "mb". + 88 ws88-microfocus value "mf". + 88 ws88-rm value "rm". + * Variável para determinar se o dado a ser tratado é um valor + * ou uma switch. + 77 ws77-dado pic 9(001) value zeros. + 88 ws88-switch value 0. + 88 ws88-valor value 1. + * Opções do pre-processador. + 77 ws77-opcoes-pp pic 9(001) value zeros. + 88 ws88-abrir-copybooks value 0. + 88 ws88-fechar-copybooks value 1. + * Variáveis que vão armazenar o basename de cada arquivo, caso + * o usuário indique um diretório externo ao diretório corrente + 77 ws77-basename-entrada pic x(256) value spaces. + 77 ws77-basename-saida pic x(256) value spaces. + * Variáveis com o valor das switches selecionadas. + 77 ws77-escolher-dialeto pic x(002) value "-d". + 77 ws77-mostrar-ajuda pic x(002) value "-h". + 77 ws77-fonte-entrada pic x(002) value "-i". + 77 ws77-fonte-saida pic x(002) value "-o". + 77 ws77-modo-verboso pic x(002) value "-v". + 77 ws77-exibir-versao pic x(002) value "-V". + * A otimizar. + 77 ws77-linha-para-parsing pic x(256) value spaces. + 01 ws01-case. + 02 ws02-maiusculo pic x(26) + value "ABCDEFGHIJKLMNOPQRSTUVXYWZ". + 02 ws02-minusculo pic x(26) + value "abcdefghijklmnopqrstuvxywz". + + procedure division. + perform ler-linha-de-comando + set ws88-abrir-copybooks to true + perform pre-processar-fonte + evaluate true + when ws88-microfocus + call "mfparser" using ws77-arquivo-entrada + ws77-arquivo-saida + ws77-processo + end-call + when ws88-microbase + call "mbparser" using ws77-arquivo-entrada + ws77-arquivo-saida + ws77-processo + end-call + end-evaluate + * set ws88-fechar-copybooks to true + * perform pre-processar-fonte + perform finalizar + . + ***************************************************************** + * Rotinas principais * + ***************************************************************** + ler-linha-de-comando. + * 1a. Etapa: Lendo as opções da linha de comando. + accept ws77-linha-comando from command-line + if return-code not equal zeros + display "Tamanho da linha de comando truncada!" + perform finalizar + end-if + if ws88-processo-verboso + display "Linha de comando: " ws77-linha-comando + end-if + unstring ws77-linha-comando delimited by ' ' into + ws02-arg-a + ws02-arg-b + ws02-arg-c + ws02-arg-d + ws02-arg-e + ws02-arg-f + ws02-arg-g + ws02-arg-h + end-unstring + if ws88-processo-verboso + perform varying ws02-i from 256 by -1 + until ws02-arg-a(ws02-i:1)not equal spaces + or + ws02-i equal zeros + continue + end-perform + add 1 to ws02-i + display "Argumento a: " ws02-arg-a(1:ws02-i) + perform varying ws02-i from 256 by -1 + until ws02-arg-b(ws02-i:1) not equal spaces + or + ws02-i equal zeros + continue + end-perform + add 1 to ws02-i + display "Argumento b: " ws02-arg-b(1:ws02-i) + perform varying ws02-i from 256 by -1 + until ws02-arg-c(ws02-i:1) + not equal spaces or ws02-i equal zeros + continue + end-perform + add 1 to ws02-i + display "Argumento c: " ws02-arg-c(1:ws02-i) + + perform varying ws02-i from 256 by -1 + until ws02-arg-d(ws02-i:1) + not equal spaces or ws02-i equal zeros + continue + end-perform + add 1 to ws02-i + display "Argumento d: " ws02-arg-d(1:ws02-i) + + perform varying ws02-i from 256 by -1 + until ws02-arg-e(ws02-i:1) + not equal spaces or ws02-i equal zeros + continue + end-perform + add 1 to ws02-i + display "Argumento e: " ws02-arg-e(1:ws02-i) + + perform varying ws02-i from 256 by -1 + until ws02-arg-f(ws02-i:1) + not equal spaces or ws02-i equal zeros + continue + end-perform + add 1 to ws02-i + display "Argumento f: " ws02-arg-f(1:ws02-i) + + perform varying ws02-i from 256 by -1 + until ws02-arg-g(ws02-i:1) + not equal spaces or ws02-i equal zeros + continue + end-perform + add 1 to ws02-i + display "Argumento g: " ws02-arg-g(1:ws02-i) + + perform varying ws02-i from 256 by -1 + until ws02-arg-h(ws02-i:1) + not equal spaces or ws02-i equal zeros + continue + end-perform + add 1 to ws02-i + display "Argumento h: " ws02-arg-h(1:ws02-i) + end-if + if ws88-switch + evaluate ws02-arg-a + when ws77-escolher-dialeto + move ws02-arg-b to ws77-dialeto-selecionado + perform escolher-dialeto + when ws77-mostrar-ajuda + perform exibir-ajuda + when ws77-fonte-entrada + move ws02-arg-b to ws77-arquivo-entrada + perform verificar-arquivo-entrada + when ws77-modo-verboso + set ws88-processo-verboso to true + when ws77-exibir-versao + perform exibir-versao + when other + perform exibir-ajuda + end-evaluate + else + set ws88-valor to true + end-if + if ws88-switch + evaluate ws02-arg-b + when ws77-escolher-dialeto + move ws02-arg-c to ws77-dialeto-selecionado + perform escolher-dialeto + when ws77-mostrar-ajuda + perform exibir-ajuda + when ws77-fonte-entrada + move ws02-arg-c to ws77-arquivo-entrada + perform verificar-arquivo-entrada + when ws77-modo-verboso + set ws88-processo-verboso to true + when ws77-exibir-versao + perform exibir-versao + when other + perform exibir-ajuda + end-evaluate + else + set ws88-valor to true + end-if + if ws88-switch + evaluate ws02-arg-c + when ws77-escolher-dialeto + move ws02-arg-d to ws77-dialeto-selecionado + perform escolher-dialeto + when ws77-fonte-entrada + move ws02-arg-d to ws77-arquivo-entrada + perform verificar-arquivo-entrada + when ws77-modo-verboso + set ws88-processo-verboso to true + when other + perform exibir-ajuda + end-evaluate + else + set ws88-switch to true + end-if + if ws88-continua-parsing + if ws88-switch + evaluate ws02-arg-c + when ws77-modo-verboso + set ws88-processo-verboso to true + when ws77-fonte-entrada + move ws02-arg-d to ws77-arquivo-entrada + perform verificar-arquivo-entrada + when ws77-fonte-saida + move ws02-arg-d to ws77-arquivo-saida + perform verificar-arquivo-saida + when other + perform exibir-ajuda + end-evaluate + else + set ws88-switch to true + end-if + end-if + if ws88-continua-parsing + if ws88-switch + evaluate ws02-arg-d + when ws77-modo-verboso + set ws88-processo-verboso to true + when ws77-fonte-entrada + move ws02-arg-e to ws77-arquivo-entrada + perform verificar-arquivo-entrada + when ws77-fonte-saida + move ws02-arg-e to ws77-arquivo-saida + perform verificar-arquivo-saida + when other + perform exibir-ajuda + end-evaluate + else + set ws88-switch to true + end-if + end-if + if ws88-continua-parsing + if ws88-switch + evaluate ws02-arg-e + when ws77-fonte-entrada + move ws02-arg-f to ws77-arquivo-entrada + perform verificar-arquivo-entrada + when ws77-fonte-saida + move ws02-arg-f to ws77-arquivo-saida + perform verificar-arquivo-saida + when other + perform exibir-ajuda + end-evaluate + else + set ws88-switch to true + end-if + end-if + if ws88-continua-parsing + if ws88-switch + evaluate ws02-arg-f + when ws77-fonte-entrada + move ws02-arg-g to ws77-arquivo-entrada + perform verificar-arquivo-entrada + when ws77-fonte-saida + move ws02-arg-g to ws77-arquivo-saida + perform verificar-arquivo-saida + when other + perform exibir-ajuda + end-evaluate + else + set ws88-switch to true + end-if + end-if + if ws88-continua-parsing + if ws88-switch + evaluate ws02-arg-g + when ws77-fonte-saida + move ws02-arg-h to ws77-arquivo-saida + perform verificar-arquivo-saida + when other + perform exibir-ajuda + end-evaluate + else + set ws88-switch to true + end-if + end-if + if ws77-dialeto-entrada equal spaces + display "Erro na escolha do dialeto" + perform finalizar + else + if ws88-processo-verboso + evaluate true + when ws88-microbase + display "dialeto: Microbase COBOL" + when ws88-microfocus + display "dialeto: Microfocus COBOL" + when ws88-rm + display "dialeto: RM COBOL" + when other + display "Erro na escolha do dialeto" + perform finalizar + end-evaluate + end-if + end-if + if ws77-arquivo-entrada equal spaces + display "Não foi informado arquivo de entrada" + perform finalizar + else + if ws88-processo-verboso + move zeros to ws02-m + perform varying ws02-m from 256 by -1 until + ws77-arquivo-entrada(ws02-m:1) not equal spaces + continue + end-perform + display "input: " ws77-arquivo-entrada(1:ws02-m) + end-if + end-if + if ws77-arquivo-saida equal spaces + display "Nao foi informado arquivo de saida" + perform finalizar + else + if ws88-processo-verboso + move zeros to ws02-m + perform varying ws02-m from 256 by -1 until + ws77-arquivo-saida(ws02-m:1) not equal spaces + continue + end-perform + display "output: " ws77-arquivo-saida(1:ws02-m) + end-if + end-if + . + pre-processar-fonte. + move ws77-arquivo-entrada + to ws77-arquivo-intermediario + perform varying ws02-i from 256 by -1 + until ws77-arquivo-intermediario(ws02-i:1) + not equal spaces + continue + end-perform + add 1 to ws02-i + compute ws02-j = 256 - ws02-i + move ".pre" to ws77-arquivo-intermediario(ws02-i:ws02-j) + if ws88-processo-verboso + add 4 to ws02-i + display "Arquivo intermediario: " + ws77-arquivo-intermediario(1:ws02-i) + end-if + open input arquivo-entrada + if not ws88-ok + perform testar-file-status + end-if + open output arquivo-intermediario + perform until ws88-fim-arquivo + read arquivo-entrada + if not ws88-fim-arquivo + move reg-arquivo-entrada + to ws77-linha-para-parsing + inspect ws77-linha-para-parsing + converting ws02-minusculo + to ws02-maiusculo + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " COPY " + if ws02-i > 0 + perform testes-copy + else + write reg-arquivo-intermediario + from reg-arquivo-entrada + end-if + end-if + end-perform + close arquivo-entrada arquivo-intermediario + move ws77-arquivo-intermediario to ws77-arquivo-entrada + . + finalizar. + stop run + . + ***************************************************************** + * Procedures secundárias * + ***************************************************************** + verificar-arquivo-entrada. + set ws88-continua-parsing to true + set ws88-valor to true + open input arquivo-entrada + if not ws88-ok + perform testar-file-status + end-if + close arquivo-entrada + . + verificar-arquivo-saida. + * Pegar o basename do fonte de entrada. + perform varying ws02-i from 256 by -1 + until ws77-arquivo-entrada(ws02-i:1) + not equal spaces + continue + end-perform + * Descobrir o início da string(que pode estar terminado com + * "/") + perform varying ws02-j from ws02-i by -1 + until ws77-arquivo-entrada(ws02-j:1) + equal "/" or ws02-j equal zeros + continue + end-perform + if ws77-arquivo-entrada(ws02-j:1) equal "/" + add 1 to ws02-j + compute ws02-k = ws02-i - ws02-j + add 1 to ws02-k + move ws77-arquivo-entrada(ws02-j:ws02-k) + to ws77-basename-entrada + if ws88-processo-verboso + display "input a: " + ws77-arquivo-entrada(ws02-j:ws02-k) + end-if + else + if ws88-processo-verboso + perform varying ws02-i from 256 by -1 + until ws77-arquivo-entrada(ws02-i:1) + not equal spaces or ws02-i equal zeros + continue + end-perform + add 1 to ws02-i + display "input b: " ws77-arquivo-entrada(1:ws02-i) + end-if + move ws77-arquivo-entrada to ws77-basename-entrada + end-if + + if ws77-arquivo-saida equal spaces + display "Arquivo de saída não informado" + perform finalizar + end-if + + * Pegar o basename do fonte de saída. + perform varying ws02-l from 256 by -1 + until ws77-arquivo-saida(ws02-l:1) + not equal spaces + continue + end-perform + if ws88-processo-verboso + display "ws02-l: " ws02-l + end-if + * Descobrir o início da string(que pode estar terminado com + * "/") + perform varying ws02-m from ws02-l by -1 + until ws77-arquivo-saida(ws02-m:1) + equal "/" or ws02-m equal zeros + continue + end-perform + if ws88-processo-verboso + display "ws02-m: " ws02-m + end-if + if ws77-arquivo-saida(ws02-m:1) equal "/" + add 1 to ws02-m + compute ws02-n = ws02-l - ws02-m + add 1 to ws02-n + move ws77-arquivo-saida(ws02-m:ws02-n) + to ws77-basename-saida + if ws88-processo-verboso + display "output a: " + ws77-arquivo-saida(ws02-m:ws02-n) + end-if + else + if ws88-processo-verboso + perform varying ws02-i from 256 by -1 + until ws77-arquivo-saida(ws02-i:1) + not equal spaces or ws02-i equal zeros + continue + end-perform + add 1 to ws02-i + display "output b: " ws77-arquivo-saida(1:ws02-i) + end-if + move ws77-arquivo-saida to ws77-basename-saida + end-if + + set ws88-finaliza-parsing to true + set ws88-valor to true + if ws77-basename-entrada equal ws77-basename-saida + display "Arquivo de saída igual ao arquivo de entrada" + perform finalizar + end-if + . + escolher-dialeto. + set ws88-valor to true + evaluate ws77-dialeto-selecionado + when "mb " + set ws88-microbase to true + when "mf " + set ws88-microfocus to true + when "rm " + set ws88-rm to true + when other + display "Erro na escolha do dialeto" + perform finalizar + end-evaluate + . + testes-copy. + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters + before ' "' + add 3 to ws02-i + perform varying ws02-j from 256 by -1 + until ws77-linha-para-parsing(ws02-j:1) + not equal spaces and "." + continue + end-perform + compute ws02-k = ws02-j - ws02-i + move "*" to reg-arquivo-entrada(7:1) + write reg-arquivo-intermediario + from reg-arquivo-entrada + if ws88-processo-verboso + display "Copybook: " reg-arquivo-entrada(ws02-i:ws02-k) + end-if + move reg-arquivo-entrada(ws02-i:ws02-k) + to ws77-arquivo-intermediario2 + open input arquivo-intermediario2 + if not ws88-ok + perform testar-file-status + end-if + perform until ws88-fim-arquivo + read arquivo-intermediario2 + if not ws88-fim-arquivo + write reg-arquivo-intermediario + from reg-arquivo-intermediario2 + end-if + end-perform + close arquivo-intermediario2 + . + exibir-versao. + display "Conversor de fontes CBL2COB - alpha 0.0.2 (lançado e + - "m 06/10/2003)" + display "Copyright (C) 2003 Hudson Reis" + perform finalizar + . + exibir-ajuda. + display "Uso: cbl2cob [-o ]" + display "opções:" + display " -d Escolhe dialeto" + display " -h Mostra ajuda" + display " -i Escolhe arquivo de entrada" + display " -o Escolhe arquivo de saida" + display " -v Modo verboso" + display " -V Mostra versão" + perform finalizar + . + copy "globals.pd". diff --git a/cbl2cob/cbl2cob.exe b/cbl2cob/cbl2cob.exe new file mode 100644 index 0000000..870d2ad Binary files /dev/null and b/cbl2cob/cbl2cob.exe differ diff --git a/cbl2cob/entrada.fd b/cbl2cob/entrada.fd new file mode 100644 index 0000000..8cbdb2d --- /dev/null +++ b/cbl2cob/entrada.fd @@ -0,0 +1,4 @@ + fd arquivo-entrada + value of file-id is ws77-arquivo-entrada. + 01 reg-arquivo-entrada pic x(256). + diff --git a/cbl2cob/entrada.sl b/cbl2cob/entrada.sl new file mode 100644 index 0000000..d195fec --- /dev/null +++ b/cbl2cob/entrada.sl @@ -0,0 +1,5 @@ + select arquivo-entrada assign to disk + organization is line sequential + access mode is sequential + file status is ws77-file-status. + diff --git a/cbl2cob/globals.ls b/cbl2cob/globals.ls new file mode 100644 index 0000000..221b0a6 --- /dev/null +++ b/cbl2cob/globals.ls @@ -0,0 +1,10 @@ + * Arquivos de entrada e saída + 77 ws77-arquivo-entrada pic x(256) value spaces. + 77 ws77-arquivo-saida pic x(256) value spaces. + 77 ws77-arquivo-intermediario pic x(256) value spaces. + 77 ws77-arquivo-intermediario2 pic x(256) value spaces. + * Variáveis para verificar se deve mostrar ou não alguma coisa. + 77 ws77-processo pic 9(001) value zeros. + 88 ws88-processo-nao-verboso value 0. + 88 ws88-processo-verboso value 1. + diff --git a/cbl2cob/globals.pd b/cbl2cob/globals.pd new file mode 100644 index 0000000..6e082e3 --- /dev/null +++ b/cbl2cob/globals.pd @@ -0,0 +1,12 @@ + testar-file-status. + evaluate true + when ws88-arquivo-inexistente + display "Arquivo inexistente" + when ws88-diretorio-inexistente + display "Diretorio inexistente" + when other + display "Erro sem report: " ws77-file-status + end-evaluate + close arquivo-entrada arquivo-saida + perform finalizar + . diff --git a/cbl2cob/globals.ws b/cbl2cob/globals.ws new file mode 100644 index 0000000..edc69b2 --- /dev/null +++ b/cbl2cob/globals.ws @@ -0,0 +1,33 @@ + * Teste de file status. + 77 ws77-file-status pic x(002) value spaces. + 88 ws88-ok values are "00" "02" "04". + 88 ws88-diretorio-inexistente value "05". + 88 ws88-fim-arquivo value "10". + 88 ws88-inexiste-registro value "22". + 88 ws88-disco-cheio value "24". + 88 ws88-arquivo-inexistente value "35". + 88 ws88-layout-diferente value "39". + 88 ws88-arquivo-ja-aberto value "41". + 88 ws88-arquivo-nao-aberto values are "42" "47". + 88 ws88-arquivo-bloqueado value "9A". + 88 ws88-registro-bloqueado value "9D". + 88 ws88-indice-corrompido values are "9$" "9)" "9(". + * Variáveis para serem usadas como contadores. + 01 ws01-contadores. + 02 ws02-i pic 9(003) value zeros. + 02 ws02-j pic 9(003) value zeros. + 02 ws02-k pic 9(003) value zeros. + 02 ws02-l pic 9(003) value zeros. + 02 ws02-m pic 9(003) value zeros. + 02 ws02-n pic 9(003) value zeros. + 02 ws02-o pic 9(003) value zeros. + 02 ws02-p pic 9(003) value zeros. + 02 ws02-q pic 9(003) value zeros. + 02 ws02-r pic 9(003) value zeros. + 02 ws02-s pic 9(003) value zeros. + * Variável para determinar se continua ou não o parsing da + * instrucao ou linha de comando. + 77 ws77-parsing pic 9(001) value zeros. + 88 ws88-continua-parsing value 0. + 88 ws88-finaliza-parsing value 1. + diff --git a/cbl2cob/intermed.fd b/cbl2cob/intermed.fd new file mode 100644 index 0000000..eb0f9b4 --- /dev/null +++ b/cbl2cob/intermed.fd @@ -0,0 +1,8 @@ + fd arquivo-intermediario + value of file-id is ws77-arquivo-intermediario. + 01 reg-arquivo-intermediario pic x(256). + + fd arquivo-intermediario2 + value of file-id is ws77-arquivo-intermediario2. + 01 reg-arquivo-intermediario2 pic x(256). + diff --git a/cbl2cob/intermed.sl b/cbl2cob/intermed.sl new file mode 100644 index 0000000..3273377 --- /dev/null +++ b/cbl2cob/intermed.sl @@ -0,0 +1,10 @@ + select arquivo-intermediario assign to disk + organization is line sequential + access mode is sequential + file status is ws77-file-status. + + select arquivo-intermediario2 assign to disk + organization is line sequential + access mode is sequential + file status is ws77-file-status. + diff --git a/cbl2cob/mbparser.cob b/cbl2cob/mbparser.cob new file mode 100644 index 0000000..26ef15a --- /dev/null +++ b/cbl2cob/mbparser.cob @@ -0,0 +1,1116 @@ + + * + * Copyright (C) 2003, Hudson Reis, + * Infocont Sistemas Integrados Ltda. + * Carlucio Lopes + * + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2, + * or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software; see the file COPYING. + * If not, write to the Free Software Foundation, Inc., 59 Temple + * Place, Suite 330, Boston, MA 02111-1307 USA + * + identification division. + program-id. mbparser. + author. Carlucio Lopes. + date-written. 03/09/2003. + * + * Parser para dialeto MB COBOL. + * + environment division. + configuration section. + input-output section. + file-control. + select arquivo-entrada assign to disk + organization is line sequential + access mode is sequential + file status is ws77-file-status. + + select arquivo-saida assign to disk + organization is line sequential + access mode is sequential + file status is ws77-file-status. + + data division. + file section. + fd arquivo-entrada + value of file-id is ws77-arquivo-entrada. + 01 reg-arquivo-entrada pic x(256). + + fd arquivo-saida + value of file-id is ws77-arquivo-saida. + 01 reg-arquivo-saida pic x(256). + + working-storage section. + * Teste de file status. + 77 ws77-file-status pic x(002) value spaces. + 88 ws88-ok values are "00" "02" "04". + 88 ws88-diretorio-inexistente value "05". + 88 ws88-fim-arquivo value "10". + 88 ws88-inexiste-registro value "22". + 88 ws88-disco-cheio value "24". + 88 ws88-arquivo-inexistente value "35". + 88 ws88-layout-diferente value "39". + 88 ws88-arquivo-ja-aberto value "41". + 88 ws88-arquivo-nao-aberto values are "42" "47". + 88 ws88-arquivo-bloqueado value "9A". + 88 ws88-registro-bloqueado value "9D". + 88 ws88-indice-corrompido values are "9$" "9)" "9(". + * Linhas usadas para parsing do fonte. + 77 ws77-linha-para-parsing pic x(256) value spaces. + 77 ws77-linha-temporaria pic x(256) value spaces. + 77 ws77-buffer-temporario pic x(256) value spaces. + 77 ws77-troca pic 9(03) value zeros. + 77 ws77-troca2 pic 9(03) value zeros. + 77 ws77-linpos pic x(37) + value " LINE POSITION ". + + 01 ws50troca redefines ws77-linha-para-parsing. + 02 ws50trocando occurs 256 times pic x. + + 01 ws50linpos redefines ws77-linpos. + 02 ws50lineposi occurs 37 times pic x. + + + * Variáveis que serão usadas para quebrar a frase + * passada na linha de comando, pelo usuário. + * O número máximo argumentos supotados é 8. + 01 ws01-args. + 02 ws02-arg-a pic x(256) value spaces. + 02 ws02-arg-b pic x(256) value spaces. + 02 ws02-arg-c pic x(256) value spaces. + 02 ws02-arg-d pic x(256) value spaces. + 02 ws02-arg-e pic x(256) value spaces. + 02 ws02-arg-f pic x(256) value spaces. + 02 ws02-arg-g pic x(256) value spaces. + 02 ws02-arg-h pic x(256) value spaces. + * Variáveis para serem usadas como contadores. + 01 ws01-contadores. + 02 ws02-i pic 9(003) value zeros. + 02 ws02-j pic 9(003) value zeros. + 02 ws02-k pic 9(003) value zeros. + 02 ws02-l pic 9(003) value zeros. + 02 ws02-m pic 9(003) value zeros. + 02 ws02-n pic 9(003) value zeros. + * Flags condicionais para gravacao de linha. + 01 ws01-grava-linha pic 9(001) value zeros. + 88 ws88-grava-linha value 0. + 88 ws88-nao-grava-linha value 1. + * Flags de termino/nao termino de linha. + 01 ws01-termino-linha pic 9(001) value zeros. + 88 ws88-terminou-linha value 0. + 88 ws88-nao-terminou-linha value 1. + 01 ws01-status-linha pic 9(001) value zeros. + 88 ws88-linha-continuada value 0. + 88 ws88-ultima-linha value 1. + * Flags para o DISPLAY. + 01 ws01-display pic 9(001) value zeros. + 88 ws88-display-nao-terminado value 0. + 88 ws88-display-terminado value 1. + * Flags para o ACCEPT. + 01 ws01-accept pic 9(001) value zeros. + 88 ws88-accept-nao-terminado value 0. + 88 ws88-accept-terminado value 1. + * Flags para Identification division. + 77 ws77-linha-id pic 9(005) value zeros. + 77 ws77-id pic 9(001) value zeros. + 88 ws88-nao-existe-id value 0. + 88 ws88-existe-id value 1. + * Flags para Environment division. + 77 ws77-linha-ed pic 9(005) value zeros. + 77 ws77-ed pic 9(001) value zeros. + 88 ws88-nao-existe-ed value 0. + 88 ws88-existe-ed value 1. + * Crt Status clause. + 77 ws77-crt-status-field pic x(256) value spaces. + 77 ws77-crt-status-length pic 9(003) value zeros. + 01 ws01-precisa-crt-status pic 9(001) value zeros. + 88 ws88-nao-precisa-crt-status value 0. + 88 ws88-precisa-crt-status value 1. + * Case. + 01 ws01-case. + 02 ws02-maiusculo pic x(26) + value "ABCDEFGHIJKLMNOPQRSTUVXYWZ". + 02 ws02-minusculo pic x(26) + value "abcdefghijklmnopqrstuvxywz". + * Linhas armazenadas. + 01 ws01-linhas. + 03 ws03-registro-armazenado pic x(256) occurs 1000 times. + * Para debug. + 77 ws77-conta-linha pic 9(005) value 1. + * Verbos a serem parseados. + 01 ws01-verbos. + 02 ws02-tokens pic x(256) occurs 256 times. + + linkage section. + * Arquivos de entrada e saída + *77 ws77-arquivo-entrada pic x(256) value spaces. + *77 ws77-arquivo-saida pic x(256) value spaces. + copy "globals.ls". + + procedure division using ws77-arquivo-entrada + ws77-arquivo-saida + ws77-processo. + perform descobrir-informacoes + move 1 to ws77-conta-linha + open input arquivo-entrada + if not ws88-ok + display "Erro na abertura do arquivo" + exit program + end-if + open output arquivo-saida + + if ws88-nao-existe-id + write reg-arquivo-saida from + " IDENTIFICATION DIVISION." + move spaces to reg-arquivo-saida + string " PROGRAM-ID. " ws77-arquivo-entrada(1:6) + "." into reg-arquivo-saida + write reg-arquivo-saida + write reg-arquivo-saida from spaces + if ws88-nao-existe-ed + if ws88-precisa-crt-status + write reg-arquivo-saida from + " ENVIRONMENT DIVISION." + write reg-arquivo-saida from + " CONFIGURATION SECTION." + write reg-arquivo-saida from + " SPECIAL-NAMES." + string " CRT STATUS IS " + ws77-crt-status-field(1:ws77-crt-status-length) + "." into reg-arquivo-saida + write reg-arquivo-saida + end-if + end-if + end-if + + perform until ws88-fim-arquivo + read arquivo-entrada + if not ws88-fim-arquivo + display "No..: " ws77-conta-linha + display "Desc: " reg-arquivo-entrada + move reg-arquivo-entrada + to ws77-linha-para-parsing + inspect ws77-linha-para-parsing + converting ws02-minusculo + to ws02-maiusculo + set ws88-grava-linha to true + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " LOCK " + if ws02-i > 0 + perform testes-lock + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " DATA " + if ws02-i > 0 + perform testes-data + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " ACCEPT " + if ws02-i > 0 + perform testes-accept + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " DISPLAY " + if ws02-i > 0 + perform testes-display + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " DELETE " + if ws02-i > 0 + perform testes-delete + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all + " CALL " + if ws02-i > 0 + perform testes-call + else + move zeros to ws02-i + inspect + ws77-linha-para-parsing + tallying ws02-i for all + " IDENTIFICATION " + if ws02-i > 0 + perform testes-id + else + move zeros to ws02-i + inspect + ws77-linha-para-parsing + tallying ws02-i for all + " ENVIRONMENT " + if ws02-i > 0 + perform testes-ed + else + perform mais-testes + end-if + end-if + end-if + end-if + end-if + end-if + end-if + end-if + add 1 to ws77-conta-linha + end-if + end-perform + + close arquivo-entrada + close arquivo-saida + exit program. + + testes-lock. + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " MODE " + if ws02-i > 0 + display "Encontrou clausula LOCK MODE" + display "Nao grava linha" + set ws88-nao-grava-linha to true + else + write reg-arquivo-saida + from reg-arquivo-entrada + end-if + . + testes-data. + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " RECORD " + if ws02-i > 0 + display "Encontrou DATA RECORD!" + move " ." to reg-arquivo-entrada + set ws88-grava-linha to true + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " DIVISION" + if ws02-i > 0 + display "Encontrou DATA DIVISION!" + if ws88-nao-existe-ed + write reg-arquivo-saida from + " ENVIRONMENT DIVISION." + if ws88-precisa-crt-status + write reg-arquivo-saida from + " CONFIGURATION SECTION." + write reg-arquivo-saida from + " SPECIAL-NAMES." + string " CRT STATUS IS " + ws77-crt-status-field + (1:ws77-crt-status-length) + "." into reg-arquivo-saida + write reg-arquivo-saida + end-if + end-if + write reg-arquivo-saida from spaces + end-if + end-if + if ws88-grava-linha + write reg-arquivo-saida from reg-arquivo-entrada + end-if + . + testes-display. + set ws88-display-nao-terminado to true + perform until ws88-display-terminado + move zeros to ws02-i + * Substituir (xx, xx) por line xx position xx + inspect ws77-linha-para-parsing + tallying ws02-i for all " (" + if ws02-i > 0 + move zeros to ws02-i + perform substituir-accept + move spaces to reg-arquivo-entrada + move ws77-linha-para-parsing to reg-arquivo-entrada + write reg-arquivo-saida + from reg-arquivo-entrada + move spaces to ws77-linha-para-parsing + move ws77-linpos to ws77-linha-para-parsing + move ws77-linha-para-parsing to reg-arquivo-entrada + * Substituir (xx, xx) por line xx position xx + inspect ws77-linha-para-parsing + tallying ws02-i for all " LINE " + if ws02-i > 0 + display "Encontrou LINE, vai retirar o AT." + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters + before " AT " + if ws02-i > 0 + add 1 to ws02-i + move spaces + to reg-arquivo-entrada(ws02-i:4) + ws77-linha-para-parsing(ws02-i:4) + end-if + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " PROMPT " + if ws02-i > 0 + display "Encontrou o PROMPT, vai remove-lo" + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters + before " PROMPT " + if ws02-i > 0 + add 1 to ws02-i + move spaces + to reg-arquivo-entrada(ws02-i:8) + ws77-linha-para-parsing(ws02-i:8) + end-if + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all + " BACKGROUND-COLOR " + if ws02-i > 0 + display " Encontrou o BACKGROUND-COLOR vai + - " remove-lo" + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters + before " BACKGROUND-COLOR " + if ws02-i > 0 + add 1 to ws02-i + move spaces + to reg-arquivo-entrada(ws02-i:18) + ws77-linha-para-parsing + (ws02-i:18) + add 18 to ws02-i + perform varying ws02-j + from ws02-i by 1 + until ws77-linha-para-parsing + (ws02-j:1) + not equal spaces or ws02-j >= 256 + continue + end-perform + perform varying ws02-i + from ws02-j by 1 + until ws77-linha-para-parsing + (ws02-i:1) + equal spaces or ws02-j >= 256 + move spaces + to ws77-linha-para-parsing + (ws02-i:1) + move spaces + to reg-arquivo-entrada + (ws02-i:1) + end-perform + end-if + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all + " FOREGROUND-COLOR " + if ws02-i > 0 + display " Encontrou o FOREGROUND-COLOR + - " vai remove-lo" + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters + before " FOREGROUND-COLOR " + if ws02-i > 0 + add 1 to ws02-i + move spaces + to reg-arquivo-entrada + (ws02-i:18) + ws77-linha-para-parsing + (ws02-i:18) + end-if + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all + " AUTO-SKIP " + if ws02-i > 0 + display " Encontrou o AUTO-SKIP + - " sera substituido pelo + - " AUTO" + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters + before " AUTO-SKIP " + if ws02-i > 0 + add 1 to ws02-i + move spaces + to reg-arquivo-entrada + (ws02-i:10) + ws77-linha-para-parsing + (ws02-i:10) + move " AUTO " + to reg-arquivo-entrada + (ws02-i:6) + ws77-linha-para-parsing + (ws02-i:6) + end-if + else + set ws88-display-terminado to true + write reg-arquivo-saida + from reg-arquivo-entrada + end-if + end-if + end-if + end-if + else + write reg-arquivo-saida + from reg-arquivo-entrada + set ws88-display-terminado to true + end-if + end-perform + . + testes-accept. + set ws88-accept-nao-terminado to true + perform until ws88-accept-terminado + move zeros to ws02-i + * Substituir (xx, xx) por line xx position xx + inspect ws77-linha-para-parsing + tallying ws02-i for all " (" + if ws02-i > 0 + move zeros to ws02-i + perform substituir-accept + move spaces to reg-arquivo-entrada + move ws77-linha-para-parsing to reg-arquivo-entrada + write reg-arquivo-saida + from reg-arquivo-entrada + move spaces to ws77-linha-para-parsing + move ws77-linpos to ws77-linha-para-parsing + move ws77-linha-para-parsing to reg-arquivo-entrada + * Substituir (xx, xx) por line xx position xx + + inspect ws77-linha-para-parsing + tallying ws02-i for all " LINE " + if ws02-i > 0 + display "Encontrou LINE, vai retirar o AT.498" + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters + before " AT " + if ws02-i > 0 + add 1 to ws02-i + move spaces + to reg-arquivo-entrada(ws02-i:4) + ws77-linha-para-parsing(ws02-i:4) + end-if + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " PROMPT " + if ws02-i > 0 + display "Encontrou o PROMPT, vai remove-lo" + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters + before " PROMPT " + if ws02-i > 0 + add 1 to ws02-i + move spaces + to reg-arquivo-entrada(ws02-i:8) + ws77-linha-para-parsing(ws02-i:8) + end-if + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all + " BACKGROUND-COLOR " + if ws02-i > 0 + display " Encontrou o BACKGROUND-COLOR vai + - " remove-lo" + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters + before " BACKGROUND-COLOR " + if ws02-i > 0 + add 1 to ws02-i + move spaces + to reg-arquivo-entrada(ws02-i:18) + ws77-linha-para-parsing + (ws02-i:18) + add 18 to ws02-i + perform varying ws02-j + from ws02-i by 1 + until ws77-linha-para-parsing + (ws02-j:1) + not equal spaces or ws02-j >= 256 + continue + end-perform + perform varying ws02-i + from ws02-j by 1 + until ws77-linha-para-parsing + (ws02-i:1) + equal spaces or ws02-j >= 256 + move spaces + to ws77-linha-para-parsing + (ws02-i:1) + move spaces + to reg-arquivo-entrada + (ws02-i:1) + end-perform + end-if + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all + " FOREGROUND-COLOR " + if ws02-i > 0 + display " Encontrou o FOREGROUND-COLOR + - " vai remove-lo" + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters + before " FOREGROUND-COLOR " + if ws02-i > 0 + add 1 to ws02-i + move spaces + to reg-arquivo-entrada + (ws02-i:18) + ws77-linha-para-parsing + (ws02-i:18) + end-if + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all + " AUTO-SKIP " + if ws02-i > 0 + display " Encontrou o AUTO-SKIP + - " sera substituido pelo + - " AUTO" + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters + before " AUTO-SKIP " + if ws02-i > 0 + add 1 to ws02-i + move spaces + to reg-arquivo-entrada + (ws02-i:10) + ws77-linha-para-parsing + (ws02-i:10) + move " AUTO " + to reg-arquivo-entrada + (ws02-i:6) + ws77-linha-para-parsing + (ws02-i:6) + end-if + else + set ws88-accept-terminado to true + write reg-arquivo-saida + from reg-arquivo-entrada + end-if + end-if + end-if + end-if + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " FROM " + if ws02-i > 0 + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " ESCAPE " + if ws02-i > 0 + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " KEY" + if ws02-i > 0 + set ws88-accept-terminado to true + end-if + else + write reg-arquivo-saida + from reg-arquivo-entrada + set ws88-accept-terminado to true + end-if + else + write reg-arquivo-saida + from reg-arquivo-entrada + set ws88-accept-terminado to true + end-if + end-if + end-perform + . + descobrir-informacoes. + open input arquivo-entrada + if not ws88-ok + display "Erro na abertura do arquivo" + exit program + end-if + perform until ws88-fim-arquivo + read arquivo-entrada + if not ws88-fim-arquivo + move reg-arquivo-entrada + to ws77-linha-para-parsing + inspect ws77-linha-para-parsing + converting ws02-minusculo + to ws02-maiusculo + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " ACCEPT " + if ws02-i > 0 + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " FROM " + if ws02-i > 0 + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all + " ESCAPE " + if ws02-i > 0 + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all + " KEY" + if ws02-i > 0 + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters + before " ACCEPT " + add 8 to ws02-i + move zeros to ws02-j + inspect ws77-linha-para-parsing + tallying ws02-j for characters + before " FROM " + compute ws02-k = ws02-j - ws02-i + add 1 to ws02-k + move ws77-linha-para-parsing + (ws02-i:ws02-k) + to ws77-crt-status-field + move ws02-k to ws77-crt-status-length + set ws88-precisa-crt-status to true + end-if + end-if + end-if + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " IDENTIFICATION " + if ws02-i > 0 + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " DIVISION" + if ws02-i > 0 + set ws88-existe-id to true + move ws77-conta-linha to ws77-linha-id + end-if + else + If not ws88-existe-id + set ws88-nao-existe-id to true + end-if + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " ENVIRONMENT " + if ws02-i > 0 + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " DIVISION" + if ws02-i > 0 + set ws88-existe-ed to true + move ws77-conta-linha to ws77-linha-ed + end-if + end-if + end-if + end-if + end-if + add 1 to ws77-conta-linha + end-perform + close arquivo-entrada + . + testes-delete. + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " DELETE " + if ws02-i > 0 + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " FILE " + if ws02-i > 0 + set ws88-nao-grava-linha to true + end-if + end-if + if ws88-grava-linha + write reg-arquivo-saida from reg-arquivo-entrada + end-if + . + testes-call. + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters before " CALL " + add 6 to ws02-i + move zeros to ws02-j + inspect ws77-linha-para-parsing + tallying ws02-j for all " USING " + if ws02-j > 0 + move zeros to ws02-j + inspect ws77-linha-para-parsing + tallying ws02-j for characters before " USING " + if ws02-j > 0 + compute ws02-k = ws02-j - ws02-i + move zeros to ws02-l + inspect ws77-linha-para-parsing + tallying ws02-l for all 'X"AF"' + if ws02-l > 0 + set ws88-nao-grava-linha to true + else + move zeros to ws02-l + inspect ws77-linha-para-parsing + tallying ws02-l for all 'X"91"' + if ws02-l > 0 + set ws88-nao-grava-linha to true + else + inspect reg-arquivo-entrada(ws02-i:ws02-k) + converting ws02-minusculo + to ws02-maiusculo + end-if + end-if + end-if + end-if + if ws88-grava-linha + write reg-arquivo-saida from reg-arquivo-entrada + end-if + . + testes-id. + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " DIVISION" + if ws02-i > 0 + display "Encontrou IDENTIFICATION DIVISION!" + write reg-arquivo-saida from reg-arquivo-entrada + read arquivo-entrada + move reg-arquivo-entrada + to ws77-linha-para-parsing + inspect ws77-linha-para-parsing + converting ws02-minusculo + to ws02-maiusculo + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " PROGRAM-ID" + if ws02-i <= 0 + display "Nao encontrou PROGRAM-ID!" + string " PROGRAM-ID. " ws77-arquivo-entrada(1:6) + "." into reg-arquivo-saida + write reg-arquivo-saida + else + display "Encontrou PROGRAM-ID!" + write reg-arquivo-saida from reg-arquivo-entrada + end-if + . + testes-ed. + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " DIVISION" + if ws02-i > 0 + display "Encontrou ENVIRONMENT DIVISION!" + write reg-arquivo-saida from reg-arquivo-entrada + read arquivo-entrada + move reg-arquivo-entrada + to ws77-linha-para-parsing + inspect ws77-linha-para-parsing + converting ws02-minusculo + to ws02-maiusculo + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " CONFIGURATION " + if ws02-i > 0 + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " SECTION" + if ws02-i > 0 + display "Encontrou CONFIGURATION SECTION!" + write reg-arquivo-saida from reg-arquivo-entrada + read arquivo-entrada + move reg-arquivo-entrada + to ws77-linha-para-parsing + inspect ws77-linha-para-parsing + converting ws02-minusculo + to ws02-maiusculo + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " SOURCE-COMPUTER" + if ws02-i > 0 + display "Encontrou SOURCE-COMPUTER!" + write reg-arquivo-saida + from reg-arquivo-entrada + read arquivo-entrada + move reg-arquivo-entrada + to ws77-linha-para-parsing + inspect ws77-linha-para-parsing + converting ws02-minusculo + to ws02-maiusculo + end-if + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " SPECIAL-NAMES" + if ws02-i > 0 + display "Encontrou SPECIAL-NAMES!" + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all + " DECIMAL-POINT" + if ws02-i > 0 + display "Encontrou DECIMAL-POINT na mesma + - " linha da SPECIAL-NAMES" + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters + before " DECIMAL-POINT" + if ws02-i > 0 + move spaces + to reg-arquivo-saida + move reg-arquivo-entrada + (1:ws02-i) + to reg-arquivo-saida + write reg-arquivo-saida + end-if + else + write reg-arquivo-saida + from reg-arquivo-entrada + end-if + move spaces to reg-arquivo-saida + if ws88-precisa-crt-status + display "Precisa de CRT STATUS!" + string " CRT STATUS IS " + ws77-crt-status-field + (1:ws77-crt-status-length) + into reg-arquivo-saida + write reg-arquivo-saida + set ws88-nao-grava-linha to true + end-if + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all + " DECIMAL-POINT" + if ws02-i > 0 + display "Encontrou DECIMAL-POINT na mesma + - " linha da SPECIAL-NAMES" + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters + before " DECIMAL-POINT" + if ws02-i > 0 + add 2 to ws02-i + compute ws02-j = 256 - ws02-i + move spaces + to reg-arquivo-saida + move reg-arquivo-entrada + (ws02-i:ws02-j) + to reg-arquivo-saida(12:242) + write reg-arquivo-saida + end-if + end-if + end-if + end-if + end-if + end-if + . + mais-testes. + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all ' "' + if ws02-i > 0 + perform testes-aspas-duplas + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all ' -' + if ws02-i > 0 + perform testes-hifen + else + write reg-arquivo-saida from reg-arquivo-entrada + end-if + end-if + . + testes-aspas-duplas. + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters before ' "' + if ws02-i = 6 + display "Encontrou aspas duplas, acertando-as para a colu + - "una 12" + add 2 to ws02-i + compute ws02-j = 256 - ws02-i + move spaces to reg-arquivo-saida(1:11) + move reg-arquivo-entrada(ws02-i:ws02-j) + to reg-arquivo-saida(12:244) + if reg-arquivo-saida(73:183) not equal spaces + display "Linha não acabou, os testes devem ser feitos + - "pelo testes-hifen" + set ws88-nao-terminou-linha to true + move reg-arquivo-saida(73:183) + to ws77-linha-temporaria + move spaces to reg-arquivo-saida(73:183) + end-if + write reg-arquivo-saida + else + move zeros to ws02-j + inspect ws77-linha-para-parsing + tallying ws02-j for characters before ' -' + if ws02-j = 5 + perform testes-hifen + else + write reg-arquivo-saida from reg-arquivo-entrada + end-if + end-if + . + testes-hifen. + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters before " -" + if ws02-i = 5 + display "Encontrado hifen" + set ws88-linha-continuada to true + move zeros to ws02-m + inspect ws77-linha-para-parsing + tallying ws02-m for all '"' + if ws02-m >= 2 + display "Ultima linha!" + set ws88-ultima-linha to true + end-if + add 3 to ws02-i + compute ws02-j = 256 - ws02-i + move spaces to reg-arquivo-saida + move " - " to reg-arquivo-saida(1:11) + if ws88-terminou-linha + display "Linha terminada" + move reg-arquivo-entrada(ws02-i:ws02-j) + to reg-arquivo-saida(12:244) + else + display "Linha nao terminada" + move '"' to reg-arquivo-saida(12:1) + perform varying ws02-k from 256 by -1 + until ws77-linha-temporaria(ws02-k:1) + not equal spaces + continue + end-perform + move ws77-linha-temporaria(1:ws02-k) + to reg-arquivo-saida(13:ws02-k) + compute ws02-l = 13 + ws02-k + display "Linha ant." reg-arquivo-saida(1:ws02-l) + add 1 to ws02-i + subtract 1 from ws02-j + compute ws02-m = 256 - ws02-l + display "I: " ws02-i + display "J: " ws02-j + display "L: " ws02-l + display "K: " ws02-k + display "M: " ws02-m + move reg-arquivo-entrada(ws02-i:ws02-j) + to reg-arquivo-saida(ws02-l:ws02-m) + display "Linha atual: " reg-arquivo-saida + end-if + if reg-arquivo-saida(73:183) not equal spaces + display "Linha nao terminou.. testes-hifen" + set ws88-nao-terminou-linha to true + move reg-arquivo-saida(73:183) + to ws77-linha-temporaria + move spaces to reg-arquivo-saida(73:183) + else + display "Linha terminou.." + set ws88-terminou-linha to true + end-if + write reg-arquivo-saida + if ws88-ultima-linha + if ws88-nao-terminou-linha + display "Ultima linha desta instrucao!" + move spaces to reg-arquivo-saida + move zeros to ws02-i + inspect ws77-linha-temporaria + tallying ws02-i for all '"' + if ws02-i >= 1 + move ' - "' + to reg-arquivo-saida(1:12) + move 13 to ws02-k + else + move 12 to ws02-k + end-if + perform varying ws02-i from 256 by -1 + until ws77-linha-temporaria(ws02-i:1) + not equal spaces + continue + end-perform + move ws77-linha-temporaria(1:ws02-i) + to reg-arquivo-saida(ws02-k:243) + perform varying ws02-i from 256 by -1 + until reg-arquivo-saida(ws02-i:1) + not equal '"' + continue + end-perform + compute ws02-j = 256 - ws02-i + move reg-arquivo-saida(ws02-i:ws02-j) + to ws77-linha-temporaria + move spaces to reg-arquivo-saida(ws02-i:ws02-j) + write reg-arquivo-saida + move spaces to reg-arquivo-saida + move ws77-linha-temporaria + to reg-arquivo-saida(ws02-k:244) + write reg-arquivo-saida + set ws88-terminou-linha to true + end-if + end-if + end-if + . + + substituir-accept. + move 1 to ws77-troca. + perform sub-accept1 thru sub-accept-exit. + + sub-accept1. + if ws50trocando (ws77-troca) not = "(" + compute ws77-troca = ws77-troca + 1 + go to sub-accept1. + move spaces to ws50trocando (ws77-troca). + compute ws77-troca = ws77-troca + 1. + move 17 to ws77-troca2. + + sub-accept2. + if ws50trocando (ws77-troca) = ")" + move spaces to ws50trocando (ws77-troca) + move 256 to ws77-troca + go to sub-accept3. + + if ws50trocando (ws77-troca) = "," + move spaces to ws50trocando (ws77-troca) + compute ws77-troca = ws77-troca + 1 + go to sub-accept2. + + if ws50trocando (ws77-troca) = " " + move spaces to ws50trocando (ws77-troca) + compute ws77-troca = ws77-troca + 1 + move 32 to ws77-troca2 + go to sub-accept2. + + move ws50trocando (ws77-troca) to + ws50lineposi (ws77-troca2). + move spaces to ws50trocando (ws77-troca). + compute ws77-troca2 = ws77-troca2 + 1. + compute ws77-troca = ws77-troca + 1. + go to sub-accept2. + + + sub-accept3. + if ws50trocando (ws77-troca) = " " + compute ws77-troca = ws77-troca - 1 + go to sub-accept3. + + if ws50trocando (ws77-troca) = "." + move 37 to ws77-troca2 + move "." to ws50lineposi (ws77-troca2) + move spaces to ws50trocando (ws77-troca) + go to sub-accept-exit. + + move " " to ws50lineposi (ws77-troca2). + + sub-accept-exit. + exit. diff --git a/cbl2cob/mbparser.dll b/cbl2cob/mbparser.dll new file mode 100644 index 0000000..b7036c7 Binary files /dev/null and b/cbl2cob/mbparser.dll differ diff --git a/cbl2cob/mfparser.cob b/cbl2cob/mfparser.cob new file mode 100644 index 0000000..7d3a07f --- /dev/null +++ b/cbl2cob/mfparser.cob @@ -0,0 +1,3017 @@ + * + * Copyright (C) 2003, Hudson Reis, + * Infocont Sistemas Integrados Ltda. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2, + * or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software; see the file COPYING. + * If not, write to the Free Software Foundation, Inc., 59 Temple + * Place, Suite 330, Boston, MA 02111-1307 USA + * + identification division. + program-id. mfparser. + author. Hudson Reis. + date-written. 03/09/2003. + * + * Parser para dialeto MicroFocus COBOL. + * + environment division. + configuration section. + input-output section. + file-control. + copy "entrada.sl". + copy "saida.sl". + + data division. + file section. + copy "entrada.fd". + copy "saida.fd". + + working-storage section. + 01 filler pic 9(01). + copy "globals.ws". + * Linhas usadas para parsing do fonte. + 01 W01-PARA PIC X(01) VALUE SPACES. + 01 W01-CONT1 PIC 9(03) VALUE ZEROS. + 01 W01-CONT2 PIC 9(03) VALUE ZEROS. + 01 W01-TIPO PIC 9(01) VALUE ZEROS. + 88 W88-PRIMEIRO VALUE 1. + 88 W88-ESPACO VALUE 2. + 88 W88-CARACTER VALUE 3. + 01 W01-TEMP1 PIC X(256) VALUE SPACES. + 01 FILLER REDEFINES W01-TEMP1. + 03 W03-OCCURS-TEMP1 OCCURS 256 TIMES PIC X(01). + 01 W01-TEMP2 PIC X(256) VALUE SPACES. + 01 FILLER REDEFINES W01-TEMP2. + 03 W03-OCCURS-TEMP2 OCCURS 256 TIMES PIC X(01). + 77 ws77-linha-para-parsing pic x(256) value spaces. + 77 ws77-linha-temporaria pic x(256) value spaces. + 77 ws77-buffer-temporario pic x(256) value spaces. + ****************************************************************** + *Linhas acrescidas por Fernando Wuthstrack em 09/07/2004 + *Linhas usadas para identificar tipos de variaveis + ****************************************************************** + 77 ws77-busca-variaveis pic 9(001) value zeros. + 88 ws88-busca-variaveis value 0. + 88 ws88-nao-busca-variaveis value 1. + 77 ws77-tipo-variavel pic 9(001) value zeros. + 88 ws88-tipo-alfa value 0. + 88 ws88-tipo-numerico value 1. + 77 ws77-linha-anterior pic x(256) value spaces. + 77 ws77-count-from pic 9(003) value zeros. + 77 ws77-count-to pic 9(003) value zeros. + 01 ws01-nome-arq-variaveis. + 03 ws03-hora-arq-var pic 9(008) value zeros. + 03 filler pic x(004) value ".tmp". + 01 ws01-dados-ante-pic pic x(256) value spaces. + 01 filler redefines ws01-dados-ante-pic. + 03 ws03-digito-ante-pic pic x(001) occurs 256 times. + 01 ws01-dados-pos-pic pic x(256) value spaces. + 01 filler redefines ws01-dados-pos-pic. + 03 ws03-digito-pos-pic pic x(001) occurs 256 times. + 01 ws01-dados-pos-accept pic x(256) value spaces. + 01 filler redefines ws01-dados-pos-accept. + 03 ws03-digito-pos-accept pic x(001) occurs 256 times. + 01 ws01-dados-pos-at pic x(256) value spaces. + 01 filler redefines ws01-dados-pos-at. + 03 ws03-digito-pos-at pic x(001) occurs 256 times. + 01 ws01-nome-variavel pic x(030) value spaces. + 01 filler redefines ws01-nome-variavel. + 03 ws03-digito-nome-variavel pic x(001) occurs 30 times. + 01 ws01-tipo-variavel pic x(020) value spaces. + 01 filler redefines ws01-tipo-variavel. + 03 ws03-digito-tipo-variavel pic x(001) occurs 20 times. + 01 ws01-posicao-cursor pic x(030) value spaces. + 01 filler redefines ws01-posicao-cursor. + 03 ws03-digito-posicao-cursor pic x(001) occurs 30 times. + 01 ws01-indice-occurs pic x(030) value spaces. + 01 filler redefines ws01-indice-occurs. + 03 ws03-digito-indice-occurs pic x(001) occurs 30 times. + ****************************************************************** + * Flags condicionais para gravacao de linha. + 01 ws01-grava-linha pic 9(001) value zeros. + 88 ws88-grava-linha value 0. + 88 ws88-nao-grava-linha value 1. + * Flags de termino/nao termino de linha. + 01 ws01-termino-linha pic 9(001) value zeros. + 88 ws88-terminou-linha value 0. + 88 ws88-nao-terminou-linha value 1. + 01 ws01-status-linha pic 9(001) value zeros. + 88 ws88-linha-continuada value 0. + 88 ws88-ultima-linha value 1. + * Flags para o DISPLAY. + 01 ws01-display pic 9(001) value zeros. + 88 ws88-display-nao-terminado value 0. + 88 ws88-display-terminado value 1. + * Flags para o ACCEPT. + 01 ws01-accept pic 9(001) value zeros. + 88 ws88-accept-nao-terminado value 0. + 88 ws88-accept-terminado value 1. + * Flags para Identification division. + 77 ws77-linha-id pic 9(005) value zeros. + 77 ws77-id pic 9(001) value zeros. + 88 ws88-nao-existe-id value 0. + 88 ws88-existe-id value 1. + * Flags para Environment division. + 77 ws77-linha-ed pic 9(005) value zeros. + 77 ws77-ed pic 9(001) value zeros. + 88 ws88-nao-existe-ed value 0. + 88 ws88-existe-ed value 1. + * Crt Status clause. + 77 ws77-crt-status-field pic x(256) value spaces. + 77 ws77-crt-status-length pic 9(003) value zeros. + 01 ws01-precisa-crt-status pic 9(001) value zeros. + 88 ws88-nao-precisa-crt-status value 0. + 88 ws88-precisa-crt-status value 1. + * Bgcolor e Fgcolor. + 77 ws77-bgcolor pic 9(001) value zeros. + 88 ws88-nao-encontrou-bgcolor value 0. + 88 ws88-encontrou-bgcolor value 1. + 77 ws77-fgcolor pic 9(001) value zeros. + 88 ws88-nao-encontrou-fgcolor value 0. + 88 ws88-encontrou-fgcolor value 1. + * Case. + 01 ws01-case. + 02 ws02-maiusculo pic x(26) + value "ABCDEFGHIJKLMNOPQRSTUVXYWZ". + 02 ws02-minusculo pic x(26) + value "abcdefghijklmnopqrstuvxywz". + * Linhas armazenadas. + 01 ws01-linhas. + 03 ws03-registro-armazenado pic x(256) occurs 1000 times. + * Para debug. + 77 ws77-conta-linha pic 9(005) value 1. + * Verbos a serem parseados. + 01 ws01-verbos. + 02 ws02-tokens pic x(256) occurs 256 times. + * Informações sobre FD e VALUE OF FILE-ID. + 01 ws01-fd. + 02 ws02-nomefd pic x(031) occurs 256 times. + 02 ws02-fileidfd pic x(031) occurs 256 times. + 02 ws02-indexed pic x(001) occurs 256 times. + 77 ws77-count-fd pic 9(003) value zeros. + * Informações para laços de repetição, onde se procura um token. + 77 ws77-token pic 9(001) value zeros. + 88 ws88-token-nao-encontrado value 0. + 88 ws88-token-encontrado value 1. + + linkage section. + copy "globals.ls". + + procedure division using ws77-arquivo-entrada + ws77-arquivo-saida + ws77-processo. + perform descobrir-informacoes + perform parsear-fonte + perform finalizar + . + ****************************************************************** + * Procedures principais * + ****************************************************************** + descobrir-informacoes. + perform varying ws02-i from 1 by 1 + until ws02-i >= 256 + move spaces to ws02-nomefd(ws02-i) ws02-fileidfd(ws02-i) + move "N" to ws02-indexed(ws02-i) + end-perform + open input arquivo-entrada + if not ws88-ok + perform testar-file-status + end-if + perform until ws88-fim-arquivo + read arquivo-entrada + if not ws88-fim-arquivo + move reg-arquivo-entrada + to ws77-linha-para-parsing + inspect ws77-linha-para-parsing + converting ws02-minusculo + to ws02-maiusculo + end-if + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " ACCEPT " + if ws02-i > 0 + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " FROM " + if ws02-i > 0 + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all + " ESCAPE " + if ws02-i > 0 + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all + " KEY" + if ws02-i > 0 + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters + before " ACCEPT " + add 8 to ws02-i + move zeros to ws02-j + inspect ws77-linha-para-parsing + tallying ws02-j for characters + before " FROM " + compute ws02-k = ws02-j - ws02-i + add 1 to ws02-k + move ws77-linha-para-parsing + (ws02-i:ws02-k) + to ws77-crt-status-field + move ws02-k to ws77-crt-status-length + set ws88-precisa-crt-status to true + end-if + end-if + end-if + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " IDENTIFICATION " + if ws02-i > 0 + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " DIVISION" + if ws02-i > 0 + set ws88-existe-id to true + move ws77-conta-linha to ws77-linha-id + end-if + else + if not ws88-existe-id + set ws88-nao-existe-id to true + end-if + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " ENVIRONMENT " + if ws02-i > 0 + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " DIVISION" + if ws02-i > 0 + set ws88-existe-ed to true + move ws77-conta-linha to ws77-linha-ed + end-if + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " SELECT " + if ws02-i > 0 + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " NOT " + if ws02-i > 0 + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " OPTIONAL " + if ws02-i > 0 + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters + before " OPTIONAL " + add 10 to ws02-i + end-if + else + *> move zeros to ws02-i + *> inspect ws77-linha-para-parsing + *> tallying ws02-i for all " OPTIONAL " + *> if ws02-i > 0 + *> move zeros to ws02-i + *> inspect ws77-linha-para-parsing + *> tallying ws02-i for characters + *> before " OPTIONAL " + *> add 10 to ws02-i + *> else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters + before " SELECT " + add 8 to ws02-i + *> end-if + end-if + move zeros to ws02-j + inspect ws77-linha-para-parsing + tallying ws02-j for all " ASSIGN " + if ws02-j > 0 + move zeros to ws02-j + inspect ws77-linha-para-parsing + tallying ws02-j for characters + before " ASSIGN " + add 2 to ws02-j + add 1 to ws77-count-fd + perform varying ws02-l + from ws02-i by 1 + until ws77-linha-para-parsing + (ws02-l:1) + not equal spaces + continue + end-perform + perform varying ws02-m + from ws02-j by -1 + until ws77-linha-para-parsing + (ws02-m:1) + not equal spaces + continue + end-perform + compute ws02-k = ws02-m - ws02-l + move reg-arquivo-entrada + (ws02-l:ws02-k) + to ws02-nomefd(ws77-count-fd) + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " TO " + if ws02-i > 0 + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters + before " TO " + add 4 to ws02-i + perform varying ws02-l + from ws02-i by 1 + until ws77-linha-para-parsing + (ws02-l:1) + not equal spaces + continue + end-perform + perform varying ws02-m + from 256 by -1 + until ws77-linha-para-parsing + (ws02-m:1) + not equal spaces + continue + end-perform + compute ws02-n = 256 - ws02-m + compute ws02-o = + (ws02-m + 1) - ws02-l + if ws88-processo-verboso + display "L: " ws02-l + display "M: " ws02-m + display "N; " ws02-n + display "O: " ws02-o + end-if + move reg-arquivo-entrada + (ws02-l:ws02-o) + to ws02-fileidfd(ws77-count-fd) + if ws88-processo-verboso + display "File-id: " + ws02-fileidfd(ws77-count-fd) + end-if + read arquivo-entrada + move reg-arquivo-entrada + to ws77-linha-para-parsing + inspect ws77-linha-para-parsing + converting ws02-minusculo + to ws02-maiusculo + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all + " ORGANIZATION " + if ws02-i > 0 + move zeros to ws02-i + inspect + ws77-linha-para-parsing + tallying ws02-i for all + " INDEXED " + if ws02-i > 0 + if ws88-processo-verboso + display "Tem indexed" + end-if + move "Y" to + ws02-indexed + (ws77-count-fd) + else + if ws88-processo-verboso + display "ñ tem indexed" + end-if + move "N" to + ws02-indexed + (ws77-count-fd) + end-if + else + move "N" to + ws02-indexed(ws77-count-fd) + end-if + end-if + end-if + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " FD " + if ws02-i > 0 + perform testes-fd + end-if + end-if + end-if + end-if + end-if + add 1 to ws77-conta-linha + end-perform + add 1 to ws77-count-fd + if ws88-processo-verboso + perform varying ws02-i from 1 by 1 + until ws02-i >= 256 + or ws02-nomefd(ws02-i) equal spaces + display "NomeFD " ws02-i ":" ws02-nomefd(ws02-i) + display "FileID " ws02-i ":" ws02-fileidfd(ws02-i) + display "Indexed?" ws02-i ":" ws02-indexed(ws02-i) + end-perform + end-if + close arquivo-entrada + . + parsear-fonte. + move 1 to ws77-conta-linha + open input arquivo-entrada + if not ws88-ok + perform testar-file-status + end-if + open output arquivo-saida + + if ws88-nao-existe-id + write reg-arquivo-saida from + " IDENTIFICATION DIVISION." + move spaces to reg-arquivo-saida + string " PROGRAM-ID. " ws77-arquivo-entrada(1:6) + "." into reg-arquivo-saida + write reg-arquivo-saida + write reg-arquivo-saida from spaces + if ws88-nao-existe-ed + if ws88-precisa-crt-status + write reg-arquivo-saida from + " ENVIRONMENT DIVISION." + write reg-arquivo-saida from + " CONFIGURATION SECTION." + write reg-arquivo-saida from + " SPECIAL-NAMES." + string " CRT STATUS IS " + ws77-crt-status-field(1:ws77-crt-status-length) + "." into reg-arquivo-saida + write reg-arquivo-saida + end-if + end-if + end-if + + perform until ws88-fim-arquivo + read arquivo-entrada + if not ws88-fim-arquivo + if ws88-processo-verboso + display "No..: " ws77-conta-linha + display "Desc: " reg-arquivo-entrada + end-if + inspect reg-arquivo-entrada + replacing all " COMP-X" + by " COMP " + inspect reg-arquivo-entrada + replacing all " comp-x" + by " COMP " + move reg-arquivo-entrada + to ws77-linha-para-parsing + inspect ws77-linha-para-parsing + converting ws02-minusculo + to ws02-maiusculo + perform testes-geral + end-if + end-perform + + close arquivo-entrada + close arquivo-saida + . + mais-testes. + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all ' SELECT ' + if ws02-i > 0 + if ws88-processo-verboso + display "Testes de select" + end-if + perform testes-select + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all ' CANCEL ' + if ws02-i > 0 + if ws88-processo-verboso + display "Testes de cancel" + end-if + perform testes-cancel + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " VALUE " + if ws02-i > 0 + if ws88-processo-verboso + display "Testes de VALUE" + end-if + perform testes-value + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " MOVE " + if ws02-i > 0 + if ws88-processo-verboso + display "Testes de move" + end-if + perform testes-move + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all ' "' + if ws02-i > 0 + if ws88-processo-verboso + display "Testes de aspas duplas" + end-if + perform testes-aspas-duplas + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " -" + if ws02-i > 0 + if ws88-processo-verboso + display "Testes de hifen" + end-if + perform testes-hifen + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " LABEL " + if ws02-i > 0 + if ws88-processo-verboso + display "Teste de label" + end-if + perform testes-label + else + write reg-arquivo-saida + from reg-arquivo-entrada + end-if + end-if + end-if + end-if + end-if + end-if + end-if + . + finalizar. + exit program + . + ***************************************************************** + * Procedures secundarias * + ***************************************************************** + testes-lock. + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " MODE " + if ws02-i > 0 + if ws88-processo-verboso + display "Encontrou clausula LOCK MODE" + display "Nao grava linha" + end-if + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all "." + if ws02-i > 0 + move " ." to reg-arquivo-saida + write reg-arquivo-saida + else + set ws88-nao-grava-linha to true + end-if + else + write reg-arquivo-saida + from reg-arquivo-entrada + end-if + . + testes-label. + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " RECORD " + if ws02-i > 0 + if ws88-processo-verboso + display "Encontrou clausula LABEL RECORD." + display "Nao grava linha" + end-if + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all "." + if ws02-i > 0 + move " ." to reg-arquivo-saida + write reg-arquivo-saida + else + set ws88-nao-grava-linha to true + end-if + else + write reg-arquivo-saida + from reg-arquivo-entrada + end-if + . + testes-data. + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " RECORD " + if ws02-i > 0 + if ws88-processo-verboso + display "Encontrou DATA RECORD!" + end-if + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all "." + if ws02-i > 0 + move " ." to reg-arquivo-entrada + set ws88-grava-linha to true + else + set ws88-nao-grava-linha to true + end-if + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " RECORDS " + if ws02-i > 0 + if ws88-processo-verboso + display "Encontrou DATA RECORDS!" + end-if + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all "." + if ws02-i > 0 + move " ." to reg-arquivo-entrada + set ws88-grava-linha to true + else + set ws88-nao-grava-linha to true + end-if + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " DIVISION" + if ws02-i > 0 + if ws88-processo-verboso + display "Encontrou DATA DIVISION!" + end-if + if ws88-nao-existe-ed + write reg-arquivo-saida from + " ENVIRONMENT DIVISION." + if ws88-precisa-crt-status + write reg-arquivo-saida from + " CONFIGURATION SECTION." + write reg-arquivo-saida from + " SPECIAL-NAMES." + string " CRT STATUS IS " + ws77-crt-status-field + (1:ws77-crt-status-length) + "." into reg-arquivo-saida + write reg-arquivo-saida + end-if + end-if + write reg-arquivo-saida from spaces + end-if + end-if + end-if + if ws88-grava-linha + write reg-arquivo-saida from reg-arquivo-entrada + end-if + . + testes-display. + set ws88-display-nao-terminado to true + perform until ws88-display-terminado + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " AT " + if ws02-i > 0 + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " LINE " + if ws02-i > 0 + if ws88-processo-verboso + display "Encontrou LINE, vai retirar o AT." + end-if + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters + before " AT " + if ws02-i > 0 + add 1 to ws02-i + move spaces + to reg-arquivo-entrada(ws02-i:4) + ws77-linha-para-parsing(ws02-i:4) + end-if + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " PROMPT " + if ws02-i > 0 + if ws88-processo-verboso + display "Encontrou o PROMPT, vai remove-lo" + end-if + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters + before " PROMPT " + if ws02-i > 0 + add 1 to ws02-i + move spaces + to reg-arquivo-entrada(ws02-i:8) + ws77-linha-para-parsing(ws02-i:8) + end-if + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all + " BACKGROUND-COLOR " + if ws02-i > 0 + if ws88-processo-verboso + display " Encontrou o BACKGROUND-COLOR + - " vai remove-lo" + end-if + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters + before " BACKGROUND-COLOR " + if ws02-i > 0 + add 1 to ws02-i + move spaces + to reg-arquivo-entrada(ws02-i:18) + ws77-linha-para-parsing + (ws02-i:18) + add 18 to ws02-i + perform varying ws02-j + from ws02-i by 1 + until ws77-linha-para-parsing + (ws02-j:1) + not equal spaces or ws02-j >= 256 + continue + end-perform + perform varying ws02-i + from ws02-j by 1 + until ws77-linha-para-parsing + (ws02-i:1) + equal spaces or ws02-j >= 256 + move spaces + to ws77-linha-para-parsing + (ws02-i:1) + move spaces + to reg-arquivo-entrada + (ws02-i:1) + end-perform + end-if + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all + " FOREGROUND-COLOR " + if ws02-i > 0 + if ws88-processo-verboso + display " Encontrou o FOREGROUND-C + - "OLOR vai remove-lo" + end-if + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters + before " FOREGROUND-COLOR " + if ws02-i > 0 + add 1 to ws02-i + move spaces + to reg-arquivo-entrada + (ws02-i:18) + ws77-linha-para-parsing + (ws02-i:18) + end-if + add 18 to ws02-i + perform varying ws02-j from ws02-i by 1 + until ws77-linha-para-parsing(ws02-j:1) + not equal spaces + or ws02-j >= 256 + continue + end-perform + perform varying ws02-i from ws02-j by 1 + until ws77-linha-para-parsing(ws02-i:1) + equal spaces + or ws02-j >= 256 + move spaces + to ws77-linha-para-parsing(ws02-i:1) + move spaces + to reg-arquivo-entrada(ws02-i:1) + end-perform + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all + " AUTO-SKIP " + if ws02-i > 0 + if ws88-processo-verboso + display " Encontrou o AUTO-SKI + - "P sera substituido pe + - "lo AUTO" + end-if + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters + before " AUTO-SKIP " + if ws02-i > 0 + add 1 to ws02-i + move spaces + to reg-arquivo-entrada + (ws02-i:10) + ws77-linha-para-parsing + (ws02-i:10) + move " AUTO " + to reg-arquivo-entrada + (ws02-i:6) + ws77-linha-para-parsing + (ws02-i:6) + end-if + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all + " WITH " + if ws02-i > 0 + if ws88-processo-verboso + display " Encontrou o WITH + - " que sera removido." + end-if + move zeros to ws02-i + inspect + ws77-linha-para-parsing + tallying ws02-i + for characters + before " WITH " + if ws02-i > 0 + add 1 to ws02-i + move spaces + to reg-arquivo-entrada + (ws02-i:6) + ws77-linha-para-parsing + (ws02-i:6) + move spaces + to reg-arquivo-entrada + (ws02-i:6) + ws77-linha-para-parsing + (ws02-i:6) + end-if + else + perform tmp-display-bgfgcolor + end-if + end-if + end-if + end-if + end-if + end-if + else + write reg-arquivo-saida + from reg-arquivo-entrada + set ws88-display-terminado to true + end-if + end-perform + . + testes-accept. + set ws88-accept-nao-terminado to true + perform until ws88-accept-terminado + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " AT " + if ws02-i > 0 + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " LINE " + if ws02-i > 0 + if ws88-processo-verboso + display "Encontrou LINE, vai retirar o AT." + end-if + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters + before " AT " + if ws02-i > 0 + add 1 to ws02-i + move spaces + to reg-arquivo-entrada(ws02-i:4) + ws77-linha-para-parsing(ws02-i:4) + end-if + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " PROMPT " + if ws02-i > 0 + if ws88-processo-verboso + display "Encontrou o PROMPT, vai remove-lo" + end-if + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters + before " PROMPT " + if ws02-i > 0 + add 1 to ws02-i + move spaces + to reg-arquivo-entrada(ws02-i:8) + ws77-linha-para-parsing(ws02-i:8) + end-if + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all + " BACKGROUND-COLOR " + if ws02-i > 0 + if ws88-processo-verboso + display " Encontrou o BACKGROUND-COLO + - "R vai remove-lo" + end-if + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters + before " BACKGROUND-COLOR " + if ws02-i > 0 + add 1 to ws02-i + move spaces + to reg-arquivo-entrada(ws02-i:18) + ws77-linha-para-parsing + (ws02-i:18) + add 18 to ws02-i + perform varying ws02-j + from ws02-i by 1 + until ws77-linha-para-parsing + (ws02-j:1) + not equal spaces or ws02-j >= 256 + continue + end-perform + perform varying ws02-i + from ws02-j by 1 + until ws77-linha-para-parsing + (ws02-i:1) + equal spaces or ws02-j >= 256 + move spaces + to ws77-linha-para-parsing + (ws02-i:1) + move spaces + to reg-arquivo-entrada + (ws02-i:1) + end-perform + end-if + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all + " FOREGROUND-COLOR " + if ws02-i > 0 + if ws88-processo-verboso + display " Encontrou o FOREGROUND-C + - "OLOR vai remove-lo" + end-if + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters + before " FOREGROUND-COLOR " + if ws02-i > 0 + add 1 to ws02-i + move spaces + to reg-arquivo-entrada + (ws02-i:18) + ws77-linha-para-parsing + (ws02-i:18) + end-if + add 18 to ws02-i + perform varying ws02-j + from ws02-i by 1 + until ws77-linha-para-parsing + (ws02-j:1) + not equal spaces or ws02-j >= 256 + continue + end-perform + perform varying ws02-i + from ws02-j by 1 + until ws77-linha-para-parsing + (ws02-i:1) + equal spaces or ws02-j >= 256 + move spaces + to ws77-linha-para-parsing + (ws02-i:1) + move spaces + to reg-arquivo-entrada + (ws02-i:1) + end-perform + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all + " AUTO-SKIP " + if ws02-i > 0 + if ws88-processo-verboso + display " Encontrou o AUTO-SKI + - "P sera substituido pe + - "lo AUTO" + end-if + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters + before " AUTO-SKIP " + if ws02-i > 0 + add 1 to ws02-i + move spaces + to reg-arquivo-entrada + (ws02-i:10) + ws77-linha-para-parsing + (ws02-i:10) + move " AUTO " + to reg-arquivo-entrada + (ws02-i:6) + ws77-linha-para-parsing + (ws02-i:6) + end-if + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all + " WITH " + if ws02-i > 0 + if ws88-processo-verboso + display " Encontrou o WITH + - " que sera removido." + end-if + move zeros to ws02-i + inspect + ws77-linha-para-parsing + tallying ws02-i + for characters + before " WITH " + if ws02-i > 0 + add 1 to ws02-i + move spaces + to reg-arquivo-entrada + (ws02-i:6) + ws77-linha-para-parsing + (ws02-i:6) + move spaces + to reg-arquivo-entrada + (ws02-i:6) + ws77-linha-para-parsing + (ws02-i:6) + end-if + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all + " BEEP" + if ws02-i > 0 + if ws88-processo-verboso + display " Encontrou o + - " BEEP que sera removi + - "do." + end-if + move zeros to ws02-i + inspect + ws77-linha-para-parsing + tallying ws02-i + for characters + before " BEEP" + if ws02-i > 0 + add 1 to ws02-i + move spaces + to reg-arquivo-entrada + (ws02-i:6) + ws77-linha-para-parsing + (ws02-i:6) + move spaces + to reg-arquivo-entrada + (ws02-i:6) + ws77-linha-para-parsing + (ws02-i:6) + end-if + else + perform tmp-accept-bgfgcolor + end-if + end-if + end-if + end-if + end-if + end-if + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " FROM " + if ws02-i > 0 + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " ESCAPE " + if ws02-i > 0 + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " KEY" + if ws02-i > 0 + set ws88-accept-terminado to true + end-if + else + write reg-arquivo-saida + from reg-arquivo-entrada + set ws88-accept-terminado to true + end-if + else + write reg-arquivo-saida + from reg-arquivo-entrada + set ws88-accept-terminado to true + end-if + end-if + end-perform + . + testes-delete. + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " DELETE " + if ws02-i > 0 + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " FILE " + if ws02-i > 0 + set ws88-nao-grava-linha to true + end-if + end-if + if ws88-grava-linha + write reg-arquivo-saida from reg-arquivo-entrada + end-if + . + testes-call. + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters before " CALL " + add 6 to ws02-i + move zeros to ws02-j + inspect ws77-linha-para-parsing + tallying ws02-j for all " USING " + if ws02-j > 0 + move zeros to ws02-j + inspect ws77-linha-para-parsing + tallying ws02-j for characters before " USING " + if ws02-j > 0 + compute ws02-k = ws02-j - ws02-i + move zeros to ws02-l + inspect ws77-linha-para-parsing + tallying ws02-l for all 'X"AF"' + if ws02-l > 0 + set ws88-nao-grava-linha to true + else + move zeros to ws02-l + inspect ws77-linha-para-parsing + tallying ws02-l for all 'X"91"' + if ws02-l > 0 + set ws88-nao-grava-linha to true + else + inspect reg-arquivo-entrada(ws02-i:ws02-k) + converting ws02-maiusculo + to ws02-minusculo + end-if + end-if + end-if + end-if + if ws88-grava-linha + write reg-arquivo-saida from reg-arquivo-entrada + end-if + . + testes-id. + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " DIVISION" + if ws02-i > 0 + if ws88-processo-verboso + display "Encontrou IDENTIFICATION DIVISION!" + end-if + write reg-arquivo-saida from reg-arquivo-entrada + read arquivo-entrada + move reg-arquivo-entrada + to ws77-linha-para-parsing + inspect ws77-linha-para-parsing + converting ws02-minusculo + to ws02-maiusculo + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " PROGRAM-ID" + if ws02-i <= 0 + if ws88-processo-verboso + display "Nao encontrou PROGRAM-ID!" + end-if + string " PROGRAM-ID. " ws77-arquivo-entrada(1:6) + "." into reg-arquivo-saida + inspect reg-arquivo-saida + converting ws02-maiusculo + to ws02-minusculo + write reg-arquivo-saida + else + if ws88-processo-verboso + display "Encontrou PROGRAM-ID!" + end-if + inspect reg-arquivo-entrada + converting ws02-maiusculo + to ws02-minusculo + write reg-arquivo-saida from reg-arquivo-entrada + end-if + . + testes-ed. + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " DIVISION" + if ws02-i > 0 + if ws88-processo-verboso + display "Encontrou ENVIRONMENT DIVISION!" + end-if + write reg-arquivo-saida from reg-arquivo-entrada + read arquivo-entrada + move reg-arquivo-entrada + to ws77-linha-para-parsing + inspect ws77-linha-para-parsing + converting ws02-minusculo + to ws02-maiusculo + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " CONFIGURATION " + if ws02-i > 0 + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " SECTION" + if ws02-i > 0 + if ws88-processo-verboso + display "Encontrou CONFIGURATION SECTION!" + end-if + write reg-arquivo-saida from reg-arquivo-entrada + read arquivo-entrada + move reg-arquivo-entrada + to ws77-linha-para-parsing + inspect ws77-linha-para-parsing + converting ws02-minusculo + to ws02-maiusculo + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " SOURCE-COMPUTER" + if ws02-i > 0 + if ws88-processo-verboso + display "Encontrou SOURCE-COMPUTER!" + end-if + write reg-arquivo-saida + from reg-arquivo-entrada + read arquivo-entrada + move reg-arquivo-entrada + to ws77-linha-para-parsing + inspect ws77-linha-para-parsing + converting ws02-minusculo + to ws02-maiusculo + else + set ws88-finaliza-parsing to true + write reg-arquivo-saida + from reg-arquivo-entrada + end-if + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " SPECIAL-NAMES" + if ws02-i > 0 + if ws88-processo-verboso + display "Encontrou SPECIAL-NAMES!" + end-if + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all + " DECIMAL-POINT" + if ws02-i > 0 + if ws88-processo-verboso + display "Encontrou DECIMAL-POINT na m + - "esma linha da SPECIAL-NAMES" + end-if + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters + before " DECIMAL-POINT" + if ws02-i > 0 + move spaces + to reg-arquivo-saida + move reg-arquivo-entrada + (1:ws02-i) + to reg-arquivo-saida + write reg-arquivo-saida + end-if + else + if ws88-continua-parsing + write reg-arquivo-saida + from reg-arquivo-entrada + end-if + end-if + move spaces to reg-arquivo-saida + if ws88-precisa-crt-status + if ws88-processo-verboso + display "Precisa de CRT STATUS!" + end-if + string " CRT STATUS IS " + ws77-crt-status-field + (1:ws77-crt-status-length) + into reg-arquivo-saida + write reg-arquivo-saida + set ws88-nao-grava-linha to true + end-if + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all + " DECIMAL-POINT" + if ws02-i > 0 + if ws88-processo-verboso + display "Encontrou DECIMAL-POINT na + - "mesma linha da SPECIAL-NAM + - "ES" + end-if + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters + before " DECIMAL-POINT" + if ws02-i > 0 + add 2 to ws02-i + compute ws02-j = 256 - ws02-i + move spaces + to reg-arquivo-saida + move reg-arquivo-entrada + (ws02-i:ws02-j) + to reg-arquivo-saida(12:242) + write reg-arquivo-saida + end-if + end-if + end-if + end-if + end-if + end-if + . + + testes-aspas-duplas. + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters before ' "' + if ws02-i = 6 + if ws88-processo-verboso + display "Encontrou aspas duplas, acertando-as para a + - " coluna 12" + end-if + add 2 to ws02-i + compute ws02-j = 256 - ws02-i + move spaces to reg-arquivo-saida(1:11) + move reg-arquivo-entrada(ws02-i:ws02-j) + to reg-arquivo-saida(12:244) + if reg-arquivo-saida(73:183) not equal spaces + if ws88-processo-verboso + display "Linha não acabou, os testes devem ser fe + - "itos pelo testes-hifen" + end-if + set ws88-nao-terminou-linha to true + move reg-arquivo-saida(73:183) + to ws77-linha-temporaria + move spaces to reg-arquivo-saida(73:183) + end-if + write reg-arquivo-saida + move zeros to ws02-i + inspect ws77-linha-temporaria + tallying ws02-i for all '"' + if ws02-i > 0 + move spaces to reg-arquivo-saida + move ' - "' to reg-arquivo-saida(1:12) + move ws77-linha-temporaria + to reg-arquivo-saida(13:) + write reg-arquivo-saida + move spaces to ws77-linha-temporaria + set ws88-terminou-linha to true + end-if + else + move zeros to ws02-j + inspect ws77-linha-para-parsing + tallying ws02-j for characters before ' -' + if ws02-j = 5 + perform testes-hifen + else + write reg-arquivo-saida + from reg-arquivo-entrada + end-if + end-if + . + testes-hifen. + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters before " -" + if ws02-i = 5 + if ws88-processo-verboso + display "Encontrado hifen" + end-if + set ws88-linha-continuada to true + move zeros to ws02-m + inspect ws77-linha-para-parsing + tallying ws02-m for all '"' + if ws02-m >= 2 + if ws88-processo-verboso + display "Ultima linha!" + end-if + set ws88-ultima-linha to true + end-if + move zeros to ws02-n + inspect ws77-linha-para-parsing + tallying ws02-n for characters before '"' + if ws02-n < 11 + if ws88-processo-verboso + display "Precisa ser modificado posicionamento" + display "N: " ws02-n + end-if + add 3 to ws02-i + set ws88-continua-parsing to true + else + if ws88-processo-verboso + display "Não precisa modificar posicionamento" + display "N: " ws02-n + end-if + move reg-arquivo-entrada to reg-arquivo-saida + set ws88-finaliza-parsing to true + end-if + if ws88-continua-parsing + compute ws02-j = 256 - ws02-i + move spaces to reg-arquivo-saida + move " - " to reg-arquivo-saida(1:11) + if ws88-terminou-linha + if ws88-processo-verboso + display "Linha terminada" + end-if + move reg-arquivo-entrada(ws02-i:ws02-j) + to reg-arquivo-saida(12:244) + else + if ws88-processo-verboso + display "Linha nao terminada" + end-if + move '"' to reg-arquivo-saida(12:1) + perform varying ws02-k from 256 by -1 + until ws77-linha-temporaria(ws02-k:1) + not equal spaces + continue + end-perform + move ws77-linha-temporaria(1:ws02-k) + to reg-arquivo-saida(13:ws02-k) + compute ws02-l = 13 + ws02-k + if ws88-processo-verboso + display "Linha ant." + reg-arquivo-saida(1:ws02-l) + end-if + add 1 to ws02-i + subtract 1 from ws02-j + compute ws02-m = 256 - ws02-l + if ws88-processo-verboso + display "I: " ws02-i + display "J: " ws02-j + display "L: " ws02-l + display "K: " ws02-k + display "M: " ws02-m + end-if + move reg-arquivo-entrada(ws02-i:ws02-j) + to reg-arquivo-saida(ws02-l:ws02-m) + if ws88-processo-verboso + display "Linha atual: " reg-arquivo-saida + end-if + end-if + end-if + if reg-arquivo-saida(73:183) not equal spaces + if ws88-processo-verboso + display "Linha nao terminou.. testes-hifen" + end-if + set ws88-nao-terminou-linha to true + move reg-arquivo-saida(73:183) + to ws77-linha-temporaria + move spaces to reg-arquivo-saida(73:183) + else + if ws88-processo-verboso + display "Linha terminou.." + end-if + set ws88-terminou-linha to true + end-if + write reg-arquivo-saida + if ws88-ultima-linha + if ws88-nao-terminou-linha + if ws88-processo-verboso + display "Ultima linha desta instrucao!" + end-if + move spaces to reg-arquivo-saida + move zeros to ws02-i + inspect ws77-linha-temporaria + tallying ws02-i for all '"' + if ws02-i >= 1 + move ' - "' + to reg-arquivo-saida(1:12) + move 13 to ws02-k + else + move 12 to ws02-k + end-if + perform varying ws02-i from 256 by -1 + until ws77-linha-temporaria(ws02-i:1) + not equal spaces + continue + end-perform + move ws77-linha-temporaria(1:ws02-i) + to reg-arquivo-saida(ws02-k:243) + perform varying ws02-i from 256 by -1 + until reg-arquivo-saida(ws02-i:1) + not equal '"' + continue + end-perform + compute ws02-j = 256 - ws02-i + move reg-arquivo-saida(ws02-i:ws02-j) + to ws77-linha-temporaria + move spaces to reg-arquivo-saida(ws02-i:ws02-j) + write reg-arquivo-saida + move spaces to reg-arquivo-saida + move ws77-linha-temporaria + to reg-arquivo-saida(ws02-k:244) + write reg-arquivo-saida + set ws88-terminou-linha to true + end-if + end-if + else + write reg-arquivo-saida from reg-arquivo-entrada + end-if + . + testes-value. + move reg-arquivo-entrada to reg-arquivo-saida + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " OF " + if ws02-i > 0 + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " FILE-ID " + if ws02-i > 0 + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " FD " + if ws02-i > 0 + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters before + " VALUE " + if ws02-i > 0 + add 1 to ws02-i + compute ws02-j = 256 - ws02-i + move spaces to reg-arquivo-saida + (ws02-i:ws02-j) + move "." to reg-arquivo-saida(ws02-i:1) + write reg-arquivo-saida + end-if + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all "." + if ws02-i > 0 + * DANILO( + MOVE ZEROS TO W01-CONT1 + INSPECT ws77-linha-para-parsing + TALLYING W01-CONT1 FOR ALL '"' + IF W01-CONT1 EQUAL 2 AND + ws02-i NOT EQUAL 2 + CONTINUE + ELSE + * DANILO) + move " ." to reg-arquivo-saida + write reg-arquivo-saida + END-IF + *> else + *> write reg-arquivo-saida from spaces + end-if + end-if + else + write reg-arquivo-saida from reg-arquivo-entrada + end-if + else + write reg-arquivo-saida from reg-arquivo-entrada + end-if + . + testes-select. + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " ASSIGN " + if ws02-i > 0 + if ws88-processo-verboso + display "Encontrou ASSIGN ..." + end-if + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " SELECT " + if ws02-i > 0 + if ws88-processo-verboso + display "Encontrou SELECT dentro do teste do ASSI + - "GN" + end-if + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " NOT " + if ws02-i > 0 + if ws88-processo-verboso + display "Encontrou NOT " + end-if + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " OPTIONAL " + if ws02-i > 0 + if ws88-processo-verboso + display "Encontrou OPTIONAL " + end-if + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters + before " OPTIONAL " + add 10 to ws02-i + move zeros to ws02-j + inspect ws77-linha-para-parsing + tallying ws02-j for characters + before " ASSIGN " + add 1 to ws02-j + perform varying ws02-k + from ws02-i by 1 + until ws77-linha-para-parsing(ws02-k:1) + not equal spaces + continue + end-perform + perform varying ws02-l + from ws02-j by -1 + until ws77-linha-para-parsing(ws02-l:1) + not equal spaces + continue + end-perform + compute ws02-m = (ws02-l + 1) - ws02-k + if ws88-processo-verboso + display "Indice I: " ws02-i + display "Indice M: " ws02-m + display "Indice K: " ws02-k + display "Indice L: " ws02-l + display "nome: " + reg-arquivo-entrada(ws02-k:ws02-m) + end-if + perform varying ws02-n from 1 by 1 + until ws02-n >= ws77-count-fd + if ws88-processo-verboso + display "Registro: " + reg-arquivo-entrada(ws02-k:ws02-m) + display "Tabela: " ws02-nomefd(ws02-n) + end-if + if reg-arquivo-entrada(ws02-k:ws02-m) + equal ws02-nomefd(ws02-n) + set ws88-nao-grava-linha to true + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " TO " + if ws02-i > 0 + if ws88-processo-verboso + display "Encontrou TO" + end-if + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " DISK " + if ws02-i > 0 + if ws88-processo-verboso + display "Encontrou DISK" + end-if + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i + for characters before + " DISK " + move reg-arquivo-entrada + (1:ws02-i) + to reg-arquivo-saida + add 1 to ws02-i + compute ws02-j = 256 - ws02-i + string " EXTERNAL " + ws02-fileidfd(ws02-n) + delimited by size + into reg-arquivo-saida + (ws02-i:ws02-j) + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters + before " NOT " + add 1 to ws02-i + move spaces + to reg-arquivo-saida(ws02-i:4) + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i + for characters before + " OPTIONAL " + if ws02-indexed(ws02-n) + equal "N" + if ws88-processo-verboso + display "ñ adiciona opt + - "ional" + end-if + move spaces + to reg-arquivo-saida + (ws02-i:10) + end-if + if ws88-processo-verboso + display "saida: " + reg-arquivo-saida + end-if + * DANILO + MOVE reg-arquivo-saida TO + W01-TEMP1 + PERFORM TIRA-ESPACO + MOVE W01-TEMP2 TO + reg-arquivo-saida + * DANILO + write reg-arquivo-saida + move ws77-count-fd to ws02-n + else + move zeros to ws02-i + inspect + ws77-linha-para-parsing + tallying ws02-i for all + " PRINTER" + if ws02-i > 0 + if ws88-processo-verboso + display "Encontrou PRI + - "NTER" + end-if + move zeros to ws02-i + inspect + ws77-linha-para-parsing + tallying ws02-i + for characters before + " PRINTER" + move reg-arquivo-entrada + (1:ws02-i) + to reg-arquivo-saida + add 1 to ws02-i + compute ws02-j = + 256 - ws02-i + string " EXTERNAL " + ws02-fileidfd(ws02-n) + delimited by size + into reg-arquivo-saida + (ws02-i:ws02-j) + move zeros to ws02-i + inspect + ws77-linha-para-parsing + tallying ws02-i + for characters + before " NOT " + add 1 to ws02-i + move spaces + to reg-arquivo-saida + (ws02-i:4) + move zeros to ws02-i + inspect + ws77-linha-para-parsing + tallying ws02-i + for characters before + " OPTIONAL " + move spaces + to reg-arquivo-saida + (ws02-i:10) + if ws88-processo-verboso + display "saida: " + reg-arquivo-saida + end-if + * DANILO + MOVE reg-arquivo-saida TO + W01-TEMP1 + PERFORM TIRA-ESPACO + MOVE W01-TEMP2 TO + reg-arquivo-saida + * DANILO + write reg-arquivo-saida + move ws77-count-fd + to ws02-n + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " NOT " + if ws02-i > 0 + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for + characters before " NOT " + add 1 to ws02-i + move spaces to reg-arquivo-entrada + (ws02-i:5) + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all + " OPTIONAL " + if ws02-i > 0 + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for + characters before " OPTIONAL " + add 1 to ws02-i + if ws02-indexed(ws02-n) + equal "N" + if ws88-processo-verboso + display "ñ adiciona opti + - "onal" + end-if + move spaces to + reg-arquivo-entrada + (ws02-i:10) + end-if + end-if + end-if + * DANILO( TIRANDO EXCESSO DE ESPACOS + MOVE reg-arquivo-entrada TO W01-TEMP1 + PERFORM TIRA-ESPACO + MOVE W01-TEMP2 TO reg-arquivo-entrada + * DANILO) + write reg-arquivo-saida + from reg-arquivo-entrada + end-if + end-if + end-if + else + set ws88-grava-linha to true + end-if + end-perform + if ws88-grava-linha + * DANILO( TIRANDO EXCESSO DE ESPACOS + MOVE reg-arquivo-entrada TO W01-TEMP1 + PERFORM TIRA-ESPACO + MOVE W01-TEMP2 TO reg-arquivo-entrada + * DANILO) + write reg-arquivo-saida + from reg-arquivo-entrada + end-if + end-if + else + * move zeros to ws02-i + * inspect ws77-linha-para-parsing + * tallying ws02-i for all " OPTIONAL " + * if ws02-i > 0 + * if ws88-processo-verboso + * display "Encontrou OPTIONAL" + * end-if + * move zeros to ws02-i + * inspect ws77-linha-para-parsing + * tallying ws02-i for characters + * before " OPTIONAL " + * add 10 to ws02-i + * move zeros to ws02-j + * inspect ws77-linha-para-parsing + * tallying ws02-j for characters + * before " ASSIGN " + * add 1 to ws02-j + * perform varying ws02-k + * from ws02-i by 1 + * until ws77-linha-para-parsing(ws02-k:1) + * not equal spaces + * continue + * end-perform + * perform varying ws02-l + * from ws02-j by -1 + * until ws77-linha-para-parsing(ws02-l:1) + * not equal spaces + * continue + * end-perform + * compute ws02-m = (ws02-l + 1) - ws02-k + * if ws88-processo-verboso + * display "Indice I: " ws02-i + * display "Indice M: " ws02-m + * display "Indice K: " ws02-k + * display "Indice L: " ws02-l + * display "nome: " + * reg-arquivo-entrada(ws02-k:ws02-m) + * end-if + * perform varying ws02-n from 1 by 1 + * until ws02-n >= ws77-count-fd + * if reg-arquivo-entrada(ws02-k:ws02-m) + * equal ws02-nomefd(ws02-n) + * set ws88-nao-grava-linha to true + * move zeros to ws02-i + * inspect ws77-linha-para-parsing + * tallying ws02-i for all " TO " + * if ws02-i > 0 + * move zeros to ws02-i + * inspect ws77-linha-para-parsing + * tallying ws02-i for all " DISK " + * if ws02-i > 0 + * move zeros to ws02-i + * inspect ws77-linha-para-parsing + * tallying ws02-i + * for characters before + * " DISK " + * move reg-arquivo-entrada + * (1:ws02-i) + * to reg-arquivo-saida + * add 1 to ws02-i + * compute ws02-j = 256 - ws02-i + * string " EXTERNAL " + * ws02-fileidfd(ws02-n) + * delimited by size + * into + * reg-arquivo-saida(ws02-i:ws02-j) + * move zeros to ws02-i + * inspect ws77-linha-para-parsing + * tallying ws02-i for characters + * before " OPTIONAL " + * add 1 to ws02-i + * move spaces + * to reg-arquivo-saida(ws02-i:10) + * if ws88-processo-verboso + * display "saida; " + * reg-arquivo-saida + * end-if + * write reg-arquivo-saida + * move ws77-count-fd to ws02-n + * else + * move zeros to ws02-i + * inspect ws77-linha-para-parsing + * tallying ws02-i for all + * " PRINTER" + * if ws02-i > 0 + * move zeros to ws02-i + * inspect + * ws77-linha-para-parsing + * tallying ws02-i + * for characters before + * " PRINTER" + * move reg-arquivo-entrada + * (1:ws02-i) + * to reg-arquivo-saida + * add 1 to ws02-i + * compute ws02-j = + * 256 - ws02-i + * string " EXTERNAL " + * ws02-fileidfd(ws02-n) + * delimited by size + * into reg-arquivo-saida + * (ws02-i:ws02-j) + * move zeros to ws02-i + * inspect + * ws77-linha-para-parsing + * tallying ws02-i + * for characters before + * " OPTIONAL " + * add 1 to ws02-i + * move spaces + * to reg-arquivo-saida + * (ws02-i:10) + * if ws88-processo-verboso + * display "saida; " + * reg-arquivo-saida + * end-if + * write reg-arquivo-saida + * move ws77-count-fd to ws02-n + * else + * move zeros to ws02-i + * inspect ws77-linha-para-parsing + * tallying ws02-i for all + * " OPTIONAL " + * if ws02-i > 0 + * move zeros to ws02-i + * inspect ws77-linha-para-parsing + * tallying ws02-i for + * characters before " OPTIONAL " + * add 1 to ws02-i + * move spaces + * to + * reg-arquivo-entrada(ws02-i:10) + * end-if + * set ws88-grava-linha to true + * end-if + * end-if + * end-if + * else + * set ws88-grava-linha to true + * end-if + * end-perform + * if ws88-grava-linha + * write reg-arquivo-saida + * from reg-arquivo-entrada + * end-if + * else + if ws88-processo-verboso + display "Select simples" + end-if + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters + before " SELECT " + add 08 to ws02-i + move zeros to ws02-j + inspect ws77-linha-para-parsing + tallying ws02-j for characters + before " ASSIGN " + add 1 to ws02-j + perform varying ws02-k + from ws02-i by 1 + until ws77-linha-para-parsing(ws02-k:1) + not equal spaces + continue + end-perform + perform varying ws02-l + from ws02-j by -1 + until ws77-linha-para-parsing(ws02-l:1) + not equal spaces + continue + end-perform + if ws88-processo-verboso + display "Indice I: " ws02-i + display "Indice M: " ws02-m + display "Indice K: " ws02-k + display "Indice L: " ws02-l + end-if + compute ws02-m = (ws02-l + 1) - ws02-k + if ws88-processo-verboso + display "nome: " + reg-arquivo-entrada(ws02-k:ws02-m) + end-if + perform varying ws02-n from 1 by 1 + until ws02-n >= ws77-count-fd + if reg-arquivo-entrada(ws02-k:ws02-m) + equal ws02-nomefd(ws02-n) + set ws88-nao-grava-linha to true + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " TO " + if ws02-i > 0 + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " DISK " + if ws02-i > 0 + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i + for characters before + " SELECT " + add 8 to ws02-i + move reg-arquivo-entrada + (1:ws02-i) + to reg-arquivo-saida + if ws88-processo-verboso + display "registro 1: " + reg-arquivo-saida + end-if + perform varying ws02-j + from 256 by -1 until + reg-arquivo-saida + (ws02-j:1) + not equal spaces + continue + end-perform + add 1 to ws02-j + if ws02-indexed(ws02-n) + equal "Y" + compute ws02-k = + 256 - ws02-j + move " OPTIONAL " + to reg-arquivo-saida + (ws02-j:ws02-k) + end-if + if ws88-processo-verboso + display "registro 2: " + reg-arquivo-saida + end-if + add 10 to ws02-j + move zeros to ws02-l + inspect ws77-linha-para-parsing + tallying ws02-l for all + " TO " + if ws02-l > 0 + move zeros to ws02-l + inspect + ws77-linha-para-parsing + tallying ws02-l for + characters before " TO " + add 4 to ws02-l + compute ws02-m = + ws02-l - ws02-i + move reg-arquivo-entrada + (ws02-i:ws02-m) + to reg-arquivo-saida + (ws02-j:) + if ws88-processo-verboso + display "registro 3: " + reg-arquivo-saida + end-if + end-if + perform varying ws02-j + from 256 by -1 + until reg-arquivo-saida + (ws02-j:1) + not equal spaces + continue + end-perform + add 1 to ws02-j + move zeros to ws02-s + inspect ws02-fileidfd(ws02-n) + tallying ws02-s + for all '\' + if ws02-s > 0 + move zeros to ws02-s + move ws02-fileidfd(ws02-n) + to ws77-linha-temporaria + inspect + ws02-fileidfd(ws02-n) + tallying ws02-s for + characters before + "\" + add 1 to ws02-s + move "/" + to ws77-linha-temporaria + (ws02-s:1) + move ws77-linha-temporaria + to ws02-fileidfd(ws02-n) + end-if + string " EXTERNAL " + ws02-fileidfd(ws02-n) + delimited by size + into reg-arquivo-saida + (ws02-j:) + if ws88-processo-verboso + display "Saida: " + reg-arquivo-saida + end-if + * DANILO(TIRANDO EXCESSO DE ESPACOS + MOVE reg-arquivo-saida TO + W01-TEMP1 + PERFORM TIRA-ESPACO + MOVE W01-TEMP2 TO + reg-arquivo-saida + * DANILO) + write reg-arquivo-saida + move ws77-count-fd to ws02-n + else + move zeros to ws02-i + inspect + ws77-linha-para-parsing + tallying ws02-i for all + " PRINTER" + if ws02-i > 0 + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i + for characters before + " PRINTER" + move reg-arquivo-entrada + (1:ws02-i) + to reg-arquivo-saida + add 1 to ws02-i + compute ws02-j = 256 - ws02-i + * DANILO + MOVE ZEROS TO W01-CONT1 + INSPECT WS02-FILEIDFD(WS02-N) + TALLYING W01-CONT1 FOR ALL "." + IF W01-CONT1 EQUAL ZEROS + STRING WS02-FILEIDFD(WS02-N) + DELIMITED BY " " + "." DELIMITED SIZE + INTO WS02-FILEIDFD(WS02-N) + END-IF + * DANILO + string " EXTERNAL " + ws02-fileidfd(ws02-n) + delimited by size + into reg-arquivo-saida + (ws02-i:ws02-j) + if ws88-processo-verboso + display "Saida: " + reg-arquivo-saida + end-if + * DANILO( TIRANDO EXCESSO DE ESPACOS + MOVE reg-arquivo-saida TO + W01-TEMP1 + PERFORM TIRA-ESPACO + MOVE W01-TEMP2 TO + reg-arquivo-saida + * DANILO) + write reg-arquivo-saida + move ws77-count-fd to ws02-n + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i + for characters before + " SELECT " + add 8 to ws02-i + move reg-arquivo-entrada + (1:ws02-i) + to reg-arquivo-saida + if ws88-processo-verboso + display "registro 1: " + reg-arquivo-saida + end-if + perform varying ws02-j + from 256 by -1 until + reg-arquivo-saida + (ws02-j:1) + not equal spaces + continue + end-perform + add 1 to ws02-j + if ws02-indexed(ws02-n) + equal "Y" + compute ws02-k = + 256 - ws02-j + move " OPTIONAL " + to reg-arquivo-saida + (ws02-j:ws02-k) + end-if + if ws88-processo-verboso + display "registro 2: " + reg-arquivo-saida + end-if + add 10 to ws02-j + move zeros to ws02-l + inspect ws77-linha-para-parsing + tallying ws02-l for all + " TO " + if ws02-l > 0 + move zeros to ws02-l + inspect + ws77-linha-para-parsing + tallying ws02-l for + characters before " TO " + add 4 to ws02-l + compute ws02-m = + ws02-l - ws02-i + move reg-arquivo-entrada + (ws02-i:ws02-m) + to reg-arquivo-saida + (ws02-j:) + if ws88-processo-verboso + display "registro 3: " + reg-arquivo-saida + end-if + end-if + perform varying ws02-j + from 256 by -1 + until reg-arquivo-saida + (ws02-j:1) + not equal spaces + continue + end-perform + add 1 to ws02-j + compute ws02-r + = 256 - ws02-i + string " EXTERNAL " + ws02-fileidfd(ws02-n) + delimited by size + into reg-arquivo-saida + (ws02-j:ws02-r) + if ws88-processo-verboso + display "Saida: " + reg-arquivo-saida + end-if + * DANILO( TIRANDO EXCESSO DE ESPACOS + MOVE reg-arquivo-saida TO + W01-TEMP1 + PERFORM TIRA-ESPACO + MOVE W01-TEMP2 TO + reg-arquivo-saida + * DANILO) + write reg-arquivo-saida + move ws77-count-fd + to ws02-n + end-if + end-if + end-if + else + set ws88-grava-linha to true + end-if + end-perform + if ws88-grava-linha + * DANILO( TIRANDO EXCESSO DE ESPACOS + MOVE reg-arquivo-entrada TO W01-TEMP1 + PERFORM TIRA-ESPACO + MOVE W01-TEMP2 TO reg-arquivo-entrada + * DANILO) + write reg-arquivo-saida + from reg-arquivo-entrada + end-if + * end-if + end-if + end-if + else + * DANILO( TIRANDO EXCESSO DE ESPACOS + MOVE reg-arquivo-entrada TO W01-TEMP1 + PERFORM TIRA-ESPACO + MOVE W01-TEMP2 TO reg-arquivo-entrada + * DANILO) + write reg-arquivo-saida from reg-arquivo-entrada + end-if + . + testes-move. + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all '"$' + if ws02-i > 0 + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters before '"$' + if ws02-i > 0 + move spaces to reg-arquivo-entrada(ws02-i:1) + add 1 to ws02-i + move ' "' to reg-arquivo-entrada(ws02-i:2) + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all "\" + if ws02-i > 0 + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters before "\" + if ws02-i > 0 + add 1 to ws02-i + move "/" to reg-arquivo-entrada(ws02-i:1) + end-if + end-if + write reg-arquivo-saida from reg-arquivo-entrada + else + write reg-arquivo-saida from reg-arquivo-saida + end-if + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all ' "' + if ws02-i > 0 + perform testes-aspas-duplas + else + write reg-arquivo-saida from reg-arquivo-entrada + end-if + end-if + . + testes-cancel. + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters before ' "' + if ws02-i > 0 and ws02-i not equal 256 + add 3 to ws02-i + perform varying ws02-j from 256 by -1 + until ws77-linha-para-parsing(ws02-j:1) + equal '"' + continue + end-perform + inspect reg-arquivo-entrada(ws02-i:ws02-j) + converting ws02-maiusculo + to ws02-minusculo + write reg-arquivo-saida from reg-arquivo-entrada + else + write reg-arquivo-saida from reg-arquivo-entrada + end-if + . + testes-geral. + set ws88-grava-linha to true + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " LOCK " + if ws02-i > 0 + perform testes-lock + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " DATA " + if ws02-i > 0 + perform testes-data + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " ACCEPT " + if ws02-i > 0 + perform testes-accept + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " DISPLAY " + if ws02-i > 0 + perform testes-display + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " DELETE " + if ws02-i > 0 + perform testes-delete + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all + " CALL " + if ws02-i > 0 + perform testes-call + else + move zeros to ws02-i + inspect + ws77-linha-para-parsing + tallying ws02-i for all + " IDENTIFICATION " + if ws02-i > 0 + perform testes-id + else + move zeros to ws02-i + inspect + ws77-linha-para-parsing + tallying ws02-i for all + " ENVIRONMENT " + if ws02-i > 0 + perform testes-ed + else + perform mais-testes + end-if + end-if + end-if + end-if + end-if + end-if + end-if + end-if + add 1 to ws77-conta-linha + . + tmp-display-bgfgcolor. + move zeros to ws02-s + write reg-arquivo-saida from reg-arquivo-entrada + read arquivo-entrada + move reg-arquivo-entrada to ws77-linha-para-parsing + inspect ws77-linha-para-parsing + converting ws02-minusculo + to ws02-maiusculo + perform 3 times + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " DISPLAY " + if ws02-i > 0 + if ws88-processo-verboso + display "Tem DISPLAY" + end-if + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " FOREGROUND-COLOR " + if ws02-i > 0 + if ws88-processo-verboso + display " Encontrou o FOREGROUND-COLOR vai remove + - "-lo" + end-if + set ws88-encontrou-fgcolor to true + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters + before " FOREGROUND-COLOR " + if ws02-i > 0 + add 1 to ws02-i + move spaces to reg-arquivo-entrada(ws02-i:18) + ws77-linha-para-parsing(ws02-i:18) + add 18 to ws02-i + perform varying ws02-j from ws02-i by 1 + until ws77-linha-para-parsing(ws02-j:1) + not equal spaces + or ws02-j >= 256 + continue + end-perform + perform varying ws02-i from ws02-j by 1 + until ws77-linha-para-parsing(ws02-i:1) + equal spaces + or ws02-j >= 256 + move spaces + to ws77-linha-para-parsing(ws02-i:1) + move spaces + to reg-arquivo-entrada(ws02-i:1) + end-perform + end-if + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " BACKGROUND-COLOR " + if ws02-i > 0 + if ws88-processo-verboso + display " Encontrou o BACKGROUND-COLOR vai re + - "move-lo" + end-if + set ws88-encontrou-bgcolor to true + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i + for characters before + " BACKGROUND-COLOR " + if ws02-i > 0 + add 1 to ws02-i + move spaces to reg-arquivo-entrada(ws02-i:18) + ws77-linha-para-parsing(ws02-i:18) + add 18 to ws02-i + perform varying ws02-j from ws02-i by 1 + until ws77-linha-para-parsing(ws02-j:1) + not equal spaces + or ws02-j >= 256 + continue + end-perform + perform varying ws02-i from ws02-j by 1 + until ws77-linha-para-parsing(ws02-i:1) + equal spaces + or ws02-j >= 256 + move spaces + to ws77-linha-para-parsing(ws02-i:1) + move spaces + to reg-arquivo-entrada(ws02-i:1) + end-perform + else + if ws88-processo-verboso + display "Não encontrou BACKGROUND-COLOR e + - "ira gravar o registro" + end-if + set ws88-display-terminado to true + perform testes-geral + end-if + else + if ws88-processo-verboso + display "Não encontrou BACKGROUND-COLOR e nao + - "irá gravar o arquivo" + end-if + set ws88-display-terminado to true + add 1 to ws02-s + end-if + end-if + end-if + end-perform + if ws88-encontrou-fgcolor or ws88-encontrou-bgcolor + set ws88-nao-encontrou-fgcolor to true + set ws88-nao-encontrou-bgcolor to true + write reg-arquivo-saida from reg-arquivo-entrada + end-if + if ws02-s = 3 + write reg-arquivo-saida from reg-arquivo-entrada + end-if + . + tmp-accept-bgfgcolor. + move zeros to ws02-s + write reg-arquivo-saida from reg-arquivo-entrada + read arquivo-entrada + move reg-arquivo-entrada to ws77-linha-para-parsing + inspect ws77-linha-para-parsing + converting ws02-minusculo + to ws02-maiusculo + perform 3 times + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " ACCEPT " + if ws02-i > 0 + if ws88-processo-verboso + display "Tem ACCEPT" + end-if + else + if ws88-processo-verboso + display "Não tem ACCEPT" + end-if + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " FOREGROUND-COLOR" + if ws02-i > 0 + if ws88-processo-verboso + display " Encontrou o FOREGROUND-COLOR vai remov + - "e-lo" + end-if + set ws88-encontrou-fgcolor to true + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters + before " FOREGROUND-COLOR" + if ws02-i > 0 + add 1 to ws02-i + move spaces to reg-arquivo-entrada(ws02-i:18) + ws77-linha-para-parsing(ws02-i:18) + add 18 to ws02-i + perform varying ws02-j from ws02-i by 1 + until ws77-linha-para-parsing(ws02-j:1) + not equal spaces + or ws02-j >= 256 + continue + end-perform + perform varying ws02-i from ws02-j by 1 + until ws77-linha-para-parsing(ws02-i:1) + equal spaces + or ws02-j >= 256 + move spaces + to ws77-linha-para-parsing(ws02-i:1) + move spaces + to reg-arquivo-entrada(ws02-i:1) + end-perform + end-if + else + if ws88-processo-verboso + display "Não encontrou FOREGROUND-COLOR" + end-if + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " BACKGROUND-COLOR " + if ws02-i > 0 + if ws88-processo-verboso + display " Encontrou o BACKGROUND-COLOR vai re + - "move-lo" + end-if + set ws88-encontrou-bgcolor to true + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i + for characters before + " BACKGROUND-COLOR " + if ws02-i > 0 + add 1 to ws02-i + move spaces to reg-arquivo-entrada(ws02-i:18) + ws77-linha-para-parsing(ws02-i:18) + add 18 to ws02-i + perform varying ws02-j from ws02-i by 1 + until ws77-linha-para-parsing(ws02-j:1) + not equal spaces + or ws02-j >= 256 + continue + end-perform + perform varying ws02-i from ws02-j by 1 + until ws77-linha-para-parsing(ws02-i:1) + equal spaces + or ws02-j >= 256 + move spaces + to ws77-linha-para-parsing(ws02-i:1) + move spaces + to reg-arquivo-entrada(ws02-i:1) + end-perform + else + if ws88-processo-verboso + display "Não encontrou BACKGROUND-COLOR e + - "ira gravar o registro" + end-if + set ws88-accept-terminado to true + perform testes-geral + end-if + else + if ws88-processo-verboso + display "Não encontrou BACKGROUND-COLOR e nao + - "irá gravar o arquivo" + end-if + set ws88-accept-terminado to true + add 1 to ws02-s + end-if + end-if + end-if + end-perform + if ws88-encontrou-fgcolor or ws88-encontrou-bgcolor + set ws88-nao-encontrou-fgcolor to true + set ws88-nao-encontrou-bgcolor to true + write reg-arquivo-saida from reg-arquivo-entrada + end-if + if ws02-s = 3 + write reg-arquivo-saida from reg-arquivo-entrada + end-if + . + testes-fd. + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters before " FD " + add 4 to ws02-i + perform varying ws02-l from ws02-i by 1 + until ws77-linha-para-parsing(ws02-l:1) + not equal spaces + continue + end-perform + if ws88-processo-verboso + display "Linha...: " ws77-linha-para-parsing + display "Indice L: " ws02-l + end-if + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " VALUE " + if ws02-i > 0 + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters + before " VALUE " + move ws02-i to ws02-j + else + move 256 to ws02-j + end-if + if ws88-processo-verboso + display "Indice J: " ws02-j + end-if + perform varying ws02-m from ws02-j by -1 + until ws77-linha-para-parsing(ws02-m:1) + not equal spaces and "." + continue + end-perform + if ws88-processo-verboso + display "Indice M: " ws02-m + end-if + compute ws02-k = (ws02-m + 1) - ws02-l + if ws88-processo-verboso + display "Indice K: " ws02-k + display "Tamanho count-fd :" ws77-count-fd + end-if + perform varying ws02-n from 1 by 1 + until ws02-n > ws77-count-fd + if reg-arquivo-entrada(ws02-l:ws02-k) + equal ws02-nomefd(ws02-n) + if ws88-processo-verboso + display "FD igual :" ws02-nomefd(ws02-n) + ", indice " ws02-n + end-if + if ws02-fileidfd(ws02-n) equal "disk" or "DISK" or + "printer" or "PRINTER" or "printer." or "PRINTER." + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " VALUE " + if ws02-i > 0 + if ws88-processo-verboso + display "Encontrou VALUE na mesma linha da + - "FD" + end-if + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " OF " + if ws02-i > 0 + if ws88-processo-verboso + display "Encontrou OF na mesma linha da + - " FD" + end-if + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " FILE-ID" + if ws02-i > 0 + if ws88-processo-verboso + display "Encontrou FILE-ID ..." + end-if + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " IS " + if ws02-i > 0 + if ws88-processo-verboso + display "Encontrou IS ..." + end-if + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters + before " IS " + add 4 to ws02-i + perform varying ws02-o + from ws02-i by 1 + until ws77-linha-para-parsing + (ws02-o:1) + not equal spaces + continue + end-perform + perform varying ws02-p + from 256 by -1 + until ws77-linha-para-parsing + (ws02-p:1) + not equal spaces + continue + end-perform + move ws02-fileidfd(ws02-n) + to ws77-linha-temporaria + move zeros to ws02-q + inspect ws77-linha-temporaria + tallying ws02-q for all "." + if ws02-q > 0 + add 1 to ws02-p + compute ws02-r = ws02-o + ws02-p + move "." + to reg-arquivo-entrada(ws02-r:1) + end-if + move zeros to ws02-q + compute ws02-q = (ws02-p + 1) - ws02-o + if ws88-processo-verboso + display "file-id: " + reg-arquivo-entrada(ws02-o:ws02-q) + end-if + move reg-arquivo-entrada(ws02-o:ws02-p) + to ws02-fileidfd(ws02-n) + else + if ws88-processo-verboso + display "Encontrou FILE-ID ..." + end-if + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters + before " FILE-ID " + add 9 to ws02-i + perform varying ws02-o + from ws02-i by 1 + until ws77-linha-para-parsing + (ws02-o:1) + not equal spaces + continue + end-perform + perform varying ws02-p + from 256 by -1 + until ws77-linha-para-parsing + (ws02-p:1) + not equal spaces and "." + continue + end-perform + move ws02-fileidfd(ws02-n) + to ws77-linha-temporaria + move zeros to ws02-q + inspect ws77-linha-temporaria + tallying ws02-q for all "." + if ws02-q > 0 + add 1 to ws02-p + compute ws02-r = ws02-o + ws02-p + move "." + to reg-arquivo-entrada(ws02-r:1) + end-if + move zeros to ws02-q + compute ws02-q = (ws02-p + 1) - ws02-o + if ws88-processo-verboso + display "file-id: " + reg-arquivo-entrada(ws02-o:ws02-q) + end-if + move reg-arquivo-entrada(ws02-o:ws02-q) + to ws02-fileidfd(ws02-n) + end-if + end-if + end-if + else + set ws88-token-nao-encontrado to true + perform until ws88-token-encontrado + read arquivo-entrada + move reg-arquivo-entrada + to ws77-linha-para-parsing + inspect ws77-linha-para-parsing + converting ws02-minusculo + to ws02-maiusculo + if ws88-processo-verboso + display "registro: " + ws77-linha-para-parsing + end-if + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all + " DATA " + if ws02-i > 0 + set ws88-token-nao-encontrado to true + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " LABEL " + if ws02-i > 0 + set ws88-token-nao-encontrado + to true + else + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " VALUE " + if ws02-i > 0 + set ws88-token-encontrado + to true + else + set ws88-token-nao-encontrado + to true + end-if + end-if + end-if + end-perform + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " VALUE " + if ws02-i > 0 + if ws88-processo-verboso + display "Encontrou VALUE na outra linha + - "." + end-if + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " OF " + if ws02-i > 0 + if ws88-processo-verboso + display "Encontrou OF na outra linh + - "a" + end-if + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " FILE-ID" + if ws02-i > 0 + if ws88-processo-verboso + display "Encontrou FILE-ID ..." + end-if + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for all " IS " + if ws02-i > 0 + if ws88-processo-verboso + display "Encontrou IS ..." + end-if + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters + before " IS " + add 4 to ws02-i + perform varying ws02-o + from ws02-i by 1 + until ws77-linha-para-parsing + (ws02-o:1) + not equal spaces + continue + end-perform + perform varying ws02-p + from 256 by -1 + until ws77-linha-para-parsing + (ws02-p:1) + not equal spaces and "." + continue + end-perform + move ws02-fileidfd(ws02-n) + to ws77-linha-temporaria + move zeros to ws02-q + inspect ws77-linha-temporaria + tallying ws02-q for all "." + if ws02-q > 0 + * DANILO( + * MOVE ZEROS TO W01-CONT1 + * INSPECT ws77-linha-temporaria + * TALLYING W01-CONT1 FOR ALL '"' + * IF W01-CONT1 EQUAL 2 AND + * ws02-q NOT EQUAL 2 + * CONTINUE + * ELSE + * DANILO) + compute ws02-r = ws02-o + ws02-p + move "." + to reg-arquivo-entrada(ws02-r:1) + * END-IF + end-if + move zeros to ws02-q + compute ws02-q = (ws02-p + 1) - ws02-o + if ws88-processo-verboso + display "file-id: " + reg-arquivo-entrada(ws02-o:ws02-q) + end-if + move reg-arquivo-entrada(ws02-o:ws02-q) + to ws02-fileidfd(ws02-n) + else + if ws88-processo-verboso + display "Encontrou FILE-ID" + end-if + move zeros to ws02-i + inspect ws77-linha-para-parsing + tallying ws02-i for characters + before " FILE-ID " + add 9 to ws02-i + perform varying ws02-o + from ws02-i by 1 + until ws77-linha-para-parsing + (ws02-o:1) + not equal spaces + continue + end-perform + perform varying ws02-p + from 256 by -1 + until ws77-linha-para-parsing + (ws02-p:1) + not equal spaces and "." + continue + end-perform + move ws02-fileidfd(ws02-n) + to ws77-linha-temporaria + move zeros to ws02-q + inspect ws77-linha-temporaria + tallying ws02-q for all "." + if ws02-q > 0 + add 1 to ws02-p + compute ws02-r = ws02-o + ws02-p + move "." + to reg-arquivo-entrada(ws02-r:1) + end-if + move zeros to ws02-q + compute ws02-q = (ws02-p + 1) - ws02-o + if ws88-processo-verboso + display "file-id: " + reg-arquivo-entrada(ws02-o:ws02-q) + end-if + move reg-arquivo-entrada(ws02-o:ws02-q) + to ws02-fileidfd(ws02-n) + end-if + end-if + end-if + end-if + end-if + end-if + else + if ws88-processo-verboso + display "FD diferente - tabela :" + ws02-nomefd(ws02-n) + display "FD diferente - arquivo :" + reg-arquivo-entrada(ws02-l:ws02-k) + end-if + end-if + end-perform + . + TIRA-ESPACO. + MOVE ZEROS TO W01-CONT1 W01-CONT2. + SET W88-PRIMEIRO TO TRUE. + MOVE SPACES TO W01-TEMP2. + PERFORM UNTIL W01-CONT1 EQUAL 256 + ADD 1 TO W01-CONT1 + IF W88-PRIMEIRO AND W03-OCCURS-TEMP1(W01-CONT1) + NOT EQUAL SPACES + SET W88-CARACTER TO TRUE + END-IF + IF W88-ESPACO AND W03-OCCURS-TEMP1(W01-CONT1) + NOT EQUAL SPACES + SET W88-CARACTER TO TRUE + END-IF + IF W88-CARACTER AND W03-OCCURS-TEMP1(W01-CONT1) + EQUAL SPACES + SET W88-ESPACO TO TRUE + ADD 1 TO W01-CONT2 + MOVE " " TO W03-OCCURS-TEMP2(W01-CONT2) + END-IF + IF NOT W88-ESPACO + ADD 1 TO W01-CONT2 + MOVE W03-OCCURS-TEMP1(W01-CONT1) TO + W03-OCCURS-TEMP2(W01-CONT2) + END-IF + END-PERFORM. + copy "globals.pd". diff --git a/cbl2cob/mfparser.dll b/cbl2cob/mfparser.dll new file mode 100644 index 0000000..a577eb3 Binary files /dev/null and b/cbl2cob/mfparser.dll differ diff --git a/cbl2cob/saida.fd b/cbl2cob/saida.fd new file mode 100644 index 0000000..b1699ed --- /dev/null +++ b/cbl2cob/saida.fd @@ -0,0 +1,4 @@ + fd arquivo-saida + value of file-id is ws77-arquivo-saida. + 01 reg-arquivo-saida pic x(256). + diff --git a/cbl2cob/saida.sl b/cbl2cob/saida.sl new file mode 100644 index 0000000..28f088d --- /dev/null +++ b/cbl2cob/saida.sl @@ -0,0 +1,5 @@ + select arquivo-saida assign to disk + organization is line sequential + access mode is sequential + file status is ws77-file-status. + diff --git a/cobpp/AUTHORS b/cobpp/AUTHORS new file mode 100644 index 0000000..a65c93a --- /dev/null +++ b/cobpp/AUTHORS @@ -0,0 +1,11 @@ +List is in alphabetic order. + +Author: +David Essex + +Contributors: +Bernard Giroud +Ferran Pegueroles +Laura Tweedy +Keisuke Nishida +Rildo Pragana diff --git a/cobpp/COPYING b/cobpp/COPYING new file mode 100644 index 0000000..a43ea21 --- /dev/null +++ b/cobpp/COPYING @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 675 Mass Ave, Cambridge, MA 02139, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) 19yy + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/cobpp/COPYRIGHT b/cobpp/COPYRIGHT new file mode 100644 index 0000000..2318502 --- /dev/null +++ b/cobpp/COPYRIGHT @@ -0,0 +1,12 @@ +The TinyCOBOL pre-processor will convert from fixed to free-form COBOL format, +and handle the COPY and REPLACE syntax. + +Some of these files, are derived form what was originally part of the Cob2C +project. They were modified to create the TinyCOBOL pre-processor. + +Copyright (C) 1999-2002 David Essex. +Copyright (C) 1998, 1999 Laura Tweedy. + +The htcobolpp program is licensed under the GNU General Public License. + +See COPYING for details. diff --git a/cobpp/Makefile b/cobpp/Makefile new file mode 100644 index 0000000..1b95e8d --- /dev/null +++ b/cobpp/Makefile @@ -0,0 +1,95 @@ +# Generated automatically from Makefile.in by configure. +# +# Makefile.in for cobolpp, the COBOL pre-processor +# + +SHELL=/bin/sh + + + +prefix=/usr/local +exec_prefix=${prefix} + +#INSTALL=/usr/bin/install -c +#INSTALL_DATA=${INSTALL} -m 644 +INSTALL=install.exe +INSTALL_DATA=${INSTALL} + +#YACC=yacc193 +YACC=bison +LEX=flex +CCX=gcc + +EXEEXT=.exe + +RM= rm -f +MKDIR=mkdir -p + +#INSTBIN=/usr/local/bin +#INSTRC=/usr/local/share/htcobol +INSTBIN=C:/TinyCOBOL +INSTRC=C:/TinyCOBOL + +# +INCLUDES=-I/usr/local/include -I../lib -I../ +CCXFLAGS=${INCLUDES} -g -Wall +CCXFLAGS1=${INCLUDES} -g +#LIBS=-L/usr/lib -lm +LIBS=-L/usr/local/lib -lgetopt -lm +LDFLAGS= + +MAKEDEPEND=@MAKEDEPEND@ + +# +# Rules for compiling .c .l sources +# +.SUFFIX: .c .o .y .l +.c.o: + $(CCX) $(CCXFLAGS) -c $< + +# +.y.c: + $(YACC) -dv -b parser -p pp_yy $< +# +.l.c: + $(LEX) -o$@ -Ppp_yy $< +# + +SRCS = parser.tab.c scanner.c cobpp.c + +OBJS = $(SRCS:.c=.o) + +PROG = htcobolpp.exe + + +all: $(PROG) +devel: all + + +${PROG}: ${OBJS} + $(CCX) -o $@ ${OBJS} $(LDFLAGS) $(LIBS) +# strip $@ + + +scanner.c: scanner.l +# $(LEX) -o$@ -Ppp_yy $< + +parser.tab.c: parser.y scanner.c + $(YACC) -dv -b parser -p pp_yy $< + +parser.tab.o: parser.tab.c + $(CCX) $(CCXFLAGS1) -c parser.tab.c + +scanner.o: scanner.c + $(CCX) $(CCXFLAGS1) -c scanner.c + +clean: + @$(RM) $(PROG) $(OBJS) scanner.c \ + parser.output parser.tab.c parser.tab.h \ + core + +install: $(PROG) + $(MKDIR) $(INSTRC) + strip $(PROG) + ${INSTALL} $(PROG) $(INSTRC)/$(PROG) +# ${INSTALL_DATA} $(PROG) $(INSTRC)/$(PROG) diff --git a/cobpp/Makefile.in b/cobpp/Makefile.in new file mode 100644 index 0000000..1c873b9 --- /dev/null +++ b/cobpp/Makefile.in @@ -0,0 +1,84 @@ +# +# Makefile.in for cobolpp, the COBOL pre-processor +# + +SHELL=/bin/sh + +@SET_MAKE@ + +prefix=@prefix@ +exec_prefix=@exec_prefix@ + +INSTALL=@INSTALL@ +INSTALL_DATA=@INSTALL_DATA@ + +YACC=@YACC@ +LEX=@LEX@ +CCX=@CC@ + +EXEEXT=@exeext@ + +RM= rm -f + +INSTBIN=@cobbin_default@ +INSTRC=@cobdir_default@ + +# +INCLUDES=@INCLUDES@ +CCXFLAGS=${INCLUDES} @CCXFLAGS@ -Wall +CCXFLAGS1=${INCLUDES} @CCXFLAGS@ +LIBS=@LIBS@ +LDFLAGS=@LDFLAGS@ +MAKEDEPEND=@MAKEDEPEND@ + +# +# Rules for compiling .c .l sources +# +.SUFFIX: .c .o .y .l +.c.o: + $(CCX) $(CCXFLAGS) -c $< + +# +.y.c: + $(YACC) -dv -b parser -p pp_yy $< +# +.l.c: + $(LEX) -o$@ -Ppp_yy $< +# + +SRCS = parser.tab.c scanner.c cobpp.c + +OBJS = $(SRCS:.c=.o) + +PROG = htcobolpp@exeext@ + + +all: $(PROG) +devel: all + +${PROG}: ${OBJS} + $(CCX) -g -o $@ ${OBJS} $(LDFLAGS) $(LIBS) +# strip $@ + + +scanner.c: scanner.l +# $(LEX) -o$@ -Ppp_yy $< + +parser.tab.c: parser.y scanner.c + $(YACC) -dv -b parser -p pp_yy $< + +parser.tab.o: parser.tab.c + $(CCX) $(CCXFLAGS1) -c parser.tab.c + +scanner.o: scanner.c + $(CCX) $(CCXFLAGS1) -c scanner.c + +clean: + @$(RM) $(PROG) $(OBJS) scanner.c \ + parser.output parser.tab.c parser.tab.h \ + core + +install: $(PROG) + strip $(PROG) + ${INSTALL} -m 755 $(PROG) $(INSTRC)/$(PROG) +# ${INSTALL_DATA} $(PROG) $(INSTRC)/$(PROG) diff --git a/cobpp/Makefile.mingw b/cobpp/Makefile.mingw new file mode 100644 index 0000000..064b72f --- /dev/null +++ b/cobpp/Makefile.mingw @@ -0,0 +1,95 @@ +# Generated automatically from Makefile.in by configure. +# +# Makefile.in for cobolpp, the COBOL pre-processor +# + +SHELL=/bin/sh + + + +prefix=/usr/local +exec_prefix=${prefix} + +#INSTALL=/usr/bin/install -c +#INSTALL_DATA=${INSTALL} -m 644 +INSTALL=install.exe +INSTALL_DATA=${INSTALL} + +#YACC=yacc193 +YACC=bison +LEX=flex +CCX=gcc + +EXEEXT=.exe + +RM= rm -f +MKDIR=mkdir -p + +#INSTBIN=/usr/local/bin +#INSTRC=/usr/local/share/htcobol +INSTBIN=@install_dir@ +INSTRC=@install_dir@ + +# +INCLUDES=-I/usr/local/include -I../lib -I../ +CCXFLAGS=${INCLUDES} -g -Wall +CCXFLAGS1=${INCLUDES} -g +#LIBS=-L/usr/lib -lm +LIBS=-L/usr/local/lib -lgetopt -lm +LDFLAGS= + +MAKEDEPEND=@MAKEDEPEND@ + +# +# Rules for compiling .c .l sources +# +.SUFFIX: .c .o .y .l +.c.o: + $(CCX) $(CCXFLAGS) -c $< + +# +.y.c: + $(YACC) -dv -b parser -p pp_yy $< +# +.l.c: + $(LEX) -o$@ -Ppp_yy $< +# + +SRCS = parser.tab.c scanner.c cobpp.c + +OBJS = $(SRCS:.c=.o) + +PROG = htcobolpp.exe + + +all: $(PROG) +devel: all + + +${PROG}: ${OBJS} + $(CCX) -o $@ ${OBJS} $(LDFLAGS) $(LIBS) +# strip $@ + + +scanner.c: scanner.l +# $(LEX) -o$@ -Ppp_yy $< + +parser.tab.c: parser.y scanner.c + $(YACC) -dv -b parser -p pp_yy $< + +parser.tab.o: parser.tab.c + $(CCX) $(CCXFLAGS1) -c parser.tab.c + +scanner.o: scanner.c + $(CCX) $(CCXFLAGS1) -c scanner.c + +clean: + @$(RM) $(PROG) $(OBJS) scanner.c \ + parser.output parser.tab.c parser.tab.h \ + core + +install: $(PROG) + $(MKDIR) $(INSTRC) + strip $(PROG) + ${INSTALL} $(PROG) $(INSTRC)/$(PROG) +# ${INSTALL_DATA} $(PROG) $(INSTRC)/$(PROG) diff --git a/cobpp/Readme.txt b/cobpp/Readme.txt new file mode 100644 index 0000000..5afc3d2 --- /dev/null +++ b/cobpp/Readme.txt @@ -0,0 +1,107 @@ +The TinyCOBOL pre-processor has been merged into the main compiler. +The pre-processor scanner and parser step will still be executed, but run +in the same process as the main compiler. + +Consequently the source in the 'cobpp' directory sources are obsolete, and +will be removed at a later date. + +See the 'compiler' directory for the new pre-processor sources. + +------------------------------------------------------------------------------- + +What the TinyCOBOL pre-processor does. +- convert from fixed to free-form COBOL format. +- Process the COPY command. +- Process the REPLACE command (not functional in current version). + +Usage: +htcobolpp [-o ] +where are: + -h Help (display this listing) + -V Display version and exit + -v Verbose mode + -d Turn on debugging mode + -t Expand tabs to space(s) + -o Output file name (default: standard output) + -p Listing file name + -x Input source is in X/Open free format + -f Input source is in standard fixed column format + -I Copybooks search directories + +Note that the -t command option will expand tabs found in main programs and copybooks. +If this option is not used, any tabs in programs and/or copybooks will cause an error. + +The 'expand' program can be used to permanently remove these tabs as the following +example illustrates. +expand -t 8 program-name > new-program-name + +------------------------------------------------------------------------------- + +Copy statement usage. + +COPY { Text-CopyName | Literal } + [ {IN|OFF} { Text-LibName | Literal } ] + [ REPLACING + ( { Text | Literal | Pseudo-Text } BY { Text | Literal | Pseudo-Text } ) ... + ] +Where: +[ ] = optional +{ | } = OR +... = repeat + +Example: +COPY 'TEST02.cpy' IN TEST-LIB REPLACING + W01-COMPUTE-0 BY W01-COMPUTE-00 + 'W01-1XXX' BY 'W01-2' + ==9(5)== BY ==9(04)== . + +------------------------------------------------------------------------------- + +Copybook search sequences. + +The locations of copybooks can be given in the following ways. +- Using the -I path(s) command line directives. +- Using the library name. +- Using an relative or absolute path in the copybook name. + +This results in an complex search sequence which is resolved as follows. +- If there is an absolute path in the copybook name (i.e. '/usr/share/tc/a.cpy'), then + command line and library name paths are ignored. +- If the library name is given then command line paths are ignored. + When the library name is given as a literal, the literal is used a the search paths. + When the library name is given as a text name, the name is used to lookup the + environment variable and if found the result is used a the search paths. + The paths are then concatenated with the copybook name and searched. +- If only the copybook name is given, then the include command line directives are + the search paths. + When the copybook name is given as a literal, the literal is used. + When the copybook name is given as a text name, suffixes are added to the name. + The default suffixes are ".cpy:.CPY:.cob:.COB:.cbl:.CBL::". The last entry indicates no suffix. + The paths are then concatenated with the copybook name and suffixes and then searched. + + +Notes on valid copybook and library names. +- Valid copybook names are a valid COBOL words (text) or literals. + Thus t1.cpy is not and 't1.cpy' is valid. +- Valid library names are a valid COBOL words (text) or literals. + Library name is given as a text and containing '-' are converted to '_' since + valid environment variables names can not contain the character '-'. + +Examples: +- The following are equivalent. + COPY 't1.cpy' IN TEST-LIB. + COPY 't1.cpy'. - with the -I $TEST_LIB command line option. +- The text name suffix search sequence. + COPY TT1. - will search for TT1.cpy, TT1.CPY, TT1.cob, TT1.COB, TT1.cbl, TT1.CBL, TT1 files. + +------------------------------------------------------------------------------- + +Integration with the main compiler. +- The new pre-processor will be executed by default. + To ensure backward compatibility, the original PP has not been removed from + the main compiler. + Further integration will be done once the pre-processor is deemed to be stable. +- The main compiler does require that the full path of the pre-processor be known. + This is problematic as the test and install directories are different. To circumvent + this problem the -t command line option as been added so that the main compiler will + seek the PP in the cobpp directory. diff --git a/cobpp/cobpp.c b/cobpp/cobpp.c new file mode 100644 index 0000000..60cf06d --- /dev/null +++ b/cobpp/cobpp.c @@ -0,0 +1,930 @@ +/* + Copyright (C) 1999-2004 David Essex, Rildo Pragana + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this software; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + Boston, MA 02111-1307 USA + + TinyCOBOL Pre-Processor program used as a front end to the main compiler. + +*/ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "cobpp.h" +#include "htconfig.h" +#include "tcppversion.h" +#include "tcpphelp.h" +#include "mwindows.h" + + +extern FILE *pp_yyin; +extern FILE *pp_yyout; +FILE *yylist; + +extern int pp_yyparse(void); +extern char *filename; + +char HTG_COPYDIR[PATHMAX3 + 2] = ""; +char HTG_FNAME_SUFFIX[PATHMAX1] = ""; +char fpath[PATHMAX3 + 2] = ""; +char fsuffix[PATHMAX] = ""; + +char *prg_name; + +/* #define DEBUG_COBPP_PP 1 */ + +#ifdef DEBUG_COBPP_PP + +char errppbuf[1024*8]; + +void debug_pp_rtn (const char *s1, const char *s2, const char *s3, int w1, int cw); + +#define DEBUG_PPRTN_STR1(msg1) debug_pp_rtn (msg1, NULL, NULL, 0, 1); +#define DEBUG_PPRTN_STR3(msg1, msg2) debug_pp_rtn (msg1, msg2, NULL, 0, 3); +#define DEBUG_PPRTN_STR7(msg1, i1) debug_pp_rtn (msg1, NULL, NULL, i1, 7); +#define DEBUG_PPRTN_STR15(msg1, msg2, msg3) debug_pp_rtn (msg1, msg2, msg3, 0, 15); +#define DEBUG_PPRTN_STR21(msg1, msg2, i1) debug_pp_rtn (msg1, msg2, NULL, i1, 21); +#define DEBUG_PPRTN_STR105(msg1, msg2, msg3, i1) debug_pp_rtn (msg1, msg2, msg3, i1, 105); + +#else + +#define DEBUG_PPRTN_STR1(msg1) +#define DEBUG_PPRTN_STR3(msg1, msg2) +#define DEBUG_PPRTN_STR7(msg1, i1) +#define DEBUG_PPRTN_STR15(msg1, msg2, msg3) +#define DEBUG_PPRTN_STR21(msg1, msg2, i1) +#define DEBUG_PPRTN_STR105(msg1, msg2, msg3, i1) + +#endif + +/* Global Env struct due to yywrap, yylex */ + +int main( int argc , char** argv ) { + + int rc = 0; + + prg_name = argv[0]; + + globalEnvPtr = &globalEnv; + + setDefaults(); + + /* error, or help/version printed */ + rc = setOptions(&globalEnv, argc, argv); + if (rc != 0) { + if ((rc > 0) && (rc < 100)) { + printHelp(); + CleanUp(); + } + return rc; + } + + /* If everything is OK parse file */ + + filename = strdup (globalEnv.ifname); + pp_yyin = fopen(globalEnv.ifname, "r"); + if ( pp_yyin == NULL ) { + fprintf(stderr, "Error opening input file: %s\n", globalEnv.ifname); + rc = 3; + return rc; + } + + if (globalEnv.ofname != NULL) { + pp_yyout = fopen(globalEnv.ofname, "w"); + if ( pp_yyout == NULL ) { + fprintf(stderr, + "Error opening output file: %s\n" + ,globalEnv.ofname + ); + fclose(pp_yyin); + rc = 9; + return rc; + } + } + else { + pp_yyout = stdout; + } + + if (globalEnv.lfname != NULL) { + yylist = fopen(globalEnv.lfname, "w"); + if ( yylist == NULL ) { + fprintf(stderr, + "Error opening listing file: %s\n" + ,globalEnv.lfname + ); + fclose(pp_yyin); + if ( pp_yyout != stdout ) { + fclose(pp_yyout); + } + rc = 11; + return rc; + } + } + + setup_scanner_state(); +/* pp_yylex(); */ +/* rc = pp_yyparse(); */ + (void) pp_yyparse(); + + rc = globalEnv.errFlag; + + DEBUG_PPRTN_STR7("Program return code=%d\n", rc) + + return rc; +} + + +/* + * Initalize the Env struct passed to this function + */ +void setDefaults(void) { + + Env *gEnv = globalEnvPtr; + + gEnv->codeFormat = -1; /* 1 is free , 0 is fixed */ + + gEnv->debugFlag = 0; /* debug flag */ + + gEnv->IncDebugLines = 0; + gEnv->verboseFlag = 0; /* set verbose flag off */ + gEnv->errFlag = 0; /* no error state by default */ + gEnv->tab2space = 0; /* expand tabs to 0 spaces */ + gEnv->progName = NULL; + gEnv->ofname = NULL; + gEnv->ifname = NULL; + gEnv->lfname = NULL; + +} + +/* + * Function to clean up memory allocated in program. + * + */ +void CleanUp(void) { + + Env *gEnv = globalEnvPtr; + + globalEnvPtr = NULL; + if (gEnv->progName != NULL) + free(gEnv->progName); + + if (gEnv->ifname != NULL) + free(gEnv->ifname); + + if (gEnv->ofname != NULL) + free(gEnv->ofname); + + if (gEnv->lfname != NULL) + free(gEnv->lfname); + +} + +/* + * Read in command line options and set up the Env struct passed in + * Alloc memory for program name string in Env struct. + * + */ +int setOptions(Env* gEnv, int argc, char** argv) { + + /* Read in args for option settings. */ + + int r = 0, len, sw, i; + char tbuf[PATHMAX1] = ""; + + + len = strlen(argv[0]); + gEnv->progName = malloc(len + 1); + if (gEnv->progName == NULL) { + gEnv->errFlag++; + r = 2; + return r; + } + strncpy(gEnv->progName, argv[0], len); + + /* + * Check argc for number of args + */ +/* if (( argc < 2 ) || (argc > 5 )){ */ + if ( argc < 2 ){ + /* printHelp(); */ + gEnv->errFlag++; + r = 1; + return r; + } + +/* opterr = 0; */ + while ((sw = getopt(argc, argv, option_list)) != EOF) { + + switch (sw) { + + /* Include debug lines from sources */ + case TCOBPP_CMDOPT_INC_DEBUG: + gEnv->IncDebugLines = 1; + break; + + /* Not currently used */ + case TCOBPP_CMDOPT_DEBUG: + gEnv->debugFlag = 1; + break; + + /* Set input file format to FIXED */ + case TCOBPP_CMDOPT_FRM_FIXED: + if (gEnv->ifname != NULL) { + fprintf(stderr, "error: duplicate input file name '%s' ... aborting\n", optarg); + gEnv->errFlag++; + r = 20; + return r; + } + len = strlen(optarg); +/* fprintf(stderr, "cobpp debug: optarg=%s: len=%d\n", optarg, len); */ + gEnv->ifname = (char*)malloc(len + 2); + if (gEnv->ifname == NULL) { + gEnv->errFlag++; + r = 21; + return r; + } + strncpy(gEnv->ifname, optarg, len+1); +/* fprintf(stderr, "cobpp debug: input file name :%s:, len=%d\n", gEnv->ifname, len); */ + gEnv->codeFormat = 0; /* 1 is free, 0 is fixed */ + break; + + /* Add path to copybooks search path */ + case TCOBPP_CMDOPT_INC_PATH: + append_include_path(optarg); + break; + + /* Set output file name */ + case TCOBPP_CMDOPT_OUTFILE: + if (gEnv->ofname != NULL) { + fprintf(stderr, "error: duplicate output file name '%s' ... aborting\n", optarg); + gEnv->errFlag++; + r = 40; + return r; + } + len = strlen(optarg); + gEnv->ofname = (char*)malloc(len + 2); + if (gEnv->ofname == NULL) { + gEnv->errFlag++; + r = 41; + return r; + } + strncpy(gEnv->ofname, optarg, len+1); +/* fprintf(stderr, "cobpp debug: output file name '%s', len=%d\n", gEnv->ofname, len); */ + break; + + /* Set output listinf file name */ + case TCOBPP_CMDOPT_LIST: + if (gEnv->lfname != NULL) { + fprintf(stderr, "error: duplicate listing file name '%s' ... aborting\n", optarg); + gEnv->errFlag++; + r = 50; + return r; + } + len = strlen(optarg); + gEnv->lfname = (char*)malloc(len + 2); + if (gEnv->lfname == NULL) { + gEnv->errFlag++; + r = 51; + return r; + } + strncpy(gEnv->lfname, optarg, len+1); +/* fprintf(stderr, "cobpp debug: print file name '%s', len=%d\n", gEnv->lfname, len); */ + break; + + /* Set tab to space conversion length */ + case TCOBPP_CMDOPT_TAB_LEN: + if (gEnv->tab2space != 0) { + fprintf(stderr, "error: duplicate tabs2space argument '%s' specified ... aborting\n", optarg); + gEnv->errFlag++; + r = 60; + return r; + } + strcpy(tbuf, optarg); +/* len = strlen(optarg); */ + len = strlen(tbuf); + for (i=0; ierrFlag++; + r = 61; + return r; + } + } +/* sscanf(optarg, "%d", &gEnv->tab2space); */ + sscanf(tbuf, "%d", &gEnv->tab2space); + if ((gEnv->tab2space < 1) || (gEnv->tab2space > 99)) { + fprintf(stderr, "error: invalid tabs2space argument '%s' specified, max=99 min=1 ... aborting\n", optarg); + gEnv->errFlag++; + r = 62; + return r; + } +/* + fprintf(stderr, "cobpp debug: input tab string :%s:, gEnv->tab2space=%d\n", optarg, gEnv->tab2space); + fprintf(stderr, "cobpp debug: input tab string :%s:, gEnv->tab2space=%d\n", tbuf, gEnv->tab2space); +*/ + break; + + /* Set input file format to FREE */ + case TCOBPP_CMDOPT_FRM_FREE: + if (gEnv->ifname != NULL) { + fprintf(stderr, "error: duplicate input file name '%s' ... aborting\n", optarg); + gEnv->errFlag++; + r = 70; + return r; + } + len = strlen(optarg); +/* fprintf(stderr, "cobpp debug: optarg=%s: len=%d\n", optarg, len); */ + gEnv->ifname = (char*)malloc(len + 2); +/* gEnv->ifname = malloc(len + 2); */ + if (gEnv->ifname == NULL) { + gEnv->errFlag++; + r = 71; + return r; + } + strncpy(gEnv->ifname, optarg, len+1); +/* strcpy(gEnv->ifname, optarg); */ +/* fprintf(stderr, "cobpp debug: input file name=%s:, len=%d\n", gEnv->ifname, len); */ + gEnv->codeFormat = 1; /* 1 is free, 0 is fixed */ + break; + + /* Display version number */ + case TCOBPP_CMDOPT_VERSION: + printVersion(); + r = 197; + break; + + /* Set verbose option on */ + case TCOBPP_CMDOPT_VERBOSE: + gEnv->verboseFlag = 1; + break; + + /* Display command line help */ + case TCOBPP_CMDOPT_HELP1: + case TCOBPP_CMDOPT_HELP: + default: + r = 5; +/* printHelp(); */ + break; + + } + } + + if (r == 0) { + if (gEnv->ifname == NULL) { + fprintf(stderr, "error: no input file name selected ... aborting\n"); + gEnv->errFlag++; + r = 80; + } + } + + /* If tabs not set default to 8 spaces */ + if (gEnv->tab2space == 0) + gEnv->tab2space = 8; + + return r; + +} + + +/* + Print out extended help +*/ +void printHelp(void){ + +/* fprintf (stdout, */ + fprintf (stderr, + "Usage: %s %s%s", + globalEnvPtr->progName, + usage_list0, + usage_list1 + ); +} + +/* + * Print pre-processor version and copyright +*/ +void printVersion(void) { + + fprintf(stdout, "%s - %s\n%s\n", + TCOBPP_TITLE, + TCOBPP_PGM_VERSION, + TCOBPP_COPYWR + ); +} + +int find_copybook_file (char *fname, char *lname) +{ + int r = 1, len, sw = 0; + char *pt, + tpath[PATHMAX1], + fname1[PATHMAX], + lname1[PATHMAX1]; + + if (lname == NULL) { + if ((*fname == CHR_SQUOTE) || (*fname == CHR_DQUOTE)) { + sw = STATE_FLIT_LNONE; + strcpy(fname1, fname+1); + len = strlen(fname1); + fname1[len - 1] = CHR_EOS; + r = find_filename_literal(fname1, HTG_COPYDIR); + + } + else { + sw = STATE_FNAME_LNONE; + strcpy(fname1, fname); + strcpy(HTG_FNAME_SUFFIX, STR_SEARCH_SUFFIXES); + r = find_filename_text(fname1, HTG_COPYDIR, HTG_FNAME_SUFFIX); + } + } + else { + if ((*lname == CHR_SQUOTE) || (*lname == CHR_DQUOTE)) { + strcpy(lname1, lname+1); + len = strlen(lname1); + lname1[len - 1] = CHR_EOS; + strcpy(tpath, lname1); + len = strlen(tpath); + if (len > 0) { + if (tpath[len - 1] != CHR_COLEN) { + strcat(tpath, STR_COLEN); + } + } + if ((*fname == CHR_SQUOTE) || (*fname == CHR_DQUOTE)) { + sw = STATE_FLIT_LLIT; + strcpy(fname1, fname+1); + len = strlen(fname1); + fname1[len - 1] = CHR_EOS; + r = find_filename_literal(fname1, tpath); + } + else { + sw = STATE_FNAME_LLIT; + strcpy(fname1, fname); + strcpy(HTG_FNAME_SUFFIX, STR_SEARCH_SUFFIXES); + r = find_filename_text(fname1, tpath, HTG_FNAME_SUFFIX); + } + } + else { + if ((*fname == CHR_SQUOTE) || (*fname == CHR_DQUOTE)) { + sw = STATE_FLIT_LNAME; + strcpy(fname1, fname+1); + len = strlen(fname1); + fname1[len - 1] = CHR_EOS; + strcpy(lname1, lname); + pt = find_env_variable(lname1); + if (pt != NULL) { + strcpy(tpath, pt); + } + else { + strcpy(tpath, ""); + } + len = strlen(tpath); + if (len > 0) { + if (tpath[len - 1] != CHR_COLEN) { + strcat(tpath, STR_COLEN); + } + } + r = find_filename_literal(fname1, tpath); + } + else { + sw = STATE_FNAME_LNAME; + strcpy(fname1, fname); + strcpy(lname1, lname); + strcpy(HTG_FNAME_SUFFIX, STR_SEARCH_SUFFIXES); + pt = find_env_variable(lname1); + if (pt != NULL) { + strcpy(tpath, pt); + } + else { + strcpy(tpath, ""); + } + len = strlen(tpath); + if (len > 0) { + if (tpath[len - 1] != CHR_COLEN) { + strcat(tpath, STR_COLEN); + } + } + r = find_filename_text(fname1, tpath, HTG_FNAME_SUFFIX); + } + } + } + + return r; +} + +int find_filename_literal (char *fname, char *fp) +{ + int r = 1, len, sw1=0; + char *pt1; + struct stat sbuf; + + strcpy(fpath, fp); + + len = strlen(fpath); + if (len == 0) { + sprintf(include_full_filename, "%s", fname); + if (stat(include_full_filename, &sbuf) == 0) { + if (S_ISREG(sbuf.st_mode) && + ((S_IRUSR & sbuf.st_mode) || (S_IRGRP & sbuf.st_mode) || (S_IROTH & sbuf.st_mode))) { + r = 0; + if (globalEnvPtr->verboseFlag == 1) { + printf("found copybook name \'%s\'\n", include_full_filename); + } + } + else { + if (globalEnvPtr->verboseFlag == 1) { + printf("copybook file \'%s\' not readable\n", include_full_filename); + } + } + } + else { + if (globalEnvPtr->verboseFlag == 1) { + printf("copybook file \'%s\' not found\n", include_full_filename); + } + } + } + else { + // If filename is an absolute path ignore library path + if (*fname == CHR_SLASH) { + if (globalEnvPtr->verboseFlag == 1) { + printf("warning: ignoring other search path(s) in absolute path copybook name \'%s\'\n", fname); + } + sprintf(include_full_filename, "%s", fname); + if (stat(include_full_filename, &sbuf) == 0) { + if (S_ISREG(sbuf.st_mode) && + ((S_IRUSR & sbuf.st_mode) || (S_IRGRP & sbuf.st_mode) || (S_IROTH & sbuf.st_mode))) { + r = 0; + if (globalEnvPtr->verboseFlag == 1) { + printf("found copybook name \'%s\'\n", include_full_filename); + } + } + else { + if (globalEnvPtr->verboseFlag == 1) { + printf("copybook file \'%s\' not readable\n", include_full_filename); + } + } + } + else { + if (globalEnvPtr->verboseFlag == 1) { + printf("copybook file \'%s\' not found\n", include_full_filename); + } + } + } + else { + sw1 = 0; + strcpy(fpath, fp); + pt1 = find_token(fpath, STR_COLEN, 0); + if (pt1 == NULL) { + pt1 = fpath; + } + while (sw1 == 0) { + sprintf(include_full_filename, "%s", pt1); + if (stat(include_full_filename, &sbuf) == 0) { + if (S_ISDIR(sbuf.st_mode) && + ((S_IRUSR & sbuf.st_mode) || (S_IRGRP & sbuf.st_mode) || (S_IROTH & sbuf.st_mode))) { + if (globalEnvPtr->verboseFlag == 1) { + printf("searching directory path \'%s\'\n", include_full_filename); + } + sprintf(include_full_filename, "%s/%s", pt1, fname); + if (stat(include_full_filename, &sbuf) == 0) { + if (S_ISREG(sbuf.st_mode) && + ((S_IRUSR & sbuf.st_mode) || (S_IRGRP & sbuf.st_mode) || (S_IROTH & sbuf.st_mode))) { + r = 0; + if (globalEnvPtr->verboseFlag == 1) { + printf("found copybook name \'%s\'\n", include_full_filename); + } + sw1 = 1; + } + else { + if (globalEnvPtr->verboseFlag == 1) { + printf("copybook file \'%s\' not readable\n", include_full_filename); + } + } + } + else { + if (globalEnvPtr->verboseFlag == 1) { + printf("copybook file \'%s\' not found\n", include_full_filename); + } + } + } + else { + if (globalEnvPtr->verboseFlag == 1) { + printf("directory path \'%s\' not readable\n", include_full_filename); + } + } + } + else { + if (globalEnvPtr->verboseFlag == 1) { + printf("directory path \'%s\' not found\n", include_full_filename); + } + } + pt1 = find_token(pt1, STR_COLEN, 1); + if (pt1 == NULL) { + sw1 = 1; + } + } + } + } + + return r; +} + +int find_filename_text (char *fname, char *fp, char *fs) +{ + int r = 1, len, sw1, sw2; + char *pt1, *pt2; + struct stat sbuf; + + strcpy(fpath, fp); + strcpy(fsuffix, fs); + + len = strlen(fpath); + if (len == 0) { + sw1 = 0; + pt1 = find_token(fsuffix, STR_COLEN, 0); + if (pt1 == NULL) { + pt1 = fsuffix; + } + while (sw1 == 0) { + sprintf(include_full_filename, "%s%s", fname, pt1); + if (stat(include_full_filename, &sbuf) == 0) { + if (S_ISREG(sbuf.st_mode) && + ((S_IRUSR & sbuf.st_mode) || (S_IRGRP & sbuf.st_mode) || (S_IROTH & sbuf.st_mode))) { + r = 0; + if (globalEnvPtr->verboseFlag == 1) { + printf("found copybook name \'%s\'\n", include_full_filename); + } + sw1 = 1; + } + else { + if (globalEnvPtr->verboseFlag == 1) { + printf("copybook file \'%s\' not readable\n", include_full_filename); + } + } + sw1 = 1; + } + else { + if (globalEnvPtr->verboseFlag == 1) { + printf("copybook file \'%s\' not found\n", include_full_filename); + } + } + pt1 = find_token(pt1, STR_COLEN, 1); + if (pt1 == NULL) { + sw1 = 1; + } + } + } + else { + sw1 = 0; + sw2 = 0; + strcpy(fpath, fp); + strcpy(fsuffix, fs); + pt1 = find_token(fpath, STR_COLEN, 0); + if (pt1 == NULL) { + pt1 = fpath; + } + while (sw1 == 0) { + sprintf(include_full_filename, "%s", pt1); + if (stat(include_full_filename, &sbuf) == 0) { + if (S_ISDIR(sbuf.st_mode) && + ((S_IRUSR & sbuf.st_mode) || (S_IRGRP & sbuf.st_mode) || (S_IROTH & sbuf.st_mode))) { + if (globalEnvPtr->verboseFlag == 1) { + printf("searching directory path \'%s\'\n", include_full_filename); + } + strcpy(fsuffix, fs); + sw2 = 0; + pt2 = find_token(fsuffix, STR_COLEN, 0); + while (sw2 == 0) { + sprintf(include_full_filename, "%s/%s%s", pt1, fname, pt2); + if (stat(include_full_filename, &sbuf) == 0) { + if (S_ISREG(sbuf.st_mode) && + ((S_IRUSR & sbuf.st_mode) || (S_IRGRP & sbuf.st_mode) || (S_IROTH & sbuf.st_mode))) { + r = 0; + if (globalEnvPtr->verboseFlag == 1) { + printf("found copybook name \'%s\'\n", include_full_filename); + } + sw1 = 1; + sw2 = 1; + } + else { + if (globalEnvPtr->verboseFlag == 1) { + printf("copybook file \'%s\' not readable\n", include_full_filename); + } + } + sw2 = 1; + } + else { + if (globalEnvPtr->verboseFlag == 1) { + printf("copybook file \'%s\' not found\n", include_full_filename); + } + } + pt2 = find_token(pt2, STR_COLEN, 1); + if (pt2 == NULL) { + sw2 = 1; + } + } + } + else { + if (globalEnvPtr->verboseFlag == 1) { + printf("directory path \'%s\' not readable\n", include_full_filename); + } + } + } + else { + if (globalEnvPtr->verboseFlag == 1) { + printf("directory path \'%s\' not found\n", include_full_filename); + } + } + pt1 = find_token(pt1, STR_COLEN, 1); + if (pt1 == NULL) { + sw1 = 1; + } + } + } + + return r; +} + +char *find_env_variable (char *ev) +{ + char *pt, ev1[PATHMAX]; + int i, len; + + len = strlen(ev); + for (i=0; iverboseFlag == 1) { + printf("envoromental variable \'%s\' found, setting search path(s) to \'%s\'\n", ev1, pt); + } + return pt; + } + + if (globalEnvPtr->verboseFlag == 1) { + printf("warning: envoromental variable \'%s\' not found\n", ev1); + } + + return NULL; +} + +char *find_token(char *p, const char *d, int sw) +{ + int i, len; + + DEBUG_PPRTN_STR105("find_token trace(1): p=%s; d=%s, sw=%d\n", p, d, sw) + + if (sw == 0) { + + len = strlen(p); + *(p+len+1) = CHR_EOS; + for (i=0; iverboseFlag == 1) { + fprintf (stdout, "Appending '%s' to include (copybooks) search path\n", ap); + } + + if (rc != 0) { + fprintf (stderr, "%s: *** Buffer overflow error while appending '%s' to include (copybooks) search path. Abort.\n", prg_name, ap); + exit(rc); + } + +} + +#ifdef DEBUG_COBPP_PP + +void debug_pp_rtn (const char *s1, const char *s2, const char *s3, int w1, int cw) +{ + switch (cw) + { + case 3: + sprintf(errppbuf, s1, s2); + break; + + case 5: + sprintf(errppbuf, s1, s3); + break; + + case 7: + sprintf(errppbuf, s1, w1); + break; + + case 15: + sprintf(errppbuf, s1, s2, s3); + break; + + case 21: + sprintf(errppbuf, s1, s2, w1); + break; + + case 35: + sprintf(errppbuf, s1, s3, w1); + break; + + case 105: + sprintf(errppbuf, s1, s2, s3, w1); + break; + + default: + sprintf(errppbuf, "%s", s1); + break; + } + + fprintf(stderr, "%s", errppbuf); +} + +#endif diff --git a/cobpp/cobpp.h b/cobpp/cobpp.h new file mode 100644 index 0000000..2bb0787 --- /dev/null +++ b/cobpp/cobpp.h @@ -0,0 +1,137 @@ +/* + Copyright (C) 1999-2004 David Essex, Rildo Pragana + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this software; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + Boston, MA 02111-1307 USA + +*/ + + +#ifndef _COBPP_H +#define _COBPP_H + +#include +#include + +#define PATHMAX 120 +#define PATHMAX1 1024 +#define PATHMAX2 256 +#define PATHMAX3 (1024 * 4) +#define CHR_SQUOTE '\'' +#define CHR_DQUOTE '"' +#define CHR_EOS '\0' +#define CHR_ASTERIX '*' +#define CHR_CR '\r' +#define CHR_LF '\n' +#define STR_DASH '-' +#define STR_UNDERSCORE '_' +#define CHR_SLASH '/' + +//#define DEBUG_COBPP 1 +#ifdef DEBUG_COBPP +#define DEBUG_COBPP_PP 1 +#define DEBUG_COBPP_SCANNER 1 +#define DEBUG_COBPP_PARSER 1 +#endif + +#ifndef __MINGW32__ +#define STR_SEARCH_SUFFIXES ".cpy:.CPY:.cob:.COB:.cbl:.CBL::" +#define CHR_COLEN ':' +#define STR_COLEN ":" +#else +#define STR_SEARCH_SUFFIXES ".cpy;.CPY;.cob;.COB;.cbl;.CBL;;" +#define CHR_COLEN ';' +#define STR_COLEN ";" +#endif + +#define FORMAT_FIXED 0 +#define FORMAT_FREE 1 + +#define STATE_FLIT_LNONE 1 +#define STATE_FNAME_LNONE 2 +#define STATE_FLIT_LLIT 3 +#define STATE_FLIT_LNAME 4 +#define STATE_FNAME_LLIT 5 +#define STATE_FNAME_LNAME 6 + +#define TCOBPP_CMDOPTION_LIST "f:x:o:p:t:I:vV?hdg" +#define TCOBPP_CMDOPT_FRM_FIXED 'f' +#define TCOBPP_CMDOPT_FRM_FREE 'x' +#define TCOBPP_CMDOPT_OUTFILE 'o' +#define TCOBPP_CMDOPT_LIST 'p' +#define TCOBPP_CMDOPT_TAB_LEN 't' +#define TCOBPP_CMDOPT_INC_PATH 'I' +#define TCOBPP_CMDOPT_VERBOSE 'v' +#define TCOBPP_CMDOPT_VERSION 'V' +#define TCOBPP_CMDOPT_HELP1 '?' +#define TCOBPP_CMDOPT_HELP 'h' +#define TCOBPP_CMDOPT_INC_DEBUG 'd' +#define TCOBPP_CMDOPT_DEBUG 'g' + +#define TCOBPP_TITLE "TinyCOBOL pre-processor" +#define TCOBPP_COPYWR "Copyright (C) 1999-2002 David Essex" + +extern char HTG_COPYDIR[]; + +typedef short bool; + +struct s_Env { + bool codeFormat; /* 1 is free , 0 is fixed */ + int debugFlag; + int IncDebugLines; + int errFlag; + int verboseFlag; + int tab2space; + char *progName; + char *ifname; + char *ofname; + char *lfname; +}; + +typedef struct s_Env Env; + +Env globalEnv; +Env *globalEnvPtr; + +/* command line options */ +static char option_list[] = { TCOBPP_CMDOPTION_LIST }; + +/* parser.tab.c */ +void yyerror(char *s); +int yyparse(void); + +/* scanner.c */ +int yylex(void); +int yywrap(void); +void yyrestart(FILE *input_file); +int lex_fgets(char *buf, int maxsize); + +extern void setup_scanner_state(); +extern char include_full_filename[]; +int find_copybook_file(char *fname, char *lname); +int find_copybook_file2 (char *fname, char *lname); +int find_filename_text (char *fname, char *fp, char *fs); +int find_filename_literal (char *fname, char *fp); +char *find_env_variable (char *ev); +char *find_token(char *p, const char *d, int sw); +void append_include_path(char *ap); + +int setOptions(Env*, int, char**); +void setDefaults(void); +void printVersion(void); +void printHelp(void); +void CleanUp(void); + +#endif diff --git a/cobpp/copybooks/TEST02.cpy b/cobpp/copybooks/TEST02.cpy new file mode 100644 index 0000000..f24e661 --- /dev/null +++ b/cobpp/copybooks/TEST02.cpy @@ -0,0 +1,16 @@ + +* 01 W01-COMPUTE-0 PIC 9(8) VALUE 30000. + 01 W01-COMPUTE PIC X(2) VALUE "**". + 01 W01-COMPUTE-0 PIC 9(8) VALUE 30000. + 01 W01-COMPUTE-1 PIC Z(5),Z(3). + 01 W01-COMPUTE-2 PIC *Z,ZZZ,ZZZ. + 01 W01-COMPUTE-3 PIC Z(3)Z(5),99. + 01 W01-COMPUTE-4 PIC 9(6)V99. + 01 W01-COMPUTE-5 PIC 9(5). + 01 W01-COMPUTE-6 PIC X(10) VALUE 'W01-1XXX'. + + COPY 'TEST02A.cpy' REPLACING + W01-COMPUTE-A0 BY W01-COMPUTE-A00 + ==9(8)== BY ==9(09)== . + + diff --git a/cobpp/copybooks/TEST02A.cpy b/cobpp/copybooks/TEST02A.cpy new file mode 100644 index 0000000..e903292 --- /dev/null +++ b/cobpp/copybooks/TEST02A.cpy @@ -0,0 +1,11 @@ + +* 01 W01-COMPUTE-A0 PIC 9(8) VALUE 30000. + 01 W01-COMPUTE-A PIC X(2) VALUE "**". + 01 W01-COMPUTE-A0 PIC 9(8) VALUE 30000. + 01 W01-COMPUTE-A1 PIC Z(5),Z(3). + 01 W01-COMPUTE-A2 PIC *Z,ZZZ,ZZZ. + 01 W01-COMPUTE-A3 PIC Z(3)Z(5),99. + 01 W01-COMPUTE-A4 PIC 9(5)V99. + + COPY 'TEST02B.cpy'. + diff --git a/cobpp/copybooks/TEST02B.cpy b/cobpp/copybooks/TEST02B.cpy new file mode 100644 index 0000000..ec84da2 --- /dev/null +++ b/cobpp/copybooks/TEST02B.cpy @@ -0,0 +1,11 @@ + +* 01 W01-COMPUTE-B0 PIC 9(8) VALUE 30000. + 01 W01-COMPUTE-B PIC X(2) VALUE "**". + 01 W01-COMPUTE-B0 PIC 9(8) VALUE 30000. + 01 W01-COMPUTE-B1 PIC Z(5),Z(3). + 01 W01-COMPUTE-B2 PIC *Z,ZZZ,ZZZ. + 01 W01-COMPUTE-B3 PIC Z(3)Z(5).99. + 01 W01-COMPUTE-B4 PIC 9(5)V99. + + + COPY 'TEST02C.cpy'. diff --git a/cobpp/copybooks/TEST02C.cpy b/cobpp/copybooks/TEST02C.cpy new file mode 100644 index 0000000..be869bd --- /dev/null +++ b/cobpp/copybooks/TEST02C.cpy @@ -0,0 +1,9 @@ + +* 01 W01-COMPUTE-C0 PIC 9(8) VALUE 30000. + 01 W01-COMPUTE-C PIC X(2) VALUE "**". + 01 W01-COMPUTE-C0 PIC 9(8) VALUE 30000. + 01 W01-COMPUTE-C1 PIC Z(5),Z(3). + 01 W01-COMPUTE-C2 PIC *Z,ZZZ,ZZZ. + 01 W01-COMPUTE-C3 PIC Z(3)Z(5).99. + 01 W01-COMPUTE-C4 PIC 9(5)V99. + diff --git a/cobpp/copybooks/TEST02E.cpy b/cobpp/copybooks/TEST02E.cpy new file mode 100644 index 0000000..02e20a3 --- /dev/null +++ b/cobpp/copybooks/TEST02E.cpy @@ -0,0 +1,9 @@ + +* 01 W01-COMPUTE-D0 PIC 9(8) VALUE 30000. + 01 W01-COMPUTE-D PIC X(2) VALUE "**". + 01 W01-COMPUTE-D0 PIC 9(8) VALUE 30000. + 01 W01-COMPUTE-D1 PIC Z(5),Z(3). + 01 W01-COMPUTE-D2 PIC *Z,ZZZ,ZZZ. + 01 W01-COMPUTE-D3 PIC Z(3)Z(5).99. + 01 W01-COMPUTE-D4 PIC 9(5)V99. + diff --git a/cobpp/copybooks/fTEST02.cpy b/cobpp/copybooks/fTEST02.cpy new file mode 100644 index 0000000..4383aef --- /dev/null +++ b/cobpp/copybooks/fTEST02.cpy @@ -0,0 +1,16 @@ +000010 fTEST02_ +000020* 01 W01-COMPUTE-0 PIC 9(8) VALUE 30000. fTEST02_ +000030 01 W01-COMPUTE PIC X(2) VALUE "**". fTEST02_ +000040 01 W01-COMPUTE-0 PIC 9(8) VALUE 30000. fTEST02_ +000050 01 W01-COMPUTE-1 PIC Z(5),Z(3). fTEST02_ +000060 01 W01-COMPUTE-2 PIC *Z,ZZZ,ZZZ. fTEST02_ +000070 01 W01-COMPUTE-3 PIC Z(3)Z(5),99. fTEST02_ +000080 01 W01-COMPUTE-4 PIC 9(6)V99. fTEST02_ +000090 01 W01-COMPUTE-5 PIC 9(5). fTEST02_ +000100 01 W01-COMPUTE-6 PIC X(10) VALUE 'W01-1XXX'. fTEST02_ +000110 fTEST02_ +000120 COPY 'fTEST02A.cpy' REPLACING fTEST02_ +000130 W01-COMPUTE-A0 BY W01-COMPUTE-A00 fTEST02_ +000140 ==9(8)== BY ==9(09)== . fTEST02_ +000150 fTEST02_ +000160 fTEST02_ diff --git a/cobpp/copybooks/fTEST02A.cpy b/cobpp/copybooks/fTEST02A.cpy new file mode 100644 index 0000000..006acee --- /dev/null +++ b/cobpp/copybooks/fTEST02A.cpy @@ -0,0 +1,11 @@ +000010 fTEST02A +000020* 01 W01-COMPUTE-A0 PIC 9(8) VALUE 30000. fTEST02A +000030 01 W01-COMPUTE-A PIC X(2) VALUE "**". fTEST02A +000040 01 W01-COMPUTE-A0 PIC 9(8) VALUE 30000. fTEST02A +000050 01 W01-COMPUTE-A1 PIC Z(5),Z(3). fTEST02A +000060 01 W01-COMPUTE-A2 PIC *Z,ZZZ,ZZZ. fTEST02A +000070 01 W01-COMPUTE-A3 PIC Z(3)Z(5),99. fTEST02A +000080 01 W01-COMPUTE-A4 PIC 9(5)V99. fTEST02A +000090 fTEST02A +000100 COPY 'fTEST02B.cpy'. fTEST02A +000110 fTEST02A diff --git a/cobpp/copybooks/fTEST02B.cpy b/cobpp/copybooks/fTEST02B.cpy new file mode 100644 index 0000000..5ec4e2f --- /dev/null +++ b/cobpp/copybooks/fTEST02B.cpy @@ -0,0 +1,11 @@ +000010 fTEST02B +000020* 01 W01-COMPUTE-B0 PIC 9(8) VALUE 30000. fTEST02B +000030 01 W01-COMPUTE-B PIC X(2) VALUE "**". fTEST02B +000040 01 W01-COMPUTE-B0 PIC 9(8) VALUE 30000. fTEST02B +000050 01 W01-COMPUTE-B1 PIC Z(5),Z(3). fTEST02B +000060 01 W01-COMPUTE-B2 PIC *Z,ZZZ,ZZZ. fTEST02B +000070 01 W01-COMPUTE-B3 PIC Z(3)Z(5).99. fTEST02B +000080 01 W01-COMPUTE-B4 PIC 9(5)V99. fTEST02B +000090 fTEST02B +000100 fTEST02B +000110 COPY 'fTEST02C.cpy'. fTEST02B diff --git a/cobpp/copybooks/fTEST02C.cpy b/cobpp/copybooks/fTEST02C.cpy new file mode 100644 index 0000000..fb15b78 --- /dev/null +++ b/cobpp/copybooks/fTEST02C.cpy @@ -0,0 +1,9 @@ +000010 fTEST02C +000020* 01 W01-COMPUTE-C0 PIC 9(8) VALUE 30000. fTEST02C +000030 01 W01-COMPUTE-C PIC X(2) VALUE "**". fTEST02C +000040 01 W01-COMPUTE-C0 PIC 9(8) VALUE 30000. fTEST02C +000050 01 W01-COMPUTE-C1 PIC Z(5),Z(3). fTEST02C +000060 01 W01-COMPUTE-C2 PIC *Z,ZZZ,ZZZ. fTEST02C +000070 01 W01-COMPUTE-C3 PIC Z(3)Z(5).99. fTEST02C +000080 01 W01-COMPUTE-C4 PIC 9(5)V99. fTEST02C +000090 fTEST02C diff --git a/cobpp/copybooks/fTEST02D.cpy b/cobpp/copybooks/fTEST02D.cpy new file mode 100644 index 0000000..5eeb87f --- /dev/null +++ b/cobpp/copybooks/fTEST02D.cpy @@ -0,0 +1,9 @@ +000010 fTEST02D +000020* 01 W01-COMPUTE-D0 PIC 9(8) VALUE 30000. fTEST02D +000030 01 W01-COMPUTE-D PIC X(2) VALUE "**". fTEST02D +000040 01 W01-COMPUTE-D0 PIC 9(8) VALUE 30000. fTEST02D +000050 01 W01-COMPUTE-D1 PIC Z(5),Z(3). fTEST02D +000060 01 W01-COMPUTE-D2 PIC *Z,ZZZ,ZZZ. fTEST02D +000070 01 W01-COMPUTE-D3 PIC Z(3)Z(5).99. fTEST02D +000080 01 W01-COMPUTE-D4 PIC 9(5)V99. fTEST02D +000090 fTEST02D diff --git a/cobpp/copybooks/fTEST02E.cpy b/cobpp/copybooks/fTEST02E.cpy new file mode 100644 index 0000000..dc99d59 --- /dev/null +++ b/cobpp/copybooks/fTEST02E.cpy @@ -0,0 +1,9 @@ +000010 fTEST02E +000020* 01 W01-COMPUTE-D0 PIC 9(8) VALUE 30000. fTEST02E +000030 01 W01-COMPUTE-D PIC X(2) VALUE "**". fTEST02E +000040 01 W01-COMPUTE-D0 PIC 9(8) VALUE 30000. fTEST02E +000050 01 W01-COMPUTE-D1 PIC Z(5),Z(3). fTEST02E +000060 01 W01-COMPUTE-D2 PIC *Z,ZZZ,ZZZ. fTEST02E +000070 01 W01-COMPUTE-D3 PIC Z(3)Z(5).99. fTEST02E +000080 01 W01-COMPUTE-D4 PIC 9(5)V99. fTEST02E +000090 fTEST02E diff --git a/cobpp/parser.y b/cobpp/parser.y new file mode 100644 index 0000000..fbce6df --- /dev/null +++ b/cobpp/parser.y @@ -0,0 +1,280 @@ +/* + Copyright (C) 1999-2004 David Essex + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this software; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + Boston, MA 02111-1307 USA + + + TinyCOBOL pre-processor parser + +*/ + +%{ + +#include +#include +#include +#include +#include + +#include "cobpp.h" + +//#define YYDEBUG 1 +/* #define DEBUG_COBPP_PARSER 1 */ + +extern unsigned long lineCount; +extern unsigned long columnCount; +extern int copy_state_sw; +extern int copy_start_sw; +extern int replace_state_sw; +extern int replace_start_sw; +extern int identifier_scan_sw; +//extern char *include_filename; +extern char *include_cpybook; +extern char *include_cpylib; + +extern int yylex(void); +extern char *pp_yytext; +extern void add_copy_replacement(char *, char *); +extern void add_replace_replacement(char *, char *); + +#ifdef DEBUG_COBPP_PARSER + +char erryybuf[1024*8]; + +void debug_yy_rtn (const char *s1, const char *s2, const char *s3, int sw); + +#define DEBUGYY_RTN_STR1(msg1) debug_yy_rtn (msg1, NULL, NULL, 1); +#define DEBUGYY_RTN_STR3(msg1, msg2) debug_yy_rtn (msg1, msg2, NULL, 3); +#define DEBUGYY_RTN_STR15(msg1, msg2, msg3) debug_yy_rtn (msg1, msg2, msg3, 15); + +#else + +#define DEBUGYY_RTN_STR1(msg1) +#define DEBUGYY_RTN_STR3(msg1, msg2) +#define DEBUGYY_RTN_STR15(msg1, msg2, msg3) + +#endif + +%} +%union { + char *str; /* string */ + int ival; /* int */ +} + +%token TOK_PSEUDO_TEXT TOK_IDENTIFIER TOK_LITERAL TOK_WORD +%token ERROR YYERROR_VERBOSE + +%token TOK_COPY TOK_PERIOD TOK_OFF TOK_BY TOK_OF TOK_IN +%token TOK_REPLACING TOK_REPLACE +%token TOK_MISC TOK_COMMA +%token TOK_SOURCE_COMPUTER TOK_WITH TOK_DEBUGGING TOK_MODE + +%type pseudo_text identifier literal word name library_name_opt replacing_text + + +%% + +root: statements + | /* nill */ + ; + +statements: statement + | statements statement + ; + +statement: TOK_SOURCE_COMPUTER TOK_PERIOD + { + DEBUGYY_RTN_STR1("yytrace: TOK_SOURCE_COMPUTER TOK_PERIOD\n") + } + identifier_debug_mode_opt + { + identifier_scan_sw--; + } + | TOK_COPY + { + DEBUGYY_RTN_STR1("yytrace: TOK_COPY\n") + } + copy_statement TOK_PERIOD + { + copy_state_sw--; + copy_start_sw++; + identifier_scan_sw--; + } + | TOK_REPLACE replace_statement TOK_PERIOD + { + replace_state_sw--; + replace_start_sw++; + identifier_scan_sw--; + } + | TOK_REPLACE TOK_OFF TOK_PERIOD + { + replace_state_sw--; + replace_start_sw--; + identifier_scan_sw--; + } + | TOK_MODE { } + | TOK_WITH { } + | error + { + globalEnvPtr->errFlag = 11; + return 11; + } + | ERROR + { + globalEnvPtr->errFlag = 12; + return 12; + } + | YYERROR_VERBOSE + { + globalEnvPtr->errFlag = 13; + return 13; + } + ; + +copy_statement: name library_name_opt + { + /*include_filename = $1; */ + include_cpybook = $1; + include_cpylib = $2; + DEBUGYY_RTN_STR15("yytrace: copy_statement: name=%s, lib=%s;\n", include_cpybook, include_cpylib) + } + TOK_REPLACING replacing_statement + | name library_name_opt + { + /*include_filename = $1;*/ + include_cpybook = $1; + include_cpylib = $2; + DEBUGYY_RTN_STR15("yytrace: copy_statement: name=%s, lib=%s;\n", include_cpybook, include_cpylib) + } + ; + +replacing_statement: replacing_statements + | replacing_statements replacing_statement + ; + +replacing_statements: replacing_text TOK_BY replacing_text comma_delimiter_opt + { + add_copy_replacement($1,$3); + DEBUGYY_RTN_STR15("yytrace: replacing_statements: \'%s\' BY \'%s\':\n", $1, $3) + } + ; + +replacing_text: pseudo_text { $$=$1; } + | identifier { $$=$1; } + | literal { $$=$1; } + | word { $$=$1; } + ; + +library_name_opt: of_in name { $$=$2; } + | { $$=NULL; } + ; + +replace_statement: replace_statements + | replace_statements replace_statement + ; + +replace_statements: pseudo_text TOK_BY pseudo_text comma_delimiter_opt + { + add_replace_replacement($1,$3); + } + ; + +name: literal { $$=$1; } + | identifier { $$=$1; } + ; + +pseudo_text: TOK_PSEUDO_TEXT { $$=$1; } + ; + +identifier: TOK_IDENTIFIER + { + DEBUGYY_RTN_STR3("yytrace: identifier: \'%s\'\n", $1) + $$=$1; + } + ; + +literal: TOK_LITERAL { $$=$1; } + ; + +word: TOK_WORD { $$=$1; } + ; + +of_in: TOK_OF + | TOK_IN + ; + +comma_delimiter_opt: TOK_COMMA + | /* no comma */ + ; + +identifier_debug_mode_opt: identifier debugging_mode_opt TOK_PERIOD + { + DEBUGYY_RTN_STR1("yytrace: identifier debugging_mode_opt TOK_PERIOD\n") + } + | /* empty */ + ; + +debugging_mode_opt: with_opt TOK_DEBUGGING + TOK_MODE + { + globalEnv.IncDebugLines = 1; + DEBUGYY_RTN_STR1("yytrace: with_opt TOK_DEBUGGING TOK_MODE \n") + } + | /* empty */ + ; + +with_opt: TOK_WITH + | /* no with */ + ; + +%% + + +void pp_yyerror(char *s) +{ + fprintf(stderr, "htcobolpp: yyerror (%lu, %lu): %s \'%s\'\n", lineCount, columnCount, s, pp_yytext); + globalEnvPtr->errFlag = 8; + + /* return 0; */ +} + +#ifdef DEBUG_COBPP_PARSER + +void debug_yy_rtn (const char *s1, const char *s2, const char *s3, int sw) +{ + switch (sw) + { + case 3: + sprintf(erryybuf, s1, s2); + break; + + case 5: + sprintf(erryybuf, s1, s3); + break; + + case 15: + sprintf(erryybuf, s1, s2, s3); + break; + + default: + sprintf(erryybuf, "%s", s1); + break; + } + + fprintf(stderr, "%s", erryybuf); +} + +#endif diff --git a/cobpp/scanner.l b/cobpp/scanner.l new file mode 100644 index 0000000..4322618 --- /dev/null +++ b/cobpp/scanner.l @@ -0,0 +1,2161 @@ +/* + * Copyright (C) 2002, 2001, 2000, 1999 David Essex + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA +*/ + +%option caseless +/*%option noyywrap*/ +%option never-interactive +%option yylineno + +%{ + +/*#undef yywrap*/ +#include +#include +#include + +#include "cobpp.h" +/* definitions from YACC */ +#include "parser.tab.h" + + +/* #define DEBUG_COBPP_SCANNER 1 */ + +#define MAX_COPY_DEPTH 25 + +#ifndef YY_READ_BUF_SIZE +#define YY_READ_BUF_SIZE 1024 +//#define YY_READ_BUF_SIZE 1024 * 8 +#endif + +#define MAX_COPY_DEPTH 25 +#define MAX_CPYNAME_LEN 65 +#define MAXLINEBUF YY_READ_BUF_SIZE +#define MAXBUF 1025 + +#define FIXFORM_6 6 +#define FIXFORM_7 7 +#define FIXFORM_65 65 +#define FIXFORM_71 71 +#define FIXFORM_72 72 +#define FIXFORM_73 73 +#define FIXFORM_81 81 + +#define lexchar input + +static struct fstack { + YY_BUFFER_STATE buffer; + char *filename; + int lineno; + struct copy_symbols *last_symbol; +} file_stack[MAX_COPY_DEPTH]; + +static struct copy_symbols { + struct copy_symbols *next; + char *value; + char *replacement; +} *copy_symbols=NULL; +struct copy_symbols *append_copy_symbols=NULL; +struct copy_symbols *append_replace_symbols=NULL; + +char *include_cpybook; +char *include_cpylib; + +char include_full_filename[MAXBUF]; +char toktext[MAXLINEBUF+1]; +char ibuf[MAXLINEBUF+1]; + +extern FILE *yylist; + +static int fsp=0; +int i,j; +unsigned int ret_token; +int copy_state_sw = 0; +int copy_start_sw = 0; +int replace_state_sw = 0; +int replace_start_sw = 0; +int identifier_scan_sw = 0; +int initial_state = 0; +int lf_add = 0; +int quote_sw = 0; +unsigned int columnCount = 0; +static unsigned int lineNumber = 0; +static unsigned int lineNumber_prev = 0; +unsigned int lineCount = 1; +int lineno = 1; +static int zzlineno = 0; +//static int lineno_prev = 1; +static int zzlineno_prev = 1; +static int result_prev = 0; +static int fsp_prev = 0; +char *filename=NULL; + +void tabExpand(char *s1, char *s2); +/*void lexError( char * msg ); */ +char *savename(const char *s, int x1, int x2); +void adjust_counters(void); + +#ifdef DEBUG_COBPP_SCANNER + +char errbuf[MAXLINEBUF+1]; + +void debug_rtn (const char *s, unsigned long Ccnt, unsigned long Lcnt, int Len, const char *s1); +void debug_rtn_sssd (const char *s1, const char *s2, const char *s3, int z, int sw); +void debug_rtn2 (const char *s1, const char *s2, int sw1, int sw2, int sw3, int sw); +void debug_rtn_dump (const char *s, const char *s1, int fsln, int fsi, int gln); + +#define DEBUG_RTN(msg) debug_rtn (msg, columnCount, lineCount, yyleng, pp_yytext); +#define DEBUG_RTN1(msg) debug_rtn (msg, columnCount, lineCount, yyleng, pp_yytext+1); +#define DEBUG_RTN_NL(msg) debug_rtn (msg, columnCount, lineCount, yyleng, ""); +#define DEBUG_RTN_DUMP(msg, msg1) debug_rtn_dump (msg, msg1, lineno, fsp, lineCount); +#define DEBUG_RTN_FSP(msg) \ + if (fsp > 0) { \ + debug_rtn_sssd (msg, NULL, NULL, fsp, 7); \ + } +#define DEBUG_RTN_FSP1(msg) debug_rtn_sssd (msg, NULL, NULL, fsp, 7); +#define DEBUG_RTN_STR1(msg) debug_rtn_sssd (msg, NULL, NULL, 0, 1); +#define DEBUG_RTN_STR2(msg1, msg2) debug_rtn_sssd (msg1, msg2, NULL, 0, 3); +#define DEBUG_RTN_STR3(msg1, msg2, msg3) debug_rtn_sssd (msg1, msg2, msg3, 0, 15); +#define DEBUG_RTN_RLIST() \ + for (cs=copy_symbols, i=0; cs != NULL; cs=cs->next, i++) { \ + fprintf(stderr, "lextrace: Replace list (%02d) :%s: by :%s:\n", \ + i, \ + cs->value, \ + cs->replacement); \ + } +#define DEBUG_RTN_RLIST2() \ + for (tmp = append_copy_symbols,i=0; tmp!=NULL; tmp=tmp->next, i++) { \ + fprintf(stderr, "lextrace: dump2 copy_symbols(%d) value=%s replacement=%s\n", \ + i, \ + tmp->value, \ + tmp->replacement \ + ); \ + } +#define DEBUG_RTN_RLIST3() \ + for (tmp = file_stack[fsp].last_symbol, i=0; tmp!=NULL; tmp=tmp->next, i++) { \ + fprintf(stderr, "lextrace: dump3(%d) level=%d, value=%s, replacement=%s\n", \ + i, \ + fsp, \ + tmp->value, \ + tmp->replacement \ + ); \ + } +#define DEBUG_RTN_RLIST4() \ + for (tmp = append_copy_symbols, i=0; tmp!=NULL; tmp=tmp->next, i++) { \ + fprintf(stderr, "lextrace: add_copy_replacement dump4(%d): value=%s replacement=%s\n", \ + i, \ + tmp->value, \ + tmp->replacement \ + ); \ + } +#define DEBUG_RTN_RLIST5() \ + for (tmp = append_copy_symbols, i=0; tmp!=NULL; tmp=tmp->next, i++) { \ + fprintf(stderr, "lextrace: add_replace_replacement dump4(%d): value=%s replacement=%s\n", \ + i, \ + tmp->value, \ + tmp->replacement \ + ); \ + } +#define DEBUG_RTN_DLIST(msg1, msg2, msg3) debug_rtn_sssd (msg1, msg2, msg3, fsp, 106); +#define DEBUG_RTN_FIXLEN(msg1, zz, msg2) debug_rtn_sssd (msg1, msg2, NULL, zz, 26); + + +#define DEBUG_RTN_LEX1() \ + for (tmp = copy_symbols, i=0; tmp!=NULL; tmp=tmp->next, i++) { \ + fprintf(stderr, "lextrace: {blank}*{eol} copy_symbols(%d) value=%s replacement=%s\n", \ + i, \ + tmp->value, \ + tmp->replacement \ + ); \ + } +#define DEBUG_RTN_LEX2() \ + if (copy_state_sw != 0) { \ + fprintf(stderr, \ + "lextrace: TOK_PSEUDO_TEXT :%s: copy_state_sw=%d\n", \ + pp_yytext, copy_state_sw); \ + } \ + else{ \ + fprintf(stderr, \ + "lextrace: TOK_PSEUDO_TEXT :%s: replace_state_sw=%d\n", \ + pp_yytext, replace_state_sw); \ + } + +#define DEBUG_RTN_LEX3(msg1, msg2) debug_rtn2 (msg1, msg2, 0, 0, 0, 3); +#define DEBUG_RTN_LEX15(msg1, msg2, i1) debug_rtn2 (msg1, msg2, i1, 0, 0, 15); +#define DEBUG_RTN_LEX35(msg1, i1, i2) debug_rtn2 (msg1, NULL, i1, i2, 0, 35); +#define DEBUG_RTN_LEX105(msg1, msg2, i1, i2) debug_rtn2 (msg1, msg2, i1, i2, 0, 105); +#define DEBUG_RTN_LEX385(msg1, i1, i2, i3) debug_rtn2 (msg1, NULL, i1, i2, i3, 385); + +#else + +#define DEBUG_RTN(msg) +#define DEBUG_RTN0(msg) +#define DEBUG_RTN1(msg) +#define DEBUG_RTN_NL(msg) +#define DEBUG_RTN_DUMP(msg, msg1) +#define DEBUG_RTN_FSP(msg) +#define DEBUG_RTN_FSP1(msg) +#define DEBUG_RTN_STR1(msg) +#define DEBUG_RTN_STR2(msg1, msg2) +#define DEBUG_RTN_STR3(msg1, msg2, msg3) +#define DEBUG_RTN_RLIST() +#define DEBUG_RTN_DLIST(msg1, msg2, msg3) +#define DEBUG_RTN_RLIST2() +#define DEBUG_RTN_RLIST3() +#define DEBUG_RTN_RLIST4() +#define DEBUG_RTN_RLIST5() +#define DEBUG_RTN_FIXLEN(msg1, zz, msg2) +#define DEBUG_RTN_LEX1() +#define DEBUG_RTN_LEX2() +#define DEBUG_RTN_LEX3(msg1, msg2) +#define DEBUG_RTN_LEX15(msg1, msg2, i1) +#define DEBUG_RTN_LEX35(msg1, i1, i2) +#define DEBUG_RTN_LEX105(msg1, msg2, i1, i2) +#define DEBUG_RTN_LEX385(msg1, i1, i2, i3) + +#endif + +void setup_scanner_state(void); +void set_scanner_state(int i0, int i1); + +void copy_switch(void); +/* void copy_do_replacements(char *buffer); */ +void do_copy_replacements(char *buffer); +void do_replace_replacements(char *buffer); +int lex_fgets(char *buf, int maxsize); + + +#define YY_INPUT(buf,result,max_size) \ + { \ + result = lex_fgets( buf, max_size ); \ + } + +%} + +cr [\r] +lf [\n] +eol {lf} +tab [\t] +blank [ ] +Quote ['"] +NoQuoteEol [^'"\n] +NoSQuoteEol [^'\n] +NoDQuoteEol [^"\n] +NoDQuote [^"] +DQuote \" +SQuote \' +ws [ \n] +Period \. +Comma [,] +Alpha [A-Za-z] +AlphaNum [A-Za-z0-9\-] +Numeric [0-9] +AnyNoDQuote [^"\t\n] +AnyNoSQuote [^'\t\n] +EqSign [=] +EqSign2 "==" +NoEqSign [^\n=] +NoEqSign2 [^\n=]/[^\n=] +invalid7 [^*/D$ \n] + +%x FREE FIXED_7 FIXED_AB COMMENT DQ_LITERAL_FIXED DQ_LITERAL_FREE SQ_LITERAL_FIXED SQ_LITERAL_FREE PSEUDO_TEXT COMMENT_ENTRY + +%% + +%{ + struct copy_symbols *tmp=NULL; +%} + + +{ + + "*>" | + ^"$" | + ^"/" | + ^"*" { + + DEBUG_RTN ("^* ^/ ^$ *>") + + columnCount = columnCount + yyleng; + BEGIN(COMMENT); + } +} + +{ + + ^"D " { + + DEBUG_RTN ("D ") + + columnCount = columnCount + yyleng; + if (globalEnvPtr->IncDebugLines == 0) { + BEGIN(COMMENT); + } + else { + fprintf(yyout, " "); + } + } + ^"-" { + + DEBUG_RTN ("-") + + columnCount = columnCount + yyleng; + fprintf(yyout, " "); + } +} + +{ + + COPY { + + DEBUG_RTN ("COPY") + + columnCount = columnCount + yyleng; + copy_state_sw++; + identifier_scan_sw++; + + DEBUG_RTN_LEX35("lextrace: TOK_COPY=%d, copy_state_sw=%d;\n", TOK_COPY, copy_state_sw) + + return TOK_COPY; + } + + OF { + + DEBUG_RTN ("OF") + + columnCount = columnCount + yyleng; + + DEBUG_RTN_LEX35("lextrace: TOK_OF=%d, copy_state_sw=%d;\n", TOK_OF, copy_state_sw) + + if (copy_state_sw != 0) { + return TOK_OF; + } + else { + ECHO; + } + } + + OFF { + + DEBUG_RTN ("OFF") + + columnCount = columnCount + yyleng; + + DEBUG_RTN_LEX35("lextrace: TOK_OFF=%d, replace_state_sw=%d;\n", TOK_OFF, replace_state_sw) + + if (replace_state_sw != 0) { + return TOK_OFF; + } + else { + ECHO; + } + } + + IN { + + DEBUG_RTN ("IN") + + columnCount = columnCount + yyleng; + + DEBUG_RTN_LEX35("lextrace: TOK_IN=%d, copy_state_sw=%d;\n", TOK_IN, copy_state_sw) + + if (copy_state_sw != 0) { + return TOK_IN; + } + else { + ECHO; + } + } + + BY { + + DEBUG_RTN ("BY") + + columnCount = columnCount + yyleng; + + DEBUG_RTN_LEX385("lextrace: TOK_BY=%d, copy_state_sw=%d, replace_state_sw=%d;\n" , TOK_BY, copy_state_sw, replace_state_sw) + + if ((copy_state_sw != 0) || (replace_state_sw != 0)) { + return TOK_BY; + } + else { + ECHO; + } + } + + REPLACE { + + DEBUG_RTN ("REPLACE") + + columnCount = columnCount + yyleng; + replace_state_sw++; + identifier_scan_sw++; + + DEBUG_RTN_LEX35("lextrace: TOK_REPLACE=%d, replace_state_sw=%d;\n", TOK_REPLACE, replace_state_sw) + + return TOK_REPLACE; + } + + REPLACING { + + DEBUG_RTN ("REPLACING") + + columnCount = columnCount + yyleng; + + DEBUG_RTN_LEX35("lextrace: TOK_REPLACING=%d, copy_state_sw=%d;\n", TOK_REPLACING, copy_state_sw) + + if (copy_state_sw != 0) { + return TOK_REPLACING; + } + else { + ECHO; + } + } + + SOURCE\-COMPUTER { + + DEBUG_RTN ("SOURCE-COMPUTER") + + identifier_scan_sw++; + columnCount = columnCount + yyleng; + ECHO; + return TOK_SOURCE_COMPUTER; + } + + ^{blank}{0,4}AUTHOR{blank}*{Period} { + + DEBUG_RTN ("^{blank}{0,4}AUTHOR{blank}*{Period}") + + columnCount = columnCount + yyleng; + /* ECHO; */ + BEGIN(COMMENT_ENTRY); + } + + {blank}{0,4}INSTALLATION{blank}*{Period} { + + DEBUG_RTN ("^{blank}{0,4}INSTALLATION{blank}*{Period}") + + columnCount = columnCount + yyleng; + /* ECHO; */ + BEGIN(COMMENT_ENTRY); + } + + {blank}{0,4}DATE\-WRITTEN{blank}*{Period} { + + DEBUG_RTN ("^{blank}{0,4}DATE-WRITTEN{blank}*{Period}") + + columnCount = columnCount + yyleng; + /* ECHO; */ + BEGIN(COMMENT_ENTRY); + } + + {blank}{0,4}DATE\-COMPILED{blank}*{Period} { + + DEBUG_RTN ("^{blank}{0,4}DATE-COMPILED{blank}*{Period}") + + columnCount = columnCount + yyleng; + /* ECHO; */ + BEGIN(COMMENT_ENTRY); + } + + {blank}{0,4}SECURITY{blank}*{Period} { + + DEBUG_RTN ("^{blank}{0,4}SECURITY{blank}*{Period}") + + columnCount = columnCount + yyleng; + /* ECHO; */ + BEGIN(COMMENT_ENTRY); + } + + WITH { + + DEBUG_RTN ("WITH") + + columnCount = columnCount + yyleng; + ECHO; + return TOK_WITH; + } + + DEBUGGING { + + DEBUG_RTN ("DEBUGGING") + + columnCount = columnCount + yyleng; + ECHO; + return TOK_DEBUGGING; + } + + MODE { + + DEBUG_RTN ("MODE") + + columnCount = columnCount + yyleng; + ECHO; + return TOK_MODE; + } + + {blank}+ { + + DEBUG_RTN ("{blank}+") + + columnCount = columnCount + yyleng; + ECHO; + } + + {DQuote} { + + DEBUG_RTN ("{DQuote}") + + columnCount++; + quote_sw = 2; + if (copy_state_sw != 0) { + strncpy(toktext, pp_yytext, MAXBUF); + } + else { + ECHO; + } + set_scanner_state(DQ_LITERAL_FIXED, DQ_LITERAL_FREE); + } + + {SQuote} { + + DEBUG_RTN ("{SQuote}") + + columnCount++; + quote_sw = 1; + if (copy_state_sw != 0) { + strncpy(toktext, pp_yytext, MAXBUF); + } + else { + ECHO; + } + set_scanner_state(SQ_LITERAL_FIXED, SQ_LITERAL_FREE); + } + + {Numeric}{1,18} { + + DEBUG_RTN ("{Numeric}") + + columnCount = columnCount + yyleng; + if (copy_state_sw != 0) { + strncpy(toktext, pp_yytext, MAXBUF); + pp_yylval.str = savename(toktext, 0, 0); + return(TOK_LITERAL); + } + else { + ECHO; + } + + } + + {EqSign2} { + + DEBUG_RTN ("{EqSign2}") + + columnCount = columnCount + yyleng; + if ((copy_state_sw != 0) || (replace_state_sw != 0)) { + + DEBUG_RTN_LEX2() + + strncpy(toktext, pp_yytext, MAXBUF); + /*pp_yylval.str = savename(toktext, 2, 2);*/ + /*return(TOK_PSEUDO_TEXT);*/ + BEGIN(PSEUDO_TEXT); + } + else { + ECHO; + } + } + + {Period}/[ \n] { + + DEBUG_RTN ("{Period}") + + columnCount++; + /*if ((copy_state_sw != 0) || (replace_state_sw != 0) || (identifier_scan_sw != 0)) {*/ + if ((copy_state_sw != 0) || (replace_state_sw != 0)) { + return(TOK_PERIOD); + } + else { + ECHO; + if (identifier_scan_sw != 0) { + return(TOK_PERIOD); + } + } + } + + ({AlphaNum}*{Alpha}+{AlphaNum}*){1,30} { + + DEBUG_RTN ("({AlphaNum}*{Alpha}+{AlphaNum}*){1,30}") + + columnCount = columnCount + yyleng; + + if (identifier_scan_sw != 0) { + + DEBUG_RTN_LEX15("lextrace: TOK_IDENTIFIER :%s: identifier_scan_sw=%d\n", pp_yytext, identifier_scan_sw) + + + strncpy(toktext, pp_yytext, MAXBUF); + pp_yylval.str = savename(toktext, 0, 0); + } + + if ((copy_state_sw != 0) || (replace_state_sw != 0)) { + return(TOK_IDENTIFIER); + } + else { + ECHO; + if (identifier_scan_sw != 0) { + return(TOK_IDENTIFIER); + } + } + + } + + {Comma} { + + DEBUG_RTN ("COMMA") + + columnCount = columnCount + yyleng; + + DEBUG_RTN_LEX35("lextrace: TOK_IN=%d, copy_state_sw=%d;\n", TOK_COMMA, copy_state_sw) + + if (copy_state_sw != 0) { + return TOK_COMMA; + } + else { + ECHO; + } + } + + "*>" { + + DEBUG_RTN ("*>") + + columnCount = columnCount + yyleng; + /* comment line remove */ + BEGIN(COMMENT); + } + + . { + + DEBUG_RTN (".") + + columnCount++; + if ((copy_state_sw != 0) || (replace_state_sw != 0)) { + return(0); + } + else { + ECHO; + } + } + +} + +{ + + "*>" | + ^"*" { + + DEBUG_RTN ("^* *>") + + columnCount = columnCount + yyleng; + BEGIN(COMMENT); + } + + {blank}{0,4}REMARKS{blank}*{Period} { + + DEBUG_RTN ("{blank}{0,4}REMARKS{blank}*{Period}") + + columnCount = columnCount + yyleng; + ECHO; + set_scanner_state(FIXED_AB, FREE); + } + + {blank}{0,4}ENVIRONMENT{blank}+DIVISION{blank}*{Period} { + + DEBUG_RTN ("{blank}{0,4}ENVIRONMENT{blank}+DIVISION{blank}*{Period}") + + columnCount = columnCount + yyleng; + ECHO; + set_scanner_state(FIXED_AB, FREE); + } + + {blank}{0,4}CONFIGURATION{blank}+SECTION{blank}*{Period} { + + DEBUG_RTN ("") + + columnCount = columnCount + yyleng; + ECHO; + set_scanner_state(FIXED_AB, FREE); + } + + {blank}{0,4}INPUT\-OUTPUT{blank}+SECTION{blank}*{Period} { + + DEBUG_RTN ("{blank}{0,4}INPUT-OUTPUT{blank}+SECTION{blank}*{Period}") + + columnCount = columnCount + yyleng; + ECHO; + set_scanner_state(FIXED_AB, FREE); + } + + {blank}{0,4}DATA{blank}+DIVISION{blank}*{Period} { + + DEBUG_RTN ("{blank}{0,4}DATA{blank}+DIVISION{blank}*{Period}") + + columnCount = columnCount + yyleng; + ECHO; + set_scanner_state(FIXED_AB, FREE); + } + + {blank}{0,4}FILE{blank}+SECTION{blank}*{Period} { + + DEBUG_RTN ("{blank}{0,4}FILE{blank}+SECTION{blank}*{Period}") + + columnCount = columnCount + yyleng; + ECHO; + set_scanner_state(FIXED_AB, FREE); + } + + {blank}{0,4}WORKING\-STORAGE{blank}+SECTION{blank}*{Period} { + + DEBUG_RTN ("{blank}{0,4}WORKING-STORAGE{blank}+SECTION{blank}*{Period}") + + columnCount = columnCount + yyleng; + ECHO; + set_scanner_state(FIXED_AB, FREE); + } + + {blank}{0,4}LINKAGE{blank}+SECTION{blank}*{Period} { + + DEBUG_RTN ("{blank}{0,4}LINKAGE{blank}+SECTION{blank}*{Period}") + + columnCount = columnCount + yyleng; + ECHO; + set_scanner_state(FIXED_AB, FREE); + } + + {blank}{0,4}COMMUNICATION{blank}+SECTION{blank}*{Period} { + + DEBUG_RTN ("{blank}{0,4}COMMUNICATION{blank}+SECTION{blank}*{Period}") + + columnCount = columnCount + yyleng; + ECHO; + set_scanner_state(FIXED_AB, FREE); + } + + {blank}{0,4}REPORT{blank}+SECTION{blank}*{Period} { + + DEBUG_RTN ("{blank}{0,4}REPORT{blank}+SECTION{blank}*{Period}") + + columnCount = columnCount + yyleng; + ECHO; + set_scanner_state(FIXED_AB, FREE); + } + + {blank}{0,4}SCREEN{blank}+SECTION{blank}*{Period} { + + DEBUG_RTN ("{blank}{0,4}SCREEN{blank}+SECTION{blank}*{Period}") + + columnCount = columnCount + yyleng; + ECHO; + set_scanner_state(FIXED_AB, FREE); + } + + {blank}{0,4}PROCEDURE{blank}+DIVISION{blank}*{Period} { + + DEBUG_RTN ("{blank}{0,4}PROCEDURE{blank}+DIVISION{blank}*{Period}") + + columnCount = columnCount + yyleng; + ECHO; + set_scanner_state(FIXED_AB, FREE); + } + + {eol} { + + DEBUG_RTN_NL ("{eol}") + + lineno++; + lineCount++; + columnCount=7; + ECHO; + } + + . { + + DEBUG_RTN (".") + + columnCount++; + } +} + +{blank}*{eol} { + + DEBUG_RTN_NL ("{blank}*{eol}") + + lineno++; + lineCount++; + columnCount=7; + /*ECHO; */ + fprintf(yyout, "\n"); + + DEBUG_RTN_LEX385("debug FIXED_AB - {blank}*{eol}(%lu,%lu): lf_add=%d,\n", lineCount, columnCount, lf_add) + + for (i=0; i{blank}*{eol} { + + DEBUG_RTN_NL ("{blank}*{eol}") + + lineno++; + lineCount++; + columnCount=0; + /*ECHO; */ + fprintf(yyout, "\n"); + + for (i=0; i{ + + "D" { + + DEBUG_RTN ("D") + + columnCount++; + if (globalEnvPtr->IncDebugLines == 0) { + BEGIN(COMMENT); + } + else { + fprintf(yyout, " "); + BEGIN(FIXED_AB); + } + } + + {blank} { + + DEBUG_RTN ("{blank}") + + columnCount = columnCount + yyleng; + ECHO; + BEGIN(FIXED_AB); + } + + {invalid7} { + + DEBUG_RTN ("{invalid7}") + + globalEnvPtr->errFlag++; + fprintf(stderr, + "%s:%d:(3) Invaild character (%c) in column %d.\n", + globalEnvPtr->ifname, + lineCount, + pp_yytext[0], + columnCount + ); + + columnCount = columnCount + yyleng; + BEGIN(COMMENT); + } + + {eol} { + + DEBUG_RTN_NL ("{eol}") + + lineno++; + lineCount++; + columnCount=7; + ECHO; + + DEBUG_RTN_LEX385("debug FIXED_7 - {eol}(%lu,%lu): lf_add=%d,\n", lineCount, columnCount, lf_add) + + for (i=0; i{ + + [^\n=]+ { + + DEBUG_RTN ("[^=]+") + + columnCount = columnCount + yyleng; + + DEBUG_RTN_LEX2() + + strncat(toktext, pp_yytext, MAXBUF); + } + + {EqSign}/[^\n=]+ { + + DEBUG_RTN ("{EqSign}/[^=]+") + + columnCount = columnCount + yyleng; + + DEBUG_RTN_LEX2() + + strncat(toktext, pp_yytext, MAXBUF); + } + + {EqSign2} { + + DEBUG_RTN ("{EqSign2}") + + columnCount = columnCount + yyleng; + + DEBUG_RTN_LEX2() + + strncat(toktext, pp_yytext, MAXBUF); + pp_yylval.str = savename(toktext, 2, 2); + set_scanner_state(FIXED_AB, FREE); + return(TOK_PSEUDO_TEXT); + } + + {eol}"-"{blank}{4,65}{DQuote} { + + DEBUG_RTN1 ("{eol}-{blank}{4,65}{DQuote}") + + /* Continuation line remove */ + /* lineno_prev = lineno; */ + /* yylineno_prev = lineNumber; */ + lineno++; + lineCount++; + columnCount = yyleng - 1; + lf_add++; + /*BEGIN(DQ_LITERAL_FIXED); */ + } + +} + +{ + + {DQuote}{blank}*{eol}?{blank}*"&"{blank}*{eol}?{blank}*{DQuote} { + + DEBUG_RTN ("{DQuote}{blank}*{eol}?{blank}*&{blank}*{eol}?{blank}*{DQuote}") + + adjust_counters(); + } + + {eol}"-"{blank}{4,65}{DQuote} { + + DEBUG_RTN1 ("{eol}-{blank}{4,65}{DQuote}") + + /* Continuation line remove */ + /* lineno_prev = lineno; */ + /* yylineno_prev = lineNumber; */ + lineno++; + lineCount++; + columnCount = yyleng - 1; + lf_add++; + /*BEGIN(DQ_LITERAL_FIXED); */ + } + + \"/[^"] { + + DEBUG_RTN ("{DQuote}/{NoDQuote}") + + columnCount = columnCount + yyleng; + + DEBUG_RTN_LEX105("lextrace: DQuote :%s: copy_state_sw=%d, quote_sw=%d\n", pp_yytext, copy_state_sw, quote_sw) + + if (copy_state_sw != 0) { + strcat(toktext, pp_yytext); + /* pp_yylval.str = savename(toktext, 1, 1); */ + pp_yylval.str = savename(toktext, 0, 0); + quote_sw = 0; + set_scanner_state(FIXED_AB, FREE); + return(TOK_LITERAL); + } + else { + ECHO; + quote_sw = 0; + set_scanner_state(FIXED_AB, FREE); + } + } + + {DQuote}{2} { + + DEBUG_RTN ("{DQuote}{2}") + + columnCount = columnCount + yyleng; + + if (copy_state_sw != 0) { + strcat(toktext, pp_yytext); + } + else { + ECHO; + } + + } + + {DQuote} { + + DEBUG_RTN ("{DQuote}") + + columnCount = columnCount + yyleng; + + DEBUG_RTN_LEX105("lextrace: SQuote :%s: copy_state_sw=%d, quote_sw=%d\n", pp_yytext, copy_state_sw, quote_sw) + + if (copy_state_sw != 0) { + strcat(toktext, pp_yytext); + if (quote_sw == 1) { + /* pp_yylval.str = savename(toktext, 1, 1); */ + pp_yylval.str = savename(toktext, 0, 0); + quote_sw = 0; + set_scanner_state(FIXED_AB, FREE); + return(TOK_LITERAL); + } + } + else { + ECHO; + if (quote_sw == 1) { + quote_sw = 0; + set_scanner_state(FIXED_AB, FREE); + } + } + } + + {NoDQuoteEol}+ { + + DEBUG_RTN ("{NoQuoteEol}+") + + /*columnCount++;*/ + columnCount = columnCount + yyleng; + + if (copy_state_sw != 0) { + strcat(toktext, pp_yytext); + } + else { + ECHO; + } + + } + + {eol} { + + DEBUG_RTN ("{eol}") + + columnCount=0; + lineCount++; + lineno++; + + if (copy_state_sw != 0) { + + DEBUG_RTN_LEX15("lextrace: TOK_LITERAL :%s: copy_state_sw=%d\n", pp_yytext, copy_state_sw) + + } + else { + set_scanner_state(FIXED_7, FREE); + } + } + +} + +{ + + {SQuote}{blank}*{eol}?{blank}*"&"{blank}*{eol}?{blank}*{SQuote} { + + DEBUG_RTN ("{SQuote}{blank}*{eol}?{blank}*&{blank}*{eol}?{blank}*{SQuote}") + + adjust_counters(); + } + + {eol}"-"{blank}{4,65}{SQuote} { + + DEBUG_RTN1 ("{eol}-{blank}{4,65}{SQuote}") + + /* Continuation line remove */ + /* lineno_prev = lineno; */ + /* yylineno_prev = lineNumber; */ + lineno++; + lineCount++; + columnCount = yyleng - 1; + lf_add++; + /* BEGIN(SQ_LITERAL_FIXED); */ + } + + \'/[^'] { + + DEBUG_RTN ("{SQuote}/{NoSQuote}") + + columnCount = columnCount + yyleng; + + DEBUG_RTN_LEX105("lextrace: SQuote :%s: copy_state_sw=%d, quote_sw=%d\n", pp_yytext, copy_state_sw, quote_sw) + + if (copy_state_sw != 0) { + strcat(toktext, pp_yytext); + /* pp_yylval.str = savename(toktext, 1, 1); */ + pp_yylval.str = savename(toktext, 0, 0); + quote_sw = 0; + set_scanner_state(FIXED_AB, FREE); + return(TOK_LITERAL); + } + else { + ECHO; + quote_sw = 0; + set_scanner_state(FIXED_AB, FREE); + } + } + + {SQuote}{2} { + + DEBUG_RTN ("{SQuote}{2}") + + columnCount = columnCount + yyleng; + + if (copy_state_sw != 0) { + strcat(toktext, pp_yytext); + } + else { + ECHO; + } + + } + + {SQuote} { + + DEBUG_RTN ("{SQuote}") + + columnCount = columnCount + yyleng; + + DEBUG_RTN_LEX105("lextrace: SQuote :%s: copy_state_sw=%d, quote_sw=%d\n", pp_yytext, copy_state_sw, quote_sw) + + if (copy_state_sw != 0) { + strcat(toktext, pp_yytext); + if (quote_sw == 1) { + /* pp_yylval.str = savename(toktext, 1, 1); */ + pp_yylval.str = savename(toktext, 0, 0); + quote_sw = 0; + set_scanner_state(FIXED_AB, FREE); + return(TOK_LITERAL); + } + } + else { + ECHO; + if (quote_sw == 1) { + quote_sw = 0; + set_scanner_state(FIXED_AB, FREE); + } + } + } + + {NoSQuoteEol}+ { + + DEBUG_RTN ("{NoSQuoteEol}+") + + columnCount = columnCount + yyleng; + + if (copy_state_sw != 0) { + strcat(toktext, pp_yytext); + } + else { + ECHO; + } + + } + + {eol} { + + DEBUG_RTN ("{eol}") + + columnCount=0; + lineCount++; + lineno++; + + if (copy_state_sw != 0) { + + DEBUG_RTN_LEX15("lextrace: TOK_LITERAL :%s: copy_state_sw=%d\n", pp_yytext, copy_state_sw) + + } + else { + set_scanner_state(FIXED_7, FREE); + } + } + +} + +{ + + .+ { + + DEBUG_RTN (".+") + + columnCount = columnCount + yyleng; + } + + {eol} { + + DEBUG_RTN_NL ("COMMENT - {eol} ") + + lineno++; + lineCount++; + columnCount=0; + ECHO; + set_scanner_state(FIXED_7, FREE); + } +} + +<> { + struct copy_symbols *cs=NULL,*cs1=NULL; + if (fsp == 0) { + + DEBUG_RTN_FSP1("lextrace: receiving <> for fsp = %d:\n") + + yyterminate(); + } + else { + +// tmp = lineno; +// yy_delete_buffer( YY_CURRENT_BUFFER ); +// yy_switch_to_buffer( file_stack[fsp].buffer ); +// lineno = file_stack[ fsp ].line; + /* free all replacements in this dead context */ + + DEBUG_RTN_FSP1("lextrace: begin delete fsp = %d:\n") + + cs1 = file_stack[fsp].last_symbol; + cs = copy_symbols; + if (cs == cs1) + copy_symbols = NULL; + while (cs) { + if (cs->next == cs1) + break; + cs = cs->next; + } + if (cs) + cs->next = NULL; + if (cs1) { + while (cs1) { + + DEBUG_RTN_DLIST("lextrace: delete fsp=%d, value=%s, replacement=%s:\n", cs1->value, cs1->replacement) + + if (cs1->value) free( cs1->value ); + if (cs1->replacement) free( cs1->replacement ); + cs = cs1->next; + cs1->next = NULL; + free( cs1 ); + cs1 = cs; + cs = NULL; + } + } + yy_delete_buffer( YY_CURRENT_BUFFER ); + fsp--; + yy_switch_to_buffer( file_stack[fsp].buffer ); + if (filename) { free (filename); filename=NULL;} + filename = file_stack[fsp].filename; + lineno = file_stack[fsp].lineno; + zzlineno = file_stack[fsp].lineno; + fprintf (yyout, "# %d \"%s\"\n", lineno, filename); + + } +} + +%% + + +/* Expand tabs to spaces */ +void tabExpand(char *s1, char *s2) { + int i, j, k, y, len, sw=0; + char delm = '0'; + + len = strlen(s2); + + for (i=0, j=0; itab2space * ((j/globalEnvPtr->tab2space) + 1)) - j; + y = j + k; + for (j=j; jifname + ,lineCount + ,msg + ); + globalEnvPtr->errFlag++; + return; +} +*/ + +int yywrap(void) { + +// yywrap will be called to open files from the List of Files in the +// Global Env struct. +// + return 1; +} + + +char *savename(const char *s, int x1, int x2) { + char *ap, *s1; + int len; + + ap = (char *) malloc( strlen(s) + 1 ); + + if (ap != NULL) { + strncpy(ap, s + x1, strlen(s) + 1); + len = strlen(ap); + s1 = ap + len - x2; + *s1 = '\0'; + s1++; + *s1 = '\0'; + + DEBUG_RTN_LEX3("lextrace: savename :%s:\n", ap) + + } + return(ap); +} + +int lex_fgets(char *buf, int maxsize) { + int result, len; + char *s; +// char ibuf[MAXLINEBUF]; +// char ibuf[YY_READ_BUF_SIZE]; + + if ((yylist != NULL) && (lineNumber > 0) && (result_prev != YY_NULL)) { + fprintf(yylist, "%6d %6d [%02d]: %s", lineNumber_prev, zzlineno_prev, fsp_prev, ibuf); + len = strlen(ibuf); +// if (len > 0) { +// fprintf(yylist, "%6d %6d : %s", yylineno_prev, lineno_prev, ibuf); +// if (copy_state_sw != 0) { +// // fprintf(yylist, "%6d %6d * %s", lineCount - 1, lineno_prev, ibuf); +// fprintf(yylist, "%6d %6d * %s", yylineno_prev, lineno_prev, ibuf); +// } +// else { +// fprintf(yylist, "%6d %6d : %s", yylineno_prev, lineno_prev, ibuf); +// // fprintf(yylist, "%6d %6d : %s", lineCount - 1, lineno_prev, ibuf); +// // fprintf(yylist, "%06d : %s", lineNumber - 1, ibuf); +// } +// } + } + + s = fgets(buf, maxsize, yyin); +// lineNumber++; + + if (s == NULL) { +// strcpy(ibuf, "\n"); + strcpy(ibuf, ""); + /* lineno_prev = lineno; */ + zzlineno_prev = zzlineno; + lineNumber_prev = lineNumber; + fsp_prev = fsp; + result_prev = YY_NULL; + result = YY_NULL; + return result; + } + + result = strlen(s); + result_prev = result; + lineNumber++; + zzlineno++; + +// result = (s==NULL) ? YY_NULL: strlen(s); + +// if (yylist != NULL) { +// fprintf(yylist, "%6d %s", lineCount, ibuf); +// } + + /* Remove tabs from line */ + strcpy(ibuf, buf); + tabExpand(buf, ibuf); + + s = buf; +// result = (s==NULL) ? YY_NULL: strlen(s); + result = strlen(s); + +// if (globalEnvPtr->debugFlag != 0 ) { +// fprintf(stderr, "lextrace: result[%d]=%d;\n", lineCount, result); +// } + +// This code will remove the from buffer, as found in DOS format files +// + if (result > 1) { +// if (globalEnvPtr->debugFlag != 0 ) { +// fprintf(stderr,"lextrace: buf(%d) before: |%s|\n", strlen(buf), buf); +// } + if (buf[result - 2] == CHR_CR) { + buf[result - 2] = CHR_LF; + buf[result - 1] = CHR_EOS; +// result = (s==NULL) ? YY_NULL: strlen(s); + result = strlen(s); + } +// if (globalEnvPtr->debugFlag != 0 ) { +// fprintf(stderr,"lextrace: buf(%d) after: |%s|\n", strlen(buf), buf); +// fprintf(stderr, "lextrace: result[%d]=%d;\n", lineCount, result); +// } + } + + DEBUG_RTN_FSP("lextrace: fsp = %d:\n") + + if ((result) && (fsp > 0)) { + + DEBUG_RTN_DUMP("lextrace: dump{%d, %d, %d, %d} - before do_copy_replacements |%s|\n", buf) + + do_copy_replacements(buf); + + result = strlen(buf); + + DEBUG_RTN_DUMP("lextrace: dump{%d, %d, %d, %d} after do_copy_replacements |%s|\n", buf) + + } + +// if (yylist != NULL) { +// /*fprintf(yylist, "%6d : %s", lineCount, buf); */ +// /* free == 1, fixed == 0 */ +// if ((globalEnvPtr->codeFormat == 0) && (result > FIXFORM_81)) { +// fprintf(yylist, "%6d * %s", lineNumber, buf); +// } +// else { +// // fprintf(yylist, "%6d : %s", lineNumber, buf); +// fprintf(yylist, "%06d : %s", lineNumber, buf); +// } +// } + + strcpy(ibuf, buf); + /* lineno_prev = lineno;; */ + /* yylineno_prev = yylineno; */ + /* yylineno_prev = lineNumber; */ + fsp_prev = fsp; + zzlineno_prev = zzlineno; + lineNumber_prev = lineNumber; + + result = strlen(buf); + + /* free == 1, fixed == 0 */ + if ( globalEnvPtr->codeFormat == 0 ) { + if (result > FIXFORM_81) { + } + if (result < FIXFORM_7) { + strcpy(buf, "\n"); + } + if (result > FIXFORM_6) { + if (result < FIXFORM_73) { + strcpy(buf, ibuf+FIXFORM_6); + } + if (result > FIXFORM_72) { + strncpy(buf, ibuf+FIXFORM_6, FIXFORM_65+1); + buf[FIXFORM_65+1] = '\n'; + buf[FIXFORM_65+2] = CHR_EOS; + } + } + } + + result = strlen(buf); + s = buf; + + return result; +} + +void set_scanner_state(int i0, int i1) { + + if (globalEnvPtr->codeFormat == FORMAT_FREE) { + BEGIN(i1); + } + + if (globalEnvPtr->codeFormat == FORMAT_FIXED) { + BEGIN(i0); + } + +} + +void setup_scanner_state () { + + /* free == 1, fixed == 0 */ + + if (globalEnvPtr->codeFormat == FORMAT_FREE) { + BEGIN(FREE) ; + } + else { + if (globalEnvPtr->codeFormat == FORMAT_FIXED) { + BEGIN(FIXED_7) ; + } + else { + assert(1); + } + } + + fprintf (yyout, "# %d \"%s\"\n", lineno, filename); +} + +void copy_switch(void) { + + struct copy_symbols *tmp=NULL; + + if (fsp>=MAX_COPY_DEPTH) { + /* yyerror("Impossible to redirect input!"); */ + fprintf(stderr, "Copy nested too deeply (max=%d)\n", MAX_COPY_DEPTH); + exit(1); + } + file_stack[ fsp ].buffer = YY_CURRENT_BUFFER; + file_stack[ fsp ].filename = filename; + /* file_stack[ fsp ].lineno = lineno; */ + file_stack[ fsp ].lineno = zzlineno; + zzlineno = 0; +// file_stack[ fsp ].copybook = include_cpybook; +// file_stack[ fsp ].copylib = include_cpylib; + + DEBUG_RTN_RLIST2() + + copy_symbols = NULL; + + fsp++; + file_stack[ fsp ].last_symbol = append_copy_symbols; + append_copy_symbols = NULL; + + DEBUG_RTN_DLIST("lextrace: fsp=%d, copybook=%s copylib=%s\n", include_cpybook, include_cpylib) + DEBUG_RTN_RLIST3() + if (find_copybook_file(include_cpybook, include_cpylib) != 0) { + + fprintf(stderr, "error: copybook file %s not found\n", include_cpybook); + + exit(16); + } + + yyin = fopen( include_full_filename, "r" ); + + if (yyin == NULL) { + fprintf(stderr, "Cannot open copy file %s\n", include_full_filename); + exit(1); + } + + yy_switch_to_buffer( yy_create_buffer(yyin,YY_BUF_SIZE) ); + filename = strdup (include_full_filename); + lineno = 1; + fprintf (yyout, "# %d \"%s\"\n", lineno, filename); + + copy_start_sw--; + +} + +void add_copy_replacement(char *orig_value, char *replacement) { + + struct copy_symbols *cs=NULL,*tmp=NULL; + int i; + + DEBUG_RTN_STR3("lextrace: add_copy_replacement - %s will be replaced by %s\n", orig_value, replacement) + + cs = malloc(sizeof(struct copy_symbols)); + cs->value = orig_value; + cs->replacement = replacement; + cs->next = NULL; + if (append_copy_symbols==NULL) + append_copy_symbols = cs; + else { + tmp=append_copy_symbols; + while (tmp->next) + tmp=tmp->next; + tmp->next = cs; + } + + DEBUG_RTN_RLIST4() + +} + +void do_copy_replacements(char *buffer) { + + struct copy_symbols *cs; + char *s, *s1, *tmp = NULL; + int len, end, i, sw, cnt; + + DEBUG_RTN_FSP("lextrace: do_copy_replacements fsp = %d:\n") + + // Replacement table empty + copy_symbols = file_stack[fsp].last_symbol; + if (file_stack[fsp].last_symbol == NULL) { + + DEBUG_RTN_STR1("lextrace: Empty replace list \n") + + return; + } + + DEBUG_RTN_STR1("lextrace: Replace list is NOT empty \n") + DEBUG_RTN_RLIST() + + + // ignore comments + if (globalEnvPtr->codeFormat == 1) { + if (*buffer == CHR_ASTERIX) { + + DEBUG_RTN_DUMP("lextrace: dump{%d, %d, %d, %d} Ignoring comment line |%s|\n", buffer) + + return; + } + } + len = strlen(buffer); + if (len > FIXFORM_7) { + if (*(buffer + FIXFORM_6) == CHR_ASTERIX) { + // comment + + DEBUG_RTN_DUMP("lextrace: dump{%d, %d, %d, %d} Ignoring comment line |%s|\n", buffer) + + return; + } + } + else { + // empty line + + DEBUG_RTN_STR2("lextrace: Ignoring empty fixed format line :%s:\n", buffer) + + return; + } + + DEBUG_RTN_DUMP("lextrace: dump{%d, %d, %d, %d} After comment check, Before copy replace : |%s|\n", buffer) + + /*tmp = malloc(MAXLINEBUF);*/ + tmp = malloc(YY_READ_BUF_SIZE); + //tmp = malloc(500); + //strcpy(tmp, ""); + tmp[0]='\0'; + s = buffer; + s1 = tmp; + len = strlen(buffer); + if (globalEnvPtr->codeFormat == 0) { + //fixed format + for (i=0; i FIXFORM_72) { + //end = len - (len - FIXFORM_72); + end = FIXFORM_72; + } + else { + end = len; + } + } + else { + // free format + i = 0; + end = len; + } + + copy_symbols = file_stack[fsp].last_symbol; + + cnt = 0; + for (i=i; ivalue, strlen(cs->value))) { + strcat(s1, cs->replacement); + cnt++; + s += strlen(cs->value); + i += strlen(cs->value); + s1 += strlen(cs->replacement); + + DEBUG_RTN_STR3("lextrace: Now replacing :%s: by :%s:\n", cs->value, cs->replacement) + + cs = NULL; + sw = 1; + } + else { + cs=cs->next; + } + } + if (sw == 0) { + *s1 = *s; + s++; + s1++; + *s1 = '\0'; + i++; + } + } + } + + if (cnt != 0) { + // Try to fix 73-80 cols. + if (globalEnvPtr->codeFormat == 0) { // fixed format + len = strlen(tmp); + + DEBUG_RTN_FIXLEN("lextrace: Before 73-80 cols fix len=%d :%s:\n", len, tmp) + + if (len > FIXFORM_72) { + sw = 0; + for (i=len-1; i>=FIXFORM_71; i--) { + s1 = tmp + i; + if (*s1 != ' ') { + sw++; + i = 0; + } + else { + s1 = tmp + i; + *s1 = '\0'; + } + } + s1 = buffer + FIXFORM_71; + strcat(tmp, s1); + } + else { + if (len < FIXFORM_72) { + for (i=len - 1; i|\n", buffer) + +} + +void add_replace_replacement(char *orig_value, char *replacement) { + + struct copy_symbols *cs,*tmp; + int i; + + DEBUG_RTN_STR3("lextrace: add_replace_replacement - %s will be replaced by %s\n", orig_value, replacement) + + cs = malloc(sizeof(struct copy_symbols)); + cs->value = orig_value; + cs->replacement = replacement; + cs->next = NULL; + if (append_replace_symbols==NULL) + append_replace_symbols = cs; + else { + tmp=append_replace_symbols; + while (tmp->next) + tmp=tmp->next; + tmp->next = cs; + } + + DEBUG_RTN_RLIST5() + +} + +void do_replace_replacements(char *buffer) { + + struct copy_symbols *cs; + char *s, *s1, *tmp = NULL; + int len, end, i, sw, cnt; + + DEBUG_RTN_FSP("lextrace: do_replace_replacements fsp = %d:\n") + + // Replacement table empty + copy_symbols = file_stack[fsp].last_symbol; + if (file_stack[fsp].last_symbol == NULL) { + + DEBUG_RTN_STR1("lextrace: Empty replace list \n") + + return; + } + + DEBUG_RTN_STR1("lextrace: Replace list is NOT empty \n") + DEBUG_RTN_RLIST() + + + // ignore comments + if (globalEnvPtr->codeFormat == 1) { + if (*buffer == CHR_ASTERIX) { + + DEBUG_RTN_DUMP("lextrace: dump{%d, %d, %d, %d} Ignoring comment line |%s|\n", buffer) + + return; + } + } + len = strlen(buffer); + if (len > FIXFORM_7) { + if (*(buffer + FIXFORM_6) == CHR_ASTERIX) { + // comment + + DEBUG_RTN_DUMP("lextrace: dump{%d, %d, %d, %d} Ignoring comment line |%s|\n", buffer) + + return; + } + } + else { + // empty line + + DEBUG_RTN_STR2("lextrace: Ignoring empty fixed format line :%s:\n", buffer) + + return; + } + + DEBUG_RTN_DUMP("lextrace: dump{%d, %d, %d, %d} After comment check, Before copy replace : |%s|\n", buffer) + + /*tmp = malloc(MAXLINEBUF);*/ + tmp = malloc(YY_READ_BUF_SIZE); + //strcpy(tmp, ""); + tmp[0]='\0'; + s = buffer; + s1 = tmp; + len = strlen(buffer); + if (globalEnvPtr->codeFormat == 0) { + //fixed format + for (i=0; i FIXFORM_72) { + //end = len - (len - FIXFORM_72); + end = FIXFORM_72; + } + else { + end = len; + } + } + else { + // free format + i = 0; + end = len; + } + + copy_symbols = file_stack[fsp].last_symbol; + + cnt = 0; + for (i=i; ivalue, strlen(cs->value))) { + strcat(s1, cs->replacement); + cnt++; + s += strlen(cs->value); + i += strlen(cs->value); + s1 += strlen(cs->replacement); + + DEBUG_RTN_STR3("lextrace: Now replacing :%s: by :%s:\n", cs->value, cs->replacement) + + cs = NULL; + sw = 1; + } + else { + cs=cs->next; + } + } + if (sw == 0) { + *s1 = *s; + s++; + s1++; + *s1 = '\0'; + i++; + } + } + } + + if (cnt != 0) { + // Try to fix 73-80 cols. + if (globalEnvPtr->codeFormat == 0) { // fixed format + len = strlen(tmp); + + DEBUG_RTN_FIXLEN("lextrace: Before 73-80 cols fix len=%d :%s:\n", len, tmp) + + if (len > FIXFORM_72) { + sw = 0; + for (i=len-1; i>=FIXFORM_71; i--) { + s1 = tmp + i; + if (*s1 != ' ') { + sw++; + i = 0; + } + else { + s1 = tmp + i; + *s1 = '\0'; + } + } + s1 = buffer + FIXFORM_71; + strcat(tmp, s1); + } + else { + if (len < FIXFORM_72) { + for (i=len - 1; i|\n", buffer) + + if (tmp) { free(tmp); tmp=NULL; } +} + +void adjust_counters(void) { + + int i, l=0, c=0, sw=0; + + for (i=yyleng-1; i>=0; i--) { + if (pp_yytext[i] == CHR_LF) { + l++; + sw=1; + } + if (sw == 0) { + c++; + } + } + lineno = lineno + l; + lineCount = lineCount + l; + lf_add = lf_add + l; + columnCount = c; + +} + +#ifdef DEBUG_COBPP_SCANNER + +void debug_rtn (const char *s, unsigned long Ccnt, unsigned long Lcnt, int Len, const char *s1) { + + + char scstate[50]; + + switch (YYSTATE) + { + case FREE: + strcpy(scstate, "FREE"); + break; + + case FIXED_7: + strcpy(scstate, "FIXED_7"); + break; + + case FIXED_AB: + strcpy(scstate, "FIXED_AB"); + break; + + case COMMENT: + strcpy(scstate, "COMMENT"); + break; + + case DQ_LITERAL_FIXED: + strcpy(scstate, "DQ_LITERAL_FIXED"); + break; + + case DQ_LITERAL_FREE: + strcpy(scstate, "DQ_LITERAL_FREE"); + break; + + case SQ_LITERAL_FIXED: + strcpy(scstate, "SQ_LITERAL_FIXED"); + break; + + case SQ_LITERAL_FREE: + strcpy(scstate, "SQ_LITERAL_FREE"); + break; + + default: + strcpy(scstate, "none"); + break; + } + + fprintf(stderr, + "debug lex %s - %s (%lu,%lu): length=%d, :%s:\n", + scstate, + s, + Lcnt, + Ccnt, + Len, + s1 + ); +} + +void debug_rtn2 (const char *s1, const char *s2, int sw1, int sw2, int sw3, int sw) +{ + switch (sw) + { + case 3: + sprintf(errbuf, s1, s2); + break; + + case 5: + sprintf(errbuf, s1, sw1); + break; + + case 7: + sprintf(errbuf, s1, sw2); + break; + + case 11: + sprintf(errbuf, s1, sw3); + break; + + case 15: + sprintf(errbuf, s1, s2, sw1); + break; + + case 21: + sprintf(errbuf, s1, s2, sw2); + break; + + case 33: + sprintf(errbuf, s1, s2, sw3); + break; + + case 35: + sprintf(errbuf, s1, sw1, sw2); + break; + + case 105: + sprintf(errbuf, s1, s2, sw1, sw2); + break; + + case 385: + sprintf(errbuf, s1, sw1, sw2, sw3); + break; + + default: + sprintf(errbuf, "%s", s1); + break; + } + + fprintf(stderr, "%s", errbuf); +} + +void debug_rtn_sssd (const char *s1, const char *s2, const char *s3, int z, int sw) +{ + switch (sw) + { + case 3: + sprintf(errbuf, s1, s2); + break; + + case 5: + sprintf(errbuf, s1, s3); + break; + + case 7: + sprintf(errbuf, s1, z); + break; + + case 15: + sprintf(errbuf, s1, s2, s3); + break; + + case 21: + sprintf(errbuf, s1, s2, z); + break; + + case 22: + sprintf(errbuf, s1, z, s2); + break; + + case 105: + sprintf(errbuf, s1, s2, s3, z); + break; + + case 106: + sprintf(errbuf, s1, z, s2, s3); + break; + + default: + sprintf(errbuf, "%s", s1); + break; + } + + fprintf(stderr, "%s", errbuf); +} + +void debug_rtn_dump (const char *s, const char *s1, int fsln, int fsi, int gln) +{ + char wkbuf[MAXLINEBUF+1]; + int ln, idx; + + strcpy(wkbuf, s1); + ln = strlen(wkbuf); + idx = ln - 1; + if (wkbuf[idx] == CHR_LF) { + wkbuf[idx] = CHR_EOS; + } + fprintf(stderr, s, fsi, fsln, gln, ln, wkbuf); +} + +#endif diff --git a/cobpp/tcpphelp.h b/cobpp/tcpphelp.h new file mode 100644 index 0000000..3431f54 --- /dev/null +++ b/cobpp/tcpphelp.h @@ -0,0 +1,118 @@ +// +// Copyright (C) 2001, 2000, 1999 David Essex +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this software; see the file COPYING. If not, write to +// the Free Software Foundation, Inc., 59 Temple Place, Suite 330, +// Boston, MA 02111-1307 USA +// + + +#ifndef _TCPPHELP_H +#define _TCPPHELP_H + +#ifdef TCOBPP_LANGUAGE_en + +/* Usage list */ +/* Usage: %s [-o ]\n" */ +static char usage_list0[] = { " [-o ]\n" }; +static char usage_list1[] = { "where are:\n\ + -h Help (display this listing)\n\ + -V Display version and exit\n\ + -v Verbose mode\n\ + -d Include debug lines\n\ + -g Turn on debuging mode\n\ + -t Expand tabs to space(s)\n\ + -o Output file name (default: standard output)\n\ + -p Listing file name \n\ + -x Input source is in free form format\n\ + -f Input source is in standard fixed column format\n\ + -I Copybooks search directories \n\ +" }; +#endif + +#ifdef TCOBPP_LANGUAGE_fr + +static char usage_list0[] = { " [-o ]\n" }; +static char usage_list1[] = { "options:\n\ + -h Affiche l'aide\n\ + -V Affiche la version\n\ + -v Mode verbeux\n\ + -d Inclut les lignes de débogage\n\ + -g Positionne le mode de débogage\n\ + -t Transforme les tabulations en d'espace(s)\n\ + -o Nom du fichier en sortie (défaut: sortie standard)\n\ + -p Nom du fichier de liste\n\ + -x Le fichier en entrée est en format libre (X/Open)\n\ + -f Le fichier en entrée est en format standard (colonnage fixe)\n\ + -I Répertoires de recherche des fichiers d'inclusion\n\ +" }; +#endif + +#ifdef TCOBPP_LANGUAGE_it + +static char usage_list0[] = { " [-o ]\n" }; +static char usage_list1[] = { "opzioni:\n\ + -h Visualizza l'aiuto\n\ + -V Versione\n\ + -v Modalita` prolissa\n\ + -d Include le linee di debug\n\ + -g Attiva la modalita` di debuging\n\ + -t Converte i 'tabs' in spazi\n\ + -o Nome file da generare (default: standard output)\n\ + -p Nome file del listato\n\ + -x Il sorgente in ingresso e` formattato in modalita` libera (free form)\n\ + -f Il sorgente in ingresso e` formattato in modalita` Standard\n\ + -I Cartella di ricerca dei files 'Copybooks'\n\ +" }; +#endif + +#ifdef TCOBPP_LANGUAGE_pt_BR + +static char usage_list0[] = { " [-o ]\n" }; +static char usage_list1[] = { "opcoes:\n\ + -h Mostra ajuda\n\ + -V Mostra versao\n\ + -v Modo verboso\n\ + -d Inclui linhas de debug\n\ + -g Muda para modo de debug\n\ + -t Expande tabs para espaco(s)\n\ + -o Nome do arquivo de saida (padrao: saida padrao)\n\ + -p Nome do arquivo listado \n\ + -x O arquivo de entrada esta no formato livre\n\ + -f Arquivo de entrada esta em formato de coluna fixa padrao\n\ + -I Diretorios de procura de copybooks\n\ +" }; +#endif + +#ifdef TCOBPP_LANGUAGE_es + +/* Usage list */ +/* Usage: %s [-o ]\n" */ +static char usage_list0[] = { " [-o son:\n\ + -h Ayuda (muestra este listado)\n\ + -V Muestra la versión y termina\n\ + -v Modo detallado\n\ + -d Incluye lineas de debug\n\ + -g Activa el modo debug\n\ + -t Expandir tabulados a espacios\n\ + -o Nombre del fichero salida (defecto: salida estándar)\n\ + -p Nombre del fichero listado\n\ + -x El fuente de entrada está en formato libre\n\ + -f El fuente está en formato estándar de cols fijas\n\ + -I Directorios de búsqueda para Copybooks\n\ +" }; +#endif + +#endif diff --git a/cobpp/tcpphelp.h.in b/cobpp/tcpphelp.h.in new file mode 100644 index 0000000..5f74f70 --- /dev/null +++ b/cobpp/tcpphelp.h.in @@ -0,0 +1,120 @@ +// +// Copyright (C) 2001, 2000, 1999 David Essex +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this software; see the file COPYING. If not, write to +// the Free Software Foundation, Inc., 59 Temple Place, Suite 330, +// Boston, MA 02111-1307 USA +// + + +#ifndef _TCPPHELP_H +#define _TCPPHELP_H + +//#define TCOBPP_LANGUAGE_@tcob_lang@ 1 + +#ifdef TCOBPP_LANGUAGE_en + +/* Usage list */ +/* Usage: %s [-o ]\n" */ +static char usage_list0[] = { " [-o ]\n" }; +static char usage_list1[] = { "where are:\n\ + -h Help (display this listing)\n\ + -V Display version and exit\n\ + -v Verbose mode\n\ + -d Include debug lines\n\ + -g Turn on debuging mode\n\ + -t Expand tabs to space(s)\n\ + -o Output file name (default: standard output)\n\ + -p Listing file name \n\ + -x Input source is in free form format\n\ + -f Input source is in standard fixed column format\n\ + -I Copybooks search directories \n\ +" }; +#endif + +#ifdef TCOBPP_LANGUAGE_fr + +static char usage_list0[] = { " [-o ]\n" }; +static char usage_list1[] = { "options:\n\ + -h Affiche l'aide\n\ + -V Affiche la version\n\ + -v Mode verbeux\n\ + -d Inclut les lignes de débogage\n\ + -g Positionne le mode de débogage\n\ + -t Transforme les tabulations en d'espace(s)\n\ + -o Nom du fichier en sortie (défaut: sortie standard)\n\ + -p Nom du fichier de liste\n\ + -x Le fichier en entrée est en format libre (X/Open)\n\ + -f Le fichier en entrée est en format standard (colonnage fixe)\n\ + -I Répertoires de recherche des fichiers d'inclusion\n\ +" }; +#endif + +#ifdef TCOBPP_LANGUAGE_it + +static char usage_list0[] = { " [-o ]\n" }; +static char usage_list1[] = { "opzioni:\n\ + -h Visualizza l'aiuto\n\ + -V Versione\n\ + -v Modalita` prolissa\n\ + -d Include le linee di debug\n\ + -g Attiva la modalita` di debuging\n\ + -t Converte i 'tabs' in spazi\n\ + -o Nome file da generare (default: standard output)\n\ + -p Nome file del listato\n\ + -x Il sorgente in ingresso e` formattato in modalita` libera (free form)\n\ + -f Il sorgente in ingresso e` formattato in modalita` Standard\n\ + -I Cartella di ricerca dei files 'Copybooks'\n\ +" }; +#endif + +#ifdef TCOBPP_LANGUAGE_pt_BR + +static char usage_list0[] = { " [-o ]\n" }; +static char usage_list1[] = { "opcoes:\n\ + -h Mostra ajuda\n\ + -V Mostra versao\n\ + -v Modo verboso\n\ + -d Inclui linhas de debug\n\ + -g Muda para modo de debug\n\ + -t Expande tabs para espaco(s)\n\ + -o Nome do arquivo de saida (padrao: saida padrao)\n\ + -p Nome do arquivo listado \n\ + -x O arquivo de entrada esta no formato livre\n\ + -f Arquivo de entrada esta em formato de coluna fixa padrao\n\ + -I Diretorios de procura de copybooks\n\ +" }; +#endif + +#ifdef TCOBPP_LANGUAGE_es + +/* Usage list */ +/* Usage: %s [-o ]\n" */ +static char usage_list0[] = { " [-o son:\n\ + -h Ayuda (muestra este listado)\n\ + -V Muestra la versión y termina\n\ + -v Modo detallado\n\ + -d Incluye lineas de debug\n\ + -g Activa el modo debug\n\ + -t Expandir tabulados a espacios\n\ + -o Nombre del fichero salida (defecto: salida estándar)\n\ + -p Nombre del fichero listado\n\ + -x El fuente de entrada está en formato libre\n\ + -f El fuente está en formato estándar de cols fijas\n\ + -I Directorios de búsqueda para Copybooks\n\ +" }; +#endif + +#endif diff --git a/cobpp/tcppversion.h b/cobpp/tcppversion.h new file mode 100644 index 0000000..d00dddb --- /dev/null +++ b/cobpp/tcppversion.h @@ -0,0 +1,13 @@ +#ifndef _TCOBPP_VERSION_H +#define _TCOBPP_VERSION_H + +#define TCOBPP_MAJOR_VERSION "0" +#define TCOBPP_MINOR_VERSION "41" +#define TCOBPP_PATCH_LEVEL "3" +#define TCOBPP_VERSION "0.41.3" +#define TCOBPP_RELEASE_DATE "2004/09/25" + +#define TCOBPP_PGM_VERSION "alpha 0.41.3 (MinGW 2004/09/25)" + + +#endif diff --git a/cobpp/tcppversion.h.in b/cobpp/tcppversion.h.in new file mode 100644 index 0000000..d1ff740 --- /dev/null +++ b/cobpp/tcppversion.h.in @@ -0,0 +1,13 @@ +#ifndef _TCOBPP_VERSION_H +#define _TCOBPP_VERSION_H + +#define TCOBPP_MAJOR_VERSION "@TCOBPP_MAJOR_VERSION@" +#define TCOBPP_MINOR_VERSION "@TCOBPP_MINOR_VERSION@" +#define TCOBPP_PATCH_LEVEL "@TCOBPP_PATCH_LEVEL@" +#define TCOBPP_VERSION "@TCOBPP_VERSION@" +#define TCOBPP_RELEASE_DATE "@TCOBPP_RELEASE_DATE@" + +#define TCOBPP_PGM_VERSION "alpha @TCOBPP_VERSION@ (@host_os@ @TCOBPP_RELEASE_DATE@)" + + +#endif diff --git a/cobpp/test.code/Makefile b/cobpp/test.code/Makefile new file mode 100644 index 0000000..c619759 --- /dev/null +++ b/cobpp/test.code/Makefile @@ -0,0 +1,124 @@ +# +# +# + +TESTLIB=../copybooks +export TESTLIB + +prefix=../../test.code +exec_prefix=../../compiler +g_includes=-I/usr/local/include +g_libraries=-L/usr/local/lib + +CCX=gcc +COB=${exec_prefix}/htcobol +COBPP=../htcobolpp +ASM=as +RM=rm -f + +COPYBOOKS= -I../copybooks -I. +INCLUDES= -I/usr/local/include +LIBS=${g_libraries} -L../../lib -lhtcobol -lm +LDFLAGS= +COBFLAGS=-P -c ${COPYBOOKS} +ASMFLAGS=-D +CCXFLAGS=-g ${INCLUDES} +COBPPFLAGS= -v -I ../copybooks + +SRC1f = ft1.cob +SRC2f = ft2.cob +SRC3f = ft2.cob +SRC1x = t1.cob +SRC2x = t2.cob +SRC3x = t3.cob + +SRC1fa = ft1-1.cob +SRC2fa = ft2-1.cob +SRC3fa = ft3-1.cob +SRC1xa = t1-1.cob +SRC2xa = t2-1.cob +SRC3xa = t3-1.cob + + +OBJS1fa = $(SRC1fa:.cob=.o) +OBJS2fa = $(SRC2fa:.cob=.o) +OBJS3fa = $(SRC3fa:.cob=.o) +OBJS1xa = $(SRC1xa:.cob=.o) +OBJS2xa = $(SRC2xa:.cob=.o) +OBJS3xa = $(SRC3xa:.cob=.o) +OBJS = $(OBJS1fa) $(OBJS2fa) $(OBJS3fa) $(OBJS1xa) $(OBJS2xa) $(OBJS3xa) + +PROG1f = ft1 +PROG2f = ft2 +PROG3f = ft3 +PROG1x = t1 +PROG2x = t2 +PROG3x = t3 +#PROGS = $(PROG1f) $(PROG2f) $(PROG3f) $(PROG1x) $(PROG2x) $(PROG3x) + +PROGS = $(SRC1fa) $(SRC2fa) $(SRC3fa) $(SRC1xa) $(SRC2xa) $(SRC3xa) + +include ${prefix}/config/C.rules.in +#include ${prefix}/config/COB.rules.in +# +# Rules for compiling .cob sources +.SUFFIX: .cob .o + +%.o: %.cob + $(COB) $(COBFLAGS) $< +# $(ASM) $(ASMFLAGS) -o $*.o -a=$*.listing.0.txt $*.s +# @grep -v 'LISTING' $*.listing.0.txt | sed '/^$$/d' >$*.s.txt +# @${RM} $*.listing.0.txt +# + +all: ${PROGS} + +${PROG1f}: ${OBJS1fa} ${SRC1fa} + $(CCX) -g -o $@ ${OBJS1fa} $(LDFLAGS) $(LIBS) +# strip $@ + +${PROG2f}: ${OBJS2fa} ${SRC2fa} + $(CCX) -g -o $@ ${OBJS2fa} $(LDFLAGS) $(LIBS) +# strip $@ + +${PROG3f}: ${OBJS3fa} ${SRC3fa} + $(CCX) -g -o $@ ${OBJS3fa} $(LDFLAGS) $(LIBS) +# strip $@ + +${PROG1x}: ${OBJS1xa} ${SRC1xa} + $(CCX) -g -o $@ ${OBJS1xa} $(LDFLAGS) $(LIBS) +# strip $@ + +${PROG2x}: ${OBJS2xa} ${SRC2xa} + $(CCX) -g -o $@ ${OBJS2xa} $(LDFLAGS) $(LIBS) +# strip $@ + +${PROG3x}: ${OBJS3xa} ${SRC3xa} + $(CCX) -g -o $@ ${OBJS3xa} $(LDFLAGS) $(LIBS) +# strip $@ + + +${SRC1fa}: + $(COBPP) $(COBPPFLAGS) -f ${SRC1f} -o ${SRC1fa} -p ${SRC1f}.txt + +${SRC2fa}: + $(COBPP) $(COBPPFLAGS) -f ${SRC2f} -o ${SRC2fa} -p ${SRC2f}.txt + +${SRC3fa}: + $(COBPP) $(COBPPFLAGS) -f ${SRC3f} -o ${SRC3fa} -p ${SRC3f}.txt + +${SRC1xa}: + $(COBPP) $(COBPPFLAGS) -x ${SRC1x} -o ${SRC1xa} -p ${SRC1x}.txt + +${SRC2xa}: + $(COBPP) $(COBPPFLAGS) -x ${SRC2x} -o ${SRC2xa} -p ${SRC2x}.txt + +${SRC3xa}: + $(COBPP) $(COBPPFLAGS) -x ${SRC3x} -o ${SRC3xa} -p ${SRC3x}.txt + + +clean: + @${RM} ${OBJS} $(PROGS) $(SRC1a) $(SRC2a) $(SRC3a) $(SRC4a) $(SRC5a) \ + *cob.txt *.lis *.s *s.txt *.trace.txt trace*txt core \ + t[0-9]-1.cob ft[0-9]-1.cob + diff --git a/cobpp/test.code/Readme.txt b/cobpp/test.code/Readme.txt new file mode 100644 index 0000000..c080526 --- /dev/null +++ b/cobpp/test.code/Readme.txt @@ -0,0 +1,29 @@ +TC pre-processor test COBOL programs. + +How to run test program: +r.sh - will test run for all programs +or +r.sh [ -f|x(format) f=fixed x=open filename(s)] - will run selected file + +The shell script will run make and create a trace files *.trace.txt. + +To run type(example) - no suffix required .cob is assumed: +r.sh -f ft3 + +To clean type make clean. + +Notes: +make program may not work. +Some copybooks require that the 'TESTLIB' environment variable be defined. + +TESTLIB='../copybooks' +export TESTLIB + +fixed: -f +../htcobolpp -v -d -I ../copybooks -f ft1.cob -o ft1-1.cob -p ft1.cob.txt 2>trace.ft1.2.txt +../htcobolpp -v -d -I ../copybooks -f ft2.cob -o ft2-1.cob -p ft2.cob.txt 2>trace.ft2.2.txt +../htcobolpp -v -d -I ../copybooks -f ft3.cob -o ft3-1.cob -p ft3.cob.txt 2>trace.ft3.2.txt + +open: -x +../htcobolpp -v -d -I ../copybooks -x t1.cob -o t1-1.cob -p t1.cob.txt 2>trace.t1.2.txt +../htcobolpp -v -d -I ../copybooks -x t2.cob -o t2-1.cob -p t2.cob.txt 2>trace.t2.2.txt diff --git a/cobpp/test.code/ft1.cob b/cobpp/test.code/ft1.cob new file mode 100644 index 0000000..2a51dbd --- /dev/null +++ b/cobpp/test.code/ft1.cob @@ -0,0 +1,71 @@ +000010 IDENTIFICATION DIVISION. +000020 PROGRAM-ID. fTEST1. +000030 ENVIRONMENT DIVISION. +000040 CONFIGURATION SECTION. +000045* SOURCE-COMPUTER. X86 WITH DEBUGGING MODE. +000046* SOURCE-COMPUTER. +000047* X86 WITH DEBUGGING MODE. +000048 SOURCE-COMPUTER. +000049 X86. +000050* SPECIAL-NAMES. +000060* DECIMAL-POINT IS COMMA. +000070 INPUT-OUTPUT SECTION. +000080 FILE-CONTROL. +000090 DATA DIVISION. +000100 FILE SECTION. +000110 +000120 WORKING-STORAGE SECTION. +000130 01 XX. +000140 05 X1 PIC 9(4) VALUE 0. +000150 05 X2 PIC 9(4) VALUE 0. +000160 01 W01-COMPUTE-E PIC S9(5)V99 USAGE COMP VALUE 99876. +000170 01 W01-COMPUTE-X PIC X(50) VALUE "aaaaaaaaaaaaaaaaaaaaaaaaaaa +000180- "bbbbbbbbbbbbbbbbbbbbbbb". +000170 01 W01-COMPUTE-Y PIC X(54) VALUE "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +000180- "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +000180- "ccccccccccccccccccccccc". +000170 01 W01-COMPUTE-Z PIC X(54) VALUE "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +000180- "bbbbbbbbbbbbbbbbbbbbbbb". +000190 +000200 CoPy 'fTEST02.cpy' IN TESTLIB REPLACING +000210* W01-COMPUTE-E BY W01-COMPUTE-EE +000280* ==9(5)== BY ==9(04)== +000280* ==9(6)== BY ==9(06)== +000280* == 02 == BY == 05 == . +000260* COPY 'fTEST02.cpy'. +000260* Copy 'fTEST02.cpy' IN "Test.lib" REPLACING +000260* COPY 'fTEST02.cpy' REPLACING +000260* COPY 'fTEST02.cpy' IN TESTLIB REPLACING +000270 W01-COMPUTE-0 BY W01-COMPUTE-00, +000270 'W01-1XXX' BY 'W01-2', +000280 ==9(5)== BY ==9(04)== . fTEST021 +000290 +000291 COPY 'fTEST02.cpy' IN TESTLIB REPLACING +000292 W01-COMPUTE-0 BY 000-W01-COMPUTE-000 +000293 'W01-1XXX' BY 'W01-3' +000294 ==9(5)== BY ==9(07)== . fTEST022 +000295 +000300 PROCEDURE DIVISION. +000310 +000320 A-000. +000330 +000340* READY TRACE. +000345D DISPLAY "READY TRACE". +000350 +000360 PERFORM A-100. +000370 +000375D DISPLAY "RESET TRACE". +000380* RESET TRACE. +000390 +000400 STOP RUN. +000410 +000420 A-100. +000430 +000440* DISPLAY "ENTER A-100". +000450 +000460 MOVE 1 TO X1. +000470 ADD 1 TO X1. +000480 MOVE X1 TO X2. +000490 +000500* DISPLAY "EXIT A-100". +000510 diff --git a/cobpp/test.code/ft2.cob b/cobpp/test.code/ft2.cob new file mode 100644 index 0000000..a96aabf --- /dev/null +++ b/cobpp/test.code/ft2.cob @@ -0,0 +1,67 @@ +000010 IDENTIFICATION DIVISION. ft2_____ +000020 PROGRAM-ID. fTEST2. ft2_____ +000030 ENVIRONMENT DIVISION. ft2_____ +000040 CONFIGURATION SECTION. ft2_____ +000050* SPECIAL-NAMES. ft2_____ +000060* DECIMAL-POINT IS COMMA. ft2_____ +000070 INPUT-OUTPUT SECTION. ft2_____ +000080 FILE-CONTROL. ft2_____ +000090 DATA DIVISION. ft2_____ +000100 FILE SECTION. ft2_____ +000110 ft2_____ +000120 WORKING-STORAGE SECTION. ft2_____ +000130 01 XX. ft2_____ +000140 05 X1 PIC 9(4) VALUE 0. ft2_____ +000150 05 X2 PIC 9(4) VALUE 0. ft2_____ +000160 01 W01-COMPUTE-E PIC S9(5)V99 USAGE COMP VALUE 99876. ft2_____ +000170 01 W01-COMPUTE-X PIC X(50) VALUE "aaaaaaaaaaaaaaaaaaaaaaaaaa""'' ft2_____ +000180- "bbbbbbbbbbbbbbbbbbbbbbb". ft2_____ +000170 01 W01-COMPUTE-Y PIC X(54) VALUE "cccccccccccccccccccccccccccccccft2_____ +000180- "ddddddddddddddddddddddddddddddddddddddddddddddddddft2_____ +000180- "eeeeeeeeeeeeeeeeeeeeeee". ft2_____ +000190 01 W01-COMPUTE-Z PIC X(54) VALUE 'fffffff '' """ffffffffffffffffft2_____ +000200- 'ggggggggggggggggggggggg'. ft2_____ +000210 ft2_____ +000211 01 W01-COMPUTE-C PIC X(54) VALUE 'fffffff ' ft2_____ +000212 & ft2_____ +000213 'ggggggggggggggggggggggg '. ft2_____ +000214 ft2_____ +000220* CoPy 'fTEST02.cpy' IN TESTLIB REPLACING ft2_____ +000230* W01-COMPUTE-E BY W01-COMPUTE-EE ft2_____ +000240* ==9(5)== BY ==9(04)== ft2_____ +000250* ==9(6)== BY ==9(06)== ft2_____ +000260* == 02 == BY == 05 == . ft2_____ +000270* COPY 'fTEST02.cpy'. ft2_____ +000280* Copy 'fTEST02.cpy' IN "Test.lib" REPLACING ft2_____ +000290* COPY 'fTEST02.cpy' REPLACING ft2_____ +000300* COPY 'fTEST02.cpy' IN TESTLIB REPLACING ft2_____ +000310* W01-COMPUTE-0 BY W01-COMPUTE-00 ft2_____ +000320* 'W01-1XXX' BY 'W01-2' ft2_____ +000330* ==9(5)== BY ==9(04)== . ft2_____ +000340* ft2_____ +000350* COPY 'fTEST02.cpy' IN TESTLIB REPLACING ft2_____ +000360* W01-COMPUTE-0 BY W01-COMPUTE-000 ft2_____ +000370* 'W01-1XXX' BY 'W01-3' ft2_____ +000380* ==9(5)== BY ==9(07)== . ft2_____ +000390 ft2_____ +000400 PROCEDURE DIVISION. ft2_____ +000410 ft2_____ +000420 A-000. ft2_____ +000430 ft2_____ +000440* READY TRACE. ft2_____ +000450 ft2_____ +000460 PERFORM A-100. ft2_____ +000470 ft2_____ +000480* RESET TRACE. ft2_____ +000490 ft2_____ +000500 STOP RUN. ft2_____ +000510 ft2_____ +000520 A-100. ft2_____ +000530 ft2_____ +000540 DISPLAY "ENTER A-100". ft2_____ +000550 ft2_____ +000560 MOVE 1 TO X1. ft2_____ +000570 ADD 1 TO X1. ft2_____ +000580 MOVE X1 TO X2. ft2_____ +000590 ft2_____ +000600 DISPLAY "EXIT A-100". ft2_____ diff --git a/cobpp/test.code/ft3.cob b/cobpp/test.code/ft3.cob new file mode 100644 index 0000000..97a4968 --- /dev/null +++ b/cobpp/test.code/ft3.cob @@ -0,0 +1,69 @@ +000010 IDENTIFICATION DIVISION. ft3_____ +000020 PROGRAM-ID. fTEST3. ft3_____ +000030 ENVIRONMENT DIVISION. ft3_____ +000040 CONFIGURATION SECTION. ft3_____ +000050* SPECIAL-NAMES. ft3_____ +000060* DECIMAL-POINT IS COMMA. ft3_____ +000070 INPUT-OUTPUT SECTION. ft3_____ +000080 FILE-CONTROL. ft3_____ +000090 DATA DIVISION. ft3_____ +000100 FILE SECTION. ft3_____ +000110 ft3_____ +000120 WORKING-STORAGE SECTION. ft3_____ +000130 01 XX. ft3_____ +000140 05 X1 PIC 9(4) VALUE 0. ft3_____ +000150 05 X2 PIC 9(4) VALUE 0. ft3_____ +000151 05 X4 PIC 9(4) VALUE 66.ft3_____ +000152 05 X5 PIC 9(4) VALUE 88ft3_____ +000153 . ft3_____ +000154 05 X6 PIC 9(4) VALUEft3_____ +000155 99. ft3_____ +000160 01 W01-COMPUTE-E PIC S9(5)V99 USAGE COMP VALUE 99876. ft3a____ +000170 01 W01-COMPUTE-X PIC X(50) VALUE "aaaaaaaaaaaaaaaaaaaaaaaaaaa ft3b____ +000180- "bbbbbbbbbbbbbbbbbbbbbbb". ft3c____ +000190 01 W01-COMPUTE-Z PIC X(54) VALUE "cccccccccccccccccccccccccccccccft3d____ +000200- "ddddddddddddddddddddddd". ft3e____ +000210 ft3f____ +000220*----------------------------------------------------------------*ft3g____ +000220* CoPy 'fTEST02.cpy' IN TESTLIB REPLACING ft3g____ +000230* W01-COMPUTE-E BY W01-COMPUTE-EE ft3_____ +000240* ==9(5)== BY ==9(04)== ft3_____ +000250* ==9(6)== BY ==9(06)== ft3_____ +000260* == 02 == BY == 05 == . ft3_____ +000270* COPY fTEST02C. ft3_____ +000265* REPLACE ==9(5)== BY ==9(07)==. ft3_____ +000270 COPY fTEST02D. ft3_____ +000280* Copy 'fTEST02.cpy' IN "Test.lib". ft3_____ +000280* Copy 'fTEST02.cpy' IN "Test.lib" REPLACING ft3_____ +000290* COPY 'fTEST02.cpy' REPLACING ft3_____ +000300* COPY 'fTEST02.cpy' IN TESTLIB REPLACING ft3_____ +000310* W01-COMPUTE-0 BY W01-COMPUTE-00 ft3_____ +000320* 'W01-1XXX' BY 'W01-2' ft3_____ +000330* ==9(5)== BY ==9(04)== . ft3_____ +000340* ft3_____ +000350* COPY 'fTEST02.cpy' IN TESTLIB REPLACING ft3_____ +000360* W01-COMPUTE-0 BY W01-COMPUTE-000 ft3_____ +000370* 'W01-1XXX' BY 'W01-3' ft3_____ +000380* ==9(5)== BY ==9(07)== . ft3_____ +000390 ft3_____ +000400 PROCEDURE DIVISION. ft3_____ +000410 ft3_____ +000420 A-000. ft3_____ +000430 ft3_____ +000440* READY TRACE. ft3_____ +000450 ft3_____ +000460 PERFORM A-100. ft3_____ +000470 ft3_____ +000480* RESET TRACE. ft3_____ +000490 ft3_____ +000500 STOP RUN. ft3_____ +000510 ft3_____ +000520 A-100. ft3_____ +000530 ft3_____ +000540 DISPLAY "ENTER A-100". ft3_____ +000550 ft3_____ +000560 MOVE 1 TO X1. ft3_____ +000570 ADD 1 TO X1. ft3_____ +000580 MOVE X1 TO X2. ft3_____ +000590 ft3_____ +000600 DISPLAY "EXIT A-100". ft3_____ diff --git a/cobpp/test.code/r.sh b/cobpp/test.code/r.sh new file mode 100644 index 0000000..232e978 --- /dev/null +++ b/cobpp/test.code/r.sh @@ -0,0 +1,80 @@ +#!/bin/bash - +# +# This shell script will run make and create trace.txt +# cmd: r.sh [ -f|x(format) f=fixed x=open filename(s)] +# David Essex August 1999 +# +e0a="invalid number of parms..." +e0b="invalid option(s) " +e0c="This shell script will run make and create trace.txt" +e0d="cmd: r.sh [ -f|x(format) f=fixed x=open filename(s)]" +# +p_print1 () +{ +for arg in "$@" +do + echo $arg >&2 +done +} +# +TESTLIB=../copybooks +export TESTLIB +# +prglst_f='ft1 ft2 ft3' +prglst_x='t1 t2 t3' +prg='' +# +p_main () +{ + ftype=$1 + shift + for prg in "$@" + do + if [ \( ! -f "$prg.cob" \) -o \( ! -r "$prg.cob" \) ] + then + e1="error: filename $prg.cob not found or not readable... skipping file" + p_print1 "$e1" + else + echo "processing $prg.cob ... " +# p_print1 "$e1" +# cp1=`cat w/copypathlen_1290.txt` +# pp=/usr/local/share/htcobol/htcobolpp-0.54 +# pp=/usr/local/share/htcobol/htcobolpp-0.55 + pp=../htcobolpp +# pp=../htcobolpp.0 +# e2="$pp -v -g -d -t 8 -I$cp1 -I.:../copybooks $ftype $prg.cob -o $prg-1.cob -p $prg.cob.txt " +# e2="$pp -v -d -t 8 -I$cp1 -I.:../copybooks $ftype $prg.cob -o $prg-1.cob -p $prg.cob.txt " + e2="$pp -v -g -d -t 8 -I.:../copybooks $ftype $prg.cob -o $prg-1.cob -p $prg.cob.txt " +# e2="$pp -v -g -t 8 -I.:../copybooks $ftype $prg.cob -o $prg-1.cob -p $prg.cob.txt " + echo "$e2" + $e2 2>$prg.run.err.trace.txt | tee -a $prg.run.trace.txt + echo "(done)" + fi + done +} +# +if [ "$#" -eq 0 ] +then + make clean + p_main -f $prglst_f + p_main -x $prglst_x +else + ft=$1 + shift +# + case "$ft" + in + -f) + p_main $ft $@ + ;; + -x) + p_main $ft $@ + ;; + *) + e1="$e0b$ft ..." + p_print1 "$e1" "$e0c" "$e0d" + ;; + esac +# +fi +# diff --git a/cobpp/test.code/t1.cob b/cobpp/test.code/t1.cob new file mode 100644 index 0000000..69a9ba8 --- /dev/null +++ b/cobpp/test.code/t1.cob @@ -0,0 +1,67 @@ +IDENTIFICATION DIVISION. +PROGRAM-ID. TEST1. +ENVIRONMENT DIVISION. +CONFIGURATION SECTION. +* SPECIAL-NAMES. +* DECIMAL-POINT IS COMMA. +INPUT-OUTPUT SECTION. +FILE-CONTROL. +DATA DIVISION. +FILE SECTION. + +WORKING-STORAGE SECTION. +01 XX. + 05 X1 PIC 9(4) VALUE 0. + 05 X2 PIC 9(4) VALUE 0. +01 W01-COMPUTE-E PIC S9(5)V99 USAGE COMP VALUE 99876. +01 W01-COMPUTE-E PIC S9(5)V99 USAGE COMP VALUE 99876. +01 W01-COMPUTE-X PIC X(50) VALUE "aaaaaaaaaaaaaaaaaaaaaaaaaaa +- "bbbbbbbbbbbbbbbbbbbbbbb". +01 W01-COMPUTE-Y PIC X(54) VALUE "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +- "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +- "ccccccccccccccccccccccc". +01 W01-COMPUTE-Z PIC X(54) VALUE "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +- "bbbbbbbbbbbbbbbbbbbbbbb". + + +* CoPy 'TEST02.cpy' IN TESTLIB REPLACING +* W01-COMPUTE-E BY W01-COMPUTE-EE +* ==9(5)== BY ==9(04)== +* ==9(6)== BY ==9(06)== +* == 02 == BY == 05 == . +* COPY 'TEST02.cpy'. +* Copy 'TEST02.cpy' IN "Test.lib" REPLACING +* COPY 'TEST02.cpy' REPLACING +COPY 'TEST02.cpy' IN TESTLIB REPLACING + W01-COMPUTE-0 BY W01-COMPUTE-00 + 'W01-1XXX' BY 'W01-2' + ==9(5)== BY ==9(04)== . + +COPY 'TEST02.cpy' IN TESTLIB REPLACING + W01-COMPUTE-0 BY 000W01-COMPUTE-000 + 'W01-1XXX' BY 'W01-3' + ==9(5)== BY ==9(07)== . + +PROCEDURE DIVISION. + +A-000. + +* READY TRACE. +D DISPLAY "READY TRACE". + + PERFORM A-100. + +D DISPLAY "RESET TRACE". +* RESET TRACE. + + STOP RUN. + +A-100. + + DISPLAY "ENTER A-100". + + MOVE 1 TO X1. + ADD 1 TO X1. + MOVE X1 TO X2. + + DISPLAY "EXIT A-100". diff --git a/cobpp/test.code/t2.cob b/cobpp/test.code/t2.cob new file mode 100644 index 0000000..c83944a --- /dev/null +++ b/cobpp/test.code/t2.cob @@ -0,0 +1,64 @@ +IDENTIFICATION DIVISION. +PROGRAM-ID. TEST2. +ENVIRONMENT DIVISION. +CONFIGURATION SECTION. +* SPECIAL-NAMES. +* DECIMAL-POINT IS COMMA. +INPUT-OUTPUT SECTION. +FILE-CONTROL. +DATA DIVISION. +FILE SECTION. + +WORKING-STORAGE SECTION. +01 XX. + 05 X1 PIC 9(4) VALUE 0. + 05 X2 PIC 9(4) VALUE 0. + 05 X3 PIC 9(4)V99 VALUE .33. +01 W01-COMPUTE-C PIC X(54) VALUE 'fffffff ' + & + 'ggggggggggggggggggggggg ' + & + 'hhhhhhhhhhhhhhhhhhhhhhh '. +01 W01-COMPUTE-E PIC S9(5)V99 USAGE COMP VALUE 99876. + +* COPY TEST02D. +* COPY TEST02E IN TEST-LIB. +* COPY 'copybooks2/TEST02F'. +* COPY 'copybooks2/TEST02F' IN TEST-LIB. +* COPY '/root/copybooks2/TEST02F' IN TEST-LIB. +* COPY '/root/copybooks2/TEST02F'. +* COPY /root/copybooks2/TEST02F. +* COPY TEST02C.cpy . +COPY TEST02C. + +COPY TEST02 IN TESTLIB REPLACING + W01-COMPUTE-0 BY W01-COMPUTE-00, + 'W01-1XXX' BY 'W01-2', + ==9(5)== BY ==9(04)== . + +COPY TEST02 IN TESTLIB REPLACING + W01-COMPUTE-0 BY W01-COMPUTE-000 + 'W01-1XXX' BY 'W01-3' + ==9(5)== BY ==9(07)== . + +PROCEDURE DIVISION. + +A-000. + +* READY TRACE. + + PERFORM A-100. + +* RESET TRACE. + + STOP RUN. + +A-100. + + DISPLAY "ENTER A-100". + + MOVE 1 TO X1. + ADD 1 TO X1. + MOVE X1 TO X2. + + DISPLAY "EXIT A-100". diff --git a/cobpp/test.code/t3.cob b/cobpp/test.code/t3.cob new file mode 100644 index 0000000..c09cd10 --- /dev/null +++ b/cobpp/test.code/t3.cob @@ -0,0 +1,54 @@ + IDENTIFICATION DIVISION. + PROGRAM-ID. TEST3. + ENVIRONMENT DIVISION. + CONFIGURATION SECTION. +* SPECIAL-NAMES. +* DECIMAL-POINT IS COMMA. + INPUT-OUTPUT SECTION. + FILE-CONTROL. + DATA DIVISION. + FILE SECTION. + + WORKING-STORAGE SECTION. + + REPLACE ==9(5)== BY ==9(07)==. + + 01 XX. + 05 X1 PIC 9(4) VALUE 0. + 05 X2 PIC 9(4) VALUE 0. + 05 X3 PIC 9(4)V99 VALUE .33. + 01 W01-COMPUTE-E PIC S9(5)V99 USAGE COMP VALUE 99876. + 01 W01-CATSTR PIC X(30) VALUE "0123456789" & + "0123456789" & *< test of in-line comment + "0123456789". + +* COPY 'TEST02C.cpy' . + COPY TEST02C. + + COPY TEST02 IN TESTLIB REPLACING + W01-COMPUTE-0 BY W01-COMPUTE-00, + 'W01-1XXX' BY 'W01-2', + ==9(5)== BY ==9(04)== . + + + PROCEDURE DIVISION. + + A-000. + +* READY TRACE. + + PERFORM A-100. + +* RESET TRACE. + + STOP RUN. + + A-100. + + DISPLAY "ENTER A-100". + + MOVE 1 TO X1. + ADD 1 TO X1. + MOVE X1 TO X2. + + DISPLAY "EXIT A-100". diff --git a/cobroutines/Makefile b/cobroutines/Makefile new file mode 100644 index 0000000..6628d09 --- /dev/null +++ b/cobroutines/Makefile @@ -0,0 +1,167 @@ +# +# Makefile.in for the Tiny COBOL compiler runtime routines library +# + +# +# Debug flags are set in htconfig.h +# -DPICTURE_TESTING -DDEBUG_RTS +# +CCX=gcc +ASM=as + +INCLUDES=-I/usr/include -I/usr/local/include -I/usr/include/glibc -I/c/tcl/include -I../lib -I.. -I. -I/c/PostgreSQL/include + +CCXFLAGS=${INCLUDES} -Wall + +WRES=windres +WRESFLAGS=-O coff + +RANLIB=ranlib +AR=ar + +lib_dir=C:/TinyCOBOL + +INSTRC=${lib_dir} +RCFILE=htrtconf + +INSTALL=install.exe +INSTALL_DATA=${INSTALL} + +MV = mv -f +RM = rm -f +LNK = ln -sf +MKDIR = mkdir -p + +# + +LIBS1=-L/usr/local/lib -L/c/mingw/lib -lpdcurses +LIBS2=-L/usr/local/lib /d/tinycobol/tcltk84/tcl84.dll /d/tinycobol/tcltk84/tk84.dll +LIBS3=-L/usr/local/lib -L/c/PostgreSQL/lib -lpq + +# +# Default install directory is set in htconfig.h +# + +lib_version=0.73.0 + +lib_name1=tcroutines +lib_name2=tctcl +lib_name3=tcpgres + +# +# Libraries to build +# +STATIC_LIB1=lib${lib_name1}.a +SHARED_LIB1=${lib_name1}.dll +SHARED_LIB1A=${lib_name1}.dll.a + +STATIC_LIB2=lib${lib_name2}.a +SHARED_LIB2=${lib_name2}.dll +SHARED_LIB2A=${lib_name2}.dll.a + +STATIC_LIB3=lib${lib_name3}.a +SHARED_LIB3=${lib_name3}.dll +SHARED_LIB3A=${lib_name3}.dll.a + +# +# Sources list +# +SRC1 = screen.c dir.c files.c globals.c system.c +OBJS1 = $(SRC1:.c=.o) + +SRC2 = tctcl.c +OBJS2 = $(SRC2:.c=.o) + +SRC3 = sql_clear_query.c sql_connect_db.c sql_disconnect_db.c sql_exec_query.c \ + sql_free_memory.c sql_get_tuple.c sql_get_value.c sql_max_field.c sql_max_tuple.c sql_status_message.c +OBJS3 = $(SRC3:.c=.o) + +# +# Rules for compiling .c .s sources +# +.SUFFIX: .c .o .lo +.c.o: + $(CCX) $(CCXFLAGS) -c $< + +%.lo: %.c + $(CCX) $(CCXFLAGS1) -c $< -o $@ + +# +# Notes on building and using the shared htcobol library. +# - The linker will try to use the shared libraries by default. +# If not available it will try to use the static libraries. +# - When linking with a shared htcobol library, all other libraries must be +# named, whether they are used in the cobol program or not. +# (i.e. -lncurses -ldb) +# - To run a cobol program built with a shared htcobol library, and the +# htcobol library is not installed in one of the standard locations, use +# the $LD_LIBRARY_PATH environmental variable to add this path. +# (i.e. export LD_LIBRARY_PATH=this path:$LD_LIBRARY_PATH ) +# - For testing purposes, it is recommended that only a static htcobol library +# be used, since gdb will not work properly with shared libraries. +# + +all: static-libs +devel: static-libs shared-libs + +static-libs: ${STATIC_LIB1} ${STATIC_LIB2} ${STATIC_LIB3} +shared-libs: ${SHARED_LIB1} ${SHARED_LIB2} ${SHARED_LIB3} + +# +# Rules for building the static libraries +# +${STATIC_LIB1}: ${OBJS1} + ${AR} cr ${STATIC_LIB1} ${OBJS1} + ${RANLIB} ${STATIC_LIB1} + +${STATIC_LIB2}: ${OBJS2} + ${AR} cr ${STATIC_LIB2} ${OBJS2} + ${RANLIB} ${STATIC_LIB2} + +${STATIC_LIB3}: ${OBJS3} + ${AR} cr ${STATIC_LIB3} ${OBJS3} + ${RANLIB} ${STATIC_LIB3} + +# +# Rules for building the shared libraries +# +${SHARED_LIB1}: ${OBJS1} + ${CCX} -shared -Wl,--out-implib,${lib_name1}.dll.a,--output-def,${lib_name1}.def -o ${SHARED_LIB1} $(OBJS1) ${LIBS1} + +${SHARED_LIB2}: ${OBJS2} + ${CCX} -shared -Wl,--out-implib,${lib_name2}.dll.a,--output-def,${lib_name2}.def -o ${SHARED_LIB2} $(OBJS2) ${LIBS2} + +${SHARED_LIB3}: ${OBJS3} + ${CCX} -shared -Wl,--out-implib,${lib_name3}.dll.a,--output-def,${lib_name3}.def -o ${SHARED_LIB3} $(OBJS3) ${LIBS3} + +# +# Rule for cleaning +# +clean: + @${RM} ${OBJS1} ${OBJS2} ${OBJS3} \ + ${STATIC_LIB1} ${SHARED_LIB1} ${SHARED_LIB1A} \ + ${STATIC_LIB2} ${SHARED_LIB2} ${SHARED_LIB2A} \ + ${STATIC_LIB3} ${SHARED_LIB3} ${SHARED_LIB3A} \ + core *.bak *.o *.lo + +# +# Rule for installing +# +install: install-dir install-static install-shared + +install-static: ${STATIC_LIB1} ${STATIC_LIB2} ${STATIC_LIB3} +# ${INSTALL} ${STATIC_LIB1} ${lib_dir}/${STATIC_LIB1} +# ${INSTALL} ${STATIC_LIB2} ${lib_dir}/${STATIC_LIB2} +# ${INSTALL} ${STATIC_LIB3} ${lib_dir}/${STATIC_LIB3} + +install-shared: ${SHARED_LIB1} ${SHARED_LIB2} ${SHARED_LIB3} + ${INSTALL} ${SHARED_LIB1} ${lib_dir}/${SHARED_LIB1} + ${INSTALL} ${SHARED_LIB2} ${lib_dir}/${SHARED_LIB2} + ${INSTALL} ${SHARED_LIB3} ${lib_dir}/${SHARED_LIB3} +# ${INSTALL} ${SHARED_LIB1A} ${lib_dir}/${SHARED_LIB1A} +# ${INSTALL} ${SHARED_LIB2A} ${lib_dir}/${SHARED_LIB2A} +# ${INSTALL} ${SHARED_LIB3A} ${lib_dir}/${SHARED_LIB3A} + +install-dir: + $(MKDIR) $(INSTRC) + diff --git a/cobroutines/Makefile.mingw b/cobroutines/Makefile.mingw new file mode 100644 index 0000000..f6319a1 --- /dev/null +++ b/cobroutines/Makefile.mingw @@ -0,0 +1,167 @@ +# +# Makefile.in for the Tiny COBOL compiler runtime routines library +# + +# +# Debug flags are set in htconfig.h +# -DPICTURE_TESTING -DDEBUG_RTS +# +CCX=gcc +ASM=as + +INCLUDES=-I/usr/include -I/usr/local/include -I/usr/include/glibc -I/c/tcl/include -I../lib -I.. -I. -I/c/PostgreSQL/include + +CCXFLAGS=${INCLUDES} -Wall + +WRES=windres +WRESFLAGS=-O coff + +RANLIB=ranlib +AR=ar + +lib_dir=@install_dir@ + +INSTRC=${lib_dir} +RCFILE=htrtconf + +INSTALL=install.exe +INSTALL_DATA=${INSTALL} + +MV = mv -f +RM = rm -f +LNK = ln -sf +MKDIR = mkdir -p + +# + +LIBS1=-L/usr/local/lib -L/c/mingw/lib -lcurses +LIBS2=-L/usr/local/lib /e/tinycobol/tcltk84/tcl84.dll /e/tinycobol/tcltk84/tk84.dll +LIBS3=-L/usr/local/lib -L/c/PostgreSQL/lib -lpq + +# +# Default install directory is set in htconfig.h +# + +lib_version=@tcob_version@ + +lib_name1=tcroutines +lib_name2=tctcl +lib_name3=tcpgres + +# +# Libraries to build +# +STATIC_LIB1=lib${lib_name1}.a +SHARED_LIB1=${lib_name1}.dll +SHARED_LIB1A=${lib_name1}.dll.a + +STATIC_LIB2=lib${lib_name2}.a +SHARED_LIB2=${lib_name2}.dll +SHARED_LIB2A=${lib_name2}.dll.a + +STATIC_LIB3=lib${lib_name3}.a +SHARED_LIB3=${lib_name3}.dll +SHARED_LIB3A=${lib_name3}.dll.a + +# +# Sources list +# +SRC1 = screen.c dir.c files.c globals.c system.c +OBJS1 = $(SRC1:.c=.o) + +SRC2 = tctcl.c +OBJS2 = $(SRC2:.c=.o) + +SRC3 = sql_clear_query.c sql_connect_db.c sql_disconnect_db.c sql_exec_query.c \ + sql_free_memory.c sql_get_tuple.c sql_get_value.c sql_max_field.c sql_max_tuple.c sql_status_message.c +OBJS3 = $(SRC3:.c=.o) + +# +# Rules for compiling .c .s sources +# +.SUFFIX: .c .o .lo +.c.o: + $(CCX) $(CCXFLAGS) -c $< + +%.lo: %.c + $(CCX) $(CCXFLAGS1) -c $< -o $@ + +# +# Notes on building and using the shared htcobol library. +# - The linker will try to use the shared libraries by default. +# If not available it will try to use the static libraries. +# - When linking with a shared htcobol library, all other libraries must be +# named, whether they are used in the cobol program or not. +# (i.e. -lncurses -ldb) +# - To run a cobol program built with a shared htcobol library, and the +# htcobol library is not installed in one of the standard locations, use +# the $LD_LIBRARY_PATH environmental variable to add this path. +# (i.e. export LD_LIBRARY_PATH=this path:$LD_LIBRARY_PATH ) +# - For testing purposes, it is recommended that only a static htcobol library +# be used, since gdb will not work properly with shared libraries. +# + +all: static-libs +devel: static-libs shared-libs + +static-libs: ${STATIC_LIB1} ${STATIC_LIB2} ${STATIC_LIB3} +shared-libs: ${SHARED_LIB1} ${SHARED_LIB2} ${SHARED_LIB3} + +# +# Rules for building the static libraries +# +${STATIC_LIB1}: ${OBJS1} + ${AR} cr ${STATIC_LIB1} ${OBJS1} + ${RANLIB} ${STATIC_LIB1} + +${STATIC_LIB2}: ${OBJS2} + ${AR} cr ${STATIC_LIB2} ${OBJS2} + ${RANLIB} ${STATIC_LIB2} + +${STATIC_LIB3}: ${OBJS3} + ${AR} cr ${STATIC_LIB3} ${OBJS3} + ${RANLIB} ${STATIC_LIB3} + +# +# Rules for building the shared libraries +# +${SHARED_LIB1}: ${OBJS1} + ${CCX} -shared -Wl,--out-implib,${lib_name1}.dll.a,--output-def,${lib_name1}.def -o ${SHARED_LIB1} $(OBJS1) ${LIBS1} + +${SHARED_LIB2}: ${OBJS2} + ${CCX} -shared -Wl,--out-implib,${lib_name2}.dll.a,--output-def,${lib_name2}.def -o ${SHARED_LIB2} $(OBJS2) ${LIBS2} + +${SHARED_LIB3}: ${OBJS3} + ${CCX} -shared -Wl,--out-implib,${lib_name3}.dll.a,--output-def,${lib_name3}.def -o ${SHARED_LIB3} $(OBJS3) ${LIBS3} + +# +# Rule for cleaning +# +clean: + @${RM} ${OBJS1} ${OBJS2} ${OBJS3} \ + ${STATIC_LIB1} ${SHARED_LIB1} ${SHARED_LIB1A} \ + ${STATIC_LIB2} ${SHARED_LIB2} ${SHARED_LIB2A} \ + ${STATIC_LIB3} ${SHARED_LIB3} ${SHARED_LIB3A} \ + core *.bak *.o *.lo + +# +# Rule for installing +# +install: install-dir install-static install-shared + +install-static: ${STATIC_LIB1} ${STATIC_LIB2} ${STATIC_LIB3} +# ${INSTALL} ${STATIC_LIB1} ${lib_dir}/${STATIC_LIB1} +# ${INSTALL} ${STATIC_LIB2} ${lib_dir}/${STATIC_LIB2} +# ${INSTALL} ${STATIC_LIB3} ${lib_dir}/${STATIC_LIB3} + +install-shared: ${SHARED_LIB1} ${SHARED_LIB2} ${SHARED_LIB3} + ${INSTALL} ${SHARED_LIB1} ${lib_dir}/${SHARED_LIB1} + ${INSTALL} ${SHARED_LIB2} ${lib_dir}/${SHARED_LIB2} + ${INSTALL} ${SHARED_LIB3} ${lib_dir}/${SHARED_LIB3} +# ${INSTALL} ${SHARED_LIB1A} ${lib_dir}/${SHARED_LIB1A} +# ${INSTALL} ${SHARED_LIB2A} ${lib_dir}/${SHARED_LIB2A} +# ${INSTALL} ${SHARED_LIB3A} ${lib_dir}/${SHARED_LIB3A} + +install-dir: + $(MKDIR) $(INSTRC) + diff --git a/cobroutines/STATUS.txt b/cobroutines/STATUS.txt new file mode 100644 index 0000000..2daff28 --- /dev/null +++ b/cobroutines/STATUS.txt @@ -0,0 +1,213 @@ +COB Routines STATUS file +------------------------ + +At this moment we have the following routines implemented: + +- cbl_change_dir +- cbl_check_file_exist +- cbl_clear_scr +- cbl_close_file +- cbl_copy_file +- cbl_create_dir +- cbl_create_file +- cbl_delete_dir +- cbl_delete_file +- cbl_flush_file +- cbl_get_csr_pos +- cbl_get_current_dir +- cbl_get_kbd_status +- cbl_get_os_info +- cbl_open_file +- cbl_read_file +- cbl_read_kbd_char +- cbl_read_scr_attrs +- cbl_read_scr_chars +- cbl_read_scr_chattrs +- cbl_rename_file +- cbl_set_csr_pos +- cbl_toupper +- cbl_tolower +- cbl_write_file +- cbl_write_scr_attrs +- cbl_write_scr_chars +- cbl_write_scr_chattrs + +At this moment this routines below its not implemented. + +- cbl_abort_run_unit +- cbl_alloc_dyn_mem +- cbl_alloc_mem +- cbl_alloc_thread_mem +- cbl_and +- cbl_cancel_proc +- cbl_close_vfile +- cbl_debugbreak +- cbl_eq +- cbl_error_proc +- cbl_event_clear +- cbl_event_close +- cbl_event_open_intra +- cbl_event_post +- cbl_event_wait +- cbl_exec_run_unit +- cbl_filename_convert +- cbl_filename_max_length +- cbl_free_dyn_mem +- cbl_free_mem +- cbl_free_record_lock +- cbl_free_shmem +- cbl_free_thread_mem +- cbl_get_exit_info +- cbl_get_mouse_mask +- cbl_get_mouse_position +- cbl_get_mouse_status +- cbl_get_program_info +- cbl_get_record_lock +- cbl_get_scr_line_draw +- cbl_get_scr_size +- cbl_get_shmem_ptr +- cbl_hide_mouse +- cbl_imp +- cbl_init_mouse +- cbl_join_filename +- cbl_locate_file +- cbl_monitor_browse +- cbl_monitor_browse_to_read +- cbl_monitor_browse_to_write +- cbl_monitor_close +- cbl_monitor_open_intra +- cbl_monitor_read +- cbl_monitor_release +- cbl_monitor_unbrowse +- cbl_monitor_unread +- cbl_monitor_write +- cbl_monitor_write_to_browse +- cbl_monitor_acquire +- cbl_mutex_acquire +- cbl_mutex_close +- cbl_mutex_open_intra +- cbl_mutex_release +- cbl_nls_close_msg_file +- cbl_nls_compare +- cbl_nls_info +- cbl_nls_open_msg_file +- cbl_nls_read_msg +- cbl_not +- cbl_open_vfile +- cbl_or +- cbl_put_shmem_ptr +- cbl_read_mouse_event +- cbl_read_vfile +- cbl_scr_allocate_color +- cbl_scr_allocate_vc_color +- cbl_scr_create_vc +- cbl_scr_destroy_vc +- cbl_scr_get_attr_info +- cbl_scr_get_attributes +- cbl_scr_name_to_rgb +- cbl_scr_query_colormap +- cbl_scr_restore_attributes +- cbl_scr_save_attributes +- cbl_scr_set_attributes +- cbl_scr_set_pc_attributes +- cbl_semaphore_acquire +- cbl_semaphore_close +- cbl_semaphore_open_intra +- cbl_semaphore_release +- cbl_set_mouse_mask +- cbl_show_mouse +- cbl_split_filename +- cbl_subsystem +- cbl_swap_scr_chattrs +- cbl_term_mouse +- cbl_test_record_lock +- cbl_thread_create +- cbl_thread_create_p +- cbl_thread_detach +- cbl_thread_exit +- cbl_thread_iddata_alloc +- cbl_thread_iddata_get +- cbl_thread_kill +- cbl_thread_list_end +- cbl_thread_list_next +- cbl_thread_list_start +- cbl_thread_lock +- cbl_thread_prog_lock +- cbl_thread_prog_unlock +- cbl_thread_resume +- cbl_thread_self +- cbl_thread_sleep +- cbl_thread_suspend +- cbl_thread_unlock +- cbl_thread_wait +- cbl_thread_yield +- cbl_tstore_get +- cbl_write_scr_chars_attr +- cbl_write_scr_n_attr +- cbl_write_scr_n_char +- cbl_write_scr_n_chattr +- cbl_write_scr_tty +- cbl_write_vfile +- cbl_xor +- cbl_yield_run_unit +- mf_client_state_allocate +- mf_client_state_delete +- mf_client_state_expiry +- mf_client_state_file +- mf_client_state_purge +- mf_client_state_restore +- mf_client_state_save +- pc_find_drives +- pc_print_file +- pc_printer_close +- pc_printer_control +- pc_printer_default_font +- pc_printer_default_name +- pc_printer_default_properties +- pc_printer_free_bmp +- pc_printer_get_color +- pc_printer_get_font +- pc_printer_info +- pc_printer_load_bmp +- pc_printer_open +- pc_printer_redirection_proc +- pc_printer_set_color +- pc_printer_set_default +- pc_printer_set_font +- pc_printer_write +- pc_printer_write_bmp +- pc_read_drive +- pc_win_char_to_oem +- pc_win_init +- pc_win_oem_to_char +- x"91" function 11. +- x"91" function 12. +- x"91" function 13. +- x"91" function 14. +- x"91" function 15. +- x"91" function 16. +- x"91" function 35. +- x"91" function 46. +- x"91" function 47. +- x"91" function 48. +- x"91" function 49. +- x"91" function 69. +- x"A7" function 6/7. +- x"A7" function 16. +- x"A7" function 17. +- x"A7" function 18. +- x"A7" function 20/21. +- x"A7" function 25. +- x"AF" function 1. +- x"AF" function 18. +- x"AF" function 22. +- x"AF" function 26. +- x"B0" function 0. +- x"B0" function 2. +- x"B0" function 4. +- x"E5". +- x"F4". +- x"F5". + + + diff --git a/cobroutines/X11/X.h b/cobroutines/X11/X.h new file mode 100644 index 0000000..bdc4f13 --- /dev/null +++ b/cobroutines/X11/X.h @@ -0,0 +1,677 @@ +/* + * $XConsortium: X.h,v 1.66 88/09/06 15:55:56 jim Exp $ + */ + +/* Definitions for the X window system likely to be used by applications */ + +#ifndef X_H +#define X_H + +/*********************************************************** +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts, +and the Massachusetts Institute of Technology, Cambridge, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the names of Digital or MIT not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ +#define X_PROTOCOL 11 /* current protocol version */ +#define X_PROTOCOL_REVISION 0 /* current minor version */ + +#if defined(MAC_OSX_TK) +# define Cursor XCursor +# define Region XRegion +#endif + +/* Resources */ + +#ifdef _WIN64 +typedef __int64 XID; +#else +typedef unsigned long XID; +#endif + +typedef XID Window; +typedef XID Drawable; +typedef XID Font; +typedef XID Pixmap; +typedef XID Cursor; +typedef XID Colormap; +typedef XID GContext; +typedef XID KeySym; + +typedef unsigned long Mask; + +typedef unsigned long Atom; + +typedef unsigned long VisualID; + +typedef unsigned long Time; + +typedef unsigned long KeyCode; /* In order to use IME, the Macintosh needs + * to pack 3 bytes into the keyCode field in + * the XEvent. In the real X.h, a KeyCode is + * defined as a short, which wouldn't be big + * enough. */ + +/***************************************************************** + * RESERVED RESOURCE AND CONSTANT DEFINITIONS + *****************************************************************/ + +#define None 0L /* universal null resource or null atom */ + +#define ParentRelative 1L /* background pixmap in CreateWindow + and ChangeWindowAttributes */ + +#define CopyFromParent 0L /* border pixmap in CreateWindow + and ChangeWindowAttributes + special VisualID and special window + class passed to CreateWindow */ + +#define PointerWindow 0L /* destination window in SendEvent */ +#define InputFocus 1L /* destination window in SendEvent */ + +#define PointerRoot 1L /* focus window in SetInputFocus */ + +#define AnyPropertyType 0L /* special Atom, passed to GetProperty */ + +#define AnyKey 0L /* special Key Code, passed to GrabKey */ + +#define AnyButton 0L /* special Button Code, passed to GrabButton */ + +#define AllTemporary 0L /* special Resource ID passed to KillClient */ + +#define CurrentTime 0L /* special Time */ + +#define NoSymbol 0L /* special KeySym */ + +/***************************************************************** + * EVENT DEFINITIONS + *****************************************************************/ + +/* Input Event Masks. Used as event-mask window attribute and as arguments + to Grab requests. Not to be confused with event names. */ + +#define NoEventMask 0L +#define KeyPressMask (1L<<0) +#define KeyReleaseMask (1L<<1) +#define ButtonPressMask (1L<<2) +#define ButtonReleaseMask (1L<<3) +#define EnterWindowMask (1L<<4) +#define LeaveWindowMask (1L<<5) +#define PointerMotionMask (1L<<6) +#define PointerMotionHintMask (1L<<7) +#define Button1MotionMask (1L<<8) +#define Button2MotionMask (1L<<9) +#define Button3MotionMask (1L<<10) +#define Button4MotionMask (1L<<11) +#define Button5MotionMask (1L<<12) +#define ButtonMotionMask (1L<<13) +#define KeymapStateMask (1L<<14) +#define ExposureMask (1L<<15) +#define VisibilityChangeMask (1L<<16) +#define StructureNotifyMask (1L<<17) +#define ResizeRedirectMask (1L<<18) +#define SubstructureNotifyMask (1L<<19) +#define SubstructureRedirectMask (1L<<20) +#define FocusChangeMask (1L<<21) +#define PropertyChangeMask (1L<<22) +#define ColormapChangeMask (1L<<23) +#define OwnerGrabButtonMask (1L<<24) + +/* Event names. Used in "type" field in XEvent structures. Not to be +confused with event masks above. They start from 2 because 0 and 1 +are reserved in the protocol for errors and replies. */ + +#define KeyPress 2 +#define KeyRelease 3 +#define ButtonPress 4 +#define ButtonRelease 5 +#define MotionNotify 6 +#define EnterNotify 7 +#define LeaveNotify 8 +#define FocusIn 9 +#define FocusOut 10 +#define KeymapNotify 11 +#define Expose 12 +#define GraphicsExpose 13 +#define NoExpose 14 +#define VisibilityNotify 15 +#define CreateNotify 16 +#define DestroyNotify 17 +#define UnmapNotify 18 +#define MapNotify 19 +#define MapRequest 20 +#define ReparentNotify 21 +#define ConfigureNotify 22 +#define ConfigureRequest 23 +#define GravityNotify 24 +#define ResizeRequest 25 +#define CirculateNotify 26 +#define CirculateRequest 27 +#define PropertyNotify 28 +#define SelectionClear 29 +#define SelectionRequest 30 +#define SelectionNotify 31 +#define ColormapNotify 32 +#define ClientMessage 33 +#define MappingNotify 34 +#define LASTEvent 35 /* must be bigger than any event # */ + + +/* Key masks. Used as modifiers to GrabButton and GrabKey, results of QueryPointer, + state in various key-, mouse-, and button-related events. */ + +#define ShiftMask (1<<0) +#define LockMask (1<<1) +#define ControlMask (1<<2) +#define Mod1Mask (1<<3) +#define Mod2Mask (1<<4) +#define Mod3Mask (1<<5) +#define Mod4Mask (1<<6) +#define Mod5Mask (1<<7) + +/* modifier names. Used to build a SetModifierMapping request or + to read a GetModifierMapping request. These correspond to the + masks defined above. */ +#define ShiftMapIndex 0 +#define LockMapIndex 1 +#define ControlMapIndex 2 +#define Mod1MapIndex 3 +#define Mod2MapIndex 4 +#define Mod3MapIndex 5 +#define Mod4MapIndex 6 +#define Mod5MapIndex 7 + + +/* button masks. Used in same manner as Key masks above. Not to be confused + with button names below. */ + +#define Button1Mask (1<<8) +#define Button2Mask (1<<9) +#define Button3Mask (1<<10) +#define Button4Mask (1<<11) +#define Button5Mask (1<<12) + +#define AnyModifier (1<<15) /* used in GrabButton, GrabKey */ + + +/* button names. Used as arguments to GrabButton and as detail in ButtonPress + and ButtonRelease events. Not to be confused with button masks above. + Note that 0 is already defined above as "AnyButton". */ + +#define Button1 1 +#define Button2 2 +#define Button3 3 +#define Button4 4 +#define Button5 5 + +/* Notify modes */ + +#define NotifyNormal 0 +#define NotifyGrab 1 +#define NotifyUngrab 2 +#define NotifyWhileGrabbed 3 + +#define NotifyHint 1 /* for MotionNotify events */ + +/* Notify detail */ + +#define NotifyAncestor 0 +#define NotifyVirtual 1 +#define NotifyInferior 2 +#define NotifyNonlinear 3 +#define NotifyNonlinearVirtual 4 +#define NotifyPointer 5 +#define NotifyPointerRoot 6 +#define NotifyDetailNone 7 + +/* Visibility notify */ + +#define VisibilityUnobscured 0 +#define VisibilityPartiallyObscured 1 +#define VisibilityFullyObscured 2 + +/* Circulation request */ + +#define PlaceOnTop 0 +#define PlaceOnBottom 1 + +/* protocol families */ + +#define FamilyInternet 0 +#define FamilyDECnet 1 +#define FamilyChaos 2 + +/* Property notification */ + +#define PropertyNewValue 0 +#define PropertyDelete 1 + +/* Color Map notification */ + +#define ColormapUninstalled 0 +#define ColormapInstalled 1 + +/* GrabPointer, GrabButton, GrabKeyboard, GrabKey Modes */ + +#define GrabModeSync 0 +#define GrabModeAsync 1 + +/* GrabPointer, GrabKeyboard reply status */ + +#define GrabSuccess 0 +#define AlreadyGrabbed 1 +#define GrabInvalidTime 2 +#define GrabNotViewable 3 +#define GrabFrozen 4 + +/* AllowEvents modes */ + +#define AsyncPointer 0 +#define SyncPointer 1 +#define ReplayPointer 2 +#define AsyncKeyboard 3 +#define SyncKeyboard 4 +#define ReplayKeyboard 5 +#define AsyncBoth 6 +#define SyncBoth 7 + +/* Used in SetInputFocus, GetInputFocus */ + +#define RevertToNone (int)None +#define RevertToPointerRoot (int)PointerRoot +#define RevertToParent 2 + +/***************************************************************** + * ERROR CODES + *****************************************************************/ + +#define Success 0 /* everything's okay */ +#define BadRequest 1 /* bad request code */ +#define BadValue 2 /* int parameter out of range */ +#define BadWindow 3 /* parameter not a Window */ +#define BadPixmap 4 /* parameter not a Pixmap */ +#define BadAtom 5 /* parameter not an Atom */ +#define BadCursor 6 /* parameter not a Cursor */ +#define BadFont 7 /* parameter not a Font */ +#define BadMatch 8 /* parameter mismatch */ +#define BadDrawable 9 /* parameter not a Pixmap or Window */ +#define BadAccess 10 /* depending on context: + - key/button already grabbed + - attempt to free an illegal + cmap entry + - attempt to store into a read-only + color map entry. + - attempt to modify the access control + list from other than the local host. + */ +#define BadAlloc 11 /* insufficient resources */ +#define BadColor 12 /* no such colormap */ +#define BadGC 13 /* parameter not a GC */ +#define BadIDChoice 14 /* choice not in range or already used */ +#define BadName 15 /* font or color name doesn't exist */ +#define BadLength 16 /* Request length incorrect */ +#define BadImplementation 17 /* server is defective */ + +#define FirstExtensionError 128 +#define LastExtensionError 255 + +/***************************************************************** + * WINDOW DEFINITIONS + *****************************************************************/ + +/* Window classes used by CreateWindow */ +/* Note that CopyFromParent is already defined as 0 above */ + +#define InputOutput 1 +#define InputOnly 2 + +/* Window attributes for CreateWindow and ChangeWindowAttributes */ + +#define CWBackPixmap (1L<<0) +#define CWBackPixel (1L<<1) +#define CWBorderPixmap (1L<<2) +#define CWBorderPixel (1L<<3) +#define CWBitGravity (1L<<4) +#define CWWinGravity (1L<<5) +#define CWBackingStore (1L<<6) +#define CWBackingPlanes (1L<<7) +#define CWBackingPixel (1L<<8) +#define CWOverrideRedirect (1L<<9) +#define CWSaveUnder (1L<<10) +#define CWEventMask (1L<<11) +#define CWDontPropagate (1L<<12) +#define CWColormap (1L<<13) +#define CWCursor (1L<<14) + +/* ConfigureWindow structure */ + +#define CWX (1<<0) +#define CWY (1<<1) +#define CWWidth (1<<2) +#define CWHeight (1<<3) +#define CWBorderWidth (1<<4) +#define CWSibling (1<<5) +#define CWStackMode (1<<6) + + +/* Bit Gravity */ + +#define ForgetGravity 0 +#define NorthWestGravity 1 +#define NorthGravity 2 +#define NorthEastGravity 3 +#define WestGravity 4 +#define CenterGravity 5 +#define EastGravity 6 +#define SouthWestGravity 7 +#define SouthGravity 8 +#define SouthEastGravity 9 +#define StaticGravity 10 + +/* Window gravity + bit gravity above */ + +#define UnmapGravity 0 + +/* Used in CreateWindow for backing-store hint */ + +#define NotUseful 0 +#define WhenMapped 1 +#define Always 2 + +/* Used in GetWindowAttributes reply */ + +#define IsUnmapped 0 +#define IsUnviewable 1 +#define IsViewable 2 + +/* Used in ChangeSaveSet */ + +#define SetModeInsert 0 +#define SetModeDelete 1 + +/* Used in ChangeCloseDownMode */ + +#define DestroyAll 0 +#define RetainPermanent 1 +#define RetainTemporary 2 + +/* Window stacking method (in configureWindow) */ + +#define Above 0 +#define Below 1 +#define TopIf 2 +#define BottomIf 3 +#define Opposite 4 + +/* Circulation direction */ + +#define RaiseLowest 0 +#define LowerHighest 1 + +/* Property modes */ + +#define PropModeReplace 0 +#define PropModePrepend 1 +#define PropModeAppend 2 + +/***************************************************************** + * GRAPHICS DEFINITIONS + *****************************************************************/ + +/* graphics functions, as in GC.alu */ + +#define GXclear 0x0 /* 0 */ +#define GXand 0x1 /* src AND dst */ +#define GXandReverse 0x2 /* src AND NOT dst */ +#define GXcopy 0x3 /* src */ +#define GXandInverted 0x4 /* NOT src AND dst */ +#define GXnoop 0x5 /* dst */ +#define GXxor 0x6 /* src XOR dst */ +#define GXor 0x7 /* src OR dst */ +#define GXnor 0x8 /* NOT src AND NOT dst */ +#define GXequiv 0x9 /* NOT src XOR dst */ +#define GXinvert 0xa /* NOT dst */ +#define GXorReverse 0xb /* src OR NOT dst */ +#define GXcopyInverted 0xc /* NOT src */ +#define GXorInverted 0xd /* NOT src OR dst */ +#define GXnand 0xe /* NOT src OR NOT dst */ +#define GXset 0xf /* 1 */ + +/* LineStyle */ + +#define LineSolid 0 +#define LineOnOffDash 1 +#define LineDoubleDash 2 + +/* capStyle */ + +#define CapNotLast 0 +#define CapButt 1 +#define CapRound 2 +#define CapProjecting 3 + +/* joinStyle */ + +#define JoinMiter 0 +#define JoinRound 1 +#define JoinBevel 2 + +/* fillStyle */ + +#define FillSolid 0 +#define FillTiled 1 +#define FillStippled 2 +#define FillOpaqueStippled 3 + +/* fillRule */ + +#define EvenOddRule 0 +#define WindingRule 1 + +/* subwindow mode */ + +#define ClipByChildren 0 +#define IncludeInferiors 1 + +/* SetClipRectangles ordering */ + +#define Unsorted 0 +#define YSorted 1 +#define YXSorted 2 +#define YXBanded 3 + +/* CoordinateMode for drawing routines */ + +#define CoordModeOrigin 0 /* relative to the origin */ +#define CoordModePrevious 1 /* relative to previous point */ + +/* Polygon shapes */ + +#define Complex 0 /* paths may intersect */ +#define Nonconvex 1 /* no paths intersect, but not convex */ +#define Convex 2 /* wholly convex */ + +/* Arc modes for PolyFillArc */ + +#define ArcChord 0 /* join endpoints of arc */ +#define ArcPieSlice 1 /* join endpoints to center of arc */ + +/* GC components: masks used in CreateGC, CopyGC, ChangeGC, OR'ed into + GC.stateChanges */ + +#define GCFunction (1L<<0) +#define GCPlaneMask (1L<<1) +#define GCForeground (1L<<2) +#define GCBackground (1L<<3) +#define GCLineWidth (1L<<4) +#define GCLineStyle (1L<<5) +#define GCCapStyle (1L<<6) +#define GCJoinStyle (1L<<7) +#define GCFillStyle (1L<<8) +#define GCFillRule (1L<<9) +#define GCTile (1L<<10) +#define GCStipple (1L<<11) +#define GCTileStipXOrigin (1L<<12) +#define GCTileStipYOrigin (1L<<13) +#define GCFont (1L<<14) +#define GCSubwindowMode (1L<<15) +#define GCGraphicsExposures (1L<<16) +#define GCClipXOrigin (1L<<17) +#define GCClipYOrigin (1L<<18) +#define GCClipMask (1L<<19) +#define GCDashOffset (1L<<20) +#define GCDashList (1L<<21) +#define GCArcMode (1L<<22) + +#define GCLastBit 22 +/***************************************************************** + * FONTS + *****************************************************************/ + +/* used in QueryFont -- draw direction */ + +#define FontLeftToRight 0 +#define FontRightToLeft 1 + +#define FontChange 255 + +/***************************************************************** + * IMAGING + *****************************************************************/ + +/* ImageFormat -- PutImage, GetImage */ + +#define XYBitmap 0 /* depth 1, XYFormat */ +#define XYPixmap 1 /* depth == drawable depth */ +#define ZPixmap 2 /* depth == drawable depth */ + +/***************************************************************** + * COLOR MAP STUFF + *****************************************************************/ + +/* For CreateColormap */ + +#define AllocNone 0 /* create map with no entries */ +#define AllocAll 1 /* allocate entire map writeable */ + + +/* Flags used in StoreNamedColor, StoreColors */ + +#define DoRed (1<<0) +#define DoGreen (1<<1) +#define DoBlue (1<<2) + +/***************************************************************** + * CURSOR STUFF + *****************************************************************/ + +/* QueryBestSize Class */ + +#define CursorShape 0 /* largest size that can be displayed */ +#define TileShape 1 /* size tiled fastest */ +#define StippleShape 2 /* size stippled fastest */ + +/***************************************************************** + * KEYBOARD/POINTER STUFF + *****************************************************************/ + +#define AutoRepeatModeOff 0 +#define AutoRepeatModeOn 1 +#define AutoRepeatModeDefault 2 + +#define LedModeOff 0 +#define LedModeOn 1 + +/* masks for ChangeKeyboardControl */ + +#define KBKeyClickPercent (1L<<0) +#define KBBellPercent (1L<<1) +#define KBBellPitch (1L<<2) +#define KBBellDuration (1L<<3) +#define KBLed (1L<<4) +#define KBLedMode (1L<<5) +#define KBKey (1L<<6) +#define KBAutoRepeatMode (1L<<7) + +#define MappingSuccess 0 +#define MappingBusy 1 +#define MappingFailed 2 + +#define MappingModifier 0 +#define MappingKeyboard 1 +#define MappingPointer 2 + +/***************************************************************** + * SCREEN SAVER STUFF + *****************************************************************/ + +#define DontPreferBlanking 0 +#define PreferBlanking 1 +#define DefaultBlanking 2 + +#define DisableScreenSaver 0 +#define DisableScreenInterval 0 + +#define DontAllowExposures 0 +#define AllowExposures 1 +#define DefaultExposures 2 + +/* for ForceScreenSaver */ + +#define ScreenSaverReset 0 +#define ScreenSaverActive 1 + +/***************************************************************** + * HOSTS AND CONNECTIONS + *****************************************************************/ + +/* for ChangeHosts */ + +#define HostInsert 0 +#define HostDelete 1 + +/* for ChangeAccessControl */ + +#define EnableAccess 1 +#define DisableAccess 0 + +/* Display classes used in opening the connection + * Note that the statically allocated ones are even numbered and the + * dynamically changeable ones are odd numbered */ + +#define StaticGray 0 +#define GrayScale 1 +#define StaticColor 2 +#define PseudoColor 3 +#define TrueColor 4 +#define DirectColor 5 + + +/* Byte order used in imageByteOrder and bitmapBitOrder */ + +#define LSBFirst 0 +#define MSBFirst 1 + +#if defined(MAC_OSX_TK) +# undef Cursor +# undef Region +#endif + +#endif /* X_H */ diff --git a/cobroutines/X11/Xatom.h b/cobroutines/X11/Xatom.h new file mode 100644 index 0000000..485a423 --- /dev/null +++ b/cobroutines/X11/Xatom.h @@ -0,0 +1,79 @@ +#ifndef XATOM_H +#define XATOM_H 1 + +/* THIS IS A GENERATED FILE + * + * Do not change! Changing this file implies a protocol change! + */ + +#define XA_PRIMARY ((Atom) 1) +#define XA_SECONDARY ((Atom) 2) +#define XA_ARC ((Atom) 3) +#define XA_ATOM ((Atom) 4) +#define XA_BITMAP ((Atom) 5) +#define XA_CARDINAL ((Atom) 6) +#define XA_COLORMAP ((Atom) 7) +#define XA_CURSOR ((Atom) 8) +#define XA_CUT_BUFFER0 ((Atom) 9) +#define XA_CUT_BUFFER1 ((Atom) 10) +#define XA_CUT_BUFFER2 ((Atom) 11) +#define XA_CUT_BUFFER3 ((Atom) 12) +#define XA_CUT_BUFFER4 ((Atom) 13) +#define XA_CUT_BUFFER5 ((Atom) 14) +#define XA_CUT_BUFFER6 ((Atom) 15) +#define XA_CUT_BUFFER7 ((Atom) 16) +#define XA_DRAWABLE ((Atom) 17) +#define XA_FONT ((Atom) 18) +#define XA_INTEGER ((Atom) 19) +#define XA_PIXMAP ((Atom) 20) +#define XA_POINT ((Atom) 21) +#define XA_RECTANGLE ((Atom) 22) +#define XA_RESOURCE_MANAGER ((Atom) 23) +#define XA_RGB_COLOR_MAP ((Atom) 24) +#define XA_RGB_BEST_MAP ((Atom) 25) +#define XA_RGB_BLUE_MAP ((Atom) 26) +#define XA_RGB_DEFAULT_MAP ((Atom) 27) +#define XA_RGB_GRAY_MAP ((Atom) 28) +#define XA_RGB_GREEN_MAP ((Atom) 29) +#define XA_RGB_RED_MAP ((Atom) 30) +#define XA_STRING ((Atom) 31) +#define XA_VISUALID ((Atom) 32) +#define XA_WINDOW ((Atom) 33) +#define XA_WM_COMMAND ((Atom) 34) +#define XA_WM_HINTS ((Atom) 35) +#define XA_WM_CLIENT_MACHINE ((Atom) 36) +#define XA_WM_ICON_NAME ((Atom) 37) +#define XA_WM_ICON_SIZE ((Atom) 38) +#define XA_WM_NAME ((Atom) 39) +#define XA_WM_NORMAL_HINTS ((Atom) 40) +#define XA_WM_SIZE_HINTS ((Atom) 41) +#define XA_WM_ZOOM_HINTS ((Atom) 42) +#define XA_MIN_SPACE ((Atom) 43) +#define XA_NORM_SPACE ((Atom) 44) +#define XA_MAX_SPACE ((Atom) 45) +#define XA_END_SPACE ((Atom) 46) +#define XA_SUPERSCRIPT_X ((Atom) 47) +#define XA_SUPERSCRIPT_Y ((Atom) 48) +#define XA_SUBSCRIPT_X ((Atom) 49) +#define XA_SUBSCRIPT_Y ((Atom) 50) +#define XA_UNDERLINE_POSITION ((Atom) 51) +#define XA_UNDERLINE_THICKNESS ((Atom) 52) +#define XA_STRIKEOUT_ASCENT ((Atom) 53) +#define XA_STRIKEOUT_DESCENT ((Atom) 54) +#define XA_ITALIC_ANGLE ((Atom) 55) +#define XA_X_HEIGHT ((Atom) 56) +#define XA_QUAD_WIDTH ((Atom) 57) +#define XA_WEIGHT ((Atom) 58) +#define XA_POINT_SIZE ((Atom) 59) +#define XA_RESOLUTION ((Atom) 60) +#define XA_COPYRIGHT ((Atom) 61) +#define XA_NOTICE ((Atom) 62) +#define XA_FONT_NAME ((Atom) 63) +#define XA_FAMILY_NAME ((Atom) 64) +#define XA_FULL_NAME ((Atom) 65) +#define XA_CAP_HEIGHT ((Atom) 66) +#define XA_WM_CLASS ((Atom) 67) +#define XA_WM_TRANSIENT_FOR ((Atom) 68) + +#define XA_LAST_PREDEFINED ((Atom) 68) +#endif /* XATOM_H */ diff --git a/cobroutines/X11/Xfuncproto.h b/cobroutines/X11/Xfuncproto.h new file mode 100644 index 0000000..a59379b --- /dev/null +++ b/cobroutines/X11/Xfuncproto.h @@ -0,0 +1,60 @@ +/* $XConsortium: Xfuncproto.h,v 1.7 91/05/13 20:49:21 rws Exp $ */ +/* + * Copyright 1989, 1991 by the Massachusetts Institute of Technology + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, provided + * that the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of M.I.T. not be used in advertising + * or publicity pertaining to distribution of the software without specific, + * written prior permission. M.I.T. makes no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + */ + +/* Definitions to make function prototypes manageable */ + +#ifndef _XFUNCPROTO_H_ +#define _XFUNCPROTO_H_ + +#ifndef NeedFunctionPrototypes +#define NeedFunctionPrototypes 1 +#endif /* NeedFunctionPrototypes */ + +#ifndef NeedVarargsPrototypes +#define NeedVarargsPrototypes 0 +#endif /* NeedVarargsPrototypes */ + +#if NeedFunctionPrototypes + +#ifndef NeedNestedPrototypes +#define NeedNestedPrototypes 1 +#endif /* NeedNestedPrototypes */ + +#ifndef _Xconst +#define _Xconst const +#endif /* _Xconst */ + +#ifndef NeedWidePrototypes +#ifdef NARROWPROTO +#define NeedWidePrototypes 0 +#else +#define NeedWidePrototypes 1 /* default to make interropt. easier */ +#endif +#endif /* NeedWidePrototypes */ + +#endif /* NeedFunctionPrototypes */ + +#ifdef __cplusplus +#define _XFUNCPROTOBEGIN extern "C" { +#define _XFUNCPROTOEND } +#endif + +#ifndef _XFUNCPROTOBEGIN +#define _XFUNCPROTOBEGIN +#define _XFUNCPROTOEND +#endif /* _XFUNCPROTOBEGIN */ + +#endif /* _XFUNCPROTO_H_ */ diff --git a/cobroutines/X11/Xlib.h b/cobroutines/X11/Xlib.h new file mode 100644 index 0000000..3af3682 --- /dev/null +++ b/cobroutines/X11/Xlib.h @@ -0,0 +1,1205 @@ +/* $XConsortium: Xlib.h,v 11.221 93/07/02 14:13:28 gildea Exp $ */ +/* + * Copyright 1985, 1986, 1987, 1991 by the Massachusetts Institute of Technology + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, provided + * that the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of M.I.T. not be used in advertising + * or publicity pertaining to distribution of the software without specific, + * written prior permission. M.I.T. makes no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * X Window System is a Trademark of MIT. + * + */ + + +/* + * Xlib.h - Header definition and support file for the C subroutine + * interface library (Xlib) to the X Window System Protocol (V11). + * Structures and symbols starting with "_" are private to the library. + */ +#ifndef _XLIB_H_ +#define _XLIB_H_ + +#define XlibSpecificationRelease 5 + +#if !defined(MAC_OSX_TK) +# include +#endif +#ifdef MAC_OSX_TK +# include +# define Cursor XCursor +# define Region XRegion +#endif + +/* applications should not depend on these two headers being included! */ +#include + +#ifndef X_WCHAR +#ifdef X_NOT_STDC_ENV +#define X_WCHAR +#endif +#endif + +#ifndef X_WCHAR +#include +#else +/* replace this with #include or typedef appropriate for your system */ +typedef unsigned long wchar_t; +#endif + +typedef char *XPointer; + +#define Bool int +#if defined(MAC_OSX_TK) +/* Use define rather than typedef, since may need to undefine this later */ +#define Status int +#else +typedef int Status; +#endif +#define True 1 +#define False 0 + +#define QueuedAlready 0 +#define QueuedAfterReading 1 +#define QueuedAfterFlush 2 + +#define ConnectionNumber(dpy) ((dpy)->fd) +#define RootWindow(dpy, scr) (((dpy)->screens[(scr)]).root) +#define DefaultScreen(dpy) ((dpy)->default_screen) +#define DefaultRootWindow(dpy) (((dpy)->screens[(dpy)->default_screen]).root) +#define DefaultVisual(dpy, scr) (((dpy)->screens[(scr)]).root_visual) +#define DefaultGC(dpy, scr) (((dpy)->screens[(scr)]).default_gc) +#define BlackPixel(dpy, scr) (((dpy)->screens[(scr)]).black_pixel) +#define WhitePixel(dpy, scr) (((dpy)->screens[(scr)]).white_pixel) +#define AllPlanes ((unsigned long)~0L) +#define QLength(dpy) ((dpy)->qlen) +#define DisplayWidth(dpy, scr) (((dpy)->screens[(scr)]).width) +#define DisplayHeight(dpy, scr) (((dpy)->screens[(scr)]).height) +#define DisplayWidthMM(dpy, scr)(((dpy)->screens[(scr)]).mwidth) +#define DisplayHeightMM(dpy, scr)(((dpy)->screens[(scr)]).mheight) +#define DisplayPlanes(dpy, scr) (((dpy)->screens[(scr)]).root_depth) +#define DisplayCells(dpy, scr) (DefaultVisual((dpy), (scr))->map_entries) +#define ScreenCount(dpy) ((dpy)->nscreens) +#define ServerVendor(dpy) ((dpy)->vendor) +#define ProtocolVersion(dpy) ((dpy)->proto_major_version) +#define ProtocolRevision(dpy) ((dpy)->proto_minor_version) +#define VendorRelease(dpy) ((dpy)->release) +#define DisplayString(dpy) ((dpy)->display_name) +#define DefaultDepth(dpy, scr) (((dpy)->screens[(scr)]).root_depth) +#define DefaultColormap(dpy, scr)(((dpy)->screens[(scr)]).cmap) +#define BitmapUnit(dpy) ((dpy)->bitmap_unit) +#define BitmapBitOrder(dpy) ((dpy)->bitmap_bit_order) +#define BitmapPad(dpy) ((dpy)->bitmap_pad) +#define ImageByteOrder(dpy) ((dpy)->byte_order) +#define NextRequest(dpy) ((dpy)->request + 1) +#define LastKnownRequestProcessed(dpy) ((dpy)->request) + +/* macros for screen oriented applications (toolkit) */ +#define ScreenOfDisplay(dpy, scr)(&((dpy)->screens[(scr)])) +#define DefaultScreenOfDisplay(dpy) (&((dpy)->screens[(dpy)->default_screen])) +#define DisplayOfScreen(s) ((s)->display) +#define RootWindowOfScreen(s) ((s)->root) +#define BlackPixelOfScreen(s) ((s)->black_pixel) +#define WhitePixelOfScreen(s) ((s)->white_pixel) +#define DefaultColormapOfScreen(s)((s)->cmap) +#define DefaultDepthOfScreen(s) ((s)->root_depth) +#define DefaultGCOfScreen(s) ((s)->default_gc) +#define DefaultVisualOfScreen(s)((s)->root_visual) +#define WidthOfScreen(s) ((s)->width) +#define HeightOfScreen(s) ((s)->height) +#define WidthMMOfScreen(s) ((s)->mwidth) +#define HeightMMOfScreen(s) ((s)->mheight) +#define PlanesOfScreen(s) ((s)->root_depth) +#define CellsOfScreen(s) (DefaultVisualOfScreen((s))->map_entries) +#define MinCmapsOfScreen(s) ((s)->min_maps) +#define MaxCmapsOfScreen(s) ((s)->max_maps) +#define DoesSaveUnders(s) ((s)->save_unders) +#define DoesBackingStore(s) ((s)->backing_store) +#define EventMaskOfScreen(s) ((s)->root_input_mask) + +/* + * Extensions need a way to hang private data on some structures. + */ +typedef struct _XExtData { + int number; /* number returned by XRegisterExtension */ + struct _XExtData *next; /* next item on list of data for structure */ + int (*free_private)(); /* called to free private storage */ + XPointer private_data; /* data private to this extension. */ +} XExtData; + +/* + * This file contains structures used by the extension mechanism. + */ +typedef struct { /* public to extension, cannot be changed */ + int extension; /* extension number */ + int major_opcode; /* major op-code assigned by server */ + int first_event; /* first event number for the extension */ + int first_error; /* first error number for the extension */ +} XExtCodes; + +/* + * Data structure for retrieving info about pixmap formats. + */ + +typedef struct { + int depth; + int bits_per_pixel; + int scanline_pad; +} XPixmapFormatValues; + + +/* + * Data structure for setting graphics context. + */ +typedef struct { + int function; /* logical operation */ + unsigned long plane_mask;/* plane mask */ + unsigned long foreground;/* foreground pixel */ + unsigned long background;/* background pixel */ + int line_width; /* line width */ + int line_style; /* LineSolid, LineOnOffDash, LineDoubleDash */ + int cap_style; /* CapNotLast, CapButt, + CapRound, CapProjecting */ + int join_style; /* JoinMiter, JoinRound, JoinBevel */ + int fill_style; /* FillSolid, FillTiled, + FillStippled, FillOpaeueStippled */ + int fill_rule; /* EvenOddRule, WindingRule */ + int arc_mode; /* ArcChord, ArcPieSlice */ + Pixmap tile; /* tile pixmap for tiling operations */ + Pixmap stipple; /* stipple 1 plane pixmap for stipping */ + int ts_x_origin; /* offset for tile or stipple operations */ + int ts_y_origin; + Font font; /* default text font for text operations */ + int subwindow_mode; /* ClipByChildren, IncludeInferiors */ + Bool graphics_exposures;/* boolean, should exposures be generated */ + int clip_x_origin; /* origin for clipping */ + int clip_y_origin; + Pixmap clip_mask; /* bitmap clipping; other calls for rects */ + int dash_offset; /* patterned/dashed line information */ + char dashes; +} XGCValues; + +/* + * Graphics context. The contents of this structure are implementation + * dependent. A GC should be treated as opaque by application code. + */ + +typedef XGCValues *GC; + +/* + * Visual structure; contains information about colormapping possible. + */ +typedef struct { + XExtData *ext_data; /* hook for extension to hang data */ + VisualID visualid; /* visual id of this visual */ +#if defined(__cplusplus) || defined(c_plusplus) + int c_class; /* C++ class of screen (monochrome, etc.) */ +#else + int class; /* class of screen (monochrome, etc.) */ +#endif + unsigned long red_mask, green_mask, blue_mask; /* mask values */ + int bits_per_rgb; /* log base 2 of distinct color values */ + int map_entries; /* color map entries */ +} Visual; + +/* + * Depth structure; contains information for each possible depth. + */ +typedef struct { + int depth; /* this depth (Z) of the depth */ + int nvisuals; /* number of Visual types at this depth */ + Visual *visuals; /* list of visuals possible at this depth */ +} Depth; + +/* + * Information about the screen. The contents of this structure are + * implementation dependent. A Screen should be treated as opaque + * by application code. + */ +typedef struct { + XExtData *ext_data; /* hook for extension to hang data */ + struct _XDisplay *display;/* back pointer to display structure */ + Window root; /* Root window id. */ + int width, height; /* width and height of screen */ + int mwidth, mheight; /* width and height of in millimeters */ + int ndepths; /* number of depths possible */ + Depth *depths; /* list of allowable depths on the screen */ + int root_depth; /* bits per pixel */ + Visual *root_visual; /* root visual */ + GC default_gc; /* GC for the root root visual */ + Colormap cmap; /* default color map */ + unsigned long white_pixel; + unsigned long black_pixel; /* White and Black pixel values */ + int max_maps, min_maps; /* max and min color maps */ + int backing_store; /* Never, WhenMapped, Always */ + Bool save_unders; + long root_input_mask; /* initial root input mask */ +} Screen; + +/* + * Format structure; describes ZFormat data the screen will understand. + */ +typedef struct { + XExtData *ext_data; /* hook for extension to hang data */ + int depth; /* depth of this image format */ + int bits_per_pixel; /* bits/pixel at this depth */ + int scanline_pad; /* scanline must padded to this multiple */ +} ScreenFormat; + +/* + * Data structure for setting window attributes. + */ +typedef struct { + Pixmap background_pixmap; /* background or None or ParentRelative */ + unsigned long background_pixel; /* background pixel */ + Pixmap border_pixmap; /* border of the window */ + unsigned long border_pixel; /* border pixel value */ + int bit_gravity; /* one of bit gravity values */ + int win_gravity; /* one of the window gravity values */ + int backing_store; /* NotUseful, WhenMapped, Always */ + unsigned long backing_planes;/* planes to be preseved if possible */ + unsigned long backing_pixel;/* value to use in restoring planes */ + Bool save_under; /* should bits under be saved? (popups) */ + long event_mask; /* set of events that should be saved */ + long do_not_propagate_mask; /* set of events that should not propagate */ + Bool override_redirect; /* boolean value for override-redirect */ + Colormap colormap; /* color map to be associated with window */ + Cursor cursor; /* cursor to be displayed (or None) */ +} XSetWindowAttributes; + +typedef struct { + int x, y; /* location of window */ + int width, height; /* width and height of window */ + int border_width; /* border width of window */ + int depth; /* depth of window */ + Visual *visual; /* the associated visual structure */ + Window root; /* root of screen containing window */ +#if defined(__cplusplus) || defined(c_plusplus) + int c_class; /* C++ InputOutput, InputOnly*/ +#else + int class; /* InputOutput, InputOnly*/ +#endif + int bit_gravity; /* one of bit gravity values */ + int win_gravity; /* one of the window gravity values */ + int backing_store; /* NotUseful, WhenMapped, Always */ + unsigned long backing_planes;/* planes to be preserved if possible */ + unsigned long backing_pixel;/* value to be used when restoring planes */ + Bool save_under; /* boolean, should bits under be saved? */ + Colormap colormap; /* color map to be associated with window */ + Bool map_installed; /* boolean, is color map currently installed*/ + int map_state; /* IsUnmapped, IsUnviewable, IsViewable */ + long all_event_masks; /* set of events all people have interest in*/ + long your_event_mask; /* my event mask */ + long do_not_propagate_mask; /* set of events that should not propagate */ + Bool override_redirect; /* boolean value for override-redirect */ + Screen *screen; /* back pointer to correct screen */ +} XWindowAttributes; + +/* + * Data structure for host setting; getting routines. + * + */ + +typedef struct { + int family; /* for example FamilyInternet */ + int length; /* length of address, in bytes */ + char *address; /* pointer to where to find the bytes */ +} XHostAddress; + +/* + * Data structure for "image" data, used by image manipulation routines. + */ +typedef struct _XImage { + int width, height; /* size of image */ + int xoffset; /* number of pixels offset in X direction */ + int format; /* XYBitmap, XYPixmap, ZPixmap */ + char *data; /* pointer to image data */ + int byte_order; /* data byte order, LSBFirst, MSBFirst */ + int bitmap_unit; /* quant. of scanline 8, 16, 32 */ + int bitmap_bit_order; /* LSBFirst, MSBFirst */ + int bitmap_pad; /* 8, 16, 32 either XY or ZPixmap */ + int depth; /* depth of image */ + int bytes_per_line; /* accelarator to next line */ + int bits_per_pixel; /* bits per pixel (ZPixmap) */ + unsigned long red_mask; /* bits in z arrangment */ + unsigned long green_mask; + unsigned long blue_mask; + XPointer obdata; /* hook for the object routines to hang on */ + struct funcs { /* image manipulation routines */ + struct _XImage *(*create_image)(); +#if NeedFunctionPrototypes + int (*destroy_image) (struct _XImage *); + unsigned long (*get_pixel) (struct _XImage *, int, int); + int (*put_pixel) (struct _XImage *, int, int, unsigned long); + struct _XImage *(*sub_image)(struct _XImage *, int, int, unsigned int, unsigned int); + int (*add_pixel) (struct _XImage *, long); +#else + int (*destroy_image)(); + unsigned long (*get_pixel)(); + int (*put_pixel)(); + struct _XImage *(*sub_image)(); + int (*add_pixel)(); +#endif + } f; +} XImage; + +/* + * Data structure for XReconfigureWindow + */ +typedef struct { + int x, y; + int width, height; + int border_width; + Window sibling; + int stack_mode; +} XWindowChanges; + +/* + * Data structure used by color operations + */ +typedef struct { + unsigned long pixel; + unsigned short red, green, blue; + char flags; /* do_red, do_green, do_blue */ + char pad; +} XColor; + +/* + * Data structures for graphics operations. On most machines, these are + * congruent with the wire protocol structures, so reformatting the data + * can be avoided on these architectures. + */ +typedef struct { + short x1, y1, x2, y2; +} XSegment; + +typedef struct { + short x, y; +} XPoint; + +typedef struct { + short x, y; + unsigned short width, height; +} XRectangle; + +typedef struct { + short x, y; + unsigned short width, height; + short angle1, angle2; +} XArc; + + +/* Data structure for XChangeKeyboardControl */ + +typedef struct { + int key_click_percent; + int bell_percent; + int bell_pitch; + int bell_duration; + int led; + int led_mode; + int key; + int auto_repeat_mode; /* On, Off, Default */ +} XKeyboardControl; + +/* Data structure for XGetKeyboardControl */ + +typedef struct { + int key_click_percent; + int bell_percent; + unsigned int bell_pitch, bell_duration; + unsigned long led_mask; + int global_auto_repeat; + char auto_repeats[32]; +} XKeyboardState; + +/* Data structure for XGetMotionEvents. */ + +typedef struct { + Time time; + short x, y; +} XTimeCoord; + +/* Data structure for X{Set,Get}ModifierMapping */ + +typedef struct { + int max_keypermod; /* The server's max # of keys per modifier */ + KeyCode *modifiermap; /* An 8 by max_keypermod array of modifiers */ +} XModifierKeymap; + + +/* + * Display datatype maintaining display specific data. + * The contents of this structure are implementation dependent. + * A Display should be treated as opaque by application code. + */ +typedef struct _XDisplay { + XExtData *ext_data; /* hook for extension to hang data */ + struct _XFreeFuncs *free_funcs; /* internal free functions */ + int fd; /* Network socket. */ + int conn_checker; /* ugly thing used by _XEventsQueued */ + int proto_major_version;/* maj. version of server's X protocol */ + int proto_minor_version;/* minor version of servers X protocol */ + char *vendor; /* vendor of the server hardware */ + XID resource_base; /* resource ID base */ + XID resource_mask; /* resource ID mask bits */ + XID resource_id; /* allocator current ID */ + int resource_shift; /* allocator shift to correct bits */ + XID (*resource_alloc)(); /* allocator function */ + int byte_order; /* screen byte order, LSBFirst, MSBFirst */ + int bitmap_unit; /* padding and data requirements */ + int bitmap_pad; /* padding requirements on bitmaps */ + int bitmap_bit_order; /* LeastSignificant or MostSignificant */ + int nformats; /* number of pixmap formats in list */ + ScreenFormat *pixmap_format; /* pixmap format list */ + int vnumber; /* Xlib's X protocol version number. */ + int release; /* release of the server */ + struct _XSQEvent *head, *tail; /* Input event queue. */ + int qlen; /* Length of input event queue */ + unsigned long request; /* sequence number of last request. */ + char *last_req; /* beginning of last request, or dummy */ + char *buffer; /* Output buffer starting address. */ + char *bufptr; /* Output buffer index pointer. */ + char *bufmax; /* Output buffer maximum+1 address. */ + unsigned max_request_size; /* maximum number 32 bit words in request*/ + struct _XrmHashBucketRec *db; + int (*synchandler)(); /* Synchronization handler */ + char *display_name; /* "host:display" string used on this connect*/ + int default_screen; /* default screen for operations */ + int nscreens; /* number of screens on this server*/ + Screen *screens; /* pointer to list of screens */ + unsigned long motion_buffer; /* size of motion buffer */ + unsigned long flags; /* internal connection flags */ + int min_keycode; /* minimum defined keycode */ + int max_keycode; /* maximum defined keycode */ + KeySym *keysyms; /* This server's keysyms */ + XModifierKeymap *modifiermap; /* This server's modifier keymap */ + int keysyms_per_keycode;/* number of rows */ + char *xdefaults; /* contents of defaults from server */ + char *scratch_buffer; /* place to hang scratch buffer */ + unsigned long scratch_length; /* length of scratch buffer */ + int ext_number; /* extension number on this display */ + struct _XExten *ext_procs; /* extensions initialized on this display */ + /* + * the following can be fixed size, as the protocol defines how + * much address space is available. + * While this could be done using the extension vector, there + * may be MANY events processed, so a search through the extension + * list to find the right procedure for each event might be + * expensive if many extensions are being used. + */ + Bool (*event_vec[128])(); /* vector for wire to event */ + Status (*wire_vec[128])(); /* vector for event to wire */ + KeySym lock_meaning; /* for XLookupString */ + struct _XLockInfo *lock; /* multi-thread state, display lock */ + struct _XInternalAsync *async_handlers; /* for internal async */ + unsigned long bigreq_size; /* max size of big requests */ + struct _XLockPtrs *lock_fns; /* pointers to threads functions */ + /* things above this line should not move, for binary compatibility */ + struct _XKeytrans *key_bindings; /* for XLookupString */ + Font cursor_font; /* for XCreateFontCursor */ + struct _XDisplayAtoms *atoms; /* for XInternAtom */ + unsigned int mode_switch; /* keyboard group modifiers */ + struct _XContextDB *context_db; /* context database */ + Bool (**error_vec)(); /* vector for wire to error */ + /* + * Xcms information + */ + struct { + XPointer defaultCCCs; /* pointer to an array of default XcmsCCC */ + XPointer clientCmaps; /* pointer to linked list of XcmsCmapRec */ + XPointer perVisualIntensityMaps; + /* linked list of XcmsIntensityMap */ + } cms; + struct _XIMFilter *im_filters; + struct _XSQEvent *qfree; /* unallocated event queue elements */ + unsigned long next_event_serial_num; /* inserted into next queue elt */ + int (*savedsynchandler)(); /* user synchandler when Xlib usurps */ +} Display; + +#if NeedFunctionPrototypes /* prototypes require event type definitions */ +#undef _XEVENT_ +#endif +#ifndef _XEVENT_ + +#define XMaxTransChars 4 + +/* + * Definitions of specific events. + */ +typedef struct { + int type; /* of event */ + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window window; /* "event" window it is reported relative to */ + Window root; /* root window that the event occured on */ + Window subwindow; /* child window */ + Time time; /* milliseconds */ + int x, y; /* pointer x, y coordinates in event window */ + int x_root, y_root; /* coordinates relative to root */ + unsigned int state; /* key or button mask */ + unsigned int keycode; /* detail */ + Bool same_screen; /* same screen flag */ + char trans_chars[XMaxTransChars]; + /* translated characters */ + int nbytes; +} XKeyEvent; +typedef XKeyEvent XKeyPressedEvent; +typedef XKeyEvent XKeyReleasedEvent; + +typedef struct { + int type; /* of event */ + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window window; /* "event" window it is reported relative to */ + Window root; /* root window that the event occured on */ + Window subwindow; /* child window */ + Time time; /* milliseconds */ + int x, y; /* pointer x, y coordinates in event window */ + int x_root, y_root; /* coordinates relative to root */ + unsigned int state; /* key or button mask */ + unsigned int button; /* detail */ + Bool same_screen; /* same screen flag */ +} XButtonEvent; +typedef XButtonEvent XButtonPressedEvent; +typedef XButtonEvent XButtonReleasedEvent; + +typedef struct { + int type; /* of event */ + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window window; /* "event" window reported relative to */ + Window root; /* root window that the event occured on */ + Window subwindow; /* child window */ + Time time; /* milliseconds */ + int x, y; /* pointer x, y coordinates in event window */ + int x_root, y_root; /* coordinates relative to root */ + unsigned int state; /* key or button mask */ + char is_hint; /* detail */ + Bool same_screen; /* same screen flag */ +} XMotionEvent; +typedef XMotionEvent XPointerMovedEvent; + +typedef struct { + int type; /* of event */ + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window window; /* "event" window reported relative to */ + Window root; /* root window that the event occured on */ + Window subwindow; /* child window */ + Time time; /* milliseconds */ + int x, y; /* pointer x, y coordinates in event window */ + int x_root, y_root; /* coordinates relative to root */ + int mode; /* NotifyNormal, NotifyGrab, NotifyUngrab */ + int detail; + /* + * NotifyAncestor, NotifyVirtual, NotifyInferior, + * NotifyNonlinear,NotifyNonlinearVirtual + */ + Bool same_screen; /* same screen flag */ + Bool focus; /* boolean focus */ + unsigned int state; /* key or button mask */ +} XCrossingEvent; +typedef XCrossingEvent XEnterWindowEvent; +typedef XCrossingEvent XLeaveWindowEvent; + +typedef struct { + int type; /* FocusIn or FocusOut */ + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window window; /* window of event */ + int mode; /* NotifyNormal, NotifyGrab, NotifyUngrab */ + int detail; + /* + * NotifyAncestor, NotifyVirtual, NotifyInferior, + * NotifyNonlinear,NotifyNonlinearVirtual, NotifyPointer, + * NotifyPointerRoot, NotifyDetailNone + */ +} XFocusChangeEvent; +typedef XFocusChangeEvent XFocusInEvent; +typedef XFocusChangeEvent XFocusOutEvent; + +/* generated on EnterWindow and FocusIn when KeyMapState selected */ +typedef struct { + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window window; + char key_vector[32]; +} XKeymapEvent; + +typedef struct { + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window window; + int x, y; + int width, height; + int count; /* if non-zero, at least this many more */ +} XExposeEvent; + +typedef struct { + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Drawable drawable; + int x, y; + int width, height; + int count; /* if non-zero, at least this many more */ + int major_code; /* core is CopyArea or CopyPlane */ + int minor_code; /* not defined in the core */ +} XGraphicsExposeEvent; + +typedef struct { + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Drawable drawable; + int major_code; /* core is CopyArea or CopyPlane */ + int minor_code; /* not defined in the core */ +} XNoExposeEvent; + +typedef struct { + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window window; + int state; /* Visibility state */ +} XVisibilityEvent; + +typedef struct { + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window parent; /* parent of the window */ + Window window; /* window id of window created */ + int x, y; /* window location */ + int width, height; /* size of window */ + int border_width; /* border width */ + Bool override_redirect; /* creation should be overridden */ +} XCreateWindowEvent; + +typedef struct { + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window event; + Window window; +} XDestroyWindowEvent; + +typedef struct { + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window event; + Window window; + Bool from_configure; +} XUnmapEvent; + +typedef struct { + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window event; + Window window; + Bool override_redirect; /* boolean, is override set... */ +} XMapEvent; + +typedef struct { + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window parent; + Window window; +} XMapRequestEvent; + +typedef struct { + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window event; + Window window; + Window parent; + int x, y; + Bool override_redirect; +} XReparentEvent; + +typedef struct { + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window event; + Window window; + int x, y; + int width, height; + int border_width; + Window above; + Bool override_redirect; +} XConfigureEvent; + +typedef struct { + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window event; + Window window; + int x, y; +} XGravityEvent; + +typedef struct { + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window window; + int width, height; +} XResizeRequestEvent; + +typedef struct { + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window parent; + Window window; + int x, y; + int width, height; + int border_width; + Window above; + int detail; /* Above, Below, TopIf, BottomIf, Opposite */ + unsigned long value_mask; +} XConfigureRequestEvent; + +typedef struct { + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window event; + Window window; + int place; /* PlaceOnTop, PlaceOnBottom */ +} XCirculateEvent; + +typedef struct { + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window parent; + Window window; + int place; /* PlaceOnTop, PlaceOnBottom */ +} XCirculateRequestEvent; + +typedef struct { + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window window; + Atom atom; + Time time; + int state; /* NewValue, Deleted */ +} XPropertyEvent; + +typedef struct { + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window window; + Atom selection; + Time time; +} XSelectionClearEvent; + +typedef struct { + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window owner; + Window requestor; + Atom selection; + Atom target; + Atom property; + Time time; +} XSelectionRequestEvent; + +typedef struct { + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window requestor; + Atom selection; + Atom target; + Atom property; /* ATOM or None */ + Time time; +} XSelectionEvent; + +typedef struct { + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window window; + Colormap colormap; /* COLORMAP or None */ +#if defined(__cplusplus) || defined(c_plusplus) + Bool c_new; /* C++ */ +#else + Bool new; +#endif + int state; /* ColormapInstalled, ColormapUninstalled */ +} XColormapEvent; + +typedef struct { + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window window; + Atom message_type; + int format; + union { + char b[20]; + short s[10]; + long l[5]; + } data; +} XClientMessageEvent; + +typedef struct { + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window window; /* unused */ + int request; /* one of MappingModifier, MappingKeyboard, + MappingPointer */ + int first_keycode; /* first keycode */ + int count; /* defines range of change w. first_keycode*/ +} XMappingEvent; + +typedef struct { + int type; + Display *display; /* Display the event was read from */ + XID resourceid; /* resource id */ + unsigned long serial; /* serial number of failed request */ + unsigned char error_code; /* error code of failed request */ + unsigned char request_code; /* Major op-code of failed request */ + unsigned char minor_code; /* Minor op-code of failed request */ +} XErrorEvent; + +typedef struct { + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display;/* Display the event was read from */ + Window window; /* window on which event was requested in event mask */ +} XAnyEvent; + +/* + * this union is defined so Xlib can always use the same sized + * event structure internally, to avoid memory fragmentation. + */ +typedef union _XEvent { + int type; /* must not be changed; first element */ + XAnyEvent xany; + XKeyEvent xkey; + XButtonEvent xbutton; + XMotionEvent xmotion; + XCrossingEvent xcrossing; + XFocusChangeEvent xfocus; + XExposeEvent xexpose; + XGraphicsExposeEvent xgraphicsexpose; + XNoExposeEvent xnoexpose; + XVisibilityEvent xvisibility; + XCreateWindowEvent xcreatewindow; + XDestroyWindowEvent xdestroywindow; + XUnmapEvent xunmap; + XMapEvent xmap; + XMapRequestEvent xmaprequest; + XReparentEvent xreparent; + XConfigureEvent xconfigure; + XGravityEvent xgravity; + XResizeRequestEvent xresizerequest; + XConfigureRequestEvent xconfigurerequest; + XCirculateEvent xcirculate; + XCirculateRequestEvent xcirculaterequest; + XPropertyEvent xproperty; + XSelectionClearEvent xselectionclear; + XSelectionRequestEvent xselectionrequest; + XSelectionEvent xselection; + XColormapEvent xcolormap; + XClientMessageEvent xclient; + XMappingEvent xmapping; + XErrorEvent xerror; + XKeymapEvent xkeymap; + long pad[24]; +} XEvent; +#endif + +#define XAllocID(dpy) ((*(dpy)->resource_alloc)((dpy))) + +/* + * per character font metric information. + */ +typedef struct { + short lbearing; /* origin to left edge of raster */ + short rbearing; /* origin to right edge of raster */ + short width; /* advance to next char's origin */ + short ascent; /* baseline to top edge of raster */ + short descent; /* baseline to bottom edge of raster */ + unsigned short attributes; /* per char flags (not predefined) */ +} XCharStruct; + +/* + * To allow arbitrary information with fonts, there are additional properties + * returned. + */ +typedef struct { + Atom name; + unsigned long card32; +} XFontProp; + +typedef struct { + XExtData *ext_data; /* hook for extension to hang data */ + Font fid; /* Font id for this font */ + unsigned direction; /* hint about direction the font is painted */ + unsigned min_char_or_byte2;/* first character */ + unsigned max_char_or_byte2;/* last character */ + unsigned min_byte1; /* first row that exists */ + unsigned max_byte1; /* last row that exists */ + Bool all_chars_exist;/* flag if all characters have non-zero size*/ + unsigned default_char; /* char to print for undefined character */ + int n_properties; /* how many properties there are */ + XFontProp *properties; /* pointer to array of additional properties*/ + XCharStruct min_bounds; /* minimum bounds over all existing char*/ + XCharStruct max_bounds; /* maximum bounds over all existing char*/ + XCharStruct *per_char; /* first_char to last_char information */ + int ascent; /* log. extent above baseline for spacing */ + int descent; /* log. descent below baseline for spacing */ +} XFontStruct; + +/* + * PolyText routines take these as arguments. + */ +typedef struct { + char *chars; /* pointer to string */ + int nchars; /* number of characters */ + int delta; /* delta between strings */ + Font font; /* font to print it in, None don't change */ +} XTextItem; + +typedef struct { /* normal 16 bit characters are two bytes */ + unsigned char byte1; + unsigned char byte2; +} XChar2b; + +typedef struct { + XChar2b *chars; /* two byte characters */ + int nchars; /* number of characters */ + int delta; /* delta between strings */ + Font font; /* font to print it in, None don't change */ +} XTextItem16; + + +typedef union { Display *display; + GC gc; + Visual *visual; + Screen *screen; + ScreenFormat *pixmap_format; + XFontStruct *font; } XEDataObject; + +typedef struct { + XRectangle max_ink_extent; + XRectangle max_logical_extent; +} XFontSetExtents; + +typedef struct _XFontSet *XFontSet; + +typedef struct { + char *chars; + int nchars; + int delta; + XFontSet font_set; +} XmbTextItem; + +typedef struct { + wchar_t *chars; + int nchars; + int delta; + XFontSet font_set; +} XwcTextItem; + +typedef void (*XIMProc)(); + +typedef struct _XIM *XIM; +typedef struct _XIC *XIC; + +typedef unsigned long XIMStyle; + +typedef struct { + unsigned short count_styles; + XIMStyle *supported_styles; +} XIMStyles; + +#define XIMPreeditArea 0x0001L +#define XIMPreeditCallbacks 0x0002L +#define XIMPreeditPosition 0x0004L +#define XIMPreeditNothing 0x0008L +#define XIMPreeditNone 0x0010L +#define XIMStatusArea 0x0100L +#define XIMStatusCallbacks 0x0200L +#define XIMStatusNothing 0x0400L +#define XIMStatusNone 0x0800L + +#define XNVaNestedList "XNVaNestedList" +#define XNClientWindow "clientWindow" +#define XNInputStyle "inputStyle" +#define XNFocusWindow "focusWindow" +#define XNResourceName "resourceName" +#define XNResourceClass "resourceClass" +#define XNGeometryCallback "geometryCallback" +#define XNFilterEvents "filterEvents" +#define XNPreeditStartCallback "preeditStartCallback" +#define XNPreeditDoneCallback "preeditDoneCallback" +#define XNPreeditDrawCallback "preeditDrawCallback" +#define XNPreeditCaretCallback "preeditCaretCallback" +#define XNPreeditAttributes "preeditAttributes" +#define XNStatusStartCallback "statusStartCallback" +#define XNStatusDoneCallback "statusDoneCallback" +#define XNStatusDrawCallback "statusDrawCallback" +#define XNStatusAttributes "statusAttributes" +#define XNArea "area" +#define XNAreaNeeded "areaNeeded" +#define XNSpotLocation "spotLocation" +#define XNColormap "colorMap" +#define XNStdColormap "stdColorMap" +#define XNForeground "foreground" +#define XNBackground "background" +#define XNBackgroundPixmap "backgroundPixmap" +#define XNFontSet "fontSet" +#define XNLineSpace "lineSpace" +#define XNCursor "cursor" + +#define XBufferOverflow -1 +#define XLookupNone 1 +#define XLookupChars 2 +#define XLookupKeySym 3 +#define XLookupBoth 4 + +#if NeedFunctionPrototypes +typedef void *XVaNestedList; +#else +typedef XPointer XVaNestedList; +#endif + +typedef struct { + XPointer client_data; + XIMProc callback; +} XIMCallback; + +typedef unsigned long XIMFeedback; + +#define XIMReverse 1 +#define XIMUnderline (1<<1) +#define XIMHighlight (1<<2) +#define XIMPrimary (1<<5) +#define XIMSecondary (1<<6) +#define XIMTertiary (1<<7) + +typedef struct _XIMText { + unsigned short length; + XIMFeedback *feedback; + Bool encoding_is_wchar; + union { + char *multi_byte; + wchar_t *wide_char; + } string; +} XIMText; + +typedef struct _XIMPreeditDrawCallbackStruct { + int caret; /* Cursor offset within pre-edit string */ + int chg_first; /* Starting change position */ + int chg_length; /* Length of the change in character count */ + XIMText *text; +} XIMPreeditDrawCallbackStruct; + +typedef enum { + XIMForwardChar, XIMBackwardChar, + XIMForwardWord, XIMBackwardWord, + XIMCaretUp, XIMCaretDown, + XIMNextLine, XIMPreviousLine, + XIMLineStart, XIMLineEnd, + XIMAbsolutePosition, + XIMDontChange +} XIMCaretDirection; + +typedef enum { + XIMIsInvisible, /* Disable caret feedback */ + XIMIsPrimary, /* UI defined caret feedback */ + XIMIsSecondary /* UI defined caret feedback */ +} XIMCaretStyle; + +typedef struct _XIMPreeditCaretCallbackStruct { + int position; /* Caret offset within pre-edit string */ + XIMCaretDirection direction; /* Caret moves direction */ + XIMCaretStyle style; /* Feedback of the caret */ +} XIMPreeditCaretCallbackStruct; + +typedef enum { + XIMTextType, + XIMBitmapType +} XIMStatusDataType; + +typedef struct _XIMStatusDrawCallbackStruct { + XIMStatusDataType type; + union { + XIMText *text; + Pixmap bitmap; + } data; +} XIMStatusDrawCallbackStruct; + +typedef int (*XErrorHandler) ( /* WARNING, this type not in Xlib spec */ +#if NeedFunctionPrototypes + Display* /* display */, + XErrorEvent* /* error_event */ +#endif +); + +_XFUNCPROTOBEGIN + + + +#include "tkIntXlibDecls.h" + +_XFUNCPROTOEND + +#if defined(MAC_OSX_TK) +# undef Cursor +# undef Region +#endif + +#endif /* _XLIB_H_ */ diff --git a/cobroutines/X11/Xutil.h b/cobroutines/X11/Xutil.h new file mode 100644 index 0000000..e42ed5d --- /dev/null +++ b/cobroutines/X11/Xutil.h @@ -0,0 +1,855 @@ +/* $XConsortium: Xutil.h,v 11.73 91/07/30 16:21:37 rws Exp $ */ + +/*********************************************************** +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts, +and the Massachusetts Institute of Technology, Cambridge, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the names of Digital or MIT not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +#ifndef _XUTIL_H_ +#define _XUTIL_H_ + +/* You must include before including this file */ + +#if defined(MAC_OSX_TK) +# define Region XRegion +#endif + +/* + * Bitmask returned by XParseGeometry(). Each bit tells if the corresponding + * value (x, y, width, height) was found in the parsed string. + */ +#define NoValue 0x0000 +#define XValue 0x0001 +#define YValue 0x0002 +#define WidthValue 0x0004 +#define HeightValue 0x0008 +#define AllValues 0x000F +#define XNegative 0x0010 +#define YNegative 0x0020 + +/* + * new version containing base_width, base_height, and win_gravity fields; + * used with WM_NORMAL_HINTS. + */ +typedef struct { + long flags; /* marks which fields in this structure are defined */ + int x, y; /* obsolete for new window mgrs, but clients */ + int width, height; /* should set so old wm's don't mess up */ + int min_width, min_height; + int max_width, max_height; + int width_inc, height_inc; + struct { + int x; /* numerator */ + int y; /* denominator */ + } min_aspect, max_aspect; + int base_width, base_height; /* added by ICCCM version 1 */ + int win_gravity; /* added by ICCCM version 1 */ +} XSizeHints; + +/* + * The next block of definitions are for window manager properties that + * clients and applications use for communication. + */ + +/* flags argument in size hints */ +#define USPosition (1L << 0) /* user specified x, y */ +#define USSize (1L << 1) /* user specified width, height */ + +#define PPosition (1L << 2) /* program specified position */ +#define PSize (1L << 3) /* program specified size */ +#define PMinSize (1L << 4) /* program specified minimum size */ +#define PMaxSize (1L << 5) /* program specified maximum size */ +#define PResizeInc (1L << 6) /* program specified resize increments */ +#define PAspect (1L << 7) /* program specified min and max aspect ratios */ +#define PBaseSize (1L << 8) /* program specified base for incrementing */ +#define PWinGravity (1L << 9) /* program specified window gravity */ + +/* obsolete */ +#define PAllHints (PPosition|PSize|PMinSize|PMaxSize|PResizeInc|PAspect) + + + +typedef struct { + long flags; /* marks which fields in this structure are defined */ + Bool input; /* does this application rely on the window manager to + get keyboard input? */ + int initial_state; /* see below */ + Pixmap icon_pixmap; /* pixmap to be used as icon */ + Window icon_window; /* window to be used as icon */ + int icon_x, icon_y; /* initial position of icon */ + Pixmap icon_mask; /* icon mask bitmap */ + XID window_group; /* id of related window group */ + /* this structure may be extended in the future */ +} XWMHints; + +/* definition for flags of XWMHints */ + +#define InputHint (1L << 0) +#define StateHint (1L << 1) +#define IconPixmapHint (1L << 2) +#define IconWindowHint (1L << 3) +#define IconPositionHint (1L << 4) +#define IconMaskHint (1L << 5) +#define WindowGroupHint (1L << 6) +#define AllHints (InputHint|StateHint|IconPixmapHint|IconWindowHint| \ +IconPositionHint|IconMaskHint|WindowGroupHint) + +/* definitions for initial window state */ +#define WithdrawnState 0 /* for windows that are not mapped */ +#define NormalState 1 /* most applications want to start this way */ +#define IconicState 3 /* application wants to start as an icon */ + +/* + * Obsolete states no longer defined by ICCCM + */ +#define DontCareState 0 /* don't know or care */ +#define ZoomState 2 /* application wants to start zoomed */ +#define InactiveState 4 /* application believes it is seldom used; */ + /* some wm's may put it on inactive menu */ + + +/* + * new structure for manipulating TEXT properties; used with WM_NAME, + * WM_ICON_NAME, WM_CLIENT_MACHINE, and WM_COMMAND. + */ +typedef struct { + unsigned char *value; /* same as Property routines */ + Atom encoding; /* prop type */ + int format; /* prop data format: 8, 16, or 32 */ + unsigned long nitems; /* number of data items in value */ +} XTextProperty; + +#define XNoMemory -1 +#define XLocaleNotSupported -2 +#define XConverterNotFound -3 + +typedef enum { + XStringStyle, /* STRING */ + XCompoundTextStyle, /* COMPOUND_TEXT */ + XTextStyle, /* text in owner's encoding (current locale)*/ + XStdICCTextStyle /* STRING, else COMPOUND_TEXT */ +} XICCEncodingStyle; + +typedef struct { + int min_width, min_height; + int max_width, max_height; + int width_inc, height_inc; +} XIconSize; + +typedef struct { + char *res_name; + char *res_class; +} XClassHint; + +/* + * These macros are used to give some sugar to the image routines so that + * naive people are more comfortable with them. + */ +#define XDestroyImage(ximage) \ + ((*((ximage)->f.destroy_image))((ximage))) +#define XGetPixel(ximage, x, y) \ + ((*((ximage)->f.get_pixel))((ximage), (x), (y))) +#define XPutPixel(ximage, x, y, pixel) \ + ((*((ximage)->f.put_pixel))((ximage), (x), (y), (pixel))) +#define XSubImage(ximage, x, y, width, height) \ + ((*((ximage)->f.sub_image))((ximage), (x), (y), (width), (height))) +#define XAddPixel(ximage, value) \ + ((*((ximage)->f.add_pixel))((ximage), (value))) + +/* + * Compose sequence status structure, used in calling XLookupString. + */ +typedef struct _XComposeStatus { + XPointer compose_ptr; /* state table pointer */ + int chars_matched; /* match state */ +} XComposeStatus; + +/* + * Keysym macros, used on Keysyms to test for classes of symbols + */ +#define IsKeypadKey(keysym) \ + (((unsigned)(keysym) >= XK_KP_Space) && ((unsigned)(keysym) <= XK_KP_Equal)) + +#define IsCursorKey(keysym) \ + (((unsigned)(keysym) >= XK_Home) && ((unsigned)(keysym) < XK_Select)) + +#define IsPFKey(keysym) \ + (((unsigned)(keysym) >= XK_KP_F1) && ((unsigned)(keysym) <= XK_KP_F4)) + +#define IsFunctionKey(keysym) \ + (((unsigned)(keysym) >= XK_F1) && ((unsigned)(keysym) <= XK_F35)) + +#define IsMiscFunctionKey(keysym) \ + (((unsigned)(keysym) >= XK_Select) && ((unsigned)(keysym) <= XK_Break)) + +#define IsModifierKey(keysym) \ + ((((unsigned)(keysym) >= XK_Shift_L) && ((unsigned)(keysym) <= XK_Hyper_R)) \ + || ((unsigned)(keysym) == XK_Mode_switch) \ + || ((unsigned)(keysym) == XK_Num_Lock)) +/* + * opaque reference to Region data type + */ +typedef struct _XRegion *Region; + +/* Return values from XRectInRegion() */ + +#define RectangleOut 0 +#define RectangleIn 1 +#define RectanglePart 2 + + +/* + * Information used by the visual utility routines to find desired visual + * type from the many visuals a display may support. + */ + +typedef struct { + Visual *visual; + VisualID visualid; + int screen; + int depth; +#if defined(__cplusplus) || defined(c_plusplus) + int c_class; /* C++ */ +#else + int class; +#endif + unsigned long red_mask; + unsigned long green_mask; + unsigned long blue_mask; + int colormap_size; + int bits_per_rgb; +} XVisualInfo; + +#define VisualNoMask 0x0 +#define VisualIDMask 0x1 +#define VisualScreenMask 0x2 +#define VisualDepthMask 0x4 +#define VisualClassMask 0x8 +#define VisualRedMaskMask 0x10 +#define VisualGreenMaskMask 0x20 +#define VisualBlueMaskMask 0x40 +#define VisualColormapSizeMask 0x80 +#define VisualBitsPerRGBMask 0x100 +#define VisualAllMask 0x1FF + +/* + * This defines a window manager property that clients may use to + * share standard color maps of type RGB_COLOR_MAP: + */ +typedef struct { + Colormap colormap; + unsigned long red_max; + unsigned long red_mult; + unsigned long green_max; + unsigned long green_mult; + unsigned long blue_max; + unsigned long blue_mult; + unsigned long base_pixel; + VisualID visualid; /* added by ICCCM version 1 */ + XID killid; /* added by ICCCM version 1 */ +} XStandardColormap; + +#define ReleaseByFreeingColormap ((XID) 1L) /* for killid field above */ + + +/* + * return codes for XReadBitmapFile and XWriteBitmapFile + */ +#define BitmapSuccess 0 +#define BitmapOpenFailed 1 +#define BitmapFileInvalid 2 +#define BitmapNoMemory 3 + +/**************************************************************** + * + * Context Management + * + ****************************************************************/ + + +/* Associative lookup table return codes */ + +#define XCSUCCESS 0 /* No error. */ +#define XCNOMEM 1 /* Out of memory */ +#define XCNOENT 2 /* No entry in table */ + +typedef int XContext; + +#define XUniqueContext() ((XContext) XrmUniqueQuark()) +#define XStringToContext(string) ((XContext) XrmStringToQuark(string)) + +_XFUNCPROTOBEGIN + +/* The following declarations are alphabetized. */ + +extern XClassHint *XAllocClassHint ( +#if NeedFunctionPrototypes + void +#endif +); + +extern XIconSize *XAllocIconSize ( +#if NeedFunctionPrototypes + void +#endif +); + +extern XSizeHints *XAllocSizeHints ( +#if NeedFunctionPrototypes + void +#endif +); + +extern XStandardColormap *XAllocStandardColormap ( +#if NeedFunctionPrototypes + void +#endif +); + +extern XWMHints *XAllocWMHints ( +#if NeedFunctionPrototypes + void +#endif +); + +extern void XClipBox( +#if NeedFunctionPrototypes + Region /* r */, + XRectangle* /* rect_return */ +#endif +); + +extern Region XCreateRegion( +#if NeedFunctionPrototypes + void +#endif +); + +extern char *XDefaultString( +#if NeedFunctionPrototypes + void +#endif +); + +extern int XDeleteContext( +#if NeedFunctionPrototypes + Display* /* display */, + XID /* rid */, + XContext /* context */ +#endif +); + +extern void XDestroyRegion( +#if NeedFunctionPrototypes + Region /* r */ +#endif +); + +extern void XEmptyRegion( +#if NeedFunctionPrototypes + Region /* r */ +#endif +); + +extern void XEqualRegion( +#if NeedFunctionPrototypes + Region /* r1 */, + Region /* r2 */ +#endif +); + +extern int XFindContext( +#if NeedFunctionPrototypes + Display* /* display */, + XID /* rid */, + XContext /* context */, + XPointer* /* data_return */ +#endif +); + +extern Status XGetClassHint( +#if NeedFunctionPrototypes + Display* /* display */, + Window /* w */, + XClassHint* /* class_hints_return */ +#endif +); + +extern Status XGetIconSizes( +#if NeedFunctionPrototypes + Display* /* display */, + Window /* w */, + XIconSize** /* size_list_return */, + int* /* count_return */ +#endif +); + +extern Status XGetNormalHints( +#if NeedFunctionPrototypes + Display* /* display */, + Window /* w */, + XSizeHints* /* hints_return */ +#endif +); + +extern Status XGetRGBColormaps( +#if NeedFunctionPrototypes + Display* /* display */, + Window /* w */, + XStandardColormap** /* stdcmap_return */, + int* /* count_return */, + Atom /* property */ +#endif +); + +extern Status XGetSizeHints( +#if NeedFunctionPrototypes + Display* /* display */, + Window /* w */, + XSizeHints* /* hints_return */, + Atom /* property */ +#endif +); + +extern Status XGetStandardColormap( +#if NeedFunctionPrototypes + Display* /* display */, + Window /* w */, + XStandardColormap* /* colormap_return */, + Atom /* property */ +#endif +); + +extern Status XGetTextProperty( +#if NeedFunctionPrototypes + Display* /* display */, + Window /* window */, + XTextProperty* /* text_prop_return */, + Atom /* property */ +#endif +); + + +extern Status XGetWMClientMachine( +#if NeedFunctionPrototypes + Display* /* display */, + Window /* w */, + XTextProperty* /* text_prop_return */ +#endif +); + +extern XWMHints *XGetWMHints( +#if NeedFunctionPrototypes + Display* /* display */, + Window /* w */ +#endif +); + +extern Status XGetWMIconName( +#if NeedFunctionPrototypes + Display* /* display */, + Window /* w */, + XTextProperty* /* text_prop_return */ +#endif +); + +extern Status XGetWMName( +#if NeedFunctionPrototypes + Display* /* display */, + Window /* w */, + XTextProperty* /* text_prop_return */ +#endif +); + +extern Status XGetWMNormalHints( +#if NeedFunctionPrototypes + Display* /* display */, + Window /* w */, + XSizeHints* /* hints_return */, + long* /* supplied_return */ +#endif +); + +extern Status XGetWMSizeHints( +#if NeedFunctionPrototypes + Display* /* display */, + Window /* w */, + XSizeHints* /* hints_return */, + long* /* supplied_return */, + Atom /* property */ +#endif +); + +extern Status XGetZoomHints( +#if NeedFunctionPrototypes + Display* /* display */, + Window /* w */, + XSizeHints* /* zhints_return */ +#endif +); + +extern void XIntersectRegion( +#if NeedFunctionPrototypes + Region /* sra */, + Region /* srb */, + Region /* dr_return */ +#endif +); + +extern int XLookupString( +#if NeedFunctionPrototypes + XKeyEvent* /* event_struct */, + char* /* buffer_return */, + int /* bytes_buffer */, + KeySym* /* keysym_return */, + XComposeStatus* /* status_in_out */ +#endif +); + +extern Status XMatchVisualInfo( +#if NeedFunctionPrototypes + Display* /* display */, + int /* screen */, + int /* depth */, + int /* class */, + XVisualInfo* /* vinfo_return */ +#endif +); + +extern void XOffsetRegion( +#if NeedFunctionPrototypes + Region /* r */, + int /* dx */, + int /* dy */ +#endif +); + +extern Bool XPointInRegion( +#if NeedFunctionPrototypes + Region /* r */, + int /* x */, + int /* y */ +#endif +); + +extern Region XPolygonRegion( +#if NeedFunctionPrototypes + XPoint* /* points */, + int /* n */, + int /* fill_rule */ +#endif +); + +extern int XRectInRegion( +#if NeedFunctionPrototypes + Region /* r */, + int /* x */, + int /* y */, + unsigned int /* width */, + unsigned int /* height */ +#endif +); + +extern int XSaveContext( +#if NeedFunctionPrototypes + Display* /* display */, + XID /* rid */, + XContext /* context */, + _Xconst char* /* data */ +#endif +); + +extern void XSetClassHint( +#if NeedFunctionPrototypes + Display* /* display */, + Window /* w */, + XClassHint* /* class_hints */ +#endif +); + +extern void XSetIconSizes( +#if NeedFunctionPrototypes + Display* /* display */, + Window /* w */, + XIconSize* /* size_list */, + int /* count */ +#endif +); + +extern void XSetNormalHints( +#if NeedFunctionPrototypes + Display* /* display */, + Window /* w */, + XSizeHints* /* hints */ +#endif +); + +extern void XSetRGBColormaps( +#if NeedFunctionPrototypes + Display* /* display */, + Window /* w */, + XStandardColormap* /* stdcmaps */, + int /* count */, + Atom /* property */ +#endif +); + +extern void XSetSizeHints( +#if NeedFunctionPrototypes + Display* /* display */, + Window /* w */, + XSizeHints* /* hints */, + Atom /* property */ +#endif +); + +extern void XSetStandardProperties( +#if NeedFunctionPrototypes + Display* /* display */, + Window /* w */, + _Xconst char* /* window_name */, + _Xconst char* /* icon_name */, + Pixmap /* icon_pixmap */, + char** /* argv */, + int /* argc */, + XSizeHints* /* hints */ +#endif +); + +extern void XSetTextProperty( +#if NeedFunctionPrototypes + Display* /* display */, + Window /* w */, + XTextProperty* /* text_prop */, + Atom /* property */ +#endif +); + +extern void XSetWMHints( +#if NeedFunctionPrototypes + Display* /* display */, + Window /* w */, + XWMHints* /* wm_hints */ +#endif +); + +extern void XSetWMIconName( +#if NeedFunctionPrototypes + Display* /* display */, + Window /* w */, + XTextProperty* /* text_prop */ +#endif +); + +extern void XSetWMName( +#if NeedFunctionPrototypes + Display* /* display */, + Window /* w */, + XTextProperty* /* text_prop */ +#endif +); + +extern void XSetWMNormalHints( +#if NeedFunctionPrototypes + Display* /* display */, + Window /* w */, + XSizeHints* /* hints */ +#endif +); + +extern void XSetWMProperties( +#if NeedFunctionPrototypes + Display* /* display */, + Window /* w */, + XTextProperty* /* window_name */, + XTextProperty* /* icon_name */, + char** /* argv */, + int /* argc */, + XSizeHints* /* normal_hints */, + XWMHints* /* wm_hints */, + XClassHint* /* class_hints */ +#endif +); + +extern void XmbSetWMProperties( +#if NeedFunctionPrototypes + Display* /* display */, + Window /* w */, + _Xconst char* /* window_name */, + _Xconst char* /* icon_name */, + char** /* argv */, + int /* argc */, + XSizeHints* /* normal_hints */, + XWMHints* /* wm_hints */, + XClassHint* /* class_hints */ +#endif +); + +extern void XSetWMSizeHints( +#if NeedFunctionPrototypes + Display* /* display */, + Window /* w */, + XSizeHints* /* hints */, + Atom /* property */ +#endif +); + +extern void XSetRegion( +#if NeedFunctionPrototypes + Display* /* display */, + GC /* gc */, + Region /* r */ +#endif +); + +extern void XSetStandardColormap( +#if NeedFunctionPrototypes + Display* /* display */, + Window /* w */, + XStandardColormap* /* colormap */, + Atom /* property */ +#endif +); + +extern void XSetZoomHints( +#if NeedFunctionPrototypes + Display* /* display */, + Window /* w */, + XSizeHints* /* zhints */ +#endif +); + +extern void XShrinkRegion( +#if NeedFunctionPrototypes + Region /* r */, + int /* dx */, + int /* dy */ +#endif +); + +extern void XSubtractRegion( +#if NeedFunctionPrototypes + Region /* sra */, + Region /* srb */, + Region /* dr_return */ +#endif +); + +extern int XmbTextListToTextProperty( +#if NeedFunctionPrototypes + Display* /* display */, + char** /* list */, + int /* count */, + XICCEncodingStyle /* style */, + XTextProperty* /* text_prop_return */ +#endif +); + +extern int XwcTextListToTextProperty( +#if NeedFunctionPrototypes + Display* /* display */, + wchar_t** /* list */, + int /* count */, + XICCEncodingStyle /* style */, + XTextProperty* /* text_prop_return */ +#endif +); + +extern void XwcFreeStringList( +#if NeedFunctionPrototypes + wchar_t** /* list */ +#endif +); + +extern Status XTextPropertyToStringList( +#if NeedFunctionPrototypes + XTextProperty* /* text_prop */, + char*** /* list_return */, + int* /* count_return */ +#endif +); + +extern int XmbTextPropertyToTextList( +#if NeedFunctionPrototypes + Display* /* display */, + XTextProperty* /* text_prop */, + char*** /* list_return */, + int* /* count_return */ +#endif +); + +extern int XwcTextPropertyToTextList( +#if NeedFunctionPrototypes + Display* /* display */, + XTextProperty* /* text_prop */, + wchar_t*** /* list_return */, + int* /* count_return */ +#endif +); + +extern void XUnionRectWithRegion( +#if NeedFunctionPrototypes + XRectangle* /* rectangle */, + Region /* src_region */, + Region /* dest_region_return */ +#endif +); + +extern void XUnionRegion( +#if NeedFunctionPrototypes + Region /* sra */, + Region /* srb */, + Region /* dr_return */ +#endif +); + +extern int XWMGeometry( +#if NeedFunctionPrototypes + Display* /* display */, + int /* screen_number */, + _Xconst char* /* user_geometry */, + _Xconst char* /* default_geometry */, + unsigned int /* border_width */, + XSizeHints* /* hints */, + int* /* x_return */, + int* /* y_return */, + int* /* width_return */, + int* /* height_return */, + int* /* gravity_return */ +#endif +); + +extern void XXorRegion( +#if NeedFunctionPrototypes + Region /* sra */, + Region /* srb */, + Region /* dr_return */ +#endif +); + +_XFUNCPROTOEND + +#if defined(MAC_OSX_TK) +# undef Region +#endif + +#endif /* _XUTIL_H_ */ diff --git a/cobroutines/X11/cursorfont.h b/cobroutines/X11/cursorfont.h new file mode 100644 index 0000000..617274f --- /dev/null +++ b/cobroutines/X11/cursorfont.h @@ -0,0 +1,79 @@ +/* $XConsortium: cursorfont.h,v 1.2 88/09/06 16:44:27 jim Exp $ */ +#define XC_num_glyphs 154 +#define XC_X_cursor 0 +#define XC_arrow 2 +#define XC_based_arrow_down 4 +#define XC_based_arrow_up 6 +#define XC_boat 8 +#define XC_bogosity 10 +#define XC_bottom_left_corner 12 +#define XC_bottom_right_corner 14 +#define XC_bottom_side 16 +#define XC_bottom_tee 18 +#define XC_box_spiral 20 +#define XC_center_ptr 22 +#define XC_circle 24 +#define XC_clock 26 +#define XC_coffee_mug 28 +#define XC_cross 30 +#define XC_cross_reverse 32 +#define XC_crosshair 34 +#define XC_diamond_cross 36 +#define XC_dot 38 +#define XC_dotbox 40 +#define XC_double_arrow 42 +#define XC_draft_large 44 +#define XC_draft_small 46 +#define XC_draped_box 48 +#define XC_exchange 50 +#define XC_fleur 52 +#define XC_gobbler 54 +#define XC_gumby 56 +#define XC_hand1 58 +#define XC_hand2 60 +#define XC_heart 62 +#define XC_icon 64 +#define XC_iron_cross 66 +#define XC_left_ptr 68 +#define XC_left_side 70 +#define XC_left_tee 72 +#define XC_leftbutton 74 +#define XC_ll_angle 76 +#define XC_lr_angle 78 +#define XC_man 80 +#define XC_middlebutton 82 +#define XC_mouse 84 +#define XC_pencil 86 +#define XC_pirate 88 +#define XC_plus 90 +#define XC_question_arrow 92 +#define XC_right_ptr 94 +#define XC_right_side 96 +#define XC_right_tee 98 +#define XC_rightbutton 100 +#define XC_rtl_logo 102 +#define XC_sailboat 104 +#define XC_sb_down_arrow 106 +#define XC_sb_h_double_arrow 108 +#define XC_sb_left_arrow 110 +#define XC_sb_right_arrow 112 +#define XC_sb_up_arrow 114 +#define XC_sb_v_double_arrow 116 +#define XC_shuttle 118 +#define XC_sizing 120 +#define XC_spider 122 +#define XC_spraycan 124 +#define XC_star 126 +#define XC_target 128 +#define XC_tcross 130 +#define XC_top_left_arrow 132 +#define XC_top_left_corner 134 +#define XC_top_right_corner 136 +#define XC_top_side 138 +#define XC_top_tee 140 +#define XC_trek 142 +#define XC_ul_angle 144 +#define XC_umbrella 146 +#define XC_ur_angle 148 +#define XC_watch 150 +#define XC_xterm 152 diff --git a/cobroutines/X11/keysym.h b/cobroutines/X11/keysym.h new file mode 100644 index 0000000..a8f1408 --- /dev/null +++ b/cobroutines/X11/keysym.h @@ -0,0 +1,35 @@ +/* $XConsortium: keysym.h,v 1.13 91/03/13 20:09:49 rws Exp $ */ + +/*********************************************************** +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts, +and the Massachusetts Institute of Technology, Cambridge, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the names of Digital or MIT not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +/* default keysyms */ +#define XK_MISCELLANY +#define XK_LATIN1 +#define XK_LATIN2 +#define XK_LATIN3 +#define XK_LATIN4 +#define XK_GREEK + +#include diff --git a/cobroutines/X11/keysymdef.h b/cobroutines/X11/keysymdef.h new file mode 100644 index 0000000..b22d41b --- /dev/null +++ b/cobroutines/X11/keysymdef.h @@ -0,0 +1,1169 @@ +/* $XConsortium: keysymdef.h,v 1.15 93/04/02 10:57:36 rws Exp $ */ + +/*********************************************************** +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts, +and the Massachusetts Institute of Technology, Cambridge, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the names of Digital or MIT not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +#define XK_VoidSymbol 0xFFFFFF /* void symbol */ + +#ifdef XK_MISCELLANY +/* + * TTY Functions, cleverly chosen to map to ascii, for convenience of + * programming, but could have been arbitrary (at the cost of lookup + * tables in client code. + */ + +#define XK_BackSpace 0xFF08 /* back space, back char */ +#define XK_Tab 0xFF09 +#define XK_Linefeed 0xFF0A /* Linefeed, LF */ +#define XK_Clear 0xFF0B +#define XK_Return 0xFF0D /* Return, enter */ +#define XK_Pause 0xFF13 /* Pause, hold */ +#define XK_Scroll_Lock 0xFF14 +#define XK_Sys_Req 0xFF15 +#define XK_Escape 0xFF1B +#define XK_Delete 0xFFFF /* Delete, rubout */ + + + +/* International & multi-key character composition */ + +#define XK_Multi_key 0xFF20 /* Multi-key character compose */ + +/* Japanese keyboard support */ + +#define XK_Kanji 0xFF21 /* Kanji, Kanji convert */ +#define XK_Muhenkan 0xFF22 /* Cancel Conversion */ +#define XK_Henkan_Mode 0xFF23 /* Start/Stop Conversion */ +#define XK_Henkan 0xFF23 /* Alias for Henkan_Mode */ +#define XK_Romaji 0xFF24 /* to Romaji */ +#define XK_Hiragana 0xFF25 /* to Hiragana */ +#define XK_Katakana 0xFF26 /* to Katakana */ +#define XK_Hiragana_Katakana 0xFF27 /* Hiragana/Katakana toggle */ +#define XK_Zenkaku 0xFF28 /* to Zenkaku */ +#define XK_Hankaku 0xFF29 /* to Hankaku */ +#define XK_Zenkaku_Hankaku 0xFF2A /* Zenkaku/Hankaku toggle */ +#define XK_Touroku 0xFF2B /* Add to Dictionary */ +#define XK_Massyo 0xFF2C /* Delete from Dictionary */ +#define XK_Kana_Lock 0xFF2D /* Kana Lock */ +#define XK_Kana_Shift 0xFF2E /* Kana Shift */ +#define XK_Eisu_Shift 0xFF2F /* Alphanumeric Shift */ +#define XK_Eisu_toggle 0xFF30 /* Alphanumeric toggle */ + +/* Cursor control & motion */ + +#define XK_Home 0xFF50 +#define XK_Left 0xFF51 /* Move left, left arrow */ +#define XK_Up 0xFF52 /* Move up, up arrow */ +#define XK_Right 0xFF53 /* Move right, right arrow */ +#define XK_Down 0xFF54 /* Move down, down arrow */ +#define XK_Prior 0xFF55 /* Prior, previous */ +#define XK_Page_Up 0xFF55 +#define XK_Next 0xFF56 /* Next */ +#define XK_Page_Down 0xFF56 +#define XK_End 0xFF57 /* EOL */ +#define XK_Begin 0xFF58 /* BOL */ + +/* Special Windows keyboard keys */ + +#define XK_Win_L 0xFF5B /* Left-hand Windows */ +#define XK_Win_R 0xFF5C /* Right-hand Windows */ +#define XK_App 0xFF5D /* Menu key */ + +/* Misc Functions */ + +#define XK_Select 0xFF60 /* Select, mark */ +#define XK_Print 0xFF61 +#define XK_Execute 0xFF62 /* Execute, run, do */ +#define XK_Insert 0xFF63 /* Insert, insert here */ +#define XK_Undo 0xFF65 /* Undo, oops */ +#define XK_Redo 0xFF66 /* redo, again */ +#define XK_Menu 0xFF67 +#define XK_Find 0xFF68 /* Find, search */ +#define XK_Cancel 0xFF69 /* Cancel, stop, abort, exit */ +#define XK_Help 0xFF6A /* Help, ? */ +#define XK_Break 0xFF6B +#define XK_Mode_switch 0xFF7E /* Character set switch */ +#define XK_script_switch 0xFF7E /* Alias for mode_switch */ +#define XK_Num_Lock 0xFF7F + +/* Keypad Functions, keypad numbers cleverly chosen to map to ascii */ + +#define XK_KP_Space 0xFF80 /* space */ +#define XK_KP_Tab 0xFF89 +#define XK_KP_Enter 0xFF8D /* enter */ +#define XK_KP_F1 0xFF91 /* PF1, KP_A, ... */ +#define XK_KP_F2 0xFF92 +#define XK_KP_F3 0xFF93 +#define XK_KP_F4 0xFF94 +#define XK_KP_Home 0xFF95 +#define XK_KP_Left 0xFF96 +#define XK_KP_Up 0xFF97 +#define XK_KP_Right 0xFF98 +#define XK_KP_Down 0xFF99 +#define XK_KP_Prior 0xFF9A +#define XK_KP_Page_Up 0xFF9A +#define XK_KP_Next 0xFF9B +#define XK_KP_Page_Down 0xFF9B +#define XK_KP_End 0xFF9C +#define XK_KP_Begin 0xFF9D +#define XK_KP_Insert 0xFF9E +#define XK_KP_Delete 0xFF9F +#define XK_KP_Equal 0xFFBD /* equals */ +#define XK_KP_Multiply 0xFFAA +#define XK_KP_Add 0xFFAB +#define XK_KP_Separator 0xFFAC /* separator, often comma */ +#define XK_KP_Subtract 0xFFAD +#define XK_KP_Decimal 0xFFAE +#define XK_KP_Divide 0xFFAF + +#define XK_KP_0 0xFFB0 +#define XK_KP_1 0xFFB1 +#define XK_KP_2 0xFFB2 +#define XK_KP_3 0xFFB3 +#define XK_KP_4 0xFFB4 +#define XK_KP_5 0xFFB5 +#define XK_KP_6 0xFFB6 +#define XK_KP_7 0xFFB7 +#define XK_KP_8 0xFFB8 +#define XK_KP_9 0xFFB9 + + + +/* + * Auxilliary Functions; note the duplicate definitions for left and right + * function keys; Sun keyboards and a few other manufactures have such + * function key groups on the left and/or right sides of the keyboard. + * We've not found a keyboard with more than 35 function keys total. + */ + +#define XK_F1 0xFFBE +#define XK_F2 0xFFBF +#define XK_F3 0xFFC0 +#define XK_F4 0xFFC1 +#define XK_F5 0xFFC2 +#define XK_F6 0xFFC3 +#define XK_F7 0xFFC4 +#define XK_F8 0xFFC5 +#define XK_F9 0xFFC6 +#define XK_F10 0xFFC7 +#define XK_F11 0xFFC8 +#define XK_L1 0xFFC8 +#define XK_F12 0xFFC9 +#define XK_L2 0xFFC9 +#define XK_F13 0xFFCA +#define XK_L3 0xFFCA +#define XK_F14 0xFFCB +#define XK_L4 0xFFCB +#define XK_F15 0xFFCC +#define XK_L5 0xFFCC +#define XK_F16 0xFFCD +#define XK_L6 0xFFCD +#define XK_F17 0xFFCE +#define XK_L7 0xFFCE +#define XK_F18 0xFFCF +#define XK_L8 0xFFCF +#define XK_F19 0xFFD0 +#define XK_L9 0xFFD0 +#define XK_F20 0xFFD1 +#define XK_L10 0xFFD1 +#define XK_F21 0xFFD2 +#define XK_R1 0xFFD2 +#define XK_F22 0xFFD3 +#define XK_R2 0xFFD3 +#define XK_F23 0xFFD4 +#define XK_R3 0xFFD4 +#define XK_F24 0xFFD5 +#define XK_R4 0xFFD5 +#define XK_F25 0xFFD6 +#define XK_R5 0xFFD6 +#define XK_F26 0xFFD7 +#define XK_R6 0xFFD7 +#define XK_F27 0xFFD8 +#define XK_R7 0xFFD8 +#define XK_F28 0xFFD9 +#define XK_R8 0xFFD9 +#define XK_F29 0xFFDA +#define XK_R9 0xFFDA +#define XK_F30 0xFFDB +#define XK_R10 0xFFDB +#define XK_F31 0xFFDC +#define XK_R11 0xFFDC +#define XK_F32 0xFFDD +#define XK_R12 0xFFDD +#define XK_F33 0xFFDE +#define XK_R13 0xFFDE +#define XK_F34 0xFFDF +#define XK_R14 0xFFDF +#define XK_F35 0xFFE0 +#define XK_R15 0xFFE0 + +/* Modifiers */ + +#define XK_Shift_L 0xFFE1 /* Left shift */ +#define XK_Shift_R 0xFFE2 /* Right shift */ +#define XK_Control_L 0xFFE3 /* Left control */ +#define XK_Control_R 0xFFE4 /* Right control */ +#define XK_Caps_Lock 0xFFE5 /* Caps lock */ +#define XK_Shift_Lock 0xFFE6 /* Shift lock */ + +#define XK_Meta_L 0xFFE7 /* Left meta */ +#define XK_Meta_R 0xFFE8 /* Right meta */ +#define XK_Alt_L 0xFFE9 /* Left alt */ +#define XK_Alt_R 0xFFEA /* Right alt */ +#define XK_Super_L 0xFFEB /* Left super */ +#define XK_Super_R 0xFFEC /* Right super */ +#define XK_Hyper_L 0xFFED /* Left hyper */ +#define XK_Hyper_R 0xFFEE /* Right hyper */ +#endif /* XK_MISCELLANY */ + +/* + * Latin 1 + * Byte 3 = 0 + */ +#ifdef XK_LATIN1 +#define XK_space 0x020 +#define XK_exclam 0x021 +#define XK_quotedbl 0x022 +#define XK_numbersign 0x023 +#define XK_dollar 0x024 +#define XK_percent 0x025 +#define XK_ampersand 0x026 +#define XK_apostrophe 0x027 +#define XK_quoteright 0x027 /* deprecated */ +#define XK_parenleft 0x028 +#define XK_parenright 0x029 +#define XK_asterisk 0x02a +#define XK_plus 0x02b +#define XK_comma 0x02c +#define XK_minus 0x02d +#define XK_period 0x02e +#define XK_slash 0x02f +#define XK_0 0x030 +#define XK_1 0x031 +#define XK_2 0x032 +#define XK_3 0x033 +#define XK_4 0x034 +#define XK_5 0x035 +#define XK_6 0x036 +#define XK_7 0x037 +#define XK_8 0x038 +#define XK_9 0x039 +#define XK_colon 0x03a +#define XK_semicolon 0x03b +#define XK_less 0x03c +#define XK_equal 0x03d +#define XK_greater 0x03e +#define XK_question 0x03f +#define XK_at 0x040 +#define XK_A 0x041 +#define XK_B 0x042 +#define XK_C 0x043 +#define XK_D 0x044 +#define XK_E 0x045 +#define XK_F 0x046 +#define XK_G 0x047 +#define XK_H 0x048 +#define XK_I 0x049 +#define XK_J 0x04a +#define XK_K 0x04b +#define XK_L 0x04c +#define XK_M 0x04d +#define XK_N 0x04e +#define XK_O 0x04f +#define XK_P 0x050 +#define XK_Q 0x051 +#define XK_R 0x052 +#define XK_S 0x053 +#define XK_T 0x054 +#define XK_U 0x055 +#define XK_V 0x056 +#define XK_W 0x057 +#define XK_X 0x058 +#define XK_Y 0x059 +#define XK_Z 0x05a +#define XK_bracketleft 0x05b +#define XK_backslash 0x05c +#define XK_bracketright 0x05d +#define XK_asciicircum 0x05e +#define XK_underscore 0x05f +#define XK_grave 0x060 +#define XK_quoteleft 0x060 /* deprecated */ +#define XK_a 0x061 +#define XK_b 0x062 +#define XK_c 0x063 +#define XK_d 0x064 +#define XK_e 0x065 +#define XK_f 0x066 +#define XK_g 0x067 +#define XK_h 0x068 +#define XK_i 0x069 +#define XK_j 0x06a +#define XK_k 0x06b +#define XK_l 0x06c +#define XK_m 0x06d +#define XK_n 0x06e +#define XK_o 0x06f +#define XK_p 0x070 +#define XK_q 0x071 +#define XK_r 0x072 +#define XK_s 0x073 +#define XK_t 0x074 +#define XK_u 0x075 +#define XK_v 0x076 +#define XK_w 0x077 +#define XK_x 0x078 +#define XK_y 0x079 +#define XK_z 0x07a +#define XK_braceleft 0x07b +#define XK_bar 0x07c +#define XK_braceright 0x07d +#define XK_asciitilde 0x07e + +#define XK_nobreakspace 0x0a0 +#define XK_exclamdown 0x0a1 +#define XK_cent 0x0a2 +#define XK_sterling 0x0a3 +#define XK_currency 0x0a4 +#define XK_yen 0x0a5 +#define XK_brokenbar 0x0a6 +#define XK_section 0x0a7 +#define XK_diaeresis 0x0a8 +#define XK_copyright 0x0a9 +#define XK_ordfeminine 0x0aa +#define XK_guillemotleft 0x0ab /* left angle quotation mark */ +#define XK_notsign 0x0ac +#define XK_hyphen 0x0ad +#define XK_registered 0x0ae +#define XK_macron 0x0af +#define XK_degree 0x0b0 +#define XK_plusminus 0x0b1 +#define XK_twosuperior 0x0b2 +#define XK_threesuperior 0x0b3 +#define XK_acute 0x0b4 +#define XK_mu 0x0b5 +#define XK_paragraph 0x0b6 +#define XK_periodcentered 0x0b7 +#define XK_cedilla 0x0b8 +#define XK_onesuperior 0x0b9 +#define XK_masculine 0x0ba +#define XK_guillemotright 0x0bb /* right angle quotation mark */ +#define XK_onequarter 0x0bc +#define XK_onehalf 0x0bd +#define XK_threequarters 0x0be +#define XK_questiondown 0x0bf +#define XK_Agrave 0x0c0 +#define XK_Aacute 0x0c1 +#define XK_Acircumflex 0x0c2 +#define XK_Atilde 0x0c3 +#define XK_Adiaeresis 0x0c4 +#define XK_Aring 0x0c5 +#define XK_AE 0x0c6 +#define XK_Ccedilla 0x0c7 +#define XK_Egrave 0x0c8 +#define XK_Eacute 0x0c9 +#define XK_Ecircumflex 0x0ca +#define XK_Ediaeresis 0x0cb +#define XK_Igrave 0x0cc +#define XK_Iacute 0x0cd +#define XK_Icircumflex 0x0ce +#define XK_Idiaeresis 0x0cf +#define XK_ETH 0x0d0 +#define XK_Eth 0x0d0 /* deprecated */ +#define XK_Ntilde 0x0d1 +#define XK_Ograve 0x0d2 +#define XK_Oacute 0x0d3 +#define XK_Ocircumflex 0x0d4 +#define XK_Otilde 0x0d5 +#define XK_Odiaeresis 0x0d6 +#define XK_multiply 0x0d7 +#define XK_Ooblique 0x0d8 +#define XK_Ugrave 0x0d9 +#define XK_Uacute 0x0da +#define XK_Ucircumflex 0x0db +#define XK_Udiaeresis 0x0dc +#define XK_Yacute 0x0dd +#define XK_THORN 0x0de +#define XK_Thorn 0x0de /* deprecated */ +#define XK_ssharp 0x0df +#define XK_agrave 0x0e0 +#define XK_aacute 0x0e1 +#define XK_acircumflex 0x0e2 +#define XK_atilde 0x0e3 +#define XK_adiaeresis 0x0e4 +#define XK_aring 0x0e5 +#define XK_ae 0x0e6 +#define XK_ccedilla 0x0e7 +#define XK_egrave 0x0e8 +#define XK_eacute 0x0e9 +#define XK_ecircumflex 0x0ea +#define XK_ediaeresis 0x0eb +#define XK_igrave 0x0ec +#define XK_iacute 0x0ed +#define XK_icircumflex 0x0ee +#define XK_idiaeresis 0x0ef +#define XK_eth 0x0f0 +#define XK_ntilde 0x0f1 +#define XK_ograve 0x0f2 +#define XK_oacute 0x0f3 +#define XK_ocircumflex 0x0f4 +#define XK_otilde 0x0f5 +#define XK_odiaeresis 0x0f6 +#define XK_division 0x0f7 +#define XK_oslash 0x0f8 +#define XK_ugrave 0x0f9 +#define XK_uacute 0x0fa +#define XK_ucircumflex 0x0fb +#define XK_udiaeresis 0x0fc +#define XK_yacute 0x0fd +#define XK_thorn 0x0fe +#define XK_ydiaeresis 0x0ff +#endif /* XK_LATIN1 */ + +/* + * Latin 2 + * Byte 3 = 1 + */ + +#ifdef XK_LATIN2 +#define XK_Aogonek 0x1a1 +#define XK_breve 0x1a2 +#define XK_Lstroke 0x1a3 +#define XK_Lcaron 0x1a5 +#define XK_Sacute 0x1a6 +#define XK_Scaron 0x1a9 +#define XK_Scedilla 0x1aa +#define XK_Tcaron 0x1ab +#define XK_Zacute 0x1ac +#define XK_Zcaron 0x1ae +#define XK_Zabovedot 0x1af +#define XK_aogonek 0x1b1 +#define XK_ogonek 0x1b2 +#define XK_lstroke 0x1b3 +#define XK_lcaron 0x1b5 +#define XK_sacute 0x1b6 +#define XK_caron 0x1b7 +#define XK_scaron 0x1b9 +#define XK_scedilla 0x1ba +#define XK_tcaron 0x1bb +#define XK_zacute 0x1bc +#define XK_doubleacute 0x1bd +#define XK_zcaron 0x1be +#define XK_zabovedot 0x1bf +#define XK_Racute 0x1c0 +#define XK_Abreve 0x1c3 +#define XK_Lacute 0x1c5 +#define XK_Cacute 0x1c6 +#define XK_Ccaron 0x1c8 +#define XK_Eogonek 0x1ca +#define XK_Ecaron 0x1cc +#define XK_Dcaron 0x1cf +#define XK_Dstroke 0x1d0 +#define XK_Nacute 0x1d1 +#define XK_Ncaron 0x1d2 +#define XK_Odoubleacute 0x1d5 +#define XK_Rcaron 0x1d8 +#define XK_Uring 0x1d9 +#define XK_Udoubleacute 0x1db +#define XK_Tcedilla 0x1de +#define XK_racute 0x1e0 +#define XK_abreve 0x1e3 +#define XK_lacute 0x1e5 +#define XK_cacute 0x1e6 +#define XK_ccaron 0x1e8 +#define XK_eogonek 0x1ea +#define XK_ecaron 0x1ec +#define XK_dcaron 0x1ef +#define XK_dstroke 0x1f0 +#define XK_nacute 0x1f1 +#define XK_ncaron 0x1f2 +#define XK_odoubleacute 0x1f5 +#define XK_udoubleacute 0x1fb +#define XK_rcaron 0x1f8 +#define XK_uring 0x1f9 +#define XK_tcedilla 0x1fe +#define XK_abovedot 0x1ff +#endif /* XK_LATIN2 */ + +/* + * Latin 3 + * Byte 3 = 2 + */ + +#ifdef XK_LATIN3 +#define XK_Hstroke 0x2a1 +#define XK_Hcircumflex 0x2a6 +#define XK_Iabovedot 0x2a9 +#define XK_Gbreve 0x2ab +#define XK_Jcircumflex 0x2ac +#define XK_hstroke 0x2b1 +#define XK_hcircumflex 0x2b6 +#define XK_idotless 0x2b9 +#define XK_gbreve 0x2bb +#define XK_jcircumflex 0x2bc +#define XK_Cabovedot 0x2c5 +#define XK_Ccircumflex 0x2c6 +#define XK_Gabovedot 0x2d5 +#define XK_Gcircumflex 0x2d8 +#define XK_Ubreve 0x2dd +#define XK_Scircumflex 0x2de +#define XK_cabovedot 0x2e5 +#define XK_ccircumflex 0x2e6 +#define XK_gabovedot 0x2f5 +#define XK_gcircumflex 0x2f8 +#define XK_ubreve 0x2fd +#define XK_scircumflex 0x2fe +#endif /* XK_LATIN3 */ + + +/* + * Latin 4 + * Byte 3 = 3 + */ + +#ifdef XK_LATIN4 +#define XK_kra 0x3a2 +#define XK_kappa 0x3a2 /* deprecated */ +#define XK_Rcedilla 0x3a3 +#define XK_Itilde 0x3a5 +#define XK_Lcedilla 0x3a6 +#define XK_Emacron 0x3aa +#define XK_Gcedilla 0x3ab +#define XK_Tslash 0x3ac +#define XK_rcedilla 0x3b3 +#define XK_itilde 0x3b5 +#define XK_lcedilla 0x3b6 +#define XK_emacron 0x3ba +#define XK_gcedilla 0x3bb +#define XK_tslash 0x3bc +#define XK_ENG 0x3bd +#define XK_eng 0x3bf +#define XK_Amacron 0x3c0 +#define XK_Iogonek 0x3c7 +#define XK_Eabovedot 0x3cc +#define XK_Imacron 0x3cf +#define XK_Ncedilla 0x3d1 +#define XK_Omacron 0x3d2 +#define XK_Kcedilla 0x3d3 +#define XK_Uogonek 0x3d9 +#define XK_Utilde 0x3dd +#define XK_Umacron 0x3de +#define XK_amacron 0x3e0 +#define XK_iogonek 0x3e7 +#define XK_eabovedot 0x3ec +#define XK_imacron 0x3ef +#define XK_ncedilla 0x3f1 +#define XK_omacron 0x3f2 +#define XK_kcedilla 0x3f3 +#define XK_uogonek 0x3f9 +#define XK_utilde 0x3fd +#define XK_umacron 0x3fe +#endif /* XK_LATIN4 */ + +/* + * Katakana + * Byte 3 = 4 + */ + +#ifdef XK_KATAKANA +#define XK_overline 0x47e +#define XK_kana_fullstop 0x4a1 +#define XK_kana_openingbracket 0x4a2 +#define XK_kana_closingbracket 0x4a3 +#define XK_kana_comma 0x4a4 +#define XK_kana_conjunctive 0x4a5 +#define XK_kana_middledot 0x4a5 /* deprecated */ +#define XK_kana_WO 0x4a6 +#define XK_kana_a 0x4a7 +#define XK_kana_i 0x4a8 +#define XK_kana_u 0x4a9 +#define XK_kana_e 0x4aa +#define XK_kana_o 0x4ab +#define XK_kana_ya 0x4ac +#define XK_kana_yu 0x4ad +#define XK_kana_yo 0x4ae +#define XK_kana_tsu 0x4af +#define XK_kana_tu 0x4af /* deprecated */ +#define XK_prolongedsound 0x4b0 +#define XK_kana_A 0x4b1 +#define XK_kana_I 0x4b2 +#define XK_kana_U 0x4b3 +#define XK_kana_E 0x4b4 +#define XK_kana_O 0x4b5 +#define XK_kana_KA 0x4b6 +#define XK_kana_KI 0x4b7 +#define XK_kana_KU 0x4b8 +#define XK_kana_KE 0x4b9 +#define XK_kana_KO 0x4ba +#define XK_kana_SA 0x4bb +#define XK_kana_SHI 0x4bc +#define XK_kana_SU 0x4bd +#define XK_kana_SE 0x4be +#define XK_kana_SO 0x4bf +#define XK_kana_TA 0x4c0 +#define XK_kana_CHI 0x4c1 +#define XK_kana_TI 0x4c1 /* deprecated */ +#define XK_kana_TSU 0x4c2 +#define XK_kana_TU 0x4c2 /* deprecated */ +#define XK_kana_TE 0x4c3 +#define XK_kana_TO 0x4c4 +#define XK_kana_NA 0x4c5 +#define XK_kana_NI 0x4c6 +#define XK_kana_NU 0x4c7 +#define XK_kana_NE 0x4c8 +#define XK_kana_NO 0x4c9 +#define XK_kana_HA 0x4ca +#define XK_kana_HI 0x4cb +#define XK_kana_FU 0x4cc +#define XK_kana_HU 0x4cc /* deprecated */ +#define XK_kana_HE 0x4cd +#define XK_kana_HO 0x4ce +#define XK_kana_MA 0x4cf +#define XK_kana_MI 0x4d0 +#define XK_kana_MU 0x4d1 +#define XK_kana_ME 0x4d2 +#define XK_kana_MO 0x4d3 +#define XK_kana_YA 0x4d4 +#define XK_kana_YU 0x4d5 +#define XK_kana_YO 0x4d6 +#define XK_kana_RA 0x4d7 +#define XK_kana_RI 0x4d8 +#define XK_kana_RU 0x4d9 +#define XK_kana_RE 0x4da +#define XK_kana_RO 0x4db +#define XK_kana_WA 0x4dc +#define XK_kana_N 0x4dd +#define XK_voicedsound 0x4de +#define XK_semivoicedsound 0x4df +#define XK_kana_switch 0xFF7E /* Alias for mode_switch */ +#endif /* XK_KATAKANA */ + +/* + * Arabic + * Byte 3 = 5 + */ + +#ifdef XK_ARABIC +#define XK_Arabic_comma 0x5ac +#define XK_Arabic_semicolon 0x5bb +#define XK_Arabic_question_mark 0x5bf +#define XK_Arabic_hamza 0x5c1 +#define XK_Arabic_maddaonalef 0x5c2 +#define XK_Arabic_hamzaonalef 0x5c3 +#define XK_Arabic_hamzaonwaw 0x5c4 +#define XK_Arabic_hamzaunderalef 0x5c5 +#define XK_Arabic_hamzaonyeh 0x5c6 +#define XK_Arabic_alef 0x5c7 +#define XK_Arabic_beh 0x5c8 +#define XK_Arabic_tehmarbuta 0x5c9 +#define XK_Arabic_teh 0x5ca +#define XK_Arabic_theh 0x5cb +#define XK_Arabic_jeem 0x5cc +#define XK_Arabic_hah 0x5cd +#define XK_Arabic_khah 0x5ce +#define XK_Arabic_dal 0x5cf +#define XK_Arabic_thal 0x5d0 +#define XK_Arabic_ra 0x5d1 +#define XK_Arabic_zain 0x5d2 +#define XK_Arabic_seen 0x5d3 +#define XK_Arabic_sheen 0x5d4 +#define XK_Arabic_sad 0x5d5 +#define XK_Arabic_dad 0x5d6 +#define XK_Arabic_tah 0x5d7 +#define XK_Arabic_zah 0x5d8 +#define XK_Arabic_ain 0x5d9 +#define XK_Arabic_ghain 0x5da +#define XK_Arabic_tatweel 0x5e0 +#define XK_Arabic_feh 0x5e1 +#define XK_Arabic_qaf 0x5e2 +#define XK_Arabic_kaf 0x5e3 +#define XK_Arabic_lam 0x5e4 +#define XK_Arabic_meem 0x5e5 +#define XK_Arabic_noon 0x5e6 +#define XK_Arabic_ha 0x5e7 +#define XK_Arabic_heh 0x5e7 /* deprecated */ +#define XK_Arabic_waw 0x5e8 +#define XK_Arabic_alefmaksura 0x5e9 +#define XK_Arabic_yeh 0x5ea +#define XK_Arabic_fathatan 0x5eb +#define XK_Arabic_dammatan 0x5ec +#define XK_Arabic_kasratan 0x5ed +#define XK_Arabic_fatha 0x5ee +#define XK_Arabic_damma 0x5ef +#define XK_Arabic_kasra 0x5f0 +#define XK_Arabic_shadda 0x5f1 +#define XK_Arabic_sukun 0x5f2 +#define XK_Arabic_switch 0xFF7E /* Alias for mode_switch */ +#endif /* XK_ARABIC */ + +/* + * Cyrillic + * Byte 3 = 6 + */ +#ifdef XK_CYRILLIC +#define XK_Serbian_dje 0x6a1 +#define XK_Macedonia_gje 0x6a2 +#define XK_Cyrillic_io 0x6a3 +#define XK_Ukrainian_ie 0x6a4 +#define XK_Ukranian_je 0x6a4 /* deprecated */ +#define XK_Macedonia_dse 0x6a5 +#define XK_Ukrainian_i 0x6a6 +#define XK_Ukranian_i 0x6a6 /* deprecated */ +#define XK_Ukrainian_yi 0x6a7 +#define XK_Ukranian_yi 0x6a7 /* deprecated */ +#define XK_Cyrillic_je 0x6a8 +#define XK_Serbian_je 0x6a8 /* deprecated */ +#define XK_Cyrillic_lje 0x6a9 +#define XK_Serbian_lje 0x6a9 /* deprecated */ +#define XK_Cyrillic_nje 0x6aa +#define XK_Serbian_nje 0x6aa /* deprecated */ +#define XK_Serbian_tshe 0x6ab +#define XK_Macedonia_kje 0x6ac +#define XK_Byelorussian_shortu 0x6ae +#define XK_Cyrillic_dzhe 0x6af +#define XK_Serbian_dze 0x6af /* deprecated */ +#define XK_numerosign 0x6b0 +#define XK_Serbian_DJE 0x6b1 +#define XK_Macedonia_GJE 0x6b2 +#define XK_Cyrillic_IO 0x6b3 +#define XK_Ukrainian_IE 0x6b4 +#define XK_Ukranian_JE 0x6b4 /* deprecated */ +#define XK_Macedonia_DSE 0x6b5 +#define XK_Ukrainian_I 0x6b6 +#define XK_Ukranian_I 0x6b6 /* deprecated */ +#define XK_Ukrainian_YI 0x6b7 +#define XK_Ukranian_YI 0x6b7 /* deprecated */ +#define XK_Cyrillic_JE 0x6b8 +#define XK_Serbian_JE 0x6b8 /* deprecated */ +#define XK_Cyrillic_LJE 0x6b9 +#define XK_Serbian_LJE 0x6b9 /* deprecated */ +#define XK_Cyrillic_NJE 0x6ba +#define XK_Serbian_NJE 0x6ba /* deprecated */ +#define XK_Serbian_TSHE 0x6bb +#define XK_Macedonia_KJE 0x6bc +#define XK_Byelorussian_SHORTU 0x6be +#define XK_Cyrillic_DZHE 0x6bf +#define XK_Serbian_DZE 0x6bf /* deprecated */ +#define XK_Cyrillic_yu 0x6c0 +#define XK_Cyrillic_a 0x6c1 +#define XK_Cyrillic_be 0x6c2 +#define XK_Cyrillic_tse 0x6c3 +#define XK_Cyrillic_de 0x6c4 +#define XK_Cyrillic_ie 0x6c5 +#define XK_Cyrillic_ef 0x6c6 +#define XK_Cyrillic_ghe 0x6c7 +#define XK_Cyrillic_ha 0x6c8 +#define XK_Cyrillic_i 0x6c9 +#define XK_Cyrillic_shorti 0x6ca +#define XK_Cyrillic_ka 0x6cb +#define XK_Cyrillic_el 0x6cc +#define XK_Cyrillic_em 0x6cd +#define XK_Cyrillic_en 0x6ce +#define XK_Cyrillic_o 0x6cf +#define XK_Cyrillic_pe 0x6d0 +#define XK_Cyrillic_ya 0x6d1 +#define XK_Cyrillic_er 0x6d2 +#define XK_Cyrillic_es 0x6d3 +#define XK_Cyrillic_te 0x6d4 +#define XK_Cyrillic_u 0x6d5 +#define XK_Cyrillic_zhe 0x6d6 +#define XK_Cyrillic_ve 0x6d7 +#define XK_Cyrillic_softsign 0x6d8 +#define XK_Cyrillic_yeru 0x6d9 +#define XK_Cyrillic_ze 0x6da +#define XK_Cyrillic_sha 0x6db +#define XK_Cyrillic_e 0x6dc +#define XK_Cyrillic_shcha 0x6dd +#define XK_Cyrillic_che 0x6de +#define XK_Cyrillic_hardsign 0x6df +#define XK_Cyrillic_YU 0x6e0 +#define XK_Cyrillic_A 0x6e1 +#define XK_Cyrillic_BE 0x6e2 +#define XK_Cyrillic_TSE 0x6e3 +#define XK_Cyrillic_DE 0x6e4 +#define XK_Cyrillic_IE 0x6e5 +#define XK_Cyrillic_EF 0x6e6 +#define XK_Cyrillic_GHE 0x6e7 +#define XK_Cyrillic_HA 0x6e8 +#define XK_Cyrillic_I 0x6e9 +#define XK_Cyrillic_SHORTI 0x6ea +#define XK_Cyrillic_KA 0x6eb +#define XK_Cyrillic_EL 0x6ec +#define XK_Cyrillic_EM 0x6ed +#define XK_Cyrillic_EN 0x6ee +#define XK_Cyrillic_O 0x6ef +#define XK_Cyrillic_PE 0x6f0 +#define XK_Cyrillic_YA 0x6f1 +#define XK_Cyrillic_ER 0x6f2 +#define XK_Cyrillic_ES 0x6f3 +#define XK_Cyrillic_TE 0x6f4 +#define XK_Cyrillic_U 0x6f5 +#define XK_Cyrillic_ZHE 0x6f6 +#define XK_Cyrillic_VE 0x6f7 +#define XK_Cyrillic_SOFTSIGN 0x6f8 +#define XK_Cyrillic_YERU 0x6f9 +#define XK_Cyrillic_ZE 0x6fa +#define XK_Cyrillic_SHA 0x6fb +#define XK_Cyrillic_E 0x6fc +#define XK_Cyrillic_SHCHA 0x6fd +#define XK_Cyrillic_CHE 0x6fe +#define XK_Cyrillic_HARDSIGN 0x6ff +#endif /* XK_CYRILLIC */ + +/* + * Greek + * Byte 3 = 7 + */ + +#ifdef XK_GREEK +#define XK_Greek_ALPHAaccent 0x7a1 +#define XK_Greek_EPSILONaccent 0x7a2 +#define XK_Greek_ETAaccent 0x7a3 +#define XK_Greek_IOTAaccent 0x7a4 +#define XK_Greek_IOTAdiaeresis 0x7a5 +#define XK_Greek_OMICRONaccent 0x7a7 +#define XK_Greek_UPSILONaccent 0x7a8 +#define XK_Greek_UPSILONdieresis 0x7a9 +#define XK_Greek_OMEGAaccent 0x7ab +#define XK_Greek_accentdieresis 0x7ae +#define XK_Greek_horizbar 0x7af +#define XK_Greek_alphaaccent 0x7b1 +#define XK_Greek_epsilonaccent 0x7b2 +#define XK_Greek_etaaccent 0x7b3 +#define XK_Greek_iotaaccent 0x7b4 +#define XK_Greek_iotadieresis 0x7b5 +#define XK_Greek_iotaaccentdieresis 0x7b6 +#define XK_Greek_omicronaccent 0x7b7 +#define XK_Greek_upsilonaccent 0x7b8 +#define XK_Greek_upsilondieresis 0x7b9 +#define XK_Greek_upsilonaccentdieresis 0x7ba +#define XK_Greek_omegaaccent 0x7bb +#define XK_Greek_ALPHA 0x7c1 +#define XK_Greek_BETA 0x7c2 +#define XK_Greek_GAMMA 0x7c3 +#define XK_Greek_DELTA 0x7c4 +#define XK_Greek_EPSILON 0x7c5 +#define XK_Greek_ZETA 0x7c6 +#define XK_Greek_ETA 0x7c7 +#define XK_Greek_THETA 0x7c8 +#define XK_Greek_IOTA 0x7c9 +#define XK_Greek_KAPPA 0x7ca +#define XK_Greek_LAMDA 0x7cb +#define XK_Greek_LAMBDA 0x7cb +#define XK_Greek_MU 0x7cc +#define XK_Greek_NU 0x7cd +#define XK_Greek_XI 0x7ce +#define XK_Greek_OMICRON 0x7cf +#define XK_Greek_PI 0x7d0 +#define XK_Greek_RHO 0x7d1 +#define XK_Greek_SIGMA 0x7d2 +#define XK_Greek_TAU 0x7d4 +#define XK_Greek_UPSILON 0x7d5 +#define XK_Greek_PHI 0x7d6 +#define XK_Greek_CHI 0x7d7 +#define XK_Greek_PSI 0x7d8 +#define XK_Greek_OMEGA 0x7d9 +#define XK_Greek_alpha 0x7e1 +#define XK_Greek_beta 0x7e2 +#define XK_Greek_gamma 0x7e3 +#define XK_Greek_delta 0x7e4 +#define XK_Greek_epsilon 0x7e5 +#define XK_Greek_zeta 0x7e6 +#define XK_Greek_eta 0x7e7 +#define XK_Greek_theta 0x7e8 +#define XK_Greek_iota 0x7e9 +#define XK_Greek_kappa 0x7ea +#define XK_Greek_lamda 0x7eb +#define XK_Greek_lambda 0x7eb +#define XK_Greek_mu 0x7ec +#define XK_Greek_nu 0x7ed +#define XK_Greek_xi 0x7ee +#define XK_Greek_omicron 0x7ef +#define XK_Greek_pi 0x7f0 +#define XK_Greek_rho 0x7f1 +#define XK_Greek_sigma 0x7f2 +#define XK_Greek_finalsmallsigma 0x7f3 +#define XK_Greek_tau 0x7f4 +#define XK_Greek_upsilon 0x7f5 +#define XK_Greek_phi 0x7f6 +#define XK_Greek_chi 0x7f7 +#define XK_Greek_psi 0x7f8 +#define XK_Greek_omega 0x7f9 +#define XK_Greek_switch 0xFF7E /* Alias for mode_switch */ +#endif /* XK_GREEK */ + +/* + * Technical + * Byte 3 = 8 + */ + +#ifdef XK_TECHNICAL +#define XK_leftradical 0x8a1 +#define XK_topleftradical 0x8a2 +#define XK_horizconnector 0x8a3 +#define XK_topintegral 0x8a4 +#define XK_botintegral 0x8a5 +#define XK_vertconnector 0x8a6 +#define XK_topleftsqbracket 0x8a7 +#define XK_botleftsqbracket 0x8a8 +#define XK_toprightsqbracket 0x8a9 +#define XK_botrightsqbracket 0x8aa +#define XK_topleftparens 0x8ab +#define XK_botleftparens 0x8ac +#define XK_toprightparens 0x8ad +#define XK_botrightparens 0x8ae +#define XK_leftmiddlecurlybrace 0x8af +#define XK_rightmiddlecurlybrace 0x8b0 +#define XK_topleftsummation 0x8b1 +#define XK_botleftsummation 0x8b2 +#define XK_topvertsummationconnector 0x8b3 +#define XK_botvertsummationconnector 0x8b4 +#define XK_toprightsummation 0x8b5 +#define XK_botrightsummation 0x8b6 +#define XK_rightmiddlesummation 0x8b7 +#define XK_lessthanequal 0x8bc +#define XK_notequal 0x8bd +#define XK_greaterthanequal 0x8be +#define XK_integral 0x8bf +#define XK_therefore 0x8c0 +#define XK_variation 0x8c1 +#define XK_infinity 0x8c2 +#define XK_nabla 0x8c5 +#define XK_approximate 0x8c8 +#define XK_similarequal 0x8c9 +#define XK_ifonlyif 0x8cd +#define XK_implies 0x8ce +#define XK_identical 0x8cf +#define XK_radical 0x8d6 +#define XK_includedin 0x8da +#define XK_includes 0x8db +#define XK_intersection 0x8dc +#define XK_union 0x8dd +#define XK_logicaland 0x8de +#define XK_logicalor 0x8df +#define XK_partialderivative 0x8ef +#define XK_function 0x8f6 +#define XK_leftarrow 0x8fb +#define XK_uparrow 0x8fc +#define XK_rightarrow 0x8fd +#define XK_downarrow 0x8fe +#endif /* XK_TECHNICAL */ + +/* + * Special + * Byte 3 = 9 + */ + +#ifdef XK_SPECIAL +#define XK_blank 0x9df +#define XK_soliddiamond 0x9e0 +#define XK_checkerboard 0x9e1 +#define XK_ht 0x9e2 +#define XK_ff 0x9e3 +#define XK_cr 0x9e4 +#define XK_lf 0x9e5 +#define XK_nl 0x9e8 +#define XK_vt 0x9e9 +#define XK_lowrightcorner 0x9ea +#define XK_uprightcorner 0x9eb +#define XK_upleftcorner 0x9ec +#define XK_lowleftcorner 0x9ed +#define XK_crossinglines 0x9ee +#define XK_horizlinescan1 0x9ef +#define XK_horizlinescan3 0x9f0 +#define XK_horizlinescan5 0x9f1 +#define XK_horizlinescan7 0x9f2 +#define XK_horizlinescan9 0x9f3 +#define XK_leftt 0x9f4 +#define XK_rightt 0x9f5 +#define XK_bott 0x9f6 +#define XK_topt 0x9f7 +#define XK_vertbar 0x9f8 +#endif /* XK_SPECIAL */ + +/* + * Publishing + * Byte 3 = a + */ + +#ifdef XK_PUBLISHING +#define XK_emspace 0xaa1 +#define XK_enspace 0xaa2 +#define XK_em3space 0xaa3 +#define XK_em4space 0xaa4 +#define XK_digitspace 0xaa5 +#define XK_punctspace 0xaa6 +#define XK_thinspace 0xaa7 +#define XK_hairspace 0xaa8 +#define XK_emdash 0xaa9 +#define XK_endash 0xaaa +#define XK_signifblank 0xaac +#define XK_ellipsis 0xaae +#define XK_doubbaselinedot 0xaaf +#define XK_onethird 0xab0 +#define XK_twothirds 0xab1 +#define XK_onefifth 0xab2 +#define XK_twofifths 0xab3 +#define XK_threefifths 0xab4 +#define XK_fourfifths 0xab5 +#define XK_onesixth 0xab6 +#define XK_fivesixths 0xab7 +#define XK_careof 0xab8 +#define XK_figdash 0xabb +#define XK_leftanglebracket 0xabc +#define XK_decimalpoint 0xabd +#define XK_rightanglebracket 0xabe +#define XK_marker 0xabf +#define XK_oneeighth 0xac3 +#define XK_threeeighths 0xac4 +#define XK_fiveeighths 0xac5 +#define XK_seveneighths 0xac6 +#define XK_trademark 0xac9 +#define XK_signaturemark 0xaca +#define XK_trademarkincircle 0xacb +#define XK_leftopentriangle 0xacc +#define XK_rightopentriangle 0xacd +#define XK_emopencircle 0xace +#define XK_emopenrectangle 0xacf +#define XK_leftsinglequotemark 0xad0 +#define XK_rightsinglequotemark 0xad1 +#define XK_leftdoublequotemark 0xad2 +#define XK_rightdoublequotemark 0xad3 +#define XK_prescription 0xad4 +#define XK_minutes 0xad6 +#define XK_seconds 0xad7 +#define XK_latincross 0xad9 +#define XK_hexagram 0xada +#define XK_filledrectbullet 0xadb +#define XK_filledlefttribullet 0xadc +#define XK_filledrighttribullet 0xadd +#define XK_emfilledcircle 0xade +#define XK_emfilledrect 0xadf +#define XK_enopencircbullet 0xae0 +#define XK_enopensquarebullet 0xae1 +#define XK_openrectbullet 0xae2 +#define XK_opentribulletup 0xae3 +#define XK_opentribulletdown 0xae4 +#define XK_openstar 0xae5 +#define XK_enfilledcircbullet 0xae6 +#define XK_enfilledsqbullet 0xae7 +#define XK_filledtribulletup 0xae8 +#define XK_filledtribulletdown 0xae9 +#define XK_leftpointer 0xaea +#define XK_rightpointer 0xaeb +#define XK_club 0xaec +#define XK_diamond 0xaed +#define XK_heart 0xaee +#define XK_maltesecross 0xaf0 +#define XK_dagger 0xaf1 +#define XK_doubledagger 0xaf2 +#define XK_checkmark 0xaf3 +#define XK_ballotcross 0xaf4 +#define XK_musicalsharp 0xaf5 +#define XK_musicalflat 0xaf6 +#define XK_malesymbol 0xaf7 +#define XK_femalesymbol 0xaf8 +#define XK_telephone 0xaf9 +#define XK_telephonerecorder 0xafa +#define XK_phonographcopyright 0xafb +#define XK_caret 0xafc +#define XK_singlelowquotemark 0xafd +#define XK_doublelowquotemark 0xafe +#define XK_cursor 0xaff +#endif /* XK_PUBLISHING */ + +/* + * APL + * Byte 3 = b + */ + +#ifdef XK_APL +#define XK_leftcaret 0xba3 +#define XK_rightcaret 0xba6 +#define XK_downcaret 0xba8 +#define XK_upcaret 0xba9 +#define XK_overbar 0xbc0 +#define XK_downtack 0xbc2 +#define XK_upshoe 0xbc3 +#define XK_downstile 0xbc4 +#define XK_underbar 0xbc6 +#define XK_jot 0xbca +#define XK_quad 0xbcc +#define XK_uptack 0xbce +#define XK_circle 0xbcf +#define XK_upstile 0xbd3 +#define XK_downshoe 0xbd6 +#define XK_rightshoe 0xbd8 +#define XK_leftshoe 0xbda +#define XK_lefttack 0xbdc +#define XK_righttack 0xbfc +#endif /* XK_APL */ + +/* + * Hebrew + * Byte 3 = c + */ + +#ifdef XK_HEBREW +#define XK_hebrew_doublelowline 0xcdf +#define XK_hebrew_aleph 0xce0 +#define XK_hebrew_bet 0xce1 +#define XK_hebrew_beth 0xce1 /* deprecated */ +#define XK_hebrew_gimel 0xce2 +#define XK_hebrew_gimmel 0xce2 /* deprecated */ +#define XK_hebrew_dalet 0xce3 +#define XK_hebrew_daleth 0xce3 /* deprecated */ +#define XK_hebrew_he 0xce4 +#define XK_hebrew_waw 0xce5 +#define XK_hebrew_zain 0xce6 +#define XK_hebrew_zayin 0xce6 /* deprecated */ +#define XK_hebrew_chet 0xce7 +#define XK_hebrew_het 0xce7 /* deprecated */ +#define XK_hebrew_tet 0xce8 +#define XK_hebrew_teth 0xce8 /* deprecated */ +#define XK_hebrew_yod 0xce9 +#define XK_hebrew_finalkaph 0xcea +#define XK_hebrew_kaph 0xceb +#define XK_hebrew_lamed 0xcec +#define XK_hebrew_finalmem 0xced +#define XK_hebrew_mem 0xcee +#define XK_hebrew_finalnun 0xcef +#define XK_hebrew_nun 0xcf0 +#define XK_hebrew_samech 0xcf1 +#define XK_hebrew_samekh 0xcf1 /* deprecated */ +#define XK_hebrew_ayin 0xcf2 +#define XK_hebrew_finalpe 0xcf3 +#define XK_hebrew_pe 0xcf4 +#define XK_hebrew_finalzade 0xcf5 +#define XK_hebrew_finalzadi 0xcf5 /* deprecated */ +#define XK_hebrew_zade 0xcf6 +#define XK_hebrew_zadi 0xcf6 /* deprecated */ +#define XK_hebrew_qoph 0xcf7 +#define XK_hebrew_kuf 0xcf7 /* deprecated */ +#define XK_hebrew_resh 0xcf8 +#define XK_hebrew_shin 0xcf9 +#define XK_hebrew_taw 0xcfa +#define XK_hebrew_taf 0xcfa /* deprecated */ +#define XK_Hebrew_switch 0xFF7E /* Alias for mode_switch */ +#endif /* XK_HEBREW */ + diff --git a/cobroutines/case.c b/cobroutines/case.c new file mode 100644 index 0000000..943101d --- /dev/null +++ b/cobroutines/case.c @@ -0,0 +1,140 @@ +/* + * Copyright (C) 2003 Hudson Reis. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 USA + */ + +/* Case routines */ + +#include +#include +#include "globals.h" + +/* +void cbl_tolower(char *in, char *out, unsigned int *ret) { + int i=0; + *ret=0; + if (cbl_align(in) != 0) { *ret=1; } + if (*ret == 0) { + for (i=0;i<=(strlen(in));i++) { + *out++ = tolower(in[i]); + } + } +} + +void cbl_toupper(char *in, char *out, unsigned int *ret) { + int i=0; + *ret=0; + if (cbl_align(in) != 0) { *ret=1; } + if (*ret == 0) { + for (i=0;i<=(strlen(in));i++) { + *out++ = toupper(in[i]); + } + } +} +*/ + +// ---------------------------------------------------------------------- +// Implemented by Walter Garrote ---------------------------------------- +// garrote@dm.com.br +// Brazil +// Goîânia-Goiás +// ---------------------------------------------------------------------- + +// return the string with all letter to lower +void cbl_tolower(char *in, int size) { + int i; + char *c; + c = in; + for(i = 0; i < size; i++) + *c++ = tolower(*c); + return; +} + +// return the string with all letter to upper +void cbl_toupper(char *in, int size) { + int i; + char *c; + c = in; + for(i = 0; i < size; i++) + *c++ = toupper(*c); + return; +} + +// return the string with all first word letter upper, and lower to the others +void cbl_ucwords(char *in, int size) { + int i; + int force = 0; + char *c; + c = in; + for(i = 0; i < size; i++) { + if(!force) + switch(*c) { + case ' ': + case '.': + case ',': + case ';': + force = 1; + break; + default: + force = 0; + break; + } + if(isalpha(*c)) + if(force || i == 0) { + *c++ = toupper(*c); + force = 0; + } else + *c++ = tolower(*c); + else + *c++; + } + return; +} + +// return the string with the first word letter upper and lower to the others +void cbl_ucfirst(char *in, int size) { + int i; + int first = 0; + char *c; + c = in; + for(i = 0; i < size; i++) { + if(isalpha(*c)) + if(first == 0) { + *c++ = toupper(*c); + first = 1; + } else + *c++ = tolower(*c); + else + *c++; + } + return; +} + +// return character for the ascii code +void cbl_char(int *a, unsigned char *c) { + *c = (char) *a; + return; +} + +// return ascii code for the character +void cbl_ord(unsigned char *c, int *a) { + unsigned char ch; + ch = *c; + *a = (int) *(c); + *c = ch; + return; +} diff --git a/cobroutines/cobtools.h b/cobroutines/cobtools.h new file mode 100644 index 0000000..27505fe --- /dev/null +++ b/cobroutines/cobtools.h @@ -0,0 +1,50 @@ +char cobtools[] = + "set argc 0\n" + "set argv {}\n" + "proc split_fields {} {\n" + " global cobol_fields data_block\n" + " set ix 0\n" + " foreach {varname size} $cobol_fields {\n" + " global $varname\n" + " set $varname [string range $data_block $ix [expr $ix+$size-1]]\n" + " incr ix $size\n" + " }\n" + "}\n" + "proc ::returnCobol {} {\n" + " global cobol_fields result ready\n" + " set result \"\"\n" + " catch {\n" + " foreach {varname size} $cobol_fields {\n" + " global $varname\n" + " append result [format \"%-$size.${size}s\" [set $varname]]\n" + " }\n" + " }\n" + " set ready 1\n" + "}\n" + "proc ::do_exit {} {\n" + " label .labDoExit\n" + " bind .labDoExit returnCobol\n" + " destroy .labDoExit\n" + "}\n" + "proc ::cobol_preprocess {} { }\n" + "proc ::cobol_update {} { }\n"; + +char compute_block_size[] = + "set block_size 0\n" + "foreach {varname size} $cobol_fields {\n" + " incr block_size $size\n" + "}\n"; + +char wait_ready[] = + "split_fields\n" + "set ready 0\n" + "cobol_preprocess\n" + "if {!$ready} {\n" + " tkwait variable ready\n" + "}\n"; + +char newgui[] = + "foreach child [winfo children .] {\n" + " destroy $child\n" + "}\n"; + diff --git a/cobroutines/dir.c b/cobroutines/dir.c new file mode 100644 index 0000000..dd47e80 --- /dev/null +++ b/cobroutines/dir.c @@ -0,0 +1,305 @@ +/* + * Copyright (C) 2003 Wesley Oliveira, Aline Oliveira, Hudson Reis. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 USA + */ + +#include +#include +#include +#include +#include +#include +#include + +#define OK 0 +#define ERRO 1 +#define NDATA -1 + +#ifdef __MSVCRT__ + #define cbl_BARRA "\\" +#else + #define cbl_BARRA "/" +#endif + +typedef unsigned int cbl_t; +DIR *current_directory; +struct dirent *current_file; + +/* Prototypes */ +cbl_t cbl_open_dir(char *directory); +cbl_t cbl_rewind_dir(); +cbl_t cbl_read_dir(char *file); +cbl_t cbl_close_dir(); +cbl_t cbl_remove_file(char *file); +void cbl_sleep(unsigned int *time); + +cbl_t cbl_copy_dir(char *entrada, char *saida); +cbl_t cbl_create_dir(char *dados, int mode); +cbl_t cbl_delete_dir(char *dados); +cbl_t cbl_move_dir(char *origem, char *destino); +cbl_t cbl_copy_file(char *entrada, char *saida); +cbl_t cbl_delete_file(char *arquivo); + +int cbl_align(char *); + +/* Functions */ +void cbl_sleep(unsigned int *time) { + Sleep(*time); + return; +} + +cbl_t cbl_open_dir(char *directory) { + char name[256]; + int p; + if(current_directory) // close the current directory before + closedir(current_directory); + p = 0; + while(p<256 && *(directory+p) != ' ') { + name[p] = *(directory+p); + p++; + } + name[p] = 0; + current_directory = opendir(name); + if(!current_directory) + return ERRO; + return OK; +} + +cbl_t cbl_rewind_dir() { + if(!current_directory) + return ERRO; + rewinddir(current_directory); + return OK; +} + +cbl_t cbl_read_dir(char *file) { + int i; + if(!current_directory) + return ERRO; + current_file = readdir(current_directory); + if(!current_file) + return ERRO; + i = 0; + while(current_file->d_name[i]) { + *(file + i) = current_file->d_name[i]; + i++; + } + return OK; +} + +cbl_t cbl_close_dir() { + if(!current_directory) // close the current directory before + return ERRO; + closedir(current_directory); + return OK; +} + +cbl_t cbl_remove_file(char *file) { + char name[256]; + int p; + p = 0; + while(p<256 && *(file+p) != ' ') { + name[p] = *(file+p); + p++; + } + name[p] = 0; + if(unlink(&name[0])==0) + return OK; + return ERRO; +} + +cbl_t cbl_copy_dir(char *entrada, char *saida) +{ + DIR *dir_a,*dir_b; + struct dirent *arquivo; + char *bufr, *bufs; + //cbl_t d; + + if(*entrada){ + if(cbl_align(entrada)==ERRO) return(1); + if(cbl_align(saida)==ERRO) return(1); + } else { + return(ERRO); + } + + bufr = (char *) malloc(sizeof(char)*(strlen(entrada)+100)); + if(!bufr) { + return(4); + } + + bufs = (char *) malloc(sizeof(char)*(strlen(saida) +100)); + if(!bufs) { + return(4); + } + + if ( (dir_a = opendir(entrada)) == NULL ) { + return(2); + } + + if((dir_b = opendir(saida)) != NULL) { + closedir(dir_a); + closedir(dir_b); + return(3); + } + else { + cbl_create_dir(saida,0766); + while( (arquivo=readdir(dir_a)) ) { + strcpy(bufr,saida); + strcpy(bufs,entrada); + strcat(bufr,cbl_BARRA); + strcat(bufs,cbl_BARRA); + if( !strcmp(arquivo->d_name,".") ) { + continue; + } + else + if( !strcmp(arquivo->d_name,"..") ) { + continue; + } + + strcat(bufr,arquivo->d_name); + strcat(bufs,arquivo->d_name); + cbl_copy_file(bufs,bufr); + } + } + closedir(dir_a); + free(bufr); + free(bufs); + return(OK); +} + +cbl_t cbl_create_dir(char *dados, int mode) +{ + DIR *dir; + + if(*dados) { + if(cbl_align(dados)==ERRO){ return(1); } + } + else { + return(1); + } + + if( (dir = opendir(dados)) != NULL ) { + return ERRO; + } + +// Nilo, 23rd april 2007 +// Aparently MINGW doesn't accept two parameters for mkdir.... +// if(mkdir(dados, mode) == -1){ + if(mkdir(dados) == -1) { + return ERRO; + } + + chmod(dados,mode); + + return(OK); +} + +cbl_t cbl_delete_dir(char *dados) +{ + DIR *dir; + struct dirent *file; + + if(*dados) { + if(cbl_align(dados)==ERRO) { + return(1); + } + } + else { + return(1); + } + + if( (dir = opendir(dados)) == NULL) { + return(2); + } + + closedir(dir); + + if( rmdir(dados) == 0 ) { /* Nao existe nada no diretorio */ + return(OK); + } + else { /* Aqui existe arquivos no diretorio + * entao sao apagados e ai depois apaga + * o diretorio. + */ + dir = opendir(dados); + while( (file = readdir(dir)) ) { + chdir(dados); + cbl_delete_file(file->d_name); + } + closedir(dir); + chdir(".."); + if ( rmdir(dados) != 0 ) { + return(ERRO); + } + } + + return(OK); +} + +cbl_t cbl_move_dir(char *origem, char *destino) +{ + DIR *dir; + //cbl_t d; + + if ( (!*origem) || (!*destino) ) { + return(1); + } + + if ( cbl_align(origem) == ERRO ) { + return(1); + } + + if ( cbl_align(destino) == ERRO ) { + return(1); + } + + if ( (dir = opendir(destino)) != NULL ) { + closedir(dir); + return(ERRO); + } + + if ( cbl_copy_dir(origem,destino) == OK ) { + if( cbl_delete_dir(origem) != OK ) { + return(ERRO); + } + } + else { + return(ERRO); + } + + return(OK); +} + +cbl_t cbl_change_dir(char *path) { + if ( cbl_align(path) != 0 ) { + return 1; + } + + if ( chdir(path) != 0 ) { + return 2; + } + + return 0; +} + +void cbl_get_current_dir(char *path, cbl_t *retorno) { + *retorno = 0; + + if ( getcwd(path, 1024) == NULL ) { + *retorno = 1; + } +} diff --git a/cobroutines/dir.o b/cobroutines/dir.o new file mode 100644 index 0000000..d5cfb9a Binary files /dev/null and b/cobroutines/dir.o differ diff --git a/cobroutines/files.c b/cobroutines/files.c new file mode 100644 index 0000000..80b1cb0 --- /dev/null +++ b/cobroutines/files.c @@ -0,0 +1,408 @@ +/* + * Copyright (C) 2003 Wesley Oliveira, Aline Oliveira, Hudson Reis, + * Husni Ali Husni. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 USA + */ + +#include +#include +#include +#include +#include +#include "globals.h" + +#ifndef MAXLINE + #define MAXLINE 1024 + #define MINLINE 256 +#endif + +#if defined(SunOS) +#include +#else +# if defined(__CYGWIN__) +# include +# else +# if defined(__MINGW32__) +# include //# include +# else +# include +# endif +# endif +#endif + +char cobpri[MAXLINE], cobpro[MAXLINE]; + +struct cbl_stream { + char path[MAXLINE]; + FILE *fd; + int handle; +} cbl_stream[MAXLINE]; + +/* Prototypes */ + +cbl_t cbl_copy_file(char *entrada, char *saida); +cbl_t cbl_rename_file(char *old, char *new); +cbl_t cbl_delete_file(char *arquivo); +cbl_t cbl_check_file_exist(char *arquivo); +cbl_t cbl_move_file(char *origem,char *destino); +void cbl_open_file(char *arquivo,char *access_mode, + char *deny_mode, int file_handle, + cbl_t *retorno); +void cbl_create_file(char *arquivo, unsigned char *access_mode, + unsigned char *deny_mode, char file_handle[5], + cbl_t *retorno); +cbl_t cbl_close_file(int file_handle); +cbl_t cbl_flush_file(int file_handle); +void cbl_read_file(int file_handle, int number_bytes, + char *buffer_read, cbl_t *retorno); +void cbl_write_file(int file_handle,int number_bytes,char *buffer_writed,cbl_t *retorno); + +/* Functions */ + +cbl_t cbl_copy_file(char *entrada, char *saida) { + FILE *fd_in, *fd_out; + int c,valor; + + if ( cbl_align(entrada) != 0 ) { + return 1; + } + + if( cbl_align(saida) != 0 ) { + return 1; + } + + if ( (valor=cbl_parm(entrada,saida)) == -2 ) { + return 0; + } + + if ( valor == 1 ) { + return 1; + } + + if ( (fd_in = fopen(cobpri,"rb")) == NULL ) { + return 3; + } + else { + if ( (fd_out=fopen(cobpro,"wb")) == NULL ) { + fclose(fd_in); + return 3; + } + } + + while ( (c = fgetc(fd_in)) != EOF ) { + fputc(c,fd_out); + } + +#ifdef __MSVCRT__ + chmod(cobpro,0666); +#else + cbl_get_per(cobpro); +#endif + + fclose(fd_in); + fclose(fd_out); + + return 0; +} + +cbl_t cbl_rename_file(char *old, char *new) { + int valor; + + if ( cbl_align(old) != 0 ) { + return 1; + } + + if (cbl_align(new) != 0) { + return 1; + } + + valor = cbl_parm(old,new); + + if(valor == 1) { + return valor; + } + + if (rename(cobpri,cobpro) == 0) { + return 0; + } + else { + return 3; + } +} + +cbl_t cbl_delete_file(char *arquivo) { + int valor; + + if ( cbl_align(arquivo) != 0 ) { + return 1; + } + + if ( (valor=cbl_parm(arquivo,""))== -2 ) { + return 0; + } + + if ( valor == 1 ) { + return valor; + } + + chdir(cobpri); + + if (remove(cobpri) != 0) { + return 2; + } + + return 0; +} + +cbl_t cbl_check_file_exist(char *arquivo) { + int valor; + //DIR *dir; + + if (cbl_align(arquivo) != 0) { + return 1; + } + + valor = cbl_parm(arquivo,""); + + if ( opendir(cobpri) != NULL ) { + return(-1); + } + + if ( access(cobpri,F_OK) != 0 ) { + return 1; + } + + return 0; +} + +cbl_t cbl_move_file(char *origem, char *destino) { + int valor; + + if ( cbl_align(origem) != 0 ) { + return 1; + } + + if ( cbl_align(destino) != 0 ) { + return 1; + } + + valor = cbl_parm(origem,destino); + + if ( valor == 1 ) { + return valor; + } + + if (cbl_copy_file(cobpri,cobpro) == 0) { + if (cbl_delete_file(cobpri) != 0) { + return 5; + } + } + else { + return 3; + } + + return 0; +} + +void cbl_open_file(char *arquivo, char *access_mode, + char *deny_mode,int file_handle, + cbl_t *retorno) { + register int i; + int valor; + + cbl_align(arquivo); + cbl_align(access_mode); + cbl_align(deny_mode); + valor=cbl_parm(arquivo,""); +// if(valor == 1) { return valor; } walter + if ( valor == 1 ) { + *retorno = 1; + return; + } + + if ( !strcmp(access_mode,deny_mode) ) { + *retorno = 1; + return; + } + + for ( i=1 ; i max_col) + max_col = strlen(line); + max_lines++; + fgets(line, 1024, file); + } + fclose(file); + + file = fopen(narq, "r"); + + // Alloc memory to put text + text = malloc( (sizeof(char) * ( max_col * max_lines )) + 128 ); + *text = 0; + memset(text, ' ', (sizeof(char) * ( max_col * max_lines )) + 128); + fgets(line, 1024, file); + + p = 0; + while ( !feof(file) ) { + memcpy(text + p, line, strlen(line)); + p += max_col; + fgets(line, 1024, file); + } + + fclose(file); + + // show the file + fline = 0; + fcol = 0; + ncol = 80; + + if(ncol > max_col) + ncol = max_col; + + show = 1; + while(show) { + p = 0; + while( (fline + p) < max_lines && p < 24) { + move(p, 0); + pnt = ( (fline + p) * max_col ) + fcol; + addnstr(text + pnt, ncol); + p++; + } + + move(0, 0); + ca = getch(); + + switch(ca) { + case 'i': + case 'I': + fline = 0; + fcol = 0; + break; + + case 'a': + case 'A': + if ( fline > 0 ) + fline--; + break; + + case 'z': + case 'Z': + if ( fline < (max_lines - 24) ) + fline++; + break; + + case ',': + if ( fcol > 0 ) + fcol--; + break; + + case '.': + if ( fcol < (max_col - 80) ) + fcol++; + break; + + case 'f': + case 'F': + show = 0; + break; + } + } + + // Return to the application + free(text); + free(narq); + + return; +} diff --git a/cobroutines/files.o b/cobroutines/files.o new file mode 100644 index 0000000..b5e9f02 Binary files /dev/null and b/cobroutines/files.o differ diff --git a/cobroutines/globals.c b/cobroutines/globals.c new file mode 100644 index 0000000..68188a5 --- /dev/null +++ b/cobroutines/globals.c @@ -0,0 +1,305 @@ +/* + * Copyright (C) 2003 Hudson Reis, Wesley Oliveira, Aline Oliveira. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 USA + */ + +/* COB internal routines */ + +#include +#include +#include +#include +#include +#include + +#ifndef MAXLINE + #define MAXLINE 1024 + #define MINLINE 256 +#endif + +#ifdef __MSVCRT__ + #define BARRA '\\' + #define COBARRA "\\" +#else + #define BARRA '/' + #define COBARRA "/" +#endif + + +struct globals{ + char cobprin[MAXLINE]; + char cobprou[MAXLINE]; + char tmpin[MAXLINE]; + char tmpou[MAXLINE]; + char *home; + char *pwd; + char *var; + int gper; + int uper; + int per; +}; + +struct globals var; + +extern char cobpri[MAXLINE], cobpro[MAXLINE]; + + +int cbl_get_per(char *str) +{ + struct stat fd; + int id; + + + id=0; + if((stat(str,&fd))==-1){ return 1; } + if(access(str,R_OK)==0) id+=4; + if(access(str,W_OK)==0) id+=2; + if(access(str,X_OK)==0) id++; + if(access(str,X_OK)==0){ + if(id == 6) id+=1; + if(id == 4) id+=1; + if(id == 2) id+=1; + } + + switch(id){ + case 7: chmod(str,0751); + break; + case 6: chmod(str,0644); + break; + case 5: chmod(str,0551); + break; + case 4: chmod(str,0444); + break; + case 3: chmod(str,0311); + break; + default: chmod(str,0666); + break; + } + return 0; +} + +void cbl_get(char *str) +{ + if(!strcmp(str,"HOME")) + var.home = getenv(str); + else if(!strcmp(str,"PWD")) + var.pwd = getenv(str); + else + var.var = getenv(str); +} + +void cbl_clear(int valor) +{ + register int i; + + if(valor == 1){ + for(i=0;i<=MAXLINE;i++){ + var.cobprin[i]='\0'; + var.cobprou[i]='\0'; + } + } + else if(valor == 2){ + for(i=0;i<=MAXLINE;i++){ + var.tmpou[i]='\0'; + } + } + else if(valor == 3){ + for(i=0;i<=MAXLINE;i++){ + var.cobprou[i]=' '; + } + var.cobprou[i]='\0'; + } + else if(valor == 4){ + for(i=0;i<=MAXLINE;i++){ + var.cobprin[i]=' '; + } + var.cobprin[i]='\0'; + } +} + + +int cbl_copy(void) +{ + FILE *fd_in, *fd_ou; + int c; + DIR *dir,*dit; + struct dirent *data; + + strcpy(var.tmpin,var.cobprin); + strcpy(var.tmpou,var.cobprou); + + if((dir=opendir(var.cobprin))==NULL) { return -1; } + else{ + chdir(var.cobprin); + while ( (data=readdir(dir)) ) { + if((dit=opendir(data->d_name))!=NULL){ + closedir(dit); + continue; + } + cbl_clear(1); + strcpy(var.cobprou,var.tmpou); + strcat(var.cobprou,COBARRA); + strcat(var.cobprin,data->d_name); + strcat(var.cobprou,data->d_name); + + + if((fd_in=fopen(var.cobprin,"rb"))==NULL) break; + if((fd_ou=fopen(var.cobprou,"wb"))==NULL){ + fclose(fd_in); + break; + } + else{ + while((c=getc(fd_in))!=EOF){ + putc(c,fd_ou); + } + fclose(fd_in); + fclose(fd_ou); + cbl_get_per(var.cobprou); + } + } + closedir(dir); + } + + return 0; // why this shit returns an int??? +} + + +int cbl_test(char *str,char *sts) +{ + int valor=0; + char data[MAXLINE]; + register int i = 0; + register int e = 0; + DIR *dir; + + if(strstr(str,"~")){ + cbl_get("HOME"); + for(i=0,e=0;i<=MAXLINE;i++){ + if(str[i] == '~') continue; + data[e] = str[i]; + e++; + } + data[e] = '\0'; + strcpy(var.tmpin,var.home); + strcat(var.tmpin,data); + strcpy(var.cobprin,var.tmpin); + valor++; + } + else{ + cbl_clear(4); + strcpy(var.cobprin,str); + valor++; + } + + + if(strstr(sts,"~")){ + cbl_get("HOME"); + for(i=0,e=0;i<=MAXLINE;i++){ + if(sts[i] == '~') continue; + data[e] = sts[i]; + e++; + } + data[e] = '\0'; + strcpy(var.tmpou,var.home); + strcat(var.tmpou,data); + strcpy(var.cobprou,var.tmpou); + if(var.cobprou[(strlen(var.cobprou))] == BARRA) + var.cobprou[(strlen(var.cobprou))] = '\0'; + valor++; + } + else { + cbl_clear(3); + strcpy(var.cobprou,sts); + valor++; + } + + if(strstr(var.cobprin,"*")){ + if((dir=opendir(var.cobprou))==NULL) { return valor; } + else{ + var.cobprin[(strlen(var.cobprin)-1)] = '\0'; + closedir(dir); + cbl_copy(); + } + return -2; + } + if((dir=opendir(var.cobprou))!=NULL){ + for(i=strlen(var.cobprin);i>0;i--){ + if(var.cobprin[i] == BARRA){ + e = i; + break; + } + } + for(i=(strlen(var.cobprou));e<=strlen(var.cobprin);i++,e++){ + var.cobprou[i]=var.cobprin[e]; + } + var.cobprou[i] = '\0'; + closedir(dir); + } + + return valor; +} + +int cbl_parm(char *str,char *sts) +{ + register int v,i; + + if ( (v=cbl_test(str,sts)) != 0 ) { + if ( v == -2 ) { + return v; + } + + if ( access(var.cobprin,F_OK) != 0 ) { + return 1; + } + + if ( !strcmp(var.cobprin,var.cobprou) ) { + return 1; + } + + for ( i=0 ; i<=MAXLINE ; i++ ) { + cobpri[i] = ' '; + cobpro[i] = ' '; + } + + cobpri[i]='\0'; + cobpro[i]='\0'; + strcpy(cobpri,var.cobprin); + strcpy(cobpro,var.cobprou); + } + + return 0; +} + +int cbl_align(char *data) { + int i=0; + if ((strlen(data) == 0)) { + return 1; + } else { + for (i=(strlen(data));i>=0;i--) { + if (data[i] != ' ' && data[i] != '\0') { + break; + } + } + data[i+1] = '\0'; + return 0; + } +} + + + + + diff --git a/cobroutines/globals.h b/cobroutines/globals.h new file mode 100644 index 0000000..2e3ab14 --- /dev/null +++ b/cobroutines/globals.h @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2003 Hudson Reis. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 USA + */ + +/* Global Parameters */ + + +/* Header for COB internal routines */ + +typedef unsigned int cbl_t; + +int cbl_parm(char *str,char *sts); +int cbl_align(char *data); +int cbl_get_per(char *str); + + diff --git a/cobroutines/globals.o b/cobroutines/globals.o new file mode 100644 index 0000000..c43320b Binary files /dev/null and b/cobroutines/globals.o differ diff --git a/cobroutines/libtcpgres.a b/cobroutines/libtcpgres.a new file mode 100644 index 0000000..8d79dd2 Binary files /dev/null and b/cobroutines/libtcpgres.a differ diff --git a/cobroutines/libtcroutines.a b/cobroutines/libtcroutines.a new file mode 100644 index 0000000..2ce4815 Binary files /dev/null and b/cobroutines/libtcroutines.a differ diff --git a/cobroutines/libtctcl.a b/cobroutines/libtctcl.a new file mode 100644 index 0000000..d2e64f4 Binary files /dev/null and b/cobroutines/libtctcl.a differ diff --git a/cobroutines/screen.c b/cobroutines/screen.c new file mode 100644 index 0000000..41db612 --- /dev/null +++ b/cobroutines/screen.c @@ -0,0 +1,798 @@ +/* + * Copyright (C) 2003 Ferran Pegueroles, Hudson Reis. + *. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 USA + */ + +/* Screen routines */ + +#include +#include + +#if defined(__MINGW32__) +# include +# include "mwindows.h" +#else +# include +# include +#endif + +#include "globals.h" + +#include // for read() + +struct screenArea { + char initLine; + char initColumn; + char endLine; + char endColumn; +} *screenArea; + +struct screenposition { + short line; + short column; +} *screenposition; + +char *windows[99]; + +struct windpos { + unsigned char id, fu, ls, ce, nl, tl, atr; + char dados[4000]; +} *windpos; + +struct windmenu { + unsigned char id, fu, ls, ce, nl, tl, atr, nlm, tlm, rtm; + char dados[4000]; +} *windmenu; + +int lastWindow = -1; + +bool initColor = 0; + +/* Prototypes */ + +/* Functions */ + +//cbl_t cbl_clear_scr(void) { +// clear(); +// return 0; +//} + +//void cbl_get_csr_pos(int *x, int *y, int *retorno) { +// getsyx((int)*y,(int)*x); +// printf("Y: %d\n", *y); +// printf("X: %d\n", *x); +// *retorno = 0; +//} + +//cbl_t cbl_get_kbd_status(void) { +// nodelay(stdscr,TRUE); +// timeout(10); +// return(getch()); +//} + +//cbl_t cbl_read_kbd_char(void) { +// return (getch()); +//} + +/*---------------------------------------------------------------------------------------- + +Routine: cbl_save_screen + +Purpose: Saves all screen contents on a user program buffer. + + ----------------------------------------------------------------------------------------*/ +void cbl_save_screen( chtype *buffer ) { + int l = 0; + int c = 0; + int i = 0; + + for ( l = 0 ; l < 24 ; l++ ) + for ( c = 0 ; c < 80 ; c++ ) + buffer[i++] = mvinch(l,c); +} + +/*---------------------------------------------------------------------------------------- + +Routine: cbl_restore_screen + +Purpose: Restores all screen contents from a user program buffer. + + ----------------------------------------------------------------------------------------*/ +void cbl_restore_screen( chtype *buffer ) { + int l = 0; + int c = 0; + int i = 0; + chtype k; + + for ( l = 0 ; l < 24 ; l++ ) + for ( c = 0 ; c < 80 ; c++ ) { + k = buffer[i++]; + attron( (k & A_ATTRIBUTES) | (k & A_COLOR) ); + mvaddch(l, c, (k & A_CHARTEXT)); + } +} + +/*---------------------------------------------------------------------------------------- + +Routine: cbl_save_partial_screen + +Purpose: Saves a screen portion's contents on a user program buffer. + + ----------------------------------------------------------------------------------------*/ +void cbl_save_partial_screen( struct screenArea *screenArea , chtype *buffer ) { + int l = 0; + int c = 0; + int i = 0; + + int initLine = (int)screenArea->initLine; + int initCol = (int)screenArea->initColumn; + int endLine = (int)screenArea->endLine; + int endCol = (int)screenArea->endColumn; + + // mvprintw(23,0,"OnSave: %d %d %d %d",initLine,initCol,endLine,endCol); + // getch(); + // refresh(); + + for ( l = initLine-1 ; l < endLine ; l++ ) + for ( c = initCol-1 ; c < endCol ; c++ ) + buffer[i++] = mvinch(l,c); +} + +/*---------------------------------------------------------------------------------------- + +Routine: cbl_restore_partial_screen + +Purpose: Restores a screen portion's contents from a user program buffer. + + ----------------------------------------------------------------------------------------*/ +void cbl_restore_partial_screen( struct screenArea *screenArea , chtype *buffer ) { + int l = 0; + int c = 0; + int i = 0; + chtype k; + + int initLine = (int)screenArea->initLine; + int initCol = (int)screenArea->initColumn; + int endLine = (int)screenArea->endLine; + int endCol = (int)screenArea->endColumn; + + // mvprintw(23,0,"OnRestore: %d %d %d %d",initLine,initCol,endLine,endCol); + // getch(); + // refresh(); + + for ( l = initLine-1 ; l < endLine ; l++ ) + for ( c = initCol-1 ; c < endCol ; c++ ) { + k = buffer[i++]; + attron( (k & A_ATTRIBUTES) | (k & A_COLOR) ); + mvaddch(l, c, (k & A_CHARTEXT)); + } +} + +/* +void cbl_read_scr_chars (struct posicaotela *posicao, + char *buffer_caracteres, + short *buffer_tamanho, + int *retorno) +{ + printf("Reading scr chars...\n"); + int y, x, i, t; + *retorno = 0; + posicaotela = posicao; + x = posicao->coluna; + y = posicao->linha; + t = *buffer_tamanho - x; + memset(buffer_caracteres,' ',t); + for (i=(x-1);i<=t;i++) { + buffer_caracteres[i] = mvinch(y,i) & A_CHARTEXT; + } +} + +void cbl_read_scr_attrs (struct posicaotela *posicao, + char *buffer_atributos, + short *buffer_tamanho, + int *retorno) +{ + int y, x, i, t; + *retorno = 0; + posicaotela = posicao; + x = posicao->coluna; + y = posicao->linha; + t = *buffer_tamanho - x; + memset(buffer_atributos,' ',t); + for (i=(x-1);i<=t;i++) { + buffer_atributos[i] = mvinch(y,i) & A_ATTRIBUTES; + } +} + +void cbl_read_scr_chattrs (struct posicaotela *posicao, + char *buffer_caracteres, + char *buffer_atributos, + short *buffer_tamanho, + int *retorno) +{ + chtype k; + int y, x, i, t, c; + *retorno = 0; + posicaotela = posicao; + x = posicao->coluna; + y = posicao->linha; + memset(buffer_atributos, ' ',*buffer_tamanho * 2); + memset(buffer_caracteres,' ',*buffer_tamanho); + i = 0, t = 0, c = 0; + while(i++ < *buffer_tamanho) { + k = mvinch(y, x); + buffer_caracteres[c++] = (k & A_CHARTEXT); + buffer_atributos[t++] = (k & A_ATTRIBUTES)/65536; + //buffer_atributos[t++] = k & A_COLOR; + buffer_atributos[t++] = (k & A_COLOR)/256; + //printf("color on read:%d\n",(char)((k & A_COLOR)/256)); + mvprintw(1,1,"col:%d lin:%d char:%c color:%d",x,y,(k & A_CHARTEXT),(k & A_COLOR)/256); refresh(); getch(); refresh(); + x++; + } +} +*/ +/*---------------------------------------------------------------------------------------------- + + cbl_set_csr_pos + + Sets the cursor position + + ----------------------------------------------------------------------------------------------*/ +//void cbl_set_csr_pos(int *x, int *y, int *retorno) { +// *retorno = 0; +// setsyx((int)*y,(int)*x); +// move((int)*y,(int)*x); +// refresh(); +//} +/* +void cbl_write_scr_attrs (struct posicaotela *posicao, + char *buffer_atributos, + short *buffer_tamanho, + int *retorno) +{ + printf("Writing scr attributes...\n"); + int y, x, i, t; + *retorno = 0; + posicaotela = posicao; + x = posicao->coluna; + y = posicao->linha; + t = *buffer_tamanho + x; + initscr(); + for (i=(x-1);i<=t;i++) { + mvaddch(y, x, *buffer_atributos); + x++; + *buffer_atributos++; + } +// refresh(); + endwin(); +} + +void cbl_write_scr_chars (struct posicaotela *posicao, + char *buffer_caracteres, + short *buffer_tamanho, + int *retorno) +{ + printf("Writing scr chars...\n"); + int y, x, i, t; + *retorno = 0; + posicaotela = posicao; + x = posicao->coluna; + y = posicao->linha; + t = *buffer_tamanho + x; + initscr(); + for (i=(x-1);i<=t;i++) { + mvaddch(y, x, *buffer_caracteres); + x++; + *buffer_caracteres++; + } +// refresh(); + endwin(); +} + +cbl_t cbl_write_scr_chars_attr(void) { + return 0; +} + +void cbl_write_scr_chattrs (struct posicaotela *posicao, + char *buffer_caracteres, + char *buffer_atributos, + short *buffer_tamanho, + int *retorno) +{ + chtype k; + int y, x, i, k1, c, att, cor; +//addstr("to em cbl_write_scr_chattrs"); refresh(); getch(); refresh(); + *retorno = 0; + posicaotela = posicao; + x = posicao->coluna; + y = posicao->linha; + mvprintw(1,1,"col:%d lin:%d",x,y); refresh(); getch(); refresh(); + i = 0, c = 0; + while(i < *buffer_tamanho) { + att = ((int) *(buffer_atributos + (c++))) * 65536; + cor = ((int) *(buffer_atributos + (c++))) * 256; + cor = buffer_atributos[c++]; + k1 = *(buffer_caracteres + i); + k1 += (k1<0?256:0); + k = k1 | att | cor; + mvaddch(y, x++, k); + i++; + } + refresh(); +} + +cbl_t cbl_write_scr_n_attr(void) { + return 0; +} + +cbl_t cbl_write_scr_n_char(void) { + return 0; +} + +cbl_t cbl_write_scr_n_chattr(void) { + return 0; +} + +cbl_t cbl_write_scr_tty(void) { + return 0; +} + +cbl_t cbl_get_scr_type(void) { + return 0; +} +*/ + + + +// ---------------------------------------------------------------------- +// Implemented by Walter Garrote +// garrote@dm.com.br +// Brazil +// Go��nia-Goi�s +// ---------------------------------------------------------------------- + +// Obs: As subrotinas que manipulam acesso a video devem ser executadas +// depois de ser chamado no programa cobol uma instru��o que fa�a a inicializa��o +// da biblioteca ncurses. Se isso n�o ocorrer, teremos problema. + +// inicia par de cores +void cbl_windms_inicia_cor() { + + int i; + + if(initColor) // ja passamos por aqui; + return; + + if(has_colors()) { // temos suporte a cores + start_color(); + for(i = 0; i < COLOR_PAIRS; i++) + init_pair(i, i % COLORS, i / COLORS); + } + + initColor++; +// na lib do tiny na parte de inicializacao de cores, n�o est� definido os pares +// foi criada o par com fg e bg = 0 +} + +// retorna cor de fundo e de frente usando o codigo de cor +void cbl_windms_color_pair(short cor, short *fg, short *bg) { + + if(cor == 0) // cor padrao 7 (frente branca, fundo preto) + cor = 7; + + *fg = cor % 8; // cor de frente + *bg = cor / 8; // cor de fundo +} + +// retorna o codigo de cor usando cor de frente e de fundo +short cbl_windms_monta_cor(short fg, short bg) { + return ((bg * 8) + fg); +} + +// escreve na janela +// para se pensar, podemos colocar um byte a mais como sendo o tipo do caracter (highlight, blink etc) +void cbl_windms_escreve(struct windpos *lk) { + + int y, x; + short fg, bg, atr; + char *dados = NULL; + + switch(lk->fu) { // qual a funcao + case 1: + case 2: dados = windows[lk->id]; // posiciona na memoria alocada pelo subrotina + break; + case 10: dados = lk->dados; // estamos recebendo a tela via cobol + atr = lk->atr; + cbl_windms_color_pair(atr, &bg, &fg); + attron(COLOR_PAIR(atr)); + break; + } + + move(lk->ls, lk->ce); + refresh(); // apenas para garantir, caso haja um display antes + for(y = lk->ls; y < (lk->ls + lk->nl); y++) { // escreve as linhas + for(x = lk->ce; x < (lk->ce + lk->tl); x++) { // escreve as colunas + if(*dados == '~') { // mudanca de atributo + dados++; // proxima posicao + fg = (int) *(dados++) - 48; // cor de frente + bg = (int) *(dados++) - 48; // cor de fundo + atr = cbl_windms_monta_cor(fg, bg); // qual o par ? + attron(COLOR_PAIR(atr)); // set atributo + } + mvaddch(y, x, *dados++); + } + } + refresh(); +} + +// muda moldura da janela +void cbl_windms_moldura(struct windpos *lk) { + + int i; + short fg, bg, atr; + + atr = lk->atr; + cbl_windms_color_pair(lk->atr, &fg, &bg); + attron(COLOR_PAIR(atr)); + + mvaddch (lk->ls, lk->ce , ACS_ULCORNER); // canto esquerdo superior + mvaddch (lk->ls, lk->ce + lk->tl - 1, ACS_URCORNER); // canto direito superior + mvaddch (lk->ls + lk->nl - 1, lk->ce , ACS_LLCORNER); // canto esquerdo inferior + mvaddch (lk->ls + lk->nl - 1, lk->ce + lk->tl - 1, ACS_LRCORNER); // canto direito inferior + for(i = lk->ls + 1; i < lk->ls + lk->nl - 1; i++) { + mvaddch(i, lk->ce , ACS_VLINE); // linha esquerda + mvaddch(i, lk->ce + lk->tl - 1, ACS_VLINE); // linha direita + } + for(i = lk->ce + 1; i < lk->ce + lk->tl - 1; i++) { + mvaddch(lk->ls, i , ACS_HLINE); // linha superior + mvaddch(lk->ls + lk->nl - 1, i , ACS_HLINE); // linha inferior + } + refresh(); + + return; +} + +// muda cor da janela +void cbl_windms_mudacor(struct windpos *lk) { + + short fg, bg; + + cbl_windms_color_pair(lk->atr, &fg, &bg); + attron(COLOR_PAIR(lk->atr)); + +} + +// guarda porcao da janela na memoria +int cbl_windms_guarda(struct windpos *lk) { + + int y, x, tamanho; + short fg, bg, atr, oldatr; // variaveis auxiliares + char *dados; + + if(lastWindow == 99) // limite de janelas + return -1; + + tamanho = 4; + for(y = lk->ls; y < lk->ls + lk->nl + 1; y++) // quantos bytes serao necessarios ? + for(x = lk->ce; x < lk->ce + lk->tl + 1; x++) { + atr = (mvinch(y, x) & A_ATTRIBUTES) / 256; + if(atr != oldatr) { + tamanho += 3; + oldatr = atr; + } + tamanho++; + } + + + lastWindow++; // janela a ser utilizada + + windows[lastWindow] = (char *) malloc(sizeof(char) * tamanho); //(lk->nl * lk->tl * 3)); // ponteiro para memoria de video + + dados = windows[lastWindow]; + + oldatr = 0; + + for(y = lk->ls; y < lk->ls + lk->nl; y++) { // guarda janela + for(x = lk->ce; x < lk->ce + lk->tl; x++) { + atr = (mvinch(y, x) & A_ATTRIBUTES) / 256; + if(atr != oldatr) { + cbl_windms_color_pair(atr, &bg, &fg); + *dados++ = '~'; + *dados++ = (char) ( ( atr % 8 ) + 48 ); + *dados++ = (char) ( ( atr / 8 ) + 48 ); + oldatr = atr; + } + *dados++ = mvinch(y, x) & A_CHARTEXT; + } + } + + return lastWindow; +} + +// remove janela +int cbl_windms_remove(struct windpos *lk) { + + while(lastWindow >= lk->id) + if(windows[lastWindow]) { + if(lk->fu == 2) // restaura janela antes + cbl_windms_escreve(lk); + free(windows[lastWindow--]); + } + + return lastWindow; +} + +// auxilio na montagem do menu +void cbl_windms_display_menu(struct windpos *lk, char *dados, int linha) { +} + +char * cbl_windms_pos(int nlm, int tlm, int l, int c, char *dad) { +// int tc, l1, c1; +// char *dat; + return NULL; +} + +// menu pop +int cbl_windms_menu(struct windpos *lk) { + + //int t, y, + + int tecla = 0, nlm, tlm, rtm; + char *dad; //, *dat; + struct windpos *lkm; + + lkm = calloc(sizeof(struct windpos),0); + + // parametros + lkm->id = lk->id; + lkm->ls = lk->ls; + lkm->ce = lk->ce; + lkm->nl = lk->nl; + lkm->tl = lk->tl; + dad = lk->dados; + nlm = (int) *dad++; + tlm = (int) *dad++; + rtm = (int) *dad++; + //t = + //while(t>0) { + // lkm->dados[y++]=*dad++; + // t--; + //} +//lkm->dados = *dad; + + lkm->fu = 11; + cbl_windms_moldura(lkm); // moldura + lkm->fu = 10; + cbl_windms_escreve(lkm); + cbl_windms_display_menu(lk, dad, rtm); + + noecho(); + tecla = getch(); + + do { +// switch(tecla) { + // case 27: printf("27\n"); + // tecla = getch(); + // switch(tecla) { + // case 79: tecla = getch(); + // break; + // case 91: tecla = getch(); + // switch(tecla) { + // case 49: + // case 50: + // case 51: + // case 52: + // case 53: + // case 54: do { + // tecla = getch(); + // } while(tecla != 126); + // break; + // } + // break; + // default: break; + // } + // break; + // default: printf("oia %i,%c\n",tecla,tecla); + // break; + // } + + move(5, 1); addch(32); refresh(); + switch(tecla) { + case KEY_UP: printf("UP %i\t%c ",tecla,tecla); + break; + case KEY_DOWN: printf("Down %i\t%c ",tecla,tecla); + break; + case KEY_LEFT: printf("Left %i\t%c ",tecla,tecla); + break; + case KEY_RIGHT: printf("Right %i\t%c ",tecla,tecla); + break; + case KEY_HOME: printf("Home %i\t%c ",tecla,tecla); + break; + case KEY_END: printf("End %i\t%c ",tecla,tecla); + break; + case KEY_NPAGE: printf("Npage %i\t%c ",tecla,tecla); + break; + case KEY_PPAGE: printf("Ppage %i\t%c ",tecla,tecla); + break; + default: + break; + } + move(5, 1); addch(32); refresh(); + tecla = getch(); + } while(tecla != KEY_EXIT); + + echo(); + + return 1; + +} + +// funcao principal +int windms(struct windpos *lk) { + + struct windpos *lkaux; + + // ajusta valores + lkaux = (struct windpos *) malloc(sizeof(struct windpos)); + *lkaux = *lk; + lkaux->ls--; + lkaux->ce--; + + cbl_windms_inicia_cor(); + + if( //(lkaux->ls < 0 || lkaux->ls > 24) || (lkaux->ce < 0 || lkaux->ce > 79) || + (lkaux->nl < 1 || lkaux->nl > 24) || + (lkaux->tl < 1 || lkaux->tl > 79)) // parametros errados + return 0; + + switch(lk->fu) { + case 0: lk->id = cbl_windms_guarda(lkaux); // guarda janela + break; + case 2: // restaura janela + case 3: lk->id = cbl_windms_remove(lkaux); // elimina janela sem restaurar + break; + case 1: // restaura janela + case 10: cbl_windms_escreve(lkaux); // escreve janela + break; + case 11: cbl_windms_moldura(lkaux); // moldura a janela + break; + case 12: cbl_windms_mudacor(lkaux); // muda cor da janela + break; + case 13: cbl_windms_menu(lkaux); // menu + getch(); + break; + } + return 1; + +} + +// Function to allocate dinamyc memory +// receive: pointer = pointer to memory allocated +// size = size of memory to allocate +// flags = only for compatibility +// return: 0 = ok, memory allocated +// 1 = error +int cbl_alloc_mem(char **pointer, unsigned int size, unsigned int flagsmem ) { + if((*pointer = (char *) malloc(sizeof(char) * size))) +// memset(*pointer, 32, size); for compatibility, microfocus doesn�t initialize the memory allocated + return 0; + return 1; +} + +// free the memory previous allocated +// receive: pointer +// return: none +void cbl_free_mem(char **pointer) { + free(*pointer); +} + +// clear the window with character and attribute +// receive: character = that will paint the screen +// attribute = pair of attribute +// return: none +void cbl_clear_scr(short character, short atr) { + int normal = A_NORMAL | character; + cbl_windms_inicia_cor(); + if(has_colors()) + normal |= COLOR_PAIR(atr); + bkgdset(normal); + erase(); + return; +} + +// return the position of cursor +// receive: structure with line and column +// return: position of cursor +void cbl_get_csr_pos(struct screenposition *scr) { + getsyx(scr->line, scr->column); + scr->line++; // adjust the line + scr->column++; // adjust the column + return; +} + +// return the state of keyboard +// receive: none +// return: state of keyboard : 0 none, 1 has key +// modified from scr_curses +void cbl_get_kbd_status(short *state) { + int c; + nodelay(stdscr,TRUE); + c=getch(); + nodelay(stdscr,FALSE); + if(c > 0) { + ungetch(c); + *state = 1; + } else + *state = 0; + return; +} + +// return the size of screen +// receive: none +// return: depth and width +void cbl_get_scr_size(short *depth, short *width) { + getmaxyx(stdscr, *depth, *width); + return; +} + +// return the character in keyboard buffer +// receive: none +// return: character +//void cbl_read_kbd_char2(char *character) { +// *character = (char) getch(); +// return; +//} + +void clr_clear_kbd_buffer() { +nodelay(stdscr, TRUE); +while( getch() != ERR ); +nodelay(stdscr,FALSE); +} + +//static struct termios initial_settings, new_settings; +static int peek_character = -1; + +void init_keyboard() +{ +// tcgetattr(0,&initial_settings); +// new_settings = initial_settings; +// new_settings.c_lflag &= ~ICANON; +// new_settings.c_lflag &= ~ECHO; +// new_settings.c_lflag &= ~ISIG; +// new_settings.c_cc[VMIN] = 1; +// new_settings.c_cc[VTIME] = 0; +// tcsetattr(0, TCSANOW, &new_settings); +} + +void close_keyboard() +{ +// tcsetattr(0, TCSANOW, &initial_settings); +} + +int readch() +{ +char ch; + + if(peek_character != -1) + { + ch = peek_character; + peek_character = -1; + return ch; + } + read(0,&ch,1); + return ch; +} diff --git a/cobroutines/screen.o b/cobroutines/screen.o new file mode 100644 index 0000000..a602331 Binary files /dev/null and b/cobroutines/screen.o differ diff --git a/cobroutines/sql_clear_query.c b/cobroutines/sql_clear_query.c new file mode 100644 index 0000000..3d9c0da --- /dev/null +++ b/cobroutines/sql_clear_query.c @@ -0,0 +1,11 @@ +/* test program for libpq (postgresql) */ + +#include +#include + +#include + +void +sql_clear_query( int *qryhandle ) { + PQclear((PGresult *)*qryhandle); +} diff --git a/cobroutines/sql_clear_query.o b/cobroutines/sql_clear_query.o new file mode 100644 index 0000000..056a0ee Binary files /dev/null and b/cobroutines/sql_clear_query.o differ diff --git a/cobroutines/sql_connect_db.c b/cobroutines/sql_connect_db.c new file mode 100644 index 0000000..12e780b --- /dev/null +++ b/cobroutines/sql_connect_db.c @@ -0,0 +1,35 @@ +/* test program for libpq (postgresql) */ + +#include +#include +#include + +#include + +//void memmove(char *,char *,int); + +void +sql_connect_db( char *dbname, int *dbhandle, int *status ) { + char *server, *user, *passwd; + + server = (char *) getenv("PGSQL_SERVER"); + user = (char *) getenv("PGSQL_USER"); + passwd = (char *) getenv("PGSQL_PASSWD"); + + PGconn *conn; + char db[81]; + char *s; + /* trim right spaces on the buffer */ + memmove(db,dbname,80); + db[80]=0; + s = db+79; + while ((s >= db) && (*s == ' ')) s--; + if (s >= db) + *(s+1)=0; +// conn = PQsetdb("","","","",db); + conn = PQsetdbLogin(server, "", "", "", db, user, passwd); + + *status = PQstatus(conn); + *dbhandle = (int)conn; + +} diff --git a/cobroutines/sql_connect_db.o b/cobroutines/sql_connect_db.o new file mode 100644 index 0000000..473da8b Binary files /dev/null and b/cobroutines/sql_connect_db.o differ diff --git a/cobroutines/sql_disconnect_db.c b/cobroutines/sql_disconnect_db.c new file mode 100644 index 0000000..1f51766 --- /dev/null +++ b/cobroutines/sql_disconnect_db.c @@ -0,0 +1,12 @@ +/* test program for libpq (postgresql) */ + +#include +#include + +#include + +void +sql_disconnect_db( int *dbhandle ) { + PGconn *conn = (PGconn *)*dbhandle; + PQfinish(conn); +} diff --git a/cobroutines/sql_disconnect_db.o b/cobroutines/sql_disconnect_db.o new file mode 100644 index 0000000..be9813c Binary files /dev/null and b/cobroutines/sql_disconnect_db.o differ diff --git a/cobroutines/sql_exec_query.c b/cobroutines/sql_exec_query.c new file mode 100644 index 0000000..6a15c08 --- /dev/null +++ b/cobroutines/sql_exec_query.c @@ -0,0 +1,23 @@ +/* test program for libpq (postgresql) */ + +#include +#include + +#include + +/* this function assumes a command buffer of 80 characters */ +void +sql_exec_query( int *dbhandle, char *query, int *qryhandle, int *status ) { + char /* *r,*/ *s=query; + //int nfields, i, j; + PGconn *conn = (PGconn *)*dbhandle; + PGresult *res; + + /* detect end of query with 2 successive ';' */ + while ( *s != ';' || *(s+1) != ';' ) s++; + *s=0; + // linha abaixo causa mensagem do primary key + res = PQexec(conn, query); + *status = PQresultStatus(res); + *qryhandle = (int) res; +} diff --git a/cobroutines/sql_exec_query.o b/cobroutines/sql_exec_query.o new file mode 100644 index 0000000..a14c6de Binary files /dev/null and b/cobroutines/sql_exec_query.o differ diff --git a/cobroutines/sql_free_memory.c b/cobroutines/sql_free_memory.c new file mode 100644 index 0000000..c48e8b7 --- /dev/null +++ b/cobroutines/sql_free_memory.c @@ -0,0 +1,11 @@ +/* test program for libpq (postgresql) */ + +#include +#include + +#include + +void +sql_free_memory( int *qryhandle ) { + PQclear((PGresult *)*qryhandle); +} diff --git a/cobroutines/sql_free_memory.o b/cobroutines/sql_free_memory.o new file mode 100644 index 0000000..7e3afd5 Binary files /dev/null and b/cobroutines/sql_free_memory.o differ diff --git a/cobroutines/sql_get_tuple.c b/cobroutines/sql_get_tuple.c new file mode 100644 index 0000000..fd244a2 --- /dev/null +++ b/cobroutines/sql_get_tuple.c @@ -0,0 +1,66 @@ +/* test program for libpq (postgresql) */ + +#include +#include + +#include + +void +sql_get_tuple( int *qryhandle, int *ntuple, char *tuple ) { + char *s; + char *p; + // danilo ( + Oid tipo; + // danilo ) + int nfield=0; + int maxfield = PQnfields((PGresult *)*qryhandle); + while (nfield < maxfield) { + s = PQgetvalue((PGresult *)*qryhandle,*ntuple,nfield); + tipo = PQftype((PGresult *)*qryhandle, nfield); + p = s; + // 1700 numerico + // 1043 string + // 1231 occurs numerico + // 1015 occurs string + // comeca danilo + if (tipo == 1231 || tipo == 1015) { + p++; + while (*p) { + if (*p == ',') { + *tuple++ = '#'; + *tuple++ = '%'; + } else + if (*p == '}') + break; + else + if (*p == '.' && tipo == 1231) + *tuple++ = ','; + else + if (*p != '"') + *tuple++ = *p; + p++; + } + } else + // termina danilo + /* while (*p) { + if (*p == '.') { + *p= ','; + break; + } + p++; + } */ + if(*s){ + while (*s) { + if (tipo == 1700 && *s == '.') { + *tuple++ = ','; + s++; + } else + *tuple++ = *s++; + } + } else + *tuple++ = ' '; + *tuple++ = '#'; + *tuple++ = '%'; + nfield++; + } +} diff --git a/cobroutines/sql_get_tuple.o b/cobroutines/sql_get_tuple.o new file mode 100644 index 0000000..9f3df93 Binary files /dev/null and b/cobroutines/sql_get_tuple.o differ diff --git a/cobroutines/sql_get_value.c b/cobroutines/sql_get_value.c new file mode 100644 index 0000000..6966914 --- /dev/null +++ b/cobroutines/sql_get_value.c @@ -0,0 +1,16 @@ +/* test program for libpq (postgresql) */ + +#include +#include + +#include + +void +sql_get_value( int *qryhandle, int *ntuple, int *nfield, char *value ) { + char *s; + s = PQgetvalue((PGresult *)*qryhandle,*ntuple,*nfield); + while (*s) { + if (*s == '\n') continue; + *value++ = *s++; + } +} diff --git a/cobroutines/sql_get_value.o b/cobroutines/sql_get_value.o new file mode 100644 index 0000000..4280d92 Binary files /dev/null and b/cobroutines/sql_get_value.o differ diff --git a/cobroutines/sql_max_field.c b/cobroutines/sql_max_field.c new file mode 100644 index 0000000..3170ed9 --- /dev/null +++ b/cobroutines/sql_max_field.c @@ -0,0 +1,11 @@ +/* test program for libpq (postgresql) */ + +#include +#include + +#include + +void +sql_max_field( int *qryhandle, int *maxfield ) { + *maxfield = PQnfields((PGresult *)*qryhandle); +} diff --git a/cobroutines/sql_max_field.o b/cobroutines/sql_max_field.o new file mode 100644 index 0000000..2c4a5f9 Binary files /dev/null and b/cobroutines/sql_max_field.o differ diff --git a/cobroutines/sql_max_tuple.c b/cobroutines/sql_max_tuple.c new file mode 100644 index 0000000..a8641c7 --- /dev/null +++ b/cobroutines/sql_max_tuple.c @@ -0,0 +1,11 @@ +/* test program for libpq (postgresql) */ + +#include +#include + +#include + +void +sql_max_tuple( int *qryhandle, int *maxtuple ) { + *maxtuple = PQntuples((PGresult *)*qryhandle); +} diff --git a/cobroutines/sql_max_tuple.o b/cobroutines/sql_max_tuple.o new file mode 100644 index 0000000..98571f6 Binary files /dev/null and b/cobroutines/sql_max_tuple.o differ diff --git a/cobroutines/sql_status_message.c b/cobroutines/sql_status_message.c new file mode 100644 index 0000000..12a3f23 --- /dev/null +++ b/cobroutines/sql_status_message.c @@ -0,0 +1,16 @@ +/* test program for libpq (postgresql) */ + +#include +#include + +#include + +void +sql_status_message( int *dbhandle, char *message ) { + PGconn *conn = (PGconn *)*dbhandle; + char *s; + s = PQerrorMessage(conn); + while (*s) { + *message++ = *s++; + } +} diff --git a/cobroutines/sql_status_message.o b/cobroutines/sql_status_message.o new file mode 100644 index 0000000..8146567 Binary files /dev/null and b/cobroutines/sql_status_message.o differ diff --git a/cobroutines/system.c b/cobroutines/system.c new file mode 100644 index 0000000..33470f6 --- /dev/null +++ b/cobroutines/system.c @@ -0,0 +1,74 @@ +/* + * Copyright (C) 2003 Hudson Reis, Husni Ali Husni. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 USA + */ + +/* System routines */ + +#include +#include +//#include + +#include "globals.h" + +/* Structs */ + +#pragma pack(1) +struct os_info { + char kernel_name[256]; + char kernel_node[256]; + char kernel_release[256]; + char kernel_version[256]; + char kernel_machine[256]; +} *os_info; +#pragma pack() + +/* Prototypes */ + +/* Functions */ + +cbl_t cbl_call_system(char *programa) { + + if (cbl_align(programa) != 0) { return 1; } + if (system(programa) != 0) { + return 2; + } else { + return 0; + } +} + +cbl_t cblsys(char *programa) { + + if (cbl_align(programa) != 0) { return 1; } + if (system(programa) != 0) { + return 2; + } else { + return 0; + } +} + +void cbl_get_os_info(struct os_info *os) { + os_info = os; + //uname(os_info); +// printf("All: %s\n", os_info); +// printf("Kernel name...: %s\n", ki->kernel_name); +// printf("Kernel node...: %s\n", ki->kernel_node); +// printf("Kernel release: %s\n", ki->kernel_release); +// printf("Kernel version: %s\n", ki->kernel_version); +// printf("Kernel machine: %s\n", ki->kernel_machine); +} + diff --git a/cobroutines/system.o b/cobroutines/system.o new file mode 100644 index 0000000..20df6fb Binary files /dev/null and b/cobroutines/system.o differ diff --git a/cobroutines/tcl.h b/cobroutines/tcl.h new file mode 100644 index 0000000..311c1fc --- /dev/null +++ b/cobroutines/tcl.h @@ -0,0 +1,2450 @@ +/* + * tcl.h -- + * + * This header file describes the externally-visible facilities of the + * Tcl interpreter. + * + * Copyright (c) 1987-1994 The Regents of the University of California. + * Copyright (c) 1993-1996 Lucent Technologies. + * Copyright (c) 1994-1998 Sun Microsystems, Inc. + * Copyright (c) 1998-2000 by Scriptics Corporation. + * Copyright (c) 2002 by Kevin B. Kenny. All rights reserved. + * + * See the file "license.terms" for information on usage and redistribution of + * this file, and for a DISCLAIMER OF ALL WARRANTIES. + * + * RCS: @(#) $Id: tcl.h,v 1.254.2.13 2009/11/03 19:21:37 dgp Exp $ + */ + +#ifndef _TCL +#define _TCL + +/* + * For C++ compilers, use extern "C" + */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * The following defines are used to indicate the various release levels. + */ + +#define TCL_ALPHA_RELEASE 0 +#define TCL_BETA_RELEASE 1 +#define TCL_FINAL_RELEASE 2 + +/* + * When version numbers change here, must also go into the following files and + * update the version numbers: + * + * library/init.tcl (1 LOC patch) + * unix/configure.in (2 LOC Major, 2 LOC minor, 1 LOC patch) + * win/configure.in (as above) + * win/tcl.m4 (not patchlevel) + * win/makefile.bc (not patchlevel) 2 LOC + * README (sections 0 and 2, with and without separator) + * macosx/Tcl.pbproj/project.pbxproj (not patchlevel) 1 LOC + * macosx/Tcl.pbproj/default.pbxuser (not patchlevel) 1 LOC + * macosx/Tcl.xcode/project.pbxproj (not patchlevel) 2 LOC + * macosx/Tcl.xcode/default.pbxuser (not patchlevel) 1 LOC + * macosx/Tcl-Common.xcconfig (not patchlevel) 1 LOC + * win/README (not patchlevel) (sections 0 and 2) + * unix/tcl.spec (1 LOC patch) + * tools/tcl.hpj.in (not patchlevel, for windows installer) + * tools/tcl.wse.in (for windows installer) + * tools/tclSplash.bmp (not patchlevel) + */ + +#define TCL_MAJOR_VERSION 8 +#define TCL_MINOR_VERSION 5 +#define TCL_RELEASE_LEVEL TCL_FINAL_RELEASE +#define TCL_RELEASE_SERIAL 8 + +#define TCL_VERSION "8.5" +#define TCL_PATCH_LEVEL "8.5.8" + +/* + * The following definitions set up the proper options for Windows compilers. + * We use this method because there is no autoconf equivalent. + */ + +#ifndef __WIN32__ +# if defined(_WIN32) || defined(WIN32) || defined(__MINGW32__) || defined(__BORLANDC__) || (defined(__WATCOMC__) && defined(__WINDOWS_386__)) +# define __WIN32__ +# ifndef WIN32 +# define WIN32 +# endif +# ifndef _WIN32 +# define _WIN32 +# endif +# endif +#endif + +/* + * STRICT: See MSDN Article Q83456 + */ + +#ifdef __WIN32__ +# ifndef STRICT +# define STRICT +# endif +#endif /* __WIN32__ */ + +/* + * Utility macros: STRINGIFY takes an argument and wraps it in "" (double + * quotation marks), JOIN joins two arguments. + */ + +#ifndef STRINGIFY +# define STRINGIFY(x) STRINGIFY1(x) +# define STRINGIFY1(x) #x +#endif +#ifndef JOIN +# define JOIN(a,b) JOIN1(a,b) +# define JOIN1(a,b) a##b +#endif + +/* + * A special definition used to allow this header file to be included from + * windows resource files so that they can obtain version information. + * RC_INVOKED is defined by default by the windows RC tool. + * + * Resource compilers don't like all the C stuff, like typedefs and function + * declarations, that occur below, so block them out. + */ + +#ifndef RC_INVOKED + +/* + * Special macro to define mutexes, that doesn't do anything if we are not + * using threads. + */ + +#ifdef TCL_THREADS +#define TCL_DECLARE_MUTEX(name) static Tcl_Mutex name; +#else +#define TCL_DECLARE_MUTEX(name) +#endif + +/* + * Tcl's public routine Tcl_FSSeek() uses the values SEEK_SET, SEEK_CUR, and + * SEEK_END, all #define'd by stdio.h . + * + * Also, many extensions need stdio.h, and they've grown accustomed to tcl.h + * providing it for them rather than #include-ing it themselves as they + * should, so also for their sake, we keep the #include to be consistent with + * prior Tcl releases. + */ + +#include + +/* + * Support for functions with a variable number of arguments. + * + * The following TCL_VARARGS* macros are to support old extensions + * written for older versions of Tcl where the macros permitted + * support for the varargs.h system as well as stdarg.h . + * + * New code should just directly be written to use stdarg.h conventions. + */ + +#include +#ifndef TCL_NO_DEPRECATED +# define TCL_VARARGS(type, name) (type name, ...) +# define TCL_VARARGS_DEF(type, name) (type name, ...) +# define TCL_VARARGS_START(type, name, list) (va_start(list, name), name) +#endif + +/* + * Macros used to declare a function to be exported by a DLL. Used by Windows, + * maps to no-op declarations on non-Windows systems. The default build on + * windows is for a DLL, which causes the DLLIMPORT and DLLEXPORT macros to be + * nonempty. To build a static library, the macro STATIC_BUILD should be + * defined. + * + * Note: when building static but linking dynamically to MSVCRT we must still + * correctly decorate the C library imported function. Use CRTIMPORT + * for this purpose. _DLL is defined by the compiler when linking to + * MSVCRT. + */ + +#if (defined(__WIN32__) && (defined(_MSC_VER) || (__BORLANDC__ >= 0x0550) || defined(__LCC__) || defined(__WATCOMC__) || (defined(__GNUC__) && defined(__declspec)))) +# define HAVE_DECLSPEC 1 +# ifdef STATIC_BUILD +# define DLLIMPORT +# define DLLEXPORT +# ifdef _DLL +# define CRTIMPORT __declspec(dllimport) +# else +# define CRTIMPORT +# endif +# else +# define DLLIMPORT __declspec(dllimport) +# define DLLEXPORT __declspec(dllexport) +# define CRTIMPORT __declspec(dllimport) +# endif +#else +# define DLLIMPORT +# if defined(__GNUC__) && __GNUC__ > 3 +# define DLLEXPORT __attribute__ ((visibility("default"))) +# else +# define DLLEXPORT +# endif +# define CRTIMPORT +#endif + +/* + * These macros are used to control whether functions are being declared for + * import or export. If a function is being declared while it is being built + * to be included in a shared library, then it should have the DLLEXPORT + * storage class. If is being declared for use by a module that is going to + * link against the shared library, then it should have the DLLIMPORT storage + * class. If the symbol is beind declared for a static build or for use from a + * stub library, then the storage class should be empty. + * + * The convention is that a macro called BUILD_xxxx, where xxxx is the name of + * a library we are building, is set on the compile line for sources that are + * to be placed in the library. When this macro is set, the storage class will + * be set to DLLEXPORT. At the end of the header file, the storage class will + * be reset to DLLIMPORT. + */ + +#undef TCL_STORAGE_CLASS +#ifdef BUILD_tcl +# define TCL_STORAGE_CLASS DLLEXPORT +#else +# ifdef USE_TCL_STUBS +# define TCL_STORAGE_CLASS +# else +# define TCL_STORAGE_CLASS DLLIMPORT +# endif +#endif + +/* + * Definitions that allow this header file to be used either with or without + * ANSI C features like function prototypes. + */ + +#undef _ANSI_ARGS_ +#undef CONST +#ifndef INLINE +# define INLINE +#endif + +#ifndef NO_CONST +# define CONST const +#else +# define CONST +#endif + +#ifndef NO_PROTOTYPES +# define _ANSI_ARGS_(x) x +#else +# define _ANSI_ARGS_(x) () +#endif + +#ifdef USE_NON_CONST +# ifdef USE_COMPAT_CONST +# error define at most one of USE_NON_CONST and USE_COMPAT_CONST +# endif +# define CONST84 +# define CONST84_RETURN +#else +# ifdef USE_COMPAT_CONST +# define CONST84 +# define CONST84_RETURN CONST +# else +# define CONST84 CONST +# define CONST84_RETURN CONST +# endif +#endif + +/* + * Make sure EXTERN isn't defined elsewhere + */ + +#ifdef EXTERN +# undef EXTERN +#endif /* EXTERN */ + +#ifdef __cplusplus +# define EXTERN extern "C" TCL_STORAGE_CLASS +#else +# define EXTERN extern TCL_STORAGE_CLASS +#endif + +/* + * The following code is copied from winnt.h. If we don't replicate it here, + * then can't be included after tcl.h, since tcl.h also defines + * VOID. This block is skipped under Cygwin and Mingw. + */ + +#if defined(__WIN32__) && !defined(HAVE_WINNT_IGNORE_VOID) +#ifndef VOID +#define VOID void +typedef char CHAR; +typedef short SHORT; +typedef long LONG; +#endif +#endif /* __WIN32__ && !HAVE_WINNT_IGNORE_VOID */ + +/* + * Macro to use instead of "void" for arguments that must have type "void *" + * in ANSI C; maps them to type "char *" in non-ANSI systems. + */ + +#ifndef NO_VOID +#define VOID void +#else +#define VOID char +#endif + +/* + * Miscellaneous declarations. + */ + +#ifndef _CLIENTDATA +# ifndef NO_VOID + typedef void *ClientData; +# else + typedef int *ClientData; +# endif +# define _CLIENTDATA +#endif + +/* + * Darwin specifc configure overrides (to support fat compiles, where + * configure runs only once for multiple architectures): + */ + +#ifdef __APPLE__ +# ifdef __LP64__ +# undef TCL_WIDE_INT_TYPE +# define TCL_WIDE_INT_IS_LONG 1 +# define TCL_CFG_DO64BIT 1 +# else /* !__LP64__ */ +# define TCL_WIDE_INT_TYPE long long +# undef TCL_WIDE_INT_IS_LONG +# undef TCL_CFG_DO64BIT +# endif /* __LP64__ */ +# undef HAVE_STRUCT_STAT64 +#endif /* __APPLE__ */ + +/* + * Define Tcl_WideInt to be a type that is (at least) 64-bits wide, and define + * Tcl_WideUInt to be the unsigned variant of that type (assuming that where + * we have one, we can have the other.) + * + * Also defines the following macros: + * TCL_WIDE_INT_IS_LONG - if wide ints are really longs (i.e. we're on a real + * 64-bit system.) + * Tcl_WideAsLong - forgetful converter from wideInt to long. + * Tcl_LongAsWide - sign-extending converter from long to wideInt. + * Tcl_WideAsDouble - converter from wideInt to double. + * Tcl_DoubleAsWide - converter from double to wideInt. + * + * The following invariant should hold for any long value 'longVal': + * longVal == Tcl_WideAsLong(Tcl_LongAsWide(longVal)) + * + * Note on converting between Tcl_WideInt and strings. This implementation (in + * tclObj.c) depends on the function + * sprintf(...,"%" TCL_LL_MODIFIER "d",...). + */ + +#if !defined(TCL_WIDE_INT_TYPE)&&!defined(TCL_WIDE_INT_IS_LONG) +# if defined(__GNUC__) +# define TCL_WIDE_INT_TYPE long long +# if defined(__WIN32__) && !defined(__CYGWIN__) +# define TCL_LL_MODIFIER "I64" +# else +# define TCL_LL_MODIFIER "L" +# endif +typedef struct stat Tcl_StatBuf; +# elif defined(__WIN32__) +# define TCL_WIDE_INT_TYPE __int64 +# ifdef __BORLANDC__ +typedef struct stati64 Tcl_StatBuf; +# define TCL_LL_MODIFIER "L" +# else /* __BORLANDC__ */ +# if _MSC_VER < 1400 || !defined(_M_IX86) +typedef struct _stati64 Tcl_StatBuf; +# else +typedef struct _stat64 Tcl_StatBuf; +# endif /* _MSC_VER < 1400 */ +# define TCL_LL_MODIFIER "I64" +# endif /* __BORLANDC__ */ +# else /* __WIN32__ */ +/* + * Don't know what platform it is and configure hasn't discovered what is + * going on for us. Try to guess... + */ +# ifdef NO_LIMITS_H +# error please define either TCL_WIDE_INT_TYPE or TCL_WIDE_INT_IS_LONG +# else /* !NO_LIMITS_H */ +# include +# if (INT_MAX < LONG_MAX) +# define TCL_WIDE_INT_IS_LONG 1 +# else +# define TCL_WIDE_INT_TYPE long long +# endif +# endif /* NO_LIMITS_H */ +# endif /* __WIN32__ */ +#endif /* !TCL_WIDE_INT_TYPE & !TCL_WIDE_INT_IS_LONG */ +#ifdef TCL_WIDE_INT_IS_LONG +# undef TCL_WIDE_INT_TYPE +# define TCL_WIDE_INT_TYPE long +#endif /* TCL_WIDE_INT_IS_LONG */ + +typedef TCL_WIDE_INT_TYPE Tcl_WideInt; +typedef unsigned TCL_WIDE_INT_TYPE Tcl_WideUInt; + +#ifdef TCL_WIDE_INT_IS_LONG +typedef struct stat Tcl_StatBuf; +# define Tcl_WideAsLong(val) ((long)(val)) +# define Tcl_LongAsWide(val) ((long)(val)) +# define Tcl_WideAsDouble(val) ((double)((long)(val))) +# define Tcl_DoubleAsWide(val) ((long)((double)(val))) +# ifndef TCL_LL_MODIFIER +# define TCL_LL_MODIFIER "l" +# endif /* !TCL_LL_MODIFIER */ +#else /* TCL_WIDE_INT_IS_LONG */ +/* + * The next short section of defines are only done when not running on Windows + * or some other strange platform. + */ +# ifndef TCL_LL_MODIFIER +# ifdef HAVE_STRUCT_STAT64 +typedef struct stat64 Tcl_StatBuf; +# else +typedef struct stat Tcl_StatBuf; +# endif /* HAVE_STRUCT_STAT64 */ +# define TCL_LL_MODIFIER "ll" +# endif /* !TCL_LL_MODIFIER */ +# define Tcl_WideAsLong(val) ((long)((Tcl_WideInt)(val))) +# define Tcl_LongAsWide(val) ((Tcl_WideInt)((long)(val))) +# define Tcl_WideAsDouble(val) ((double)((Tcl_WideInt)(val))) +# define Tcl_DoubleAsWide(val) ((Tcl_WideInt)((double)(val))) +#endif /* TCL_WIDE_INT_IS_LONG */ + +/* + * Data structures defined opaquely in this module. The definitions below just + * provide dummy types. A few fields are made visible in Tcl_Interp + * structures, namely those used for returning a string result from commands. + * Direct access to the result field is discouraged in Tcl 8.0. The + * interpreter result is either an object or a string, and the two values are + * kept consistent unless some C code sets interp->result directly. + * Programmers should use either the function Tcl_GetObjResult() or + * Tcl_GetStringResult() to read the interpreter's result. See the SetResult + * man page for details. + * + * Note: any change to the Tcl_Interp definition below must be mirrored in the + * "real" definition in tclInt.h. + * + * Note: Tcl_ObjCmdProc functions do not directly set result and freeProc. + * Instead, they set a Tcl_Obj member in the "real" structure that can be + * accessed with Tcl_GetObjResult() and Tcl_SetObjResult(). + */ + +typedef struct Tcl_Interp { + char *result; /* If the last command returned a string + * result, this points to it. */ + void (*freeProc) _ANSI_ARGS_((char *blockPtr)); + /* Zero means the string result is statically + * allocated. TCL_DYNAMIC means it was + * allocated with ckalloc and should be freed + * with ckfree. Other values give the address + * of function to invoke to free the result. + * Tcl_Eval must free it before executing next + * command. */ + int errorLine; /* When TCL_ERROR is returned, this gives the + * line number within the command where the + * error occurred (1 if first line). */ +} Tcl_Interp; + +typedef struct Tcl_AsyncHandler_ *Tcl_AsyncHandler; +typedef struct Tcl_Channel_ *Tcl_Channel; +typedef struct Tcl_ChannelTypeVersion_ *Tcl_ChannelTypeVersion; +typedef struct Tcl_Command_ *Tcl_Command; +typedef struct Tcl_Condition_ *Tcl_Condition; +typedef struct Tcl_Dict_ *Tcl_Dict; +typedef struct Tcl_EncodingState_ *Tcl_EncodingState; +typedef struct Tcl_Encoding_ *Tcl_Encoding; +typedef struct Tcl_Event Tcl_Event; +typedef struct Tcl_InterpState_ *Tcl_InterpState; +typedef struct Tcl_LoadHandle_ *Tcl_LoadHandle; +typedef struct Tcl_Mutex_ *Tcl_Mutex; +typedef struct Tcl_Pid_ *Tcl_Pid; +typedef struct Tcl_RegExp_ *Tcl_RegExp; +typedef struct Tcl_ThreadDataKey_ *Tcl_ThreadDataKey; +typedef struct Tcl_ThreadId_ *Tcl_ThreadId; +typedef struct Tcl_TimerToken_ *Tcl_TimerToken; +typedef struct Tcl_Trace_ *Tcl_Trace; +typedef struct Tcl_Var_ *Tcl_Var; + +/* + * Definition of the interface to functions implementing threads. A function + * following this definition is given to each call of 'Tcl_CreateThread' and + * will be called as the main fuction of the new thread created by that call. + */ + +#if defined __WIN32__ +typedef unsigned (__stdcall Tcl_ThreadCreateProc) _ANSI_ARGS_((ClientData clientData)); +#else +typedef void (Tcl_ThreadCreateProc) _ANSI_ARGS_((ClientData clientData)); +#endif + +/* + * Threading function return types used for abstracting away platform + * differences when writing a Tcl_ThreadCreateProc. See the NewThread function + * in generic/tclThreadTest.c for it's usage. + */ + +#if defined __WIN32__ +# define Tcl_ThreadCreateType unsigned __stdcall +# define TCL_THREAD_CREATE_RETURN return 0 +#else +# define Tcl_ThreadCreateType void +# define TCL_THREAD_CREATE_RETURN +#endif + +/* + * Definition of values for default stacksize and the possible flags to be + * given to Tcl_CreateThread. + */ + +#define TCL_THREAD_STACK_DEFAULT (0) /* Use default size for stack */ +#define TCL_THREAD_NOFLAGS (0000) /* Standard flags, default behaviour */ +#define TCL_THREAD_JOINABLE (0001) /* Mark the thread as joinable */ + +/* + * Flag values passed to Tcl_StringCaseMatch. + */ + +#define TCL_MATCH_NOCASE (1<<0) + +/* + * Flag values passed to Tcl_GetRegExpFromObj. + */ + +#define TCL_REG_BASIC 000000 /* BREs (convenience) */ +#define TCL_REG_EXTENDED 000001 /* EREs */ +#define TCL_REG_ADVF 000002 /* advanced features in EREs */ +#define TCL_REG_ADVANCED 000003 /* AREs (which are also EREs) */ +#define TCL_REG_QUOTE 000004 /* no special characters, none */ +#define TCL_REG_NOCASE 000010 /* ignore case */ +#define TCL_REG_NOSUB 000020 /* don't care about subexpressions */ +#define TCL_REG_EXPANDED 000040 /* expanded format, white space & + * comments */ +#define TCL_REG_NLSTOP 000100 /* \n doesn't match . or [^ ] */ +#define TCL_REG_NLANCH 000200 /* ^ matches after \n, $ before */ +#define TCL_REG_NEWLINE 000300 /* newlines are line terminators */ +#define TCL_REG_CANMATCH 001000 /* report details on partial/limited + * matches */ + +/* + * Flags values passed to Tcl_RegExpExecObj. + */ + +#define TCL_REG_NOTBOL 0001 /* Beginning of string does not match ^. */ +#define TCL_REG_NOTEOL 0002 /* End of string does not match $. */ + +/* + * Structures filled in by Tcl_RegExpInfo. Note that all offset values are + * relative to the start of the match string, not the beginning of the entire + * string. + */ + +typedef struct Tcl_RegExpIndices { + long start; /* Character offset of first character in + * match. */ + long end; /* Character offset of first character after + * the match. */ +} Tcl_RegExpIndices; + +typedef struct Tcl_RegExpInfo { + int nsubs; /* Number of subexpressions in the compiled + * expression. */ + Tcl_RegExpIndices *matches; /* Array of nsubs match offset pairs. */ + long extendStart; /* The offset at which a subsequent match + * might begin. */ + long reserved; /* Reserved for later use. */ +} Tcl_RegExpInfo; + +/* + * Picky compilers complain if this typdef doesn't appear before the struct's + * reference in tclDecls.h. + */ + +typedef Tcl_StatBuf *Tcl_Stat_; +typedef struct stat *Tcl_OldStat_; + +/* + * When a TCL command returns, the interpreter contains a result from the + * command. Programmers are strongly encouraged to use one of the functions + * Tcl_GetObjResult() or Tcl_GetStringResult() to read the interpreter's + * result. See the SetResult man page for details. Besides this result, the + * command function returns an integer code, which is one of the following: + * + * TCL_OK Command completed normally; the interpreter's result + * contains the command's result. + * TCL_ERROR The command couldn't be completed successfully; the + * interpreter's result describes what went wrong. + * TCL_RETURN The command requests that the current function return; + * the interpreter's result contains the function's + * return value. + * TCL_BREAK The command requests that the innermost loop be + * exited; the interpreter's result is meaningless. + * TCL_CONTINUE Go on to the next iteration of the current loop; the + * interpreter's result is meaningless. + */ + +#define TCL_OK 0 +#define TCL_ERROR 1 +#define TCL_RETURN 2 +#define TCL_BREAK 3 +#define TCL_CONTINUE 4 + +#define TCL_RESULT_SIZE 200 + +/* + * Flags to control what substitutions are performed by Tcl_SubstObj(): + */ + +#define TCL_SUBST_COMMANDS 001 +#define TCL_SUBST_VARIABLES 002 +#define TCL_SUBST_BACKSLASHES 004 +#define TCL_SUBST_ALL 007 + +/* + * Argument descriptors for math function callbacks in expressions: + */ + +typedef enum { + TCL_INT, TCL_DOUBLE, TCL_EITHER, TCL_WIDE_INT +} Tcl_ValueType; + +typedef struct Tcl_Value { + Tcl_ValueType type; /* Indicates intValue or doubleValue is valid, + * or both. */ + long intValue; /* Integer value. */ + double doubleValue; /* Double-precision floating value. */ + Tcl_WideInt wideValue; /* Wide (min. 64-bit) integer value. */ +} Tcl_Value; + +/* + * Forward declaration of Tcl_Obj to prevent an error when the forward + * reference to Tcl_Obj is encountered in the function types declared below. + */ + +struct Tcl_Obj; + +/* + * Function types defined by Tcl: + */ + +typedef int (Tcl_AppInitProc) _ANSI_ARGS_((Tcl_Interp *interp)); +typedef int (Tcl_AsyncProc) _ANSI_ARGS_((ClientData clientData, + Tcl_Interp *interp, int code)); +typedef void (Tcl_ChannelProc) _ANSI_ARGS_((ClientData clientData, int mask)); +typedef void (Tcl_CloseProc) _ANSI_ARGS_((ClientData data)); +typedef void (Tcl_CmdDeleteProc) _ANSI_ARGS_((ClientData clientData)); +typedef int (Tcl_CmdProc) _ANSI_ARGS_((ClientData clientData, + Tcl_Interp *interp, int argc, CONST84 char *argv[])); +typedef void (Tcl_CmdTraceProc) _ANSI_ARGS_((ClientData clientData, + Tcl_Interp *interp, int level, char *command, Tcl_CmdProc *proc, + ClientData cmdClientData, int argc, CONST84 char *argv[])); +typedef int (Tcl_CmdObjTraceProc) _ANSI_ARGS_((ClientData clientData, + Tcl_Interp *interp, int level, CONST char *command, + Tcl_Command commandInfo, int objc, struct Tcl_Obj * CONST * objv)); +typedef void (Tcl_CmdObjTraceDeleteProc) _ANSI_ARGS_((ClientData clientData)); +typedef void (Tcl_DupInternalRepProc) _ANSI_ARGS_((struct Tcl_Obj *srcPtr, + struct Tcl_Obj *dupPtr)); +typedef int (Tcl_EncodingConvertProc)_ANSI_ARGS_((ClientData clientData, + CONST char *src, int srcLen, int flags, Tcl_EncodingState *statePtr, + char *dst, int dstLen, int *srcReadPtr, int *dstWrotePtr, + int *dstCharsPtr)); +typedef void (Tcl_EncodingFreeProc)_ANSI_ARGS_((ClientData clientData)); +typedef int (Tcl_EventProc) _ANSI_ARGS_((Tcl_Event *evPtr, int flags)); +typedef void (Tcl_EventCheckProc) _ANSI_ARGS_((ClientData clientData, + int flags)); +typedef int (Tcl_EventDeleteProc) _ANSI_ARGS_((Tcl_Event *evPtr, + ClientData clientData)); +typedef void (Tcl_EventSetupProc) _ANSI_ARGS_((ClientData clientData, + int flags)); +typedef void (Tcl_ExitProc) _ANSI_ARGS_((ClientData clientData)); +typedef void (Tcl_FileProc) _ANSI_ARGS_((ClientData clientData, int mask)); +typedef void (Tcl_FileFreeProc) _ANSI_ARGS_((ClientData clientData)); +typedef void (Tcl_FreeInternalRepProc) _ANSI_ARGS_((struct Tcl_Obj *objPtr)); +typedef void (Tcl_FreeProc) _ANSI_ARGS_((char *blockPtr)); +typedef void (Tcl_IdleProc) _ANSI_ARGS_((ClientData clientData)); +typedef void (Tcl_InterpDeleteProc) _ANSI_ARGS_((ClientData clientData, + Tcl_Interp *interp)); +typedef int (Tcl_MathProc) _ANSI_ARGS_((ClientData clientData, + Tcl_Interp *interp, Tcl_Value *args, Tcl_Value *resultPtr)); +typedef void (Tcl_NamespaceDeleteProc) _ANSI_ARGS_((ClientData clientData)); +typedef int (Tcl_ObjCmdProc) _ANSI_ARGS_((ClientData clientData, + Tcl_Interp *interp, int objc, struct Tcl_Obj * CONST * objv)); +typedef int (Tcl_PackageInitProc) _ANSI_ARGS_((Tcl_Interp *interp)); +typedef int (Tcl_PackageUnloadProc) _ANSI_ARGS_((Tcl_Interp *interp, + int flags)); +typedef void (Tcl_PanicProc) _ANSI_ARGS_((CONST char *format, ...)); +typedef void (Tcl_TcpAcceptProc) _ANSI_ARGS_((ClientData callbackData, + Tcl_Channel chan, char *address, int port)); +typedef void (Tcl_TimerProc) _ANSI_ARGS_((ClientData clientData)); +typedef int (Tcl_SetFromAnyProc) _ANSI_ARGS_((Tcl_Interp *interp, + struct Tcl_Obj *objPtr)); +typedef void (Tcl_UpdateStringProc) _ANSI_ARGS_((struct Tcl_Obj *objPtr)); +typedef char *(Tcl_VarTraceProc) _ANSI_ARGS_((ClientData clientData, + Tcl_Interp *interp, CONST84 char *part1, CONST84 char *part2, + int flags)); +typedef void (Tcl_CommandTraceProc) _ANSI_ARGS_((ClientData clientData, + Tcl_Interp *interp, CONST char *oldName, CONST char *newName, + int flags)); +typedef void (Tcl_CreateFileHandlerProc) _ANSI_ARGS_((int fd, int mask, + Tcl_FileProc *proc, ClientData clientData)); +typedef void (Tcl_DeleteFileHandlerProc) _ANSI_ARGS_((int fd)); +typedef void (Tcl_AlertNotifierProc) _ANSI_ARGS_((ClientData clientData)); +typedef void (Tcl_ServiceModeHookProc) _ANSI_ARGS_((int mode)); +typedef ClientData (Tcl_InitNotifierProc) _ANSI_ARGS_((VOID)); +typedef void (Tcl_FinalizeNotifierProc) _ANSI_ARGS_((ClientData clientData)); +typedef void (Tcl_MainLoopProc) _ANSI_ARGS_((void)); + +/* + * The following structure represents a type of object, which is a particular + * internal representation for an object plus a set of functions that provide + * standard operations on objects of that type. + */ + +typedef struct Tcl_ObjType { + char *name; /* Name of the type, e.g. "int". */ + Tcl_FreeInternalRepProc *freeIntRepProc; + /* Called to free any storage for the type's + * internal rep. NULL if the internal rep does + * not need freeing. */ + Tcl_DupInternalRepProc *dupIntRepProc; + /* Called to create a new object as a copy of + * an existing object. */ + Tcl_UpdateStringProc *updateStringProc; + /* Called to update the string rep from the + * type's internal representation. */ + Tcl_SetFromAnyProc *setFromAnyProc; + /* Called to convert the object's internal rep + * to this type. Frees the internal rep of the + * old type. Returns TCL_ERROR on failure. */ +} Tcl_ObjType; + +/* + * One of the following structures exists for each object in the Tcl system. + * An object stores a value as either a string, some internal representation, + * or both. + */ + +typedef struct Tcl_Obj { + int refCount; /* When 0 the object will be freed. */ + char *bytes; /* This points to the first byte of the + * object's string representation. The array + * must be followed by a null byte (i.e., at + * offset length) but may also contain + * embedded null characters. The array's + * storage is allocated by ckalloc. NULL means + * the string rep is invalid and must be + * regenerated from the internal rep. Clients + * should use Tcl_GetStringFromObj or + * Tcl_GetString to get a pointer to the byte + * array as a readonly value. */ + int length; /* The number of bytes at *bytes, not + * including the terminating null. */ + Tcl_ObjType *typePtr; /* Denotes the object's type. Always + * corresponds to the type of the object's + * internal rep. NULL indicates the object has + * no internal rep (has no type). */ + union { /* The internal representation: */ + long longValue; /* - an long integer value */ + double doubleValue; /* - a double-precision floating value */ + VOID *otherValuePtr; /* - another, type-specific value */ + Tcl_WideInt wideValue; /* - a long long value */ + struct { /* - internal rep as two pointers */ + VOID *ptr1; + VOID *ptr2; + } twoPtrValue; + struct { /* - internal rep as a wide int, tightly + * packed fields */ + VOID *ptr; /* Pointer to digits */ + unsigned long value;/* Alloc, used, and signum packed into a + * single word */ + } ptrAndLongRep; + } internalRep; +} Tcl_Obj; + +/* + * Macros to increment and decrement a Tcl_Obj's reference count, and to test + * whether an object is shared (i.e. has reference count > 1). Note: clients + * should use Tcl_DecrRefCount() when they are finished using an object, and + * should never call TclFreeObj() directly. TclFreeObj() is only defined and + * made public in tcl.h to support Tcl_DecrRefCount's macro definition. Note + * also that Tcl_DecrRefCount() refers to the parameter "obj" twice. This + * means that you should avoid calling it with an expression that is expensive + * to compute or has side effects. + */ + +void Tcl_IncrRefCount _ANSI_ARGS_((Tcl_Obj *objPtr)); +void Tcl_DecrRefCount _ANSI_ARGS_((Tcl_Obj *objPtr)); +int Tcl_IsShared _ANSI_ARGS_((Tcl_Obj *objPtr)); + +/* + * The following structure contains the state needed by Tcl_SaveResult. No-one + * outside of Tcl should access any of these fields. This structure is + * typically allocated on the stack. + */ + +typedef struct Tcl_SavedResult { + char *result; + Tcl_FreeProc *freeProc; + Tcl_Obj *objResultPtr; + char *appendResult; + int appendAvl; + int appendUsed; + char resultSpace[TCL_RESULT_SIZE+1]; +} Tcl_SavedResult; + +/* + * The following definitions support Tcl's namespace facility. Note: the first + * five fields must match exactly the fields in a Namespace structure (see + * tclInt.h). + */ + +typedef struct Tcl_Namespace { + char *name; /* The namespace's name within its parent + * namespace. This contains no ::'s. The name + * of the global namespace is "" although "::" + * is an synonym. */ + char *fullName; /* The namespace's fully qualified name. This + * starts with ::. */ + ClientData clientData; /* Arbitrary value associated with this + * namespace. */ + Tcl_NamespaceDeleteProc *deleteProc; + /* Function invoked when deleting the + * namespace to, e.g., free clientData. */ + struct Tcl_Namespace *parentPtr; + /* Points to the namespace that contains this + * one. NULL if this is the global + * namespace. */ +} Tcl_Namespace; + +/* + * The following structure represents a call frame, or activation record. A + * call frame defines a naming context for a procedure call: its local scope + * (for local variables) and its namespace scope (used for non-local + * variables; often the global :: namespace). A call frame can also define the + * naming context for a namespace eval or namespace inscope command: the + * namespace in which the command's code should execute. The Tcl_CallFrame + * structures exist only while procedures or namespace eval/inscope's are + * being executed, and provide a Tcl call stack. + * + * A call frame is initialized and pushed using Tcl_PushCallFrame and popped + * using Tcl_PopCallFrame. Storage for a Tcl_CallFrame must be provided by the + * Tcl_PushCallFrame caller, and callers typically allocate them on the C call + * stack for efficiency. For this reason, Tcl_CallFrame is defined as a + * structure and not as an opaque token. However, most Tcl_CallFrame fields + * are hidden since applications should not access them directly; others are + * declared as "dummyX". + * + * WARNING!! The structure definition must be kept consistent with the + * CallFrame structure in tclInt.h. If you change one, change the other. + */ + +typedef struct Tcl_CallFrame { + Tcl_Namespace *nsPtr; + int dummy1; + int dummy2; + char *dummy3; + char *dummy4; + char *dummy5; + int dummy6; + char *dummy7; + char *dummy8; + int dummy9; + char *dummy10; + char *dummy11; + char *dummy12; +} Tcl_CallFrame; + +/* + * Information about commands that is returned by Tcl_GetCommandInfo and + * passed to Tcl_SetCommandInfo. objProc is an objc/objv object-based command + * function while proc is a traditional Tcl argc/argv string-based function. + * Tcl_CreateObjCommand and Tcl_CreateCommand ensure that both objProc and + * proc are non-NULL and can be called to execute the command. However, it may + * be faster to call one instead of the other. The member isNativeObjectProc + * is set to 1 if an object-based function was registered by + * Tcl_CreateObjCommand, and to 0 if a string-based function was registered by + * Tcl_CreateCommand. The other function is typically set to a compatibility + * wrapper that does string-to-object or object-to-string argument conversions + * then calls the other function. + */ + +typedef struct Tcl_CmdInfo { + int isNativeObjectProc; /* 1 if objProc was registered by a call to + * Tcl_CreateObjCommand; 0 otherwise. + * Tcl_SetCmdInfo does not modify this + * field. */ + Tcl_ObjCmdProc *objProc; /* Command's object-based function. */ + ClientData objClientData; /* ClientData for object proc. */ + Tcl_CmdProc *proc; /* Command's string-based function. */ + ClientData clientData; /* ClientData for string proc. */ + Tcl_CmdDeleteProc *deleteProc; + /* Function to call when command is + * deleted. */ + ClientData deleteData; /* Value to pass to deleteProc (usually the + * same as clientData). */ + Tcl_Namespace *namespacePtr;/* Points to the namespace that contains this + * command. Note that Tcl_SetCmdInfo will not + * change a command's namespace; use + * TclRenameCommand or Tcl_Eval (of 'rename') + * to do that. */ +} Tcl_CmdInfo; + +/* + * The structure defined below is used to hold dynamic strings. The only + * fields that clients should use are string and length, accessible via the + * macros Tcl_DStringValue and Tcl_DStringLength. + */ + +#define TCL_DSTRING_STATIC_SIZE 200 +typedef struct Tcl_DString { + char *string; /* Points to beginning of string: either + * staticSpace below or a malloced array. */ + int length; /* Number of non-NULL characters in the + * string. */ + int spaceAvl; /* Total number of bytes available for the + * string and its terminating NULL char. */ + char staticSpace[TCL_DSTRING_STATIC_SIZE]; + /* Space to use in common case where string is + * small. */ +} Tcl_DString; + +#define Tcl_DStringLength(dsPtr) ((dsPtr)->length) +#define Tcl_DStringValue(dsPtr) ((dsPtr)->string) +#define Tcl_DStringTrunc Tcl_DStringSetLength + +/* + * Definitions for the maximum number of digits of precision that may be + * specified in the "tcl_precision" variable, and the number of bytes of + * buffer space required by Tcl_PrintDouble. + */ + +#define TCL_MAX_PREC 17 +#define TCL_DOUBLE_SPACE (TCL_MAX_PREC+10) + +/* + * Definition for a number of bytes of buffer space sufficient to hold the + * string representation of an integer in base 10 (assuming the existence of + * 64-bit integers). + */ + +#define TCL_INTEGER_SPACE 24 + +/* + * Flag values passed to Tcl_ConvertElement. + * TCL_DONT_USE_BRACES forces it not to enclose the element in braces, but to + * use backslash quoting instead. + * TCL_DONT_QUOTE_HASH disables the default quoting of the '#' character. It + * is safe to leave the hash unquoted when the element is not the first + * element of a list, and this flag can be used by the caller to indicate + * that condition. + * (Careful! If you change these flag values be sure to change the definitions + * at the front of tclUtil.c). + */ + +#define TCL_DONT_USE_BRACES 1 +#define TCL_DONT_QUOTE_HASH 8 + +/* + * Flag that may be passed to Tcl_GetIndexFromObj to force it to disallow + * abbreviated strings. + */ + +#define TCL_EXACT 1 + +/* + * Flag values passed to Tcl_RecordAndEval, Tcl_EvalObj, Tcl_EvalObjv. + * WARNING: these bit choices must not conflict with the bit choices for + * evalFlag bits in tclInt.h! + * + * Meanings: + * TCL_NO_EVAL: Just record this command + * TCL_EVAL_GLOBAL: Execute script in global namespace + * TCL_EVAL_DIRECT: Do not compile this script + * TCL_EVAL_INVOKE: Magical Tcl_EvalObjv mode for aliases/ensembles + * o Run in iPtr->lookupNsPtr or global namespace + * o Cut out of error traces + * o Don't reset the flags controlling ensemble + * error message rewriting. + */ +#define TCL_NO_EVAL 0x10000 +#define TCL_EVAL_GLOBAL 0x20000 +#define TCL_EVAL_DIRECT 0x40000 +#define TCL_EVAL_INVOKE 0x80000 + +/* + * Special freeProc values that may be passed to Tcl_SetResult (see the man + * page for details): + */ + +#define TCL_VOLATILE ((Tcl_FreeProc *) 1) +#define TCL_STATIC ((Tcl_FreeProc *) 0) +#define TCL_DYNAMIC ((Tcl_FreeProc *) 3) + +/* + * Flag values passed to variable-related functions. + */ + +#define TCL_GLOBAL_ONLY 1 +#define TCL_NAMESPACE_ONLY 2 +#define TCL_APPEND_VALUE 4 +#define TCL_LIST_ELEMENT 8 +#define TCL_TRACE_READS 0x10 +#define TCL_TRACE_WRITES 0x20 +#define TCL_TRACE_UNSETS 0x40 +#define TCL_TRACE_DESTROYED 0x80 +#define TCL_INTERP_DESTROYED 0x100 +#define TCL_LEAVE_ERR_MSG 0x200 +#define TCL_TRACE_ARRAY 0x800 +#ifndef TCL_REMOVE_OBSOLETE_TRACES +/* Required to support old variable/vdelete/vinfo traces */ +#define TCL_TRACE_OLD_STYLE 0x1000 +#endif +/* Indicate the semantics of the result of a trace */ +#define TCL_TRACE_RESULT_DYNAMIC 0x8000 +#define TCL_TRACE_RESULT_OBJECT 0x10000 + +/* + * Flag values for ensemble commands. + */ + +#define TCL_ENSEMBLE_PREFIX 0x02/* Flag value to say whether to allow + * unambiguous prefixes of commands or to + * require exact matches for command names. */ + +/* + * Flag values passed to command-related functions. + */ + +#define TCL_TRACE_RENAME 0x2000 +#define TCL_TRACE_DELETE 0x4000 + +#define TCL_ALLOW_INLINE_COMPILATION 0x20000 + +/* + * The TCL_PARSE_PART1 flag is deprecated and has no effect. The part1 is now + * always parsed whenever the part2 is NULL. (This is to avoid a common error + * when converting code to use the new object based APIs and forgetting to + * give the flag) + */ + +#ifndef TCL_NO_DEPRECATED +# define TCL_PARSE_PART1 0x400 +#endif + +/* + * Types for linked variables: + */ + +#define TCL_LINK_INT 1 +#define TCL_LINK_DOUBLE 2 +#define TCL_LINK_BOOLEAN 3 +#define TCL_LINK_STRING 4 +#define TCL_LINK_WIDE_INT 5 +#define TCL_LINK_CHAR 6 +#define TCL_LINK_UCHAR 7 +#define TCL_LINK_SHORT 8 +#define TCL_LINK_USHORT 9 +#define TCL_LINK_UINT 10 +#define TCL_LINK_LONG 11 +#define TCL_LINK_ULONG 12 +#define TCL_LINK_FLOAT 13 +#define TCL_LINK_WIDE_UINT 14 +#define TCL_LINK_READ_ONLY 0x80 + +/* + * Forward declarations of Tcl_HashTable and related types. + */ + +typedef struct Tcl_HashKeyType Tcl_HashKeyType; +typedef struct Tcl_HashTable Tcl_HashTable; +typedef struct Tcl_HashEntry Tcl_HashEntry; + +typedef unsigned int (Tcl_HashKeyProc) _ANSI_ARGS_((Tcl_HashTable *tablePtr, + VOID *keyPtr)); +typedef int (Tcl_CompareHashKeysProc) _ANSI_ARGS_((VOID *keyPtr, + Tcl_HashEntry *hPtr)); +typedef Tcl_HashEntry *(Tcl_AllocHashEntryProc) _ANSI_ARGS_(( + Tcl_HashTable *tablePtr, VOID *keyPtr)); +typedef void (Tcl_FreeHashEntryProc) _ANSI_ARGS_((Tcl_HashEntry *hPtr)); + +/* + * This flag controls whether the hash table stores the hash of a key, or + * recalculates it. There should be no reason for turning this flag off as it + * is completely binary and source compatible unless you directly access the + * bucketPtr member of the Tcl_HashTableEntry structure. This member has been + * removed and the space used to store the hash value. + */ + +#ifndef TCL_HASH_KEY_STORE_HASH +# define TCL_HASH_KEY_STORE_HASH 1 +#endif + +/* + * Structure definition for an entry in a hash table. No-one outside Tcl + * should access any of these fields directly; use the macros defined below. + */ + +struct Tcl_HashEntry { + Tcl_HashEntry *nextPtr; /* Pointer to next entry in this hash bucket, + * or NULL for end of chain. */ + Tcl_HashTable *tablePtr; /* Pointer to table containing entry. */ +#if TCL_HASH_KEY_STORE_HASH + VOID *hash; /* Hash value, stored as pointer to ensure + * that the offsets of the fields in this + * structure are not changed. */ +#else + Tcl_HashEntry **bucketPtr; /* Pointer to bucket that points to first + * entry in this entry's chain: used for + * deleting the entry. */ +#endif + ClientData clientData; /* Application stores something here with + * Tcl_SetHashValue. */ + union { /* Key has one of these forms: */ + char *oneWordValue; /* One-word value for key. */ + Tcl_Obj *objPtr; /* Tcl_Obj * key value. */ + int words[1]; /* Multiple integer words for key. The actual + * size will be as large as necessary for this + * table's keys. */ + char string[4]; /* String for key. The actual size will be as + * large as needed to hold the key. */ + } key; /* MUST BE LAST FIELD IN RECORD!! */ +}; + +/* + * Flags used in Tcl_HashKeyType. + * + * TCL_HASH_KEY_RANDOMIZE_HASH - + * There are some things, pointers for example + * which don't hash well because they do not use + * the lower bits. If this flag is set then the + * hash table will attempt to rectify this by + * randomising the bits and then using the upper + * N bits as the index into the table. + * TCL_HASH_KEY_SYSTEM_HASH - If this flag is set then all memory internally + * allocated for the hash table that is not for an + * entry will use the system heap. + */ + +#define TCL_HASH_KEY_RANDOMIZE_HASH 0x1 +#define TCL_HASH_KEY_SYSTEM_HASH 0x2 + +/* + * Structure definition for the methods associated with a hash table key type. + */ + +#define TCL_HASH_KEY_TYPE_VERSION 1 +struct Tcl_HashKeyType { + int version; /* Version of the table. If this structure is + * extended in future then the version can be + * used to distinguish between different + * structures. */ + int flags; /* Flags, see above for details. */ + Tcl_HashKeyProc *hashKeyProc; + /* Calculates a hash value for the key. If + * this is NULL then the pointer itself is + * used as a hash value. */ + Tcl_CompareHashKeysProc *compareKeysProc; + /* Compares two keys and returns zero if they + * do not match, and non-zero if they do. If + * this is NULL then the pointers are + * compared. */ + Tcl_AllocHashEntryProc *allocEntryProc; + /* Called to allocate memory for a new entry, + * i.e. if the key is a string then this could + * allocate a single block which contains + * enough space for both the entry and the + * string. Only the key field of the allocated + * Tcl_HashEntry structure needs to be filled + * in. If something else needs to be done to + * the key, i.e. incrementing a reference + * count then that should be done by this + * function. If this is NULL then Tcl_Alloc is + * used to allocate enough space for a + * Tcl_HashEntry and the key pointer is + * assigned to key.oneWordValue. */ + Tcl_FreeHashEntryProc *freeEntryProc; + /* Called to free memory associated with an + * entry. If something else needs to be done + * to the key, i.e. decrementing a reference + * count then that should be done by this + * function. If this is NULL then Tcl_Free is + * used to free the Tcl_HashEntry. */ +}; + +/* + * Structure definition for a hash table. Must be in tcl.h so clients can + * allocate space for these structures, but clients should never access any + * fields in this structure. + */ + +#define TCL_SMALL_HASH_TABLE 4 +struct Tcl_HashTable { + Tcl_HashEntry **buckets; /* Pointer to bucket array. Each element + * points to first entry in bucket's hash + * chain, or NULL. */ + Tcl_HashEntry *staticBuckets[TCL_SMALL_HASH_TABLE]; + /* Bucket array used for small tables (to + * avoid mallocs and frees). */ + int numBuckets; /* Total number of buckets allocated at + * **bucketPtr. */ + int numEntries; /* Total number of entries present in + * table. */ + int rebuildSize; /* Enlarge table when numEntries gets to be + * this large. */ + int downShift; /* Shift count used in hashing function. + * Designed to use high-order bits of + * randomized keys. */ + int mask; /* Mask value used in hashing function. */ + int keyType; /* Type of keys used in this table. It's + * either TCL_CUSTOM_KEYS, TCL_STRING_KEYS, + * TCL_ONE_WORD_KEYS, or an integer giving the + * number of ints that is the size of the + * key. */ + Tcl_HashEntry *(*findProc) _ANSI_ARGS_((Tcl_HashTable *tablePtr, + CONST char *key)); + Tcl_HashEntry *(*createProc) _ANSI_ARGS_((Tcl_HashTable *tablePtr, + CONST char *key, int *newPtr)); + Tcl_HashKeyType *typePtr; /* Type of the keys used in the + * Tcl_HashTable. */ +}; + +/* + * Structure definition for information used to keep track of searches through + * hash tables: + */ + +typedef struct Tcl_HashSearch { + Tcl_HashTable *tablePtr; /* Table being searched. */ + int nextIndex; /* Index of next bucket to be enumerated after + * present one. */ + Tcl_HashEntry *nextEntryPtr;/* Next entry to be enumerated in the current + * bucket. */ +} Tcl_HashSearch; + +/* + * Acceptable key types for hash tables: + * + * TCL_STRING_KEYS: The keys are strings, they are copied into the + * entry. + * TCL_ONE_WORD_KEYS: The keys are pointers, the pointer is stored + * in the entry. + * TCL_CUSTOM_TYPE_KEYS: The keys are arbitrary types which are copied + * into the entry. + * TCL_CUSTOM_PTR_KEYS: The keys are pointers to arbitrary types, the + * pointer is stored in the entry. + * + * While maintaining binary compatability the above have to be distinct values + * as they are used to differentiate between old versions of the hash table + * which don't have a typePtr and new ones which do. Once binary compatability + * is discarded in favour of making more wide spread changes TCL_STRING_KEYS + * can be the same as TCL_CUSTOM_TYPE_KEYS, and TCL_ONE_WORD_KEYS can be the + * same as TCL_CUSTOM_PTR_KEYS because they simply determine how the key is + * accessed from the entry and not the behaviour. + */ + +#define TCL_STRING_KEYS 0 +#define TCL_ONE_WORD_KEYS 1 +#define TCL_CUSTOM_TYPE_KEYS -2 +#define TCL_CUSTOM_PTR_KEYS -1 + +/* + * Structure definition for information used to keep track of searches through + * dictionaries. These fields should not be accessed by code outside + * tclDictObj.c + */ + +typedef struct { + void *next; /* Search position for underlying hash + * table. */ + int epoch; /* Epoch marker for dictionary being searched, + * or -1 if search has terminated. */ + Tcl_Dict dictionaryPtr; /* Reference to dictionary being searched. */ +} Tcl_DictSearch; + +/* + * Flag values to pass to Tcl_DoOneEvent to disable searches for some kinds of + * events: + */ + +#define TCL_DONT_WAIT (1<<1) +#define TCL_WINDOW_EVENTS (1<<2) +#define TCL_FILE_EVENTS (1<<3) +#define TCL_TIMER_EVENTS (1<<4) +#define TCL_IDLE_EVENTS (1<<5) /* WAS 0x10 ???? */ +#define TCL_ALL_EVENTS (~TCL_DONT_WAIT) + +/* + * The following structure defines a generic event for the Tcl event system. + * These are the things that are queued in calls to Tcl_QueueEvent and + * serviced later by Tcl_DoOneEvent. There can be many different kinds of + * events with different fields, corresponding to window events, timer events, + * etc. The structure for a particular event consists of a Tcl_Event header + * followed by additional information specific to that event. + */ + +struct Tcl_Event { + Tcl_EventProc *proc; /* Function to call to service this event. */ + struct Tcl_Event *nextPtr; /* Next in list of pending events, or NULL. */ +}; + +/* + * Positions to pass to Tcl_QueueEvent: + */ + +typedef enum { + TCL_QUEUE_TAIL, TCL_QUEUE_HEAD, TCL_QUEUE_MARK +} Tcl_QueuePosition; + +/* + * Values to pass to Tcl_SetServiceMode to specify the behavior of notifier + * event routines. + */ + +#define TCL_SERVICE_NONE 0 +#define TCL_SERVICE_ALL 1 + +/* + * The following structure keeps is used to hold a time value, either as an + * absolute time (the number of seconds from the epoch) or as an elapsed time. + * On Unix systems the epoch is Midnight Jan 1, 1970 GMT. + */ + +typedef struct Tcl_Time { + long sec; /* Seconds. */ + long usec; /* Microseconds. */ +} Tcl_Time; + +typedef void (Tcl_SetTimerProc) _ANSI_ARGS_((Tcl_Time *timePtr)); +typedef int (Tcl_WaitForEventProc) _ANSI_ARGS_((Tcl_Time *timePtr)); + +/* + * TIP #233 (Virtualized Time) + */ + +typedef void (Tcl_GetTimeProc) _ANSI_ARGS_((Tcl_Time *timebuf, + ClientData clientData)); +typedef void (Tcl_ScaleTimeProc) _ANSI_ARGS_((Tcl_Time *timebuf, + ClientData clientData)); + +/* + * Bits to pass to Tcl_CreateFileHandler and Tcl_CreateChannelHandler to + * indicate what sorts of events are of interest: + */ + +#define TCL_READABLE (1<<1) +#define TCL_WRITABLE (1<<2) +#define TCL_EXCEPTION (1<<3) + +/* + * Flag values to pass to Tcl_OpenCommandChannel to indicate the disposition + * of the stdio handles. TCL_STDIN, TCL_STDOUT, TCL_STDERR, are also used in + * Tcl_GetStdChannel. + */ + +#define TCL_STDIN (1<<1) +#define TCL_STDOUT (1<<2) +#define TCL_STDERR (1<<3) +#define TCL_ENFORCE_MODE (1<<4) + +/* + * Bits passed to Tcl_DriverClose2Proc to indicate which side of a channel + * should be closed. + */ + +#define TCL_CLOSE_READ (1<<1) +#define TCL_CLOSE_WRITE (1<<2) + +/* + * Value to use as the closeProc for a channel that supports the close2Proc + * interface. + */ + +#define TCL_CLOSE2PROC ((Tcl_DriverCloseProc *)1) + +/* + * Channel version tag. This was introduced in 8.3.2/8.4. + */ + +#define TCL_CHANNEL_VERSION_1 ((Tcl_ChannelTypeVersion) 0x1) +#define TCL_CHANNEL_VERSION_2 ((Tcl_ChannelTypeVersion) 0x2) +#define TCL_CHANNEL_VERSION_3 ((Tcl_ChannelTypeVersion) 0x3) +#define TCL_CHANNEL_VERSION_4 ((Tcl_ChannelTypeVersion) 0x4) +#define TCL_CHANNEL_VERSION_5 ((Tcl_ChannelTypeVersion) 0x5) + +/* + * TIP #218: Channel Actions, Ids for Tcl_DriverThreadActionProc + */ + +#define TCL_CHANNEL_THREAD_INSERT (0) +#define TCL_CHANNEL_THREAD_REMOVE (1) + +/* + * Typedefs for the various operations in a channel type: + */ + +typedef int (Tcl_DriverBlockModeProc) _ANSI_ARGS_(( + ClientData instanceData, int mode)); +typedef int (Tcl_DriverCloseProc) _ANSI_ARGS_((ClientData instanceData, + Tcl_Interp *interp)); +typedef int (Tcl_DriverClose2Proc) _ANSI_ARGS_((ClientData instanceData, + Tcl_Interp *interp, int flags)); +typedef int (Tcl_DriverInputProc) _ANSI_ARGS_((ClientData instanceData, + char *buf, int toRead, int *errorCodePtr)); +typedef int (Tcl_DriverOutputProc) _ANSI_ARGS_((ClientData instanceData, + CONST84 char *buf, int toWrite, int *errorCodePtr)); +typedef int (Tcl_DriverSeekProc) _ANSI_ARGS_((ClientData instanceData, + long offset, int mode, int *errorCodePtr)); +typedef int (Tcl_DriverSetOptionProc) _ANSI_ARGS_(( + ClientData instanceData, Tcl_Interp *interp, + CONST char *optionName, CONST char *value)); +typedef int (Tcl_DriverGetOptionProc) _ANSI_ARGS_(( + ClientData instanceData, Tcl_Interp *interp, + CONST84 char *optionName, Tcl_DString *dsPtr)); +typedef void (Tcl_DriverWatchProc) _ANSI_ARGS_(( + ClientData instanceData, int mask)); +typedef int (Tcl_DriverGetHandleProc) _ANSI_ARGS_(( + ClientData instanceData, int direction, + ClientData *handlePtr)); +typedef int (Tcl_DriverFlushProc) _ANSI_ARGS_((ClientData instanceData)); +typedef int (Tcl_DriverHandlerProc) _ANSI_ARGS_(( + ClientData instanceData, int interestMask)); +typedef Tcl_WideInt (Tcl_DriverWideSeekProc) _ANSI_ARGS_(( + ClientData instanceData, Tcl_WideInt offset, + int mode, int *errorCodePtr)); +/* + * TIP #218, Channel Thread Actions + */ +typedef void (Tcl_DriverThreadActionProc) _ANSI_ARGS_ (( + ClientData instanceData, int action)); +/* + * TIP #208, File Truncation (etc.) + */ +typedef int (Tcl_DriverTruncateProc) _ANSI_ARGS_(( + ClientData instanceData, Tcl_WideInt length)); + +/* + * struct Tcl_ChannelType: + * + * One such structure exists for each type (kind) of channel. It collects + * together in one place all the functions that are part of the specific + * channel type. + * + * It is recommend that the Tcl_Channel* functions are used to access elements + * of this structure, instead of direct accessing. + */ + +typedef struct Tcl_ChannelType { + char *typeName; /* The name of the channel type in Tcl + * commands. This storage is owned by channel + * type. */ + Tcl_ChannelTypeVersion version; + /* Version of the channel type. */ + Tcl_DriverCloseProc *closeProc; + /* Function to call to close the channel, or + * TCL_CLOSE2PROC if the close2Proc should be + * used instead. */ + Tcl_DriverInputProc *inputProc; + /* Function to call for input on channel. */ + Tcl_DriverOutputProc *outputProc; + /* Function to call for output on channel. */ + Tcl_DriverSeekProc *seekProc; + /* Function to call to seek on the channel. + * May be NULL. */ + Tcl_DriverSetOptionProc *setOptionProc; + /* Set an option on a channel. */ + Tcl_DriverGetOptionProc *getOptionProc; + /* Get an option from a channel. */ + Tcl_DriverWatchProc *watchProc; + /* Set up the notifier to watch for events on + * this channel. */ + Tcl_DriverGetHandleProc *getHandleProc; + /* Get an OS handle from the channel or NULL + * if not supported. */ + Tcl_DriverClose2Proc *close2Proc; + /* Function to call to close the channel if + * the device supports closing the read & + * write sides independently. */ + Tcl_DriverBlockModeProc *blockModeProc; + /* Set blocking mode for the raw channel. May + * be NULL. */ + /* + * Only valid in TCL_CHANNEL_VERSION_2 channels or later + */ + Tcl_DriverFlushProc *flushProc; + /* Function to call to flush a channel. May be + * NULL. */ + Tcl_DriverHandlerProc *handlerProc; + /* Function to call to handle a channel event. + * This will be passed up the stacked channel + * chain. */ + /* + * Only valid in TCL_CHANNEL_VERSION_3 channels or later + */ + Tcl_DriverWideSeekProc *wideSeekProc; + /* Function to call to seek on the channel + * which can handle 64-bit offsets. May be + * NULL, and must be NULL if seekProc is + * NULL. */ + /* + * Only valid in TCL_CHANNEL_VERSION_4 channels or later + * TIP #218, Channel Thread Actions + */ + Tcl_DriverThreadActionProc *threadActionProc; + /* Function to call to notify the driver of + * thread specific activity for a channel. May + * be NULL. */ + + /* + * Only valid in TCL_CHANNEL_VERSION_5 channels or later + * TIP #208, File Truncation + */ + Tcl_DriverTruncateProc *truncateProc; + /* Function to call to truncate the underlying + * file to a particular length. May be NULL if + * the channel does not support truncation. */ +} Tcl_ChannelType; + +/* + * The following flags determine whether the blockModeProc above should set + * the channel into blocking or nonblocking mode. They are passed as arguments + * to the blockModeProc function in the above structure. + */ + +#define TCL_MODE_BLOCKING 0 /* Put channel into blocking mode. */ +#define TCL_MODE_NONBLOCKING 1 /* Put channel into nonblocking + * mode. */ + +/* + * Enum for different types of file paths. + */ + +typedef enum Tcl_PathType { + TCL_PATH_ABSOLUTE, + TCL_PATH_RELATIVE, + TCL_PATH_VOLUME_RELATIVE +} Tcl_PathType; + +/* + * The following structure is used to pass glob type data amongst the various + * glob routines and Tcl_FSMatchInDirectory. + */ + +typedef struct Tcl_GlobTypeData { + int type; /* Corresponds to bcdpfls as in 'find -t' */ + int perm; /* Corresponds to file permissions */ + Tcl_Obj *macType; /* Acceptable mac type */ + Tcl_Obj *macCreator; /* Acceptable mac creator */ +} Tcl_GlobTypeData; + +/* + * Type and permission definitions for glob command + */ + +#define TCL_GLOB_TYPE_BLOCK (1<<0) +#define TCL_GLOB_TYPE_CHAR (1<<1) +#define TCL_GLOB_TYPE_DIR (1<<2) +#define TCL_GLOB_TYPE_PIPE (1<<3) +#define TCL_GLOB_TYPE_FILE (1<<4) +#define TCL_GLOB_TYPE_LINK (1<<5) +#define TCL_GLOB_TYPE_SOCK (1<<6) +#define TCL_GLOB_TYPE_MOUNT (1<<7) + +#define TCL_GLOB_PERM_RONLY (1<<0) +#define TCL_GLOB_PERM_HIDDEN (1<<1) +#define TCL_GLOB_PERM_R (1<<2) +#define TCL_GLOB_PERM_W (1<<3) +#define TCL_GLOB_PERM_X (1<<4) + +/* + * Flags for the unload callback function + */ + +#define TCL_UNLOAD_DETACH_FROM_INTERPRETER (1<<0) +#define TCL_UNLOAD_DETACH_FROM_PROCESS (1<<1) + +/* + * Typedefs for the various filesystem operations: + */ + +typedef int (Tcl_FSStatProc) _ANSI_ARGS_((Tcl_Obj *pathPtr, Tcl_StatBuf *buf)); +typedef int (Tcl_FSAccessProc) _ANSI_ARGS_((Tcl_Obj *pathPtr, int mode)); +typedef Tcl_Channel (Tcl_FSOpenFileChannelProc) _ANSI_ARGS_(( + Tcl_Interp *interp, Tcl_Obj *pathPtr, int mode, int permissions)); +typedef int (Tcl_FSMatchInDirectoryProc) _ANSI_ARGS_((Tcl_Interp *interp, + Tcl_Obj *result, Tcl_Obj *pathPtr, CONST char *pattern, + Tcl_GlobTypeData * types)); +typedef Tcl_Obj * (Tcl_FSGetCwdProc) _ANSI_ARGS_((Tcl_Interp *interp)); +typedef int (Tcl_FSChdirProc) _ANSI_ARGS_((Tcl_Obj *pathPtr)); +typedef int (Tcl_FSLstatProc) _ANSI_ARGS_((Tcl_Obj *pathPtr, + Tcl_StatBuf *buf)); +typedef int (Tcl_FSCreateDirectoryProc) _ANSI_ARGS_((Tcl_Obj *pathPtr)); +typedef int (Tcl_FSDeleteFileProc) _ANSI_ARGS_((Tcl_Obj *pathPtr)); +typedef int (Tcl_FSCopyDirectoryProc) _ANSI_ARGS_((Tcl_Obj *srcPathPtr, + Tcl_Obj *destPathPtr, Tcl_Obj **errorPtr)); +typedef int (Tcl_FSCopyFileProc) _ANSI_ARGS_((Tcl_Obj *srcPathPtr, + Tcl_Obj *destPathPtr)); +typedef int (Tcl_FSRemoveDirectoryProc) _ANSI_ARGS_((Tcl_Obj *pathPtr, + int recursive, Tcl_Obj **errorPtr)); +typedef int (Tcl_FSRenameFileProc) _ANSI_ARGS_((Tcl_Obj *srcPathPtr, + Tcl_Obj *destPathPtr)); +typedef void (Tcl_FSUnloadFileProc) _ANSI_ARGS_((Tcl_LoadHandle loadHandle)); +typedef Tcl_Obj * (Tcl_FSListVolumesProc) _ANSI_ARGS_((void)); +/* We have to declare the utime structure here. */ +struct utimbuf; +typedef int (Tcl_FSUtimeProc) _ANSI_ARGS_((Tcl_Obj *pathPtr, + struct utimbuf *tval)); +typedef int (Tcl_FSNormalizePathProc) _ANSI_ARGS_((Tcl_Interp *interp, + Tcl_Obj *pathPtr, int nextCheckpoint)); +typedef int (Tcl_FSFileAttrsGetProc) _ANSI_ARGS_((Tcl_Interp *interp, + int index, Tcl_Obj *pathPtr, Tcl_Obj **objPtrRef)); +typedef CONST char ** (Tcl_FSFileAttrStringsProc) _ANSI_ARGS_(( + Tcl_Obj *pathPtr, Tcl_Obj **objPtrRef)); +typedef int (Tcl_FSFileAttrsSetProc) _ANSI_ARGS_((Tcl_Interp *interp, + int index, Tcl_Obj *pathPtr, Tcl_Obj *objPtr)); +typedef Tcl_Obj * (Tcl_FSLinkProc) _ANSI_ARGS_((Tcl_Obj *pathPtr, + Tcl_Obj *toPtr, int linkType)); +typedef int (Tcl_FSLoadFileProc) _ANSI_ARGS_((Tcl_Interp * interp, + Tcl_Obj *pathPtr, Tcl_LoadHandle *handlePtr, + Tcl_FSUnloadFileProc **unloadProcPtr)); +typedef int (Tcl_FSPathInFilesystemProc) _ANSI_ARGS_((Tcl_Obj *pathPtr, + ClientData *clientDataPtr)); +typedef Tcl_Obj * (Tcl_FSFilesystemPathTypeProc) _ANSI_ARGS_(( + Tcl_Obj *pathPtr)); +typedef Tcl_Obj * (Tcl_FSFilesystemSeparatorProc) _ANSI_ARGS_(( + Tcl_Obj *pathPtr)); +typedef void (Tcl_FSFreeInternalRepProc) _ANSI_ARGS_((ClientData clientData)); +typedef ClientData (Tcl_FSDupInternalRepProc) _ANSI_ARGS_(( + ClientData clientData)); +typedef Tcl_Obj * (Tcl_FSInternalToNormalizedProc) _ANSI_ARGS_(( + ClientData clientData)); +typedef ClientData (Tcl_FSCreateInternalRepProc) _ANSI_ARGS_(( + Tcl_Obj *pathPtr)); + +typedef struct Tcl_FSVersion_ *Tcl_FSVersion; + +/* + *---------------------------------------------------------------- + * Data structures related to hooking into the filesystem + *---------------------------------------------------------------- + */ + +/* + * Filesystem version tag. This was introduced in 8.4. + */ +#define TCL_FILESYSTEM_VERSION_1 ((Tcl_FSVersion) 0x1) + +/* + * struct Tcl_Filesystem: + * + * One such structure exists for each type (kind) of filesystem. It collects + * together in one place all the functions that are part of the specific + * filesystem. Tcl always accesses the filesystem through one of these + * structures. + * + * Not all entries need be non-NULL; any which are NULL are simply ignored. + * However, a complete filesystem should provide all of these functions. The + * explanations in the structure show the importance of each function. + */ + +typedef struct Tcl_Filesystem { + CONST char *typeName; /* The name of the filesystem. */ + int structureLength; /* Length of this structure, so future binary + * compatibility can be assured. */ + Tcl_FSVersion version; /* Version of the filesystem type. */ + Tcl_FSPathInFilesystemProc *pathInFilesystemProc; + /* Function to check whether a path is in this + * filesystem. This is the most important + * filesystem function. */ + Tcl_FSDupInternalRepProc *dupInternalRepProc; + /* Function to duplicate internal fs rep. May + * be NULL (but then fs is less efficient). */ + Tcl_FSFreeInternalRepProc *freeInternalRepProc; + /* Function to free internal fs rep. Must be + * implemented if internal representations + * need freeing, otherwise it can be NULL. */ + Tcl_FSInternalToNormalizedProc *internalToNormalizedProc; + /* Function to convert internal representation + * to a normalized path. Only required if the + * fs creates pure path objects with no + * string/path representation. */ + Tcl_FSCreateInternalRepProc *createInternalRepProc; + /* Function to create a filesystem-specific + * internal representation. May be NULL if + * paths have no internal representation, or + * if the Tcl_FSPathInFilesystemProc for this + * filesystem always immediately creates an + * internal representation for paths it + * accepts. */ + Tcl_FSNormalizePathProc *normalizePathProc; + /* Function to normalize a path. Should be + * implemented for all filesystems which can + * have multiple string representations for + * the same path object. */ + Tcl_FSFilesystemPathTypeProc *filesystemPathTypeProc; + /* Function to determine the type of a path in + * this filesystem. May be NULL. */ + Tcl_FSFilesystemSeparatorProc *filesystemSeparatorProc; + /* Function to return the separator + * character(s) for this filesystem. Must be + * implemented. */ + Tcl_FSStatProc *statProc; /* Function to process a 'Tcl_FSStat()' call. + * Must be implemented for any reasonable + * filesystem. */ + Tcl_FSAccessProc *accessProc; + /* Function to process a 'Tcl_FSAccess()' + * call. Must be implemented for any + * reasonable filesystem. */ + Tcl_FSOpenFileChannelProc *openFileChannelProc; + /* Function to process a + * 'Tcl_FSOpenFileChannel()' call. Must be + * implemented for any reasonable + * filesystem. */ + Tcl_FSMatchInDirectoryProc *matchInDirectoryProc; + /* Function to process a + * 'Tcl_FSMatchInDirectory()'. If not + * implemented, then glob and recursive copy + * functionality will be lacking in the + * filesystem. */ + Tcl_FSUtimeProc *utimeProc; /* Function to process a 'Tcl_FSUtime()' call. + * Required to allow setting (not reading) of + * times with 'file mtime', 'file atime' and + * the open-r/open-w/fcopy implementation of + * 'file copy'. */ + Tcl_FSLinkProc *linkProc; /* Function to process a 'Tcl_FSLink()' call. + * Should be implemented only if the + * filesystem supports links (reading or + * creating). */ + Tcl_FSListVolumesProc *listVolumesProc; + /* Function to list any filesystem volumes + * added by this filesystem. Should be + * implemented only if the filesystem adds + * volumes at the head of the filesystem. */ + Tcl_FSFileAttrStringsProc *fileAttrStringsProc; + /* Function to list all attributes strings + * which are valid for this filesystem. If not + * implemented the filesystem will not support + * the 'file attributes' command. This allows + * arbitrary additional information to be + * attached to files in the filesystem. */ + Tcl_FSFileAttrsGetProc *fileAttrsGetProc; + /* Function to process a + * 'Tcl_FSFileAttrsGet()' call, used by 'file + * attributes'. */ + Tcl_FSFileAttrsSetProc *fileAttrsSetProc; + /* Function to process a + * 'Tcl_FSFileAttrsSet()' call, used by 'file + * attributes'. */ + Tcl_FSCreateDirectoryProc *createDirectoryProc; + /* Function to process a + * 'Tcl_FSCreateDirectory()' call. Should be + * implemented unless the FS is read-only. */ + Tcl_FSRemoveDirectoryProc *removeDirectoryProc; + /* Function to process a + * 'Tcl_FSRemoveDirectory()' call. Should be + * implemented unless the FS is read-only. */ + Tcl_FSDeleteFileProc *deleteFileProc; + /* Function to process a 'Tcl_FSDeleteFile()' + * call. Should be implemented unless the FS + * is read-only. */ + Tcl_FSCopyFileProc *copyFileProc; + /* Function to process a 'Tcl_FSCopyFile()' + * call. If not implemented Tcl will fall back + * on open-r, open-w and fcopy as a copying + * mechanism, for copying actions initiated in + * Tcl (not C). */ + Tcl_FSRenameFileProc *renameFileProc; + /* Function to process a 'Tcl_FSRenameFile()' + * call. If not implemented, Tcl will fall + * back on a copy and delete mechanism, for + * rename actions initiated in Tcl (not C). */ + Tcl_FSCopyDirectoryProc *copyDirectoryProc; + /* Function to process a + * 'Tcl_FSCopyDirectory()' call. If not + * implemented, Tcl will fall back on a + * recursive create-dir, file copy mechanism, + * for copying actions initiated in Tcl (not + * C). */ + Tcl_FSLstatProc *lstatProc; /* Function to process a 'Tcl_FSLstat()' call. + * If not implemented, Tcl will attempt to use + * the 'statProc' defined above instead. */ + Tcl_FSLoadFileProc *loadFileProc; + /* Function to process a 'Tcl_FSLoadFile()' + * call. If not implemented, Tcl will fall + * back on a copy to native-temp followed by a + * Tcl_FSLoadFile on that temporary copy. */ + Tcl_FSGetCwdProc *getCwdProc; + /* Function to process a 'Tcl_FSGetCwd()' + * call. Most filesystems need not implement + * this. It will usually only be called once, + * if 'getcwd' is called before 'chdir'. May + * be NULL. */ + Tcl_FSChdirProc *chdirProc; /* Function to process a 'Tcl_FSChdir()' call. + * If filesystems do not implement this, it + * will be emulated by a series of directory + * access checks. Otherwise, virtual + * filesystems which do implement it need only + * respond with a positive return result if + * the dirName is a valid directory in their + * filesystem. They need not remember the + * result, since that will be automatically + * remembered for use by GetCwd. Real + * filesystems should carry out the correct + * action (i.e. call the correct system + * 'chdir' api). If not implemented, then 'cd' + * and 'pwd' will fail inside the + * filesystem. */ +} Tcl_Filesystem; + +/* + * The following definitions are used as values for the 'linkAction' flag to + * Tcl_FSLink, or the linkProc of any filesystem. Any combination of flags can + * be given. For link creation, the linkProc should create a link which + * matches any of the types given. + * + * TCL_CREATE_SYMBOLIC_LINK - Create a symbolic or soft link. + * TCL_CREATE_HARD_LINK - Create a hard link. + */ + +#define TCL_CREATE_SYMBOLIC_LINK 0x01 +#define TCL_CREATE_HARD_LINK 0x02 + +/* + * The following structure represents the Notifier functions that you can + * override with the Tcl_SetNotifier call. + */ + +typedef struct Tcl_NotifierProcs { + Tcl_SetTimerProc *setTimerProc; + Tcl_WaitForEventProc *waitForEventProc; + Tcl_CreateFileHandlerProc *createFileHandlerProc; + Tcl_DeleteFileHandlerProc *deleteFileHandlerProc; + Tcl_InitNotifierProc *initNotifierProc; + Tcl_FinalizeNotifierProc *finalizeNotifierProc; + Tcl_AlertNotifierProc *alertNotifierProc; + Tcl_ServiceModeHookProc *serviceModeHookProc; +} Tcl_NotifierProcs; + +/* + * The following structure represents a user-defined encoding. It collects + * together all the functions that are used by the specific encoding. + */ + +typedef struct Tcl_EncodingType { + CONST char *encodingName; /* The name of the encoding, e.g. "euc-jp". + * This name is the unique key for this + * encoding type. */ + Tcl_EncodingConvertProc *toUtfProc; + /* Function to convert from external encoding + * into UTF-8. */ + Tcl_EncodingConvertProc *fromUtfProc; + /* Function to convert from UTF-8 into + * external encoding. */ + Tcl_EncodingFreeProc *freeProc; + /* If non-NULL, function to call when this + * encoding is deleted. */ + ClientData clientData; /* Arbitrary value associated with encoding + * type. Passed to conversion functions. */ + int nullSize; /* Number of zero bytes that signify + * end-of-string in this encoding. This number + * is used to determine the source string + * length when the srcLen argument is + * negative. Must be 1 or 2. */ +} Tcl_EncodingType; + +/* + * The following definitions are used as values for the conversion control + * flags argument when converting text from one character set to another: + * + * TCL_ENCODING_START - Signifies that the source buffer is the first + * block in a (potentially multi-block) input + * stream. Tells the conversion function to reset + * to an initial state and perform any + * initialization that needs to occur before the + * first byte is converted. If the source buffer + * contains the entire input stream to be + * converted, this flag should be set. + * TCL_ENCODING_END - Signifies that the source buffer is the last + * block in a (potentially multi-block) input + * stream. Tells the conversion routine to + * perform any finalization that needs to occur + * after the last byte is converted and then to + * reset to an initial state. If the source + * buffer contains the entire input stream to be + * converted, this flag should be set. + * TCL_ENCODING_STOPONERROR - If set, then the converter will return + * immediately upon encountering an invalid byte + * sequence or a source character that has no + * mapping in the target encoding. If clear, then + * the converter will skip the problem, + * substituting one or more "close" characters in + * the destination buffer and then continue to + * convert the source. + */ + +#define TCL_ENCODING_START 0x01 +#define TCL_ENCODING_END 0x02 +#define TCL_ENCODING_STOPONERROR 0x04 + +/* + * The following data structures and declarations are for the new Tcl parser. + */ + +/* + * For each word of a command, and for each piece of a word such as a variable + * reference, one of the following structures is created to describe the + * token. + */ + +typedef struct Tcl_Token { + int type; /* Type of token, such as TCL_TOKEN_WORD; see + * below for valid types. */ + CONST char *start; /* First character in token. */ + int size; /* Number of bytes in token. */ + int numComponents; /* If this token is composed of other tokens, + * this field tells how many of them there are + * (including components of components, etc.). + * The component tokens immediately follow + * this one. */ +} Tcl_Token; + +/* + * Type values defined for Tcl_Token structures. These values are defined as + * mask bits so that it's easy to check for collections of types. + * + * TCL_TOKEN_WORD - The token describes one word of a command, + * from the first non-blank character of the word + * (which may be " or {) up to but not including + * the space, semicolon, or bracket that + * terminates the word. NumComponents counts the + * total number of sub-tokens that make up the + * word. This includes, for example, sub-tokens + * of TCL_TOKEN_VARIABLE tokens. + * TCL_TOKEN_SIMPLE_WORD - This token is just like TCL_TOKEN_WORD except + * that the word is guaranteed to consist of a + * single TCL_TOKEN_TEXT sub-token. + * TCL_TOKEN_TEXT - The token describes a range of literal text + * that is part of a word. NumComponents is + * always 0. + * TCL_TOKEN_BS - The token describes a backslash sequence that + * must be collapsed. NumComponents is always 0. + * TCL_TOKEN_COMMAND - The token describes a command whose result + * must be substituted into the word. The token + * includes the enclosing brackets. NumComponents + * is always 0. + * TCL_TOKEN_VARIABLE - The token describes a variable substitution, + * including the dollar sign, variable name, and + * array index (if there is one) up through the + * right parentheses. NumComponents tells how + * many additional tokens follow to represent the + * variable name. The first token will be a + * TCL_TOKEN_TEXT token that describes the + * variable name. If the variable is an array + * reference then there will be one or more + * additional tokens, of type TCL_TOKEN_TEXT, + * TCL_TOKEN_BS, TCL_TOKEN_COMMAND, and + * TCL_TOKEN_VARIABLE, that describe the array + * index; numComponents counts the total number + * of nested tokens that make up the variable + * reference, including sub-tokens of + * TCL_TOKEN_VARIABLE tokens. + * TCL_TOKEN_SUB_EXPR - The token describes one subexpression of an + * expression, from the first non-blank character + * of the subexpression up to but not including + * the space, brace, or bracket that terminates + * the subexpression. NumComponents counts the + * total number of following subtokens that make + * up the subexpression; this includes all + * subtokens for any nested TCL_TOKEN_SUB_EXPR + * tokens. For example, a numeric value used as a + * primitive operand is described by a + * TCL_TOKEN_SUB_EXPR token followed by a + * TCL_TOKEN_TEXT token. A binary subexpression + * is described by a TCL_TOKEN_SUB_EXPR token + * followed by the TCL_TOKEN_OPERATOR token for + * the operator, then TCL_TOKEN_SUB_EXPR tokens + * for the left then the right operands. + * TCL_TOKEN_OPERATOR - The token describes one expression operator. + * An operator might be the name of a math + * function such as "abs". A TCL_TOKEN_OPERATOR + * token is always preceeded by one + * TCL_TOKEN_SUB_EXPR token for the operator's + * subexpression, and is followed by zero or more + * TCL_TOKEN_SUB_EXPR tokens for the operator's + * operands. NumComponents is always 0. + * TCL_TOKEN_EXPAND_WORD - This token is just like TCL_TOKEN_WORD except + * that it marks a word that began with the + * literal character prefix "{*}". This word is + * marked to be expanded - that is, broken into + * words after substitution is complete. + */ + +#define TCL_TOKEN_WORD 1 +#define TCL_TOKEN_SIMPLE_WORD 2 +#define TCL_TOKEN_TEXT 4 +#define TCL_TOKEN_BS 8 +#define TCL_TOKEN_COMMAND 16 +#define TCL_TOKEN_VARIABLE 32 +#define TCL_TOKEN_SUB_EXPR 64 +#define TCL_TOKEN_OPERATOR 128 +#define TCL_TOKEN_EXPAND_WORD 256 + +/* + * Parsing error types. On any parsing error, one of these values will be + * stored in the error field of the Tcl_Parse structure defined below. + */ + +#define TCL_PARSE_SUCCESS 0 +#define TCL_PARSE_QUOTE_EXTRA 1 +#define TCL_PARSE_BRACE_EXTRA 2 +#define TCL_PARSE_MISSING_BRACE 3 +#define TCL_PARSE_MISSING_BRACKET 4 +#define TCL_PARSE_MISSING_PAREN 5 +#define TCL_PARSE_MISSING_QUOTE 6 +#define TCL_PARSE_MISSING_VAR_BRACE 7 +#define TCL_PARSE_SYNTAX 8 +#define TCL_PARSE_BAD_NUMBER 9 + +/* + * A structure of the following type is filled in by Tcl_ParseCommand. It + * describes a single command parsed from an input string. + */ + +#define NUM_STATIC_TOKENS 20 + +typedef struct Tcl_Parse { + CONST char *commentStart; /* Pointer to # that begins the first of one + * or more comments preceding the command. */ + int commentSize; /* Number of bytes in comments (up through + * newline character that terminates the last + * comment). If there were no comments, this + * field is 0. */ + CONST char *commandStart; /* First character in first word of + * command. */ + int commandSize; /* Number of bytes in command, including first + * character of first word, up through the + * terminating newline, close bracket, or + * semicolon. */ + int numWords; /* Total number of words in command. May be + * 0. */ + Tcl_Token *tokenPtr; /* Pointer to first token representing the + * words of the command. Initially points to + * staticTokens, but may change to point to + * malloc-ed space if command exceeds space in + * staticTokens. */ + int numTokens; /* Total number of tokens in command. */ + int tokensAvailable; /* Total number of tokens available at + * *tokenPtr. */ + int errorType; /* One of the parsing error types defined + * above. */ + + /* + * The fields below are intended only for the private use of the parser. + * They should not be used by functions that invoke Tcl_ParseCommand. + */ + + CONST char *string; /* The original command string passed to + * Tcl_ParseCommand. */ + CONST char *end; /* Points to the character just after the last + * one in the command string. */ + Tcl_Interp *interp; /* Interpreter to use for error reporting, or + * NULL. */ + CONST char *term; /* Points to character in string that + * terminated most recent token. Filled in by + * ParseTokens. If an error occurs, points to + * beginning of region where the error + * occurred (e.g. the open brace if the close + * brace is missing). */ + int incomplete; /* This field is set to 1 by Tcl_ParseCommand + * if the command appears to be incomplete. + * This information is used by + * Tcl_CommandComplete. */ + Tcl_Token staticTokens[NUM_STATIC_TOKENS]; + /* Initial space for tokens for command. This + * space should be large enough to accommodate + * most commands; dynamic space is allocated + * for very large commands that don't fit + * here. */ +} Tcl_Parse; + +/* + * The following definitions are the error codes returned by the conversion + * routines: + * + * TCL_OK - All characters were converted. + * TCL_CONVERT_NOSPACE - The output buffer would not have been large + * enough for all of the converted data; as many + * characters as could fit were converted though. + * TCL_CONVERT_MULTIBYTE - The last few bytes in the source string were + * the beginning of a multibyte sequence, but + * more bytes were needed to complete this + * sequence. A subsequent call to the conversion + * routine should pass the beginning of this + * unconverted sequence plus additional bytes + * from the source stream to properly convert the + * formerly split-up multibyte sequence. + * TCL_CONVERT_SYNTAX - The source stream contained an invalid + * character sequence. This may occur if the + * input stream has been damaged or if the input + * encoding method was misidentified. This error + * is reported only if TCL_ENCODING_STOPONERROR + * was specified. + * TCL_CONVERT_UNKNOWN - The source string contained a character that + * could not be represented in the target + * encoding. This error is reported only if + * TCL_ENCODING_STOPONERROR was specified. + */ + +#define TCL_CONVERT_MULTIBYTE -1 +#define TCL_CONVERT_SYNTAX -2 +#define TCL_CONVERT_UNKNOWN -3 +#define TCL_CONVERT_NOSPACE -4 + +/* + * The maximum number of bytes that are necessary to represent a single + * Unicode character in UTF-8. The valid values should be 3 or 6 (or perhaps 1 + * if we want to support a non-unicode enabled core). If 3, then Tcl_UniChar + * must be 2-bytes in size (UCS-2) (the default). If 6, then Tcl_UniChar must + * be 4-bytes in size (UCS-4). At this time UCS-2 mode is the default and + * recommended mode. UCS-4 is experimental and not recommended. It works for + * the core, but most extensions expect UCS-2. + */ + +#ifndef TCL_UTF_MAX +#define TCL_UTF_MAX 3 +#endif + +/* + * This represents a Unicode character. Any changes to this should also be + * reflected in regcustom.h. + */ + +#if TCL_UTF_MAX > 3 + /* + * unsigned int isn't 100% accurate as it should be a strict 4-byte value + * (perhaps wchar_t). 64-bit systems may have troubles. The size of this + * value must be reflected correctly in regcustom.h and + * in tclEncoding.c. + * XXX: Tcl is currently UCS-2 and planning UTF-16 for the Unicode + * XXX: string rep that Tcl_UniChar represents. Changing the size + * XXX: of Tcl_UniChar is /not/ supported. + */ +typedef unsigned int Tcl_UniChar; +#else +typedef unsigned short Tcl_UniChar; +#endif + +/* + * TIP #59: The following structure is used in calls 'Tcl_RegisterConfig' to + * provide the system with the embedded configuration data. + */ + +typedef struct Tcl_Config { + CONST char *key; /* Configuration key to register. ASCII + * encoded, thus UTF-8 */ + CONST char *value; /* The value associated with the key. System + * encoding */ +} Tcl_Config; + +/* + * Flags for TIP#143 limits, detailing which limits are active in an + * interpreter. Used for Tcl_{Add,Remove}LimitHandler type argument. + */ + +#define TCL_LIMIT_COMMANDS 0x01 +#define TCL_LIMIT_TIME 0x02 + +/* + * Structure containing information about a limit handler to be called when a + * command- or time-limit is exceeded by an interpreter. + */ + +typedef void (Tcl_LimitHandlerProc) _ANSI_ARGS_((ClientData clientData, + Tcl_Interp *interp)); +typedef void (Tcl_LimitHandlerDeleteProc) _ANSI_ARGS_((ClientData clientData)); + +typedef struct mp_int mp_int; +#define MP_INT_DECLARED +typedef unsigned int mp_digit; +#define MP_DIGIT_DECLARED + +/* + * The following constant is used to test for older versions of Tcl in the + * stubs tables. + * + * Jan Nijtman's plus patch uses 0xFCA1BACF, so we need to pick a different + * value since the stubs tables don't match. + */ + +#define TCL_STUB_MAGIC ((int)0xFCA3BACF) + +/* + * The following function is required to be defined in all stubs aware + * extensions. The function is actually implemented in the stub library, not + * the main Tcl library, although there is a trivial implementation in the + * main library in case an extension is statically linked into an application. + */ + +EXTERN CONST char * Tcl_InitStubs _ANSI_ARGS_((Tcl_Interp *interp, + CONST char *version, int exact)); +EXTERN CONST char * TclTomMathInitializeStubs _ANSI_ARGS_(( + Tcl_Interp *interp, CONST char *version, + int epoch, int revision)); + +#ifndef USE_TCL_STUBS + +/* + * When not using stubs, make it a macro. + */ + +#define Tcl_InitStubs(interp, version, exact) \ + Tcl_PkgInitStubsCheck(interp, version, exact) + +#endif + + /* + * TODO - tommath stubs export goes here! + */ + + +/* + * Public functions that are not accessible via the stubs table. + * Tcl_GetMemoryInfo is needed for AOLserver. [Bug 1868171] + */ + +EXTERN void Tcl_Main _ANSI_ARGS_((int argc, char **argv, + Tcl_AppInitProc *appInitProc)); +EXTERN CONST char * Tcl_PkgInitStubsCheck _ANSI_ARGS_((Tcl_Interp *interp, + CONST char *version, int exact)); +#if defined(TCL_THREADS) && defined(USE_THREAD_ALLOC) +EXTERN void Tcl_GetMemoryInfo _ANSI_ARGS_((Tcl_DString *dsPtr)); +#endif + +/* + * Include the public function declarations that are accessible via the stubs + * table. + */ + +#include "tclDecls.h" + +/* + * Include platform specific public function declarations that are accessible + * via the stubs table. + */ + +#include "tclPlatDecls.h" + +/* + * The following declarations either map ckalloc and ckfree to malloc and + * free, or they map them to functions with all sorts of debugging hooks + * defined in tclCkalloc.c. + */ + +#ifdef TCL_MEM_DEBUG + +# define ckalloc(x) Tcl_DbCkalloc(x, __FILE__, __LINE__) +# define ckfree(x) Tcl_DbCkfree(x, __FILE__, __LINE__) +# define ckrealloc(x,y) Tcl_DbCkrealloc((x), (y),__FILE__, __LINE__) +# define attemptckalloc(x) Tcl_AttemptDbCkalloc(x, __FILE__, __LINE__) +# define attemptckrealloc(x,y) Tcl_AttemptDbCkrealloc((x), (y), __FILE__, __LINE__) + +#else /* !TCL_MEM_DEBUG */ + +/* + * If we are not using the debugging allocator, we should call the Tcl_Alloc, + * et al. routines in order to guarantee that every module is using the same + * memory allocator both inside and outside of the Tcl library. + */ + +# define ckalloc(x) Tcl_Alloc(x) +# define ckfree(x) Tcl_Free(x) +# define ckrealloc(x,y) Tcl_Realloc(x,y) +# define attemptckalloc(x) Tcl_AttemptAlloc(x) +# define attemptckrealloc(x,y) Tcl_AttemptRealloc(x,y) +# undef Tcl_InitMemory +# define Tcl_InitMemory(x) +# undef Tcl_DumpActiveMemory +# define Tcl_DumpActiveMemory(x) +# undef Tcl_ValidateAllMemory +# define Tcl_ValidateAllMemory(x,y) + +#endif /* !TCL_MEM_DEBUG */ + +#ifdef TCL_MEM_DEBUG +# define Tcl_IncrRefCount(objPtr) \ + Tcl_DbIncrRefCount(objPtr, __FILE__, __LINE__) +# define Tcl_DecrRefCount(objPtr) \ + Tcl_DbDecrRefCount(objPtr, __FILE__, __LINE__) +# define Tcl_IsShared(objPtr) \ + Tcl_DbIsShared(objPtr, __FILE__, __LINE__) +#else +# define Tcl_IncrRefCount(objPtr) \ + ++(objPtr)->refCount + /* + * Use do/while0 idiom for optimum correctness without compiler warnings + * http://c2.com/cgi/wiki?TrivialDoWhileLoop + */ +# define Tcl_DecrRefCount(objPtr) \ + do { if (--(objPtr)->refCount <= 0) TclFreeObj(objPtr); } while(0) +# define Tcl_IsShared(objPtr) \ + ((objPtr)->refCount > 1) +#endif + +/* + * Macros and definitions that help to debug the use of Tcl objects. When + * TCL_MEM_DEBUG is defined, the Tcl_New declarations are overridden to call + * debugging versions of the object creation functions. + */ + +#ifdef TCL_MEM_DEBUG +# undef Tcl_NewBignumObj +# define Tcl_NewBignumObj(val) \ + Tcl_DbNewBignumObj(val, __FILE__, __LINE__) +# undef Tcl_NewBooleanObj +# define Tcl_NewBooleanObj(val) \ + Tcl_DbNewBooleanObj(val, __FILE__, __LINE__) +# undef Tcl_NewByteArrayObj +# define Tcl_NewByteArrayObj(bytes, len) \ + Tcl_DbNewByteArrayObj(bytes, len, __FILE__, __LINE__) +# undef Tcl_NewDoubleObj +# define Tcl_NewDoubleObj(val) \ + Tcl_DbNewDoubleObj(val, __FILE__, __LINE__) +# undef Tcl_NewIntObj +# define Tcl_NewIntObj(val) \ + Tcl_DbNewLongObj(val, __FILE__, __LINE__) +# undef Tcl_NewListObj +# define Tcl_NewListObj(objc, objv) \ + Tcl_DbNewListObj(objc, objv, __FILE__, __LINE__) +# undef Tcl_NewLongObj +# define Tcl_NewLongObj(val) \ + Tcl_DbNewLongObj(val, __FILE__, __LINE__) +# undef Tcl_NewObj +# define Tcl_NewObj() \ + Tcl_DbNewObj(__FILE__, __LINE__) +# undef Tcl_NewStringObj +# define Tcl_NewStringObj(bytes, len) \ + Tcl_DbNewStringObj(bytes, len, __FILE__, __LINE__) +# undef Tcl_NewWideIntObj +# define Tcl_NewWideIntObj(val) \ + Tcl_DbNewWideIntObj(val, __FILE__, __LINE__) +#endif /* TCL_MEM_DEBUG */ + +/* + * Macros for clients to use to access fields of hash entries: + */ + +#define Tcl_GetHashValue(h) ((h)->clientData) +#define Tcl_SetHashValue(h, value) ((h)->clientData = (ClientData) (value)) +#define Tcl_GetHashKey(tablePtr, h) \ + ((char *) (((tablePtr)->keyType == TCL_ONE_WORD_KEYS || \ + (tablePtr)->keyType == TCL_CUSTOM_PTR_KEYS) \ + ? (h)->key.oneWordValue \ + : (h)->key.string)) + +/* + * Macros to use for clients to use to invoke find and create functions for + * hash tables: + */ + +#undef Tcl_FindHashEntry +#define Tcl_FindHashEntry(tablePtr, key) \ + (*((tablePtr)->findProc))(tablePtr, key) +#undef Tcl_CreateHashEntry +#define Tcl_CreateHashEntry(tablePtr, key, newPtr) \ + (*((tablePtr)->createProc))(tablePtr, key, newPtr) + +/* + * Macros that eliminate the overhead of the thread synchronization functions + * when compiling without thread support. + */ + +#ifndef TCL_THREADS +#undef Tcl_MutexLock +#define Tcl_MutexLock(mutexPtr) +#undef Tcl_MutexUnlock +#define Tcl_MutexUnlock(mutexPtr) +#undef Tcl_MutexFinalize +#define Tcl_MutexFinalize(mutexPtr) +#undef Tcl_ConditionNotify +#define Tcl_ConditionNotify(condPtr) +#undef Tcl_ConditionWait +#define Tcl_ConditionWait(condPtr, mutexPtr, timePtr) +#undef Tcl_ConditionFinalize +#define Tcl_ConditionFinalize(condPtr) +#endif /* TCL_THREADS */ + +#ifndef TCL_NO_DEPRECATED + /* + * Deprecated Tcl functions: + */ + +# undef Tcl_EvalObj +# define Tcl_EvalObj(interp,objPtr) \ + Tcl_EvalObjEx((interp),(objPtr),0) +# undef Tcl_GlobalEvalObj +# define Tcl_GlobalEvalObj(interp,objPtr) \ + Tcl_EvalObjEx((interp),(objPtr),TCL_EVAL_GLOBAL) + + /* + * These function have been renamed. The old names are deprecated, but we + * define these macros for backwards compatibilty. + */ + +# define Tcl_Ckalloc Tcl_Alloc +# define Tcl_Ckfree Tcl_Free +# define Tcl_Ckrealloc Tcl_Realloc +# define Tcl_Return Tcl_SetResult +# define Tcl_TildeSubst Tcl_TranslateFileName +# define panic Tcl_Panic +# define panicVA Tcl_PanicVA +#endif + +/* + * Convenience declaration of Tcl_AppInit for backwards compatibility. This + * function is not *implemented* by the tcl library, so the storage class is + * neither DLLEXPORT nor DLLIMPORT. + */ + +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS + +EXTERN int Tcl_AppInit _ANSI_ARGS_((Tcl_Interp *interp)); + +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLIMPORT + +#endif /* RC_INVOKED */ + +/* + * end block for C++ + */ + +#ifdef __cplusplus +} +#endif + +#endif /* _TCL */ + +/* + * Local Variables: + * mode: c + * c-basic-offset: 4 + * fill-column: 78 + * End: + */ diff --git a/cobroutines/tclDecls.h b/cobroutines/tclDecls.h new file mode 100644 index 0000000..c3099ff --- /dev/null +++ b/cobroutines/tclDecls.h @@ -0,0 +1,6548 @@ +/* + * tclDecls.h -- + * + * Declarations of functions in the platform independent public Tcl API. + * + * Copyright (c) 1998-1999 by Scriptics Corporation. + * + * See the file "license.terms" for information on usage and redistribution + * of this file, and for a DISCLAIMER OF ALL WARRANTIES. + * + * RCS: @(#) $Id: tclDecls.h,v 1.130.2.1 2008/11/18 07:02:17 nijtmans Exp $ + */ + +#ifndef _TCLDECLS +#define _TCLDECLS + +#undef TCL_STORAGE_CLASS +#ifdef BUILD_tcl +# define TCL_STORAGE_CLASS DLLEXPORT +#else +# ifdef USE_TCL_STUBS +# define TCL_STORAGE_CLASS +# else +# define TCL_STORAGE_CLASS DLLIMPORT +# endif +#endif + +/* + * WARNING: This file is automatically generated by the tools/genStubs.tcl + * script. Any modifications to the function declarations below should be made + * in the generic/tcl.decls script. + */ + +/* !BEGIN!: Do not edit below this line. */ + +/* + * Exported function declarations: + */ + +#ifndef Tcl_PkgProvideEx_TCL_DECLARED +#define Tcl_PkgProvideEx_TCL_DECLARED +/* 0 */ +EXTERN int Tcl_PkgProvideEx (Tcl_Interp* interp, + CONST char* name, CONST char* version, + ClientData clientData); +#endif +#ifndef Tcl_PkgRequireEx_TCL_DECLARED +#define Tcl_PkgRequireEx_TCL_DECLARED +/* 1 */ +EXTERN CONST84_RETURN char * Tcl_PkgRequireEx (Tcl_Interp * interp, + CONST char * name, CONST char * version, + int exact, ClientData * clientDataPtr); +#endif +#ifndef Tcl_Panic_TCL_DECLARED +#define Tcl_Panic_TCL_DECLARED +/* 2 */ +EXTERN void Tcl_Panic (CONST char * format, ...); +#endif +#ifndef Tcl_Alloc_TCL_DECLARED +#define Tcl_Alloc_TCL_DECLARED +/* 3 */ +EXTERN char * Tcl_Alloc (unsigned int size); +#endif +#ifndef Tcl_Free_TCL_DECLARED +#define Tcl_Free_TCL_DECLARED +/* 4 */ +EXTERN void Tcl_Free (char * ptr); +#endif +#ifndef Tcl_Realloc_TCL_DECLARED +#define Tcl_Realloc_TCL_DECLARED +/* 5 */ +EXTERN char * Tcl_Realloc (char * ptr, unsigned int size); +#endif +#ifndef Tcl_DbCkalloc_TCL_DECLARED +#define Tcl_DbCkalloc_TCL_DECLARED +/* 6 */ +EXTERN char * Tcl_DbCkalloc (unsigned int size, CONST char * file, + int line); +#endif +#ifndef Tcl_DbCkfree_TCL_DECLARED +#define Tcl_DbCkfree_TCL_DECLARED +/* 7 */ +EXTERN int Tcl_DbCkfree (char * ptr, CONST char * file, + int line); +#endif +#ifndef Tcl_DbCkrealloc_TCL_DECLARED +#define Tcl_DbCkrealloc_TCL_DECLARED +/* 8 */ +EXTERN char * Tcl_DbCkrealloc (char * ptr, unsigned int size, + CONST char * file, int line); +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_CreateFileHandler_TCL_DECLARED +#define Tcl_CreateFileHandler_TCL_DECLARED +/* 9 */ +EXTERN void Tcl_CreateFileHandler (int fd, int mask, + Tcl_FileProc * proc, ClientData clientData); +#endif +#endif /* UNIX */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_CreateFileHandler_TCL_DECLARED +#define Tcl_CreateFileHandler_TCL_DECLARED +/* 9 */ +EXTERN void Tcl_CreateFileHandler (int fd, int mask, + Tcl_FileProc * proc, ClientData clientData); +#endif +#endif /* MACOSX */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_DeleteFileHandler_TCL_DECLARED +#define Tcl_DeleteFileHandler_TCL_DECLARED +/* 10 */ +EXTERN void Tcl_DeleteFileHandler (int fd); +#endif +#endif /* UNIX */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_DeleteFileHandler_TCL_DECLARED +#define Tcl_DeleteFileHandler_TCL_DECLARED +/* 10 */ +EXTERN void Tcl_DeleteFileHandler (int fd); +#endif +#endif /* MACOSX */ +#ifndef Tcl_SetTimer_TCL_DECLARED +#define Tcl_SetTimer_TCL_DECLARED +/* 11 */ +EXTERN void Tcl_SetTimer (Tcl_Time * timePtr); +#endif +#ifndef Tcl_Sleep_TCL_DECLARED +#define Tcl_Sleep_TCL_DECLARED +/* 12 */ +EXTERN void Tcl_Sleep (int ms); +#endif +#ifndef Tcl_WaitForEvent_TCL_DECLARED +#define Tcl_WaitForEvent_TCL_DECLARED +/* 13 */ +EXTERN int Tcl_WaitForEvent (Tcl_Time * timePtr); +#endif +#ifndef Tcl_AppendAllObjTypes_TCL_DECLARED +#define Tcl_AppendAllObjTypes_TCL_DECLARED +/* 14 */ +EXTERN int Tcl_AppendAllObjTypes (Tcl_Interp * interp, + Tcl_Obj * objPtr); +#endif +#ifndef Tcl_AppendStringsToObj_TCL_DECLARED +#define Tcl_AppendStringsToObj_TCL_DECLARED +/* 15 */ +EXTERN void Tcl_AppendStringsToObj (Tcl_Obj * objPtr, ...); +#endif +#ifndef Tcl_AppendToObj_TCL_DECLARED +#define Tcl_AppendToObj_TCL_DECLARED +/* 16 */ +EXTERN void Tcl_AppendToObj (Tcl_Obj* objPtr, CONST char* bytes, + int length); +#endif +#ifndef Tcl_ConcatObj_TCL_DECLARED +#define Tcl_ConcatObj_TCL_DECLARED +/* 17 */ +EXTERN Tcl_Obj * Tcl_ConcatObj (int objc, Tcl_Obj *CONST objv[]); +#endif +#ifndef Tcl_ConvertToType_TCL_DECLARED +#define Tcl_ConvertToType_TCL_DECLARED +/* 18 */ +EXTERN int Tcl_ConvertToType (Tcl_Interp * interp, + Tcl_Obj * objPtr, Tcl_ObjType * typePtr); +#endif +#ifndef Tcl_DbDecrRefCount_TCL_DECLARED +#define Tcl_DbDecrRefCount_TCL_DECLARED +/* 19 */ +EXTERN void Tcl_DbDecrRefCount (Tcl_Obj * objPtr, + CONST char * file, int line); +#endif +#ifndef Tcl_DbIncrRefCount_TCL_DECLARED +#define Tcl_DbIncrRefCount_TCL_DECLARED +/* 20 */ +EXTERN void Tcl_DbIncrRefCount (Tcl_Obj * objPtr, + CONST char * file, int line); +#endif +#ifndef Tcl_DbIsShared_TCL_DECLARED +#define Tcl_DbIsShared_TCL_DECLARED +/* 21 */ +EXTERN int Tcl_DbIsShared (Tcl_Obj * objPtr, CONST char * file, + int line); +#endif +#ifndef Tcl_DbNewBooleanObj_TCL_DECLARED +#define Tcl_DbNewBooleanObj_TCL_DECLARED +/* 22 */ +EXTERN Tcl_Obj * Tcl_DbNewBooleanObj (int boolValue, + CONST char * file, int line); +#endif +#ifndef Tcl_DbNewByteArrayObj_TCL_DECLARED +#define Tcl_DbNewByteArrayObj_TCL_DECLARED +/* 23 */ +EXTERN Tcl_Obj * Tcl_DbNewByteArrayObj (CONST unsigned char * bytes, + int length, CONST char * file, int line); +#endif +#ifndef Tcl_DbNewDoubleObj_TCL_DECLARED +#define Tcl_DbNewDoubleObj_TCL_DECLARED +/* 24 */ +EXTERN Tcl_Obj * Tcl_DbNewDoubleObj (double doubleValue, + CONST char * file, int line); +#endif +#ifndef Tcl_DbNewListObj_TCL_DECLARED +#define Tcl_DbNewListObj_TCL_DECLARED +/* 25 */ +EXTERN Tcl_Obj * Tcl_DbNewListObj (int objc, Tcl_Obj *CONST * objv, + CONST char * file, int line); +#endif +#ifndef Tcl_DbNewLongObj_TCL_DECLARED +#define Tcl_DbNewLongObj_TCL_DECLARED +/* 26 */ +EXTERN Tcl_Obj * Tcl_DbNewLongObj (long longValue, CONST char * file, + int line); +#endif +#ifndef Tcl_DbNewObj_TCL_DECLARED +#define Tcl_DbNewObj_TCL_DECLARED +/* 27 */ +EXTERN Tcl_Obj * Tcl_DbNewObj (CONST char * file, int line); +#endif +#ifndef Tcl_DbNewStringObj_TCL_DECLARED +#define Tcl_DbNewStringObj_TCL_DECLARED +/* 28 */ +EXTERN Tcl_Obj * Tcl_DbNewStringObj (CONST char * bytes, int length, + CONST char * file, int line); +#endif +#ifndef Tcl_DuplicateObj_TCL_DECLARED +#define Tcl_DuplicateObj_TCL_DECLARED +/* 29 */ +EXTERN Tcl_Obj * Tcl_DuplicateObj (Tcl_Obj * objPtr); +#endif +#ifndef TclFreeObj_TCL_DECLARED +#define TclFreeObj_TCL_DECLARED +/* 30 */ +EXTERN void TclFreeObj (Tcl_Obj * objPtr); +#endif +#ifndef Tcl_GetBoolean_TCL_DECLARED +#define Tcl_GetBoolean_TCL_DECLARED +/* 31 */ +EXTERN int Tcl_GetBoolean (Tcl_Interp * interp, + CONST char * src, int * boolPtr); +#endif +#ifndef Tcl_GetBooleanFromObj_TCL_DECLARED +#define Tcl_GetBooleanFromObj_TCL_DECLARED +/* 32 */ +EXTERN int Tcl_GetBooleanFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, int * boolPtr); +#endif +#ifndef Tcl_GetByteArrayFromObj_TCL_DECLARED +#define Tcl_GetByteArrayFromObj_TCL_DECLARED +/* 33 */ +EXTERN unsigned char * Tcl_GetByteArrayFromObj (Tcl_Obj * objPtr, + int * lengthPtr); +#endif +#ifndef Tcl_GetDouble_TCL_DECLARED +#define Tcl_GetDouble_TCL_DECLARED +/* 34 */ +EXTERN int Tcl_GetDouble (Tcl_Interp * interp, CONST char * src, + double * doublePtr); +#endif +#ifndef Tcl_GetDoubleFromObj_TCL_DECLARED +#define Tcl_GetDoubleFromObj_TCL_DECLARED +/* 35 */ +EXTERN int Tcl_GetDoubleFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, double * doublePtr); +#endif +#ifndef Tcl_GetIndexFromObj_TCL_DECLARED +#define Tcl_GetIndexFromObj_TCL_DECLARED +/* 36 */ +EXTERN int Tcl_GetIndexFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, CONST84 char ** tablePtr, + CONST char * msg, int flags, int * indexPtr); +#endif +#ifndef Tcl_GetInt_TCL_DECLARED +#define Tcl_GetInt_TCL_DECLARED +/* 37 */ +EXTERN int Tcl_GetInt (Tcl_Interp * interp, CONST char * src, + int * intPtr); +#endif +#ifndef Tcl_GetIntFromObj_TCL_DECLARED +#define Tcl_GetIntFromObj_TCL_DECLARED +/* 38 */ +EXTERN int Tcl_GetIntFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, int * intPtr); +#endif +#ifndef Tcl_GetLongFromObj_TCL_DECLARED +#define Tcl_GetLongFromObj_TCL_DECLARED +/* 39 */ +EXTERN int Tcl_GetLongFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, long * longPtr); +#endif +#ifndef Tcl_GetObjType_TCL_DECLARED +#define Tcl_GetObjType_TCL_DECLARED +/* 40 */ +EXTERN Tcl_ObjType * Tcl_GetObjType (CONST char * typeName); +#endif +#ifndef Tcl_GetStringFromObj_TCL_DECLARED +#define Tcl_GetStringFromObj_TCL_DECLARED +/* 41 */ +EXTERN char * Tcl_GetStringFromObj (Tcl_Obj * objPtr, + int * lengthPtr); +#endif +#ifndef Tcl_InvalidateStringRep_TCL_DECLARED +#define Tcl_InvalidateStringRep_TCL_DECLARED +/* 42 */ +EXTERN void Tcl_InvalidateStringRep (Tcl_Obj * objPtr); +#endif +#ifndef Tcl_ListObjAppendList_TCL_DECLARED +#define Tcl_ListObjAppendList_TCL_DECLARED +/* 43 */ +EXTERN int Tcl_ListObjAppendList (Tcl_Interp * interp, + Tcl_Obj * listPtr, Tcl_Obj * elemListPtr); +#endif +#ifndef Tcl_ListObjAppendElement_TCL_DECLARED +#define Tcl_ListObjAppendElement_TCL_DECLARED +/* 44 */ +EXTERN int Tcl_ListObjAppendElement (Tcl_Interp * interp, + Tcl_Obj * listPtr, Tcl_Obj * objPtr); +#endif +#ifndef Tcl_ListObjGetElements_TCL_DECLARED +#define Tcl_ListObjGetElements_TCL_DECLARED +/* 45 */ +EXTERN int Tcl_ListObjGetElements (Tcl_Interp * interp, + Tcl_Obj * listPtr, int * objcPtr, + Tcl_Obj *** objvPtr); +#endif +#ifndef Tcl_ListObjIndex_TCL_DECLARED +#define Tcl_ListObjIndex_TCL_DECLARED +/* 46 */ +EXTERN int Tcl_ListObjIndex (Tcl_Interp * interp, + Tcl_Obj * listPtr, int index, + Tcl_Obj ** objPtrPtr); +#endif +#ifndef Tcl_ListObjLength_TCL_DECLARED +#define Tcl_ListObjLength_TCL_DECLARED +/* 47 */ +EXTERN int Tcl_ListObjLength (Tcl_Interp * interp, + Tcl_Obj * listPtr, int * lengthPtr); +#endif +#ifndef Tcl_ListObjReplace_TCL_DECLARED +#define Tcl_ListObjReplace_TCL_DECLARED +/* 48 */ +EXTERN int Tcl_ListObjReplace (Tcl_Interp * interp, + Tcl_Obj * listPtr, int first, int count, + int objc, Tcl_Obj *CONST objv[]); +#endif +#ifndef Tcl_NewBooleanObj_TCL_DECLARED +#define Tcl_NewBooleanObj_TCL_DECLARED +/* 49 */ +EXTERN Tcl_Obj * Tcl_NewBooleanObj (int boolValue); +#endif +#ifndef Tcl_NewByteArrayObj_TCL_DECLARED +#define Tcl_NewByteArrayObj_TCL_DECLARED +/* 50 */ +EXTERN Tcl_Obj * Tcl_NewByteArrayObj (CONST unsigned char* bytes, + int length); +#endif +#ifndef Tcl_NewDoubleObj_TCL_DECLARED +#define Tcl_NewDoubleObj_TCL_DECLARED +/* 51 */ +EXTERN Tcl_Obj * Tcl_NewDoubleObj (double doubleValue); +#endif +#ifndef Tcl_NewIntObj_TCL_DECLARED +#define Tcl_NewIntObj_TCL_DECLARED +/* 52 */ +EXTERN Tcl_Obj * Tcl_NewIntObj (int intValue); +#endif +#ifndef Tcl_NewListObj_TCL_DECLARED +#define Tcl_NewListObj_TCL_DECLARED +/* 53 */ +EXTERN Tcl_Obj * Tcl_NewListObj (int objc, Tcl_Obj *CONST objv[]); +#endif +#ifndef Tcl_NewLongObj_TCL_DECLARED +#define Tcl_NewLongObj_TCL_DECLARED +/* 54 */ +EXTERN Tcl_Obj * Tcl_NewLongObj (long longValue); +#endif +#ifndef Tcl_NewObj_TCL_DECLARED +#define Tcl_NewObj_TCL_DECLARED +/* 55 */ +EXTERN Tcl_Obj * Tcl_NewObj (void); +#endif +#ifndef Tcl_NewStringObj_TCL_DECLARED +#define Tcl_NewStringObj_TCL_DECLARED +/* 56 */ +EXTERN Tcl_Obj * Tcl_NewStringObj (CONST char * bytes, int length); +#endif +#ifndef Tcl_SetBooleanObj_TCL_DECLARED +#define Tcl_SetBooleanObj_TCL_DECLARED +/* 57 */ +EXTERN void Tcl_SetBooleanObj (Tcl_Obj * objPtr, int boolValue); +#endif +#ifndef Tcl_SetByteArrayLength_TCL_DECLARED +#define Tcl_SetByteArrayLength_TCL_DECLARED +/* 58 */ +EXTERN unsigned char * Tcl_SetByteArrayLength (Tcl_Obj * objPtr, int length); +#endif +#ifndef Tcl_SetByteArrayObj_TCL_DECLARED +#define Tcl_SetByteArrayObj_TCL_DECLARED +/* 59 */ +EXTERN void Tcl_SetByteArrayObj (Tcl_Obj * objPtr, + CONST unsigned char * bytes, int length); +#endif +#ifndef Tcl_SetDoubleObj_TCL_DECLARED +#define Tcl_SetDoubleObj_TCL_DECLARED +/* 60 */ +EXTERN void Tcl_SetDoubleObj (Tcl_Obj * objPtr, + double doubleValue); +#endif +#ifndef Tcl_SetIntObj_TCL_DECLARED +#define Tcl_SetIntObj_TCL_DECLARED +/* 61 */ +EXTERN void Tcl_SetIntObj (Tcl_Obj * objPtr, int intValue); +#endif +#ifndef Tcl_SetListObj_TCL_DECLARED +#define Tcl_SetListObj_TCL_DECLARED +/* 62 */ +EXTERN void Tcl_SetListObj (Tcl_Obj * objPtr, int objc, + Tcl_Obj *CONST objv[]); +#endif +#ifndef Tcl_SetLongObj_TCL_DECLARED +#define Tcl_SetLongObj_TCL_DECLARED +/* 63 */ +EXTERN void Tcl_SetLongObj (Tcl_Obj * objPtr, long longValue); +#endif +#ifndef Tcl_SetObjLength_TCL_DECLARED +#define Tcl_SetObjLength_TCL_DECLARED +/* 64 */ +EXTERN void Tcl_SetObjLength (Tcl_Obj * objPtr, int length); +#endif +#ifndef Tcl_SetStringObj_TCL_DECLARED +#define Tcl_SetStringObj_TCL_DECLARED +/* 65 */ +EXTERN void Tcl_SetStringObj (Tcl_Obj* objPtr, CONST char* bytes, + int length); +#endif +#ifndef Tcl_AddErrorInfo_TCL_DECLARED +#define Tcl_AddErrorInfo_TCL_DECLARED +/* 66 */ +EXTERN void Tcl_AddErrorInfo (Tcl_Interp * interp, + CONST char * message); +#endif +#ifndef Tcl_AddObjErrorInfo_TCL_DECLARED +#define Tcl_AddObjErrorInfo_TCL_DECLARED +/* 67 */ +EXTERN void Tcl_AddObjErrorInfo (Tcl_Interp * interp, + CONST char * message, int length); +#endif +#ifndef Tcl_AllowExceptions_TCL_DECLARED +#define Tcl_AllowExceptions_TCL_DECLARED +/* 68 */ +EXTERN void Tcl_AllowExceptions (Tcl_Interp * interp); +#endif +#ifndef Tcl_AppendElement_TCL_DECLARED +#define Tcl_AppendElement_TCL_DECLARED +/* 69 */ +EXTERN void Tcl_AppendElement (Tcl_Interp * interp, + CONST char * element); +#endif +#ifndef Tcl_AppendResult_TCL_DECLARED +#define Tcl_AppendResult_TCL_DECLARED +/* 70 */ +EXTERN void Tcl_AppendResult (Tcl_Interp * interp, ...); +#endif +#ifndef Tcl_AsyncCreate_TCL_DECLARED +#define Tcl_AsyncCreate_TCL_DECLARED +/* 71 */ +EXTERN Tcl_AsyncHandler Tcl_AsyncCreate (Tcl_AsyncProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_AsyncDelete_TCL_DECLARED +#define Tcl_AsyncDelete_TCL_DECLARED +/* 72 */ +EXTERN void Tcl_AsyncDelete (Tcl_AsyncHandler async); +#endif +#ifndef Tcl_AsyncInvoke_TCL_DECLARED +#define Tcl_AsyncInvoke_TCL_DECLARED +/* 73 */ +EXTERN int Tcl_AsyncInvoke (Tcl_Interp * interp, int code); +#endif +#ifndef Tcl_AsyncMark_TCL_DECLARED +#define Tcl_AsyncMark_TCL_DECLARED +/* 74 */ +EXTERN void Tcl_AsyncMark (Tcl_AsyncHandler async); +#endif +#ifndef Tcl_AsyncReady_TCL_DECLARED +#define Tcl_AsyncReady_TCL_DECLARED +/* 75 */ +EXTERN int Tcl_AsyncReady (void); +#endif +#ifndef Tcl_BackgroundError_TCL_DECLARED +#define Tcl_BackgroundError_TCL_DECLARED +/* 76 */ +EXTERN void Tcl_BackgroundError (Tcl_Interp * interp); +#endif +#ifndef Tcl_Backslash_TCL_DECLARED +#define Tcl_Backslash_TCL_DECLARED +/* 77 */ +EXTERN char Tcl_Backslash (CONST char * src, int * readPtr); +#endif +#ifndef Tcl_BadChannelOption_TCL_DECLARED +#define Tcl_BadChannelOption_TCL_DECLARED +/* 78 */ +EXTERN int Tcl_BadChannelOption (Tcl_Interp * interp, + CONST char * optionName, + CONST char * optionList); +#endif +#ifndef Tcl_CallWhenDeleted_TCL_DECLARED +#define Tcl_CallWhenDeleted_TCL_DECLARED +/* 79 */ +EXTERN void Tcl_CallWhenDeleted (Tcl_Interp * interp, + Tcl_InterpDeleteProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_CancelIdleCall_TCL_DECLARED +#define Tcl_CancelIdleCall_TCL_DECLARED +/* 80 */ +EXTERN void Tcl_CancelIdleCall (Tcl_IdleProc * idleProc, + ClientData clientData); +#endif +#ifndef Tcl_Close_TCL_DECLARED +#define Tcl_Close_TCL_DECLARED +/* 81 */ +EXTERN int Tcl_Close (Tcl_Interp * interp, Tcl_Channel chan); +#endif +#ifndef Tcl_CommandComplete_TCL_DECLARED +#define Tcl_CommandComplete_TCL_DECLARED +/* 82 */ +EXTERN int Tcl_CommandComplete (CONST char * cmd); +#endif +#ifndef Tcl_Concat_TCL_DECLARED +#define Tcl_Concat_TCL_DECLARED +/* 83 */ +EXTERN char * Tcl_Concat (int argc, CONST84 char * CONST * argv); +#endif +#ifndef Tcl_ConvertElement_TCL_DECLARED +#define Tcl_ConvertElement_TCL_DECLARED +/* 84 */ +EXTERN int Tcl_ConvertElement (CONST char * src, char * dst, + int flags); +#endif +#ifndef Tcl_ConvertCountedElement_TCL_DECLARED +#define Tcl_ConvertCountedElement_TCL_DECLARED +/* 85 */ +EXTERN int Tcl_ConvertCountedElement (CONST char * src, + int length, char * dst, int flags); +#endif +#ifndef Tcl_CreateAlias_TCL_DECLARED +#define Tcl_CreateAlias_TCL_DECLARED +/* 86 */ +EXTERN int Tcl_CreateAlias (Tcl_Interp * slave, + CONST char * slaveCmd, Tcl_Interp * target, + CONST char * targetCmd, int argc, + CONST84 char * CONST * argv); +#endif +#ifndef Tcl_CreateAliasObj_TCL_DECLARED +#define Tcl_CreateAliasObj_TCL_DECLARED +/* 87 */ +EXTERN int Tcl_CreateAliasObj (Tcl_Interp * slave, + CONST char * slaveCmd, Tcl_Interp * target, + CONST char * targetCmd, int objc, + Tcl_Obj *CONST objv[]); +#endif +#ifndef Tcl_CreateChannel_TCL_DECLARED +#define Tcl_CreateChannel_TCL_DECLARED +/* 88 */ +EXTERN Tcl_Channel Tcl_CreateChannel (Tcl_ChannelType * typePtr, + CONST char * chanName, + ClientData instanceData, int mask); +#endif +#ifndef Tcl_CreateChannelHandler_TCL_DECLARED +#define Tcl_CreateChannelHandler_TCL_DECLARED +/* 89 */ +EXTERN void Tcl_CreateChannelHandler (Tcl_Channel chan, int mask, + Tcl_ChannelProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_CreateCloseHandler_TCL_DECLARED +#define Tcl_CreateCloseHandler_TCL_DECLARED +/* 90 */ +EXTERN void Tcl_CreateCloseHandler (Tcl_Channel chan, + Tcl_CloseProc * proc, ClientData clientData); +#endif +#ifndef Tcl_CreateCommand_TCL_DECLARED +#define Tcl_CreateCommand_TCL_DECLARED +/* 91 */ +EXTERN Tcl_Command Tcl_CreateCommand (Tcl_Interp * interp, + CONST char * cmdName, Tcl_CmdProc * proc, + ClientData clientData, + Tcl_CmdDeleteProc * deleteProc); +#endif +#ifndef Tcl_CreateEventSource_TCL_DECLARED +#define Tcl_CreateEventSource_TCL_DECLARED +/* 92 */ +EXTERN void Tcl_CreateEventSource ( + Tcl_EventSetupProc * setupProc, + Tcl_EventCheckProc * checkProc, + ClientData clientData); +#endif +#ifndef Tcl_CreateExitHandler_TCL_DECLARED +#define Tcl_CreateExitHandler_TCL_DECLARED +/* 93 */ +EXTERN void Tcl_CreateExitHandler (Tcl_ExitProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_CreateInterp_TCL_DECLARED +#define Tcl_CreateInterp_TCL_DECLARED +/* 94 */ +EXTERN Tcl_Interp * Tcl_CreateInterp (void); +#endif +#ifndef Tcl_CreateMathFunc_TCL_DECLARED +#define Tcl_CreateMathFunc_TCL_DECLARED +/* 95 */ +EXTERN void Tcl_CreateMathFunc (Tcl_Interp * interp, + CONST char * name, int numArgs, + Tcl_ValueType * argTypes, + Tcl_MathProc * proc, ClientData clientData); +#endif +#ifndef Tcl_CreateObjCommand_TCL_DECLARED +#define Tcl_CreateObjCommand_TCL_DECLARED +/* 96 */ +EXTERN Tcl_Command Tcl_CreateObjCommand (Tcl_Interp * interp, + CONST char * cmdName, Tcl_ObjCmdProc * proc, + ClientData clientData, + Tcl_CmdDeleteProc * deleteProc); +#endif +#ifndef Tcl_CreateSlave_TCL_DECLARED +#define Tcl_CreateSlave_TCL_DECLARED +/* 97 */ +EXTERN Tcl_Interp * Tcl_CreateSlave (Tcl_Interp * interp, + CONST char * slaveName, int isSafe); +#endif +#ifndef Tcl_CreateTimerHandler_TCL_DECLARED +#define Tcl_CreateTimerHandler_TCL_DECLARED +/* 98 */ +EXTERN Tcl_TimerToken Tcl_CreateTimerHandler (int milliseconds, + Tcl_TimerProc * proc, ClientData clientData); +#endif +#ifndef Tcl_CreateTrace_TCL_DECLARED +#define Tcl_CreateTrace_TCL_DECLARED +/* 99 */ +EXTERN Tcl_Trace Tcl_CreateTrace (Tcl_Interp * interp, int level, + Tcl_CmdTraceProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_DeleteAssocData_TCL_DECLARED +#define Tcl_DeleteAssocData_TCL_DECLARED +/* 100 */ +EXTERN void Tcl_DeleteAssocData (Tcl_Interp * interp, + CONST char * name); +#endif +#ifndef Tcl_DeleteChannelHandler_TCL_DECLARED +#define Tcl_DeleteChannelHandler_TCL_DECLARED +/* 101 */ +EXTERN void Tcl_DeleteChannelHandler (Tcl_Channel chan, + Tcl_ChannelProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_DeleteCloseHandler_TCL_DECLARED +#define Tcl_DeleteCloseHandler_TCL_DECLARED +/* 102 */ +EXTERN void Tcl_DeleteCloseHandler (Tcl_Channel chan, + Tcl_CloseProc * proc, ClientData clientData); +#endif +#ifndef Tcl_DeleteCommand_TCL_DECLARED +#define Tcl_DeleteCommand_TCL_DECLARED +/* 103 */ +EXTERN int Tcl_DeleteCommand (Tcl_Interp * interp, + CONST char * cmdName); +#endif +#ifndef Tcl_DeleteCommandFromToken_TCL_DECLARED +#define Tcl_DeleteCommandFromToken_TCL_DECLARED +/* 104 */ +EXTERN int Tcl_DeleteCommandFromToken (Tcl_Interp * interp, + Tcl_Command command); +#endif +#ifndef Tcl_DeleteEvents_TCL_DECLARED +#define Tcl_DeleteEvents_TCL_DECLARED +/* 105 */ +EXTERN void Tcl_DeleteEvents (Tcl_EventDeleteProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_DeleteEventSource_TCL_DECLARED +#define Tcl_DeleteEventSource_TCL_DECLARED +/* 106 */ +EXTERN void Tcl_DeleteEventSource ( + Tcl_EventSetupProc * setupProc, + Tcl_EventCheckProc * checkProc, + ClientData clientData); +#endif +#ifndef Tcl_DeleteExitHandler_TCL_DECLARED +#define Tcl_DeleteExitHandler_TCL_DECLARED +/* 107 */ +EXTERN void Tcl_DeleteExitHandler (Tcl_ExitProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_DeleteHashEntry_TCL_DECLARED +#define Tcl_DeleteHashEntry_TCL_DECLARED +/* 108 */ +EXTERN void Tcl_DeleteHashEntry (Tcl_HashEntry * entryPtr); +#endif +#ifndef Tcl_DeleteHashTable_TCL_DECLARED +#define Tcl_DeleteHashTable_TCL_DECLARED +/* 109 */ +EXTERN void Tcl_DeleteHashTable (Tcl_HashTable * tablePtr); +#endif +#ifndef Tcl_DeleteInterp_TCL_DECLARED +#define Tcl_DeleteInterp_TCL_DECLARED +/* 110 */ +EXTERN void Tcl_DeleteInterp (Tcl_Interp * interp); +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_DetachPids_TCL_DECLARED +#define Tcl_DetachPids_TCL_DECLARED +/* 111 */ +EXTERN void Tcl_DetachPids (int numPids, Tcl_Pid * pidPtr); +#endif +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ +#ifndef Tcl_DetachPids_TCL_DECLARED +#define Tcl_DetachPids_TCL_DECLARED +/* 111 */ +EXTERN void Tcl_DetachPids (int numPids, Tcl_Pid * pidPtr); +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_DetachPids_TCL_DECLARED +#define Tcl_DetachPids_TCL_DECLARED +/* 111 */ +EXTERN void Tcl_DetachPids (int numPids, Tcl_Pid * pidPtr); +#endif +#endif /* MACOSX */ +#ifndef Tcl_DeleteTimerHandler_TCL_DECLARED +#define Tcl_DeleteTimerHandler_TCL_DECLARED +/* 112 */ +EXTERN void Tcl_DeleteTimerHandler (Tcl_TimerToken token); +#endif +#ifndef Tcl_DeleteTrace_TCL_DECLARED +#define Tcl_DeleteTrace_TCL_DECLARED +/* 113 */ +EXTERN void Tcl_DeleteTrace (Tcl_Interp * interp, + Tcl_Trace trace); +#endif +#ifndef Tcl_DontCallWhenDeleted_TCL_DECLARED +#define Tcl_DontCallWhenDeleted_TCL_DECLARED +/* 114 */ +EXTERN void Tcl_DontCallWhenDeleted (Tcl_Interp * interp, + Tcl_InterpDeleteProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_DoOneEvent_TCL_DECLARED +#define Tcl_DoOneEvent_TCL_DECLARED +/* 115 */ +EXTERN int Tcl_DoOneEvent (int flags); +#endif +#ifndef Tcl_DoWhenIdle_TCL_DECLARED +#define Tcl_DoWhenIdle_TCL_DECLARED +/* 116 */ +EXTERN void Tcl_DoWhenIdle (Tcl_IdleProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_DStringAppend_TCL_DECLARED +#define Tcl_DStringAppend_TCL_DECLARED +/* 117 */ +EXTERN char * Tcl_DStringAppend (Tcl_DString * dsPtr, + CONST char * bytes, int length); +#endif +#ifndef Tcl_DStringAppendElement_TCL_DECLARED +#define Tcl_DStringAppendElement_TCL_DECLARED +/* 118 */ +EXTERN char * Tcl_DStringAppendElement (Tcl_DString * dsPtr, + CONST char * element); +#endif +#ifndef Tcl_DStringEndSublist_TCL_DECLARED +#define Tcl_DStringEndSublist_TCL_DECLARED +/* 119 */ +EXTERN void Tcl_DStringEndSublist (Tcl_DString * dsPtr); +#endif +#ifndef Tcl_DStringFree_TCL_DECLARED +#define Tcl_DStringFree_TCL_DECLARED +/* 120 */ +EXTERN void Tcl_DStringFree (Tcl_DString * dsPtr); +#endif +#ifndef Tcl_DStringGetResult_TCL_DECLARED +#define Tcl_DStringGetResult_TCL_DECLARED +/* 121 */ +EXTERN void Tcl_DStringGetResult (Tcl_Interp * interp, + Tcl_DString * dsPtr); +#endif +#ifndef Tcl_DStringInit_TCL_DECLARED +#define Tcl_DStringInit_TCL_DECLARED +/* 122 */ +EXTERN void Tcl_DStringInit (Tcl_DString * dsPtr); +#endif +#ifndef Tcl_DStringResult_TCL_DECLARED +#define Tcl_DStringResult_TCL_DECLARED +/* 123 */ +EXTERN void Tcl_DStringResult (Tcl_Interp * interp, + Tcl_DString * dsPtr); +#endif +#ifndef Tcl_DStringSetLength_TCL_DECLARED +#define Tcl_DStringSetLength_TCL_DECLARED +/* 124 */ +EXTERN void Tcl_DStringSetLength (Tcl_DString * dsPtr, + int length); +#endif +#ifndef Tcl_DStringStartSublist_TCL_DECLARED +#define Tcl_DStringStartSublist_TCL_DECLARED +/* 125 */ +EXTERN void Tcl_DStringStartSublist (Tcl_DString * dsPtr); +#endif +#ifndef Tcl_Eof_TCL_DECLARED +#define Tcl_Eof_TCL_DECLARED +/* 126 */ +EXTERN int Tcl_Eof (Tcl_Channel chan); +#endif +#ifndef Tcl_ErrnoId_TCL_DECLARED +#define Tcl_ErrnoId_TCL_DECLARED +/* 127 */ +EXTERN CONST84_RETURN char * Tcl_ErrnoId (void); +#endif +#ifndef Tcl_ErrnoMsg_TCL_DECLARED +#define Tcl_ErrnoMsg_TCL_DECLARED +/* 128 */ +EXTERN CONST84_RETURN char * Tcl_ErrnoMsg (int err); +#endif +#ifndef Tcl_Eval_TCL_DECLARED +#define Tcl_Eval_TCL_DECLARED +/* 129 */ +EXTERN int Tcl_Eval (Tcl_Interp * interp, CONST char * script); +#endif +#ifndef Tcl_EvalFile_TCL_DECLARED +#define Tcl_EvalFile_TCL_DECLARED +/* 130 */ +EXTERN int Tcl_EvalFile (Tcl_Interp * interp, + CONST char * fileName); +#endif +#ifndef Tcl_EvalObj_TCL_DECLARED +#define Tcl_EvalObj_TCL_DECLARED +/* 131 */ +EXTERN int Tcl_EvalObj (Tcl_Interp * interp, Tcl_Obj * objPtr); +#endif +#ifndef Tcl_EventuallyFree_TCL_DECLARED +#define Tcl_EventuallyFree_TCL_DECLARED +/* 132 */ +EXTERN void Tcl_EventuallyFree (ClientData clientData, + Tcl_FreeProc * freeProc); +#endif +#ifndef Tcl_Exit_TCL_DECLARED +#define Tcl_Exit_TCL_DECLARED +/* 133 */ +EXTERN void Tcl_Exit (int status); +#endif +#ifndef Tcl_ExposeCommand_TCL_DECLARED +#define Tcl_ExposeCommand_TCL_DECLARED +/* 134 */ +EXTERN int Tcl_ExposeCommand (Tcl_Interp * interp, + CONST char * hiddenCmdToken, + CONST char * cmdName); +#endif +#ifndef Tcl_ExprBoolean_TCL_DECLARED +#define Tcl_ExprBoolean_TCL_DECLARED +/* 135 */ +EXTERN int Tcl_ExprBoolean (Tcl_Interp * interp, + CONST char * expr, int * ptr); +#endif +#ifndef Tcl_ExprBooleanObj_TCL_DECLARED +#define Tcl_ExprBooleanObj_TCL_DECLARED +/* 136 */ +EXTERN int Tcl_ExprBooleanObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, int * ptr); +#endif +#ifndef Tcl_ExprDouble_TCL_DECLARED +#define Tcl_ExprDouble_TCL_DECLARED +/* 137 */ +EXTERN int Tcl_ExprDouble (Tcl_Interp * interp, + CONST char * expr, double * ptr); +#endif +#ifndef Tcl_ExprDoubleObj_TCL_DECLARED +#define Tcl_ExprDoubleObj_TCL_DECLARED +/* 138 */ +EXTERN int Tcl_ExprDoubleObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, double * ptr); +#endif +#ifndef Tcl_ExprLong_TCL_DECLARED +#define Tcl_ExprLong_TCL_DECLARED +/* 139 */ +EXTERN int Tcl_ExprLong (Tcl_Interp * interp, CONST char * expr, + long * ptr); +#endif +#ifndef Tcl_ExprLongObj_TCL_DECLARED +#define Tcl_ExprLongObj_TCL_DECLARED +/* 140 */ +EXTERN int Tcl_ExprLongObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, long * ptr); +#endif +#ifndef Tcl_ExprObj_TCL_DECLARED +#define Tcl_ExprObj_TCL_DECLARED +/* 141 */ +EXTERN int Tcl_ExprObj (Tcl_Interp * interp, Tcl_Obj * objPtr, + Tcl_Obj ** resultPtrPtr); +#endif +#ifndef Tcl_ExprString_TCL_DECLARED +#define Tcl_ExprString_TCL_DECLARED +/* 142 */ +EXTERN int Tcl_ExprString (Tcl_Interp * interp, + CONST char * expr); +#endif +#ifndef Tcl_Finalize_TCL_DECLARED +#define Tcl_Finalize_TCL_DECLARED +/* 143 */ +EXTERN void Tcl_Finalize (void); +#endif +#ifndef Tcl_FindExecutable_TCL_DECLARED +#define Tcl_FindExecutable_TCL_DECLARED +/* 144 */ +EXTERN void Tcl_FindExecutable (CONST char * argv0); +#endif +#ifndef Tcl_FirstHashEntry_TCL_DECLARED +#define Tcl_FirstHashEntry_TCL_DECLARED +/* 145 */ +EXTERN Tcl_HashEntry * Tcl_FirstHashEntry (Tcl_HashTable * tablePtr, + Tcl_HashSearch * searchPtr); +#endif +#ifndef Tcl_Flush_TCL_DECLARED +#define Tcl_Flush_TCL_DECLARED +/* 146 */ +EXTERN int Tcl_Flush (Tcl_Channel chan); +#endif +#ifndef Tcl_FreeResult_TCL_DECLARED +#define Tcl_FreeResult_TCL_DECLARED +/* 147 */ +EXTERN void Tcl_FreeResult (Tcl_Interp * interp); +#endif +#ifndef Tcl_GetAlias_TCL_DECLARED +#define Tcl_GetAlias_TCL_DECLARED +/* 148 */ +EXTERN int Tcl_GetAlias (Tcl_Interp * interp, + CONST char * slaveCmd, + Tcl_Interp ** targetInterpPtr, + CONST84 char ** targetCmdPtr, int * argcPtr, + CONST84 char *** argvPtr); +#endif +#ifndef Tcl_GetAliasObj_TCL_DECLARED +#define Tcl_GetAliasObj_TCL_DECLARED +/* 149 */ +EXTERN int Tcl_GetAliasObj (Tcl_Interp * interp, + CONST char * slaveCmd, + Tcl_Interp ** targetInterpPtr, + CONST84 char ** targetCmdPtr, int * objcPtr, + Tcl_Obj *** objv); +#endif +#ifndef Tcl_GetAssocData_TCL_DECLARED +#define Tcl_GetAssocData_TCL_DECLARED +/* 150 */ +EXTERN ClientData Tcl_GetAssocData (Tcl_Interp * interp, + CONST char * name, + Tcl_InterpDeleteProc ** procPtr); +#endif +#ifndef Tcl_GetChannel_TCL_DECLARED +#define Tcl_GetChannel_TCL_DECLARED +/* 151 */ +EXTERN Tcl_Channel Tcl_GetChannel (Tcl_Interp * interp, + CONST char * chanName, int * modePtr); +#endif +#ifndef Tcl_GetChannelBufferSize_TCL_DECLARED +#define Tcl_GetChannelBufferSize_TCL_DECLARED +/* 152 */ +EXTERN int Tcl_GetChannelBufferSize (Tcl_Channel chan); +#endif +#ifndef Tcl_GetChannelHandle_TCL_DECLARED +#define Tcl_GetChannelHandle_TCL_DECLARED +/* 153 */ +EXTERN int Tcl_GetChannelHandle (Tcl_Channel chan, + int direction, ClientData * handlePtr); +#endif +#ifndef Tcl_GetChannelInstanceData_TCL_DECLARED +#define Tcl_GetChannelInstanceData_TCL_DECLARED +/* 154 */ +EXTERN ClientData Tcl_GetChannelInstanceData (Tcl_Channel chan); +#endif +#ifndef Tcl_GetChannelMode_TCL_DECLARED +#define Tcl_GetChannelMode_TCL_DECLARED +/* 155 */ +EXTERN int Tcl_GetChannelMode (Tcl_Channel chan); +#endif +#ifndef Tcl_GetChannelName_TCL_DECLARED +#define Tcl_GetChannelName_TCL_DECLARED +/* 156 */ +EXTERN CONST84_RETURN char * Tcl_GetChannelName (Tcl_Channel chan); +#endif +#ifndef Tcl_GetChannelOption_TCL_DECLARED +#define Tcl_GetChannelOption_TCL_DECLARED +/* 157 */ +EXTERN int Tcl_GetChannelOption (Tcl_Interp * interp, + Tcl_Channel chan, CONST char * optionName, + Tcl_DString * dsPtr); +#endif +#ifndef Tcl_GetChannelType_TCL_DECLARED +#define Tcl_GetChannelType_TCL_DECLARED +/* 158 */ +EXTERN Tcl_ChannelType * Tcl_GetChannelType (Tcl_Channel chan); +#endif +#ifndef Tcl_GetCommandInfo_TCL_DECLARED +#define Tcl_GetCommandInfo_TCL_DECLARED +/* 159 */ +EXTERN int Tcl_GetCommandInfo (Tcl_Interp * interp, + CONST char * cmdName, Tcl_CmdInfo * infoPtr); +#endif +#ifndef Tcl_GetCommandName_TCL_DECLARED +#define Tcl_GetCommandName_TCL_DECLARED +/* 160 */ +EXTERN CONST84_RETURN char * Tcl_GetCommandName (Tcl_Interp * interp, + Tcl_Command command); +#endif +#ifndef Tcl_GetErrno_TCL_DECLARED +#define Tcl_GetErrno_TCL_DECLARED +/* 161 */ +EXTERN int Tcl_GetErrno (void); +#endif +#ifndef Tcl_GetHostName_TCL_DECLARED +#define Tcl_GetHostName_TCL_DECLARED +/* 162 */ +EXTERN CONST84_RETURN char * Tcl_GetHostName (void); +#endif +#ifndef Tcl_GetInterpPath_TCL_DECLARED +#define Tcl_GetInterpPath_TCL_DECLARED +/* 163 */ +EXTERN int Tcl_GetInterpPath (Tcl_Interp * askInterp, + Tcl_Interp * slaveInterp); +#endif +#ifndef Tcl_GetMaster_TCL_DECLARED +#define Tcl_GetMaster_TCL_DECLARED +/* 164 */ +EXTERN Tcl_Interp * Tcl_GetMaster (Tcl_Interp * interp); +#endif +#ifndef Tcl_GetNameOfExecutable_TCL_DECLARED +#define Tcl_GetNameOfExecutable_TCL_DECLARED +/* 165 */ +EXTERN CONST char * Tcl_GetNameOfExecutable (void); +#endif +#ifndef Tcl_GetObjResult_TCL_DECLARED +#define Tcl_GetObjResult_TCL_DECLARED +/* 166 */ +EXTERN Tcl_Obj * Tcl_GetObjResult (Tcl_Interp * interp); +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_GetOpenFile_TCL_DECLARED +#define Tcl_GetOpenFile_TCL_DECLARED +/* 167 */ +EXTERN int Tcl_GetOpenFile (Tcl_Interp * interp, + CONST char * chanID, int forWriting, + int checkUsage, ClientData * filePtr); +#endif +#endif /* UNIX */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_GetOpenFile_TCL_DECLARED +#define Tcl_GetOpenFile_TCL_DECLARED +/* 167 */ +EXTERN int Tcl_GetOpenFile (Tcl_Interp * interp, + CONST char * chanID, int forWriting, + int checkUsage, ClientData * filePtr); +#endif +#endif /* MACOSX */ +#ifndef Tcl_GetPathType_TCL_DECLARED +#define Tcl_GetPathType_TCL_DECLARED +/* 168 */ +EXTERN Tcl_PathType Tcl_GetPathType (CONST char * path); +#endif +#ifndef Tcl_Gets_TCL_DECLARED +#define Tcl_Gets_TCL_DECLARED +/* 169 */ +EXTERN int Tcl_Gets (Tcl_Channel chan, Tcl_DString * dsPtr); +#endif +#ifndef Tcl_GetsObj_TCL_DECLARED +#define Tcl_GetsObj_TCL_DECLARED +/* 170 */ +EXTERN int Tcl_GetsObj (Tcl_Channel chan, Tcl_Obj * objPtr); +#endif +#ifndef Tcl_GetServiceMode_TCL_DECLARED +#define Tcl_GetServiceMode_TCL_DECLARED +/* 171 */ +EXTERN int Tcl_GetServiceMode (void); +#endif +#ifndef Tcl_GetSlave_TCL_DECLARED +#define Tcl_GetSlave_TCL_DECLARED +/* 172 */ +EXTERN Tcl_Interp * Tcl_GetSlave (Tcl_Interp * interp, + CONST char * slaveName); +#endif +#ifndef Tcl_GetStdChannel_TCL_DECLARED +#define Tcl_GetStdChannel_TCL_DECLARED +/* 173 */ +EXTERN Tcl_Channel Tcl_GetStdChannel (int type); +#endif +#ifndef Tcl_GetStringResult_TCL_DECLARED +#define Tcl_GetStringResult_TCL_DECLARED +/* 174 */ +EXTERN CONST84_RETURN char * Tcl_GetStringResult (Tcl_Interp * interp); +#endif +#ifndef Tcl_GetVar_TCL_DECLARED +#define Tcl_GetVar_TCL_DECLARED +/* 175 */ +EXTERN CONST84_RETURN char * Tcl_GetVar (Tcl_Interp * interp, + CONST char * varName, int flags); +#endif +#ifndef Tcl_GetVar2_TCL_DECLARED +#define Tcl_GetVar2_TCL_DECLARED +/* 176 */ +EXTERN CONST84_RETURN char * Tcl_GetVar2 (Tcl_Interp * interp, + CONST char * part1, CONST char * part2, + int flags); +#endif +#ifndef Tcl_GlobalEval_TCL_DECLARED +#define Tcl_GlobalEval_TCL_DECLARED +/* 177 */ +EXTERN int Tcl_GlobalEval (Tcl_Interp * interp, + CONST char * command); +#endif +#ifndef Tcl_GlobalEvalObj_TCL_DECLARED +#define Tcl_GlobalEvalObj_TCL_DECLARED +/* 178 */ +EXTERN int Tcl_GlobalEvalObj (Tcl_Interp * interp, + Tcl_Obj * objPtr); +#endif +#ifndef Tcl_HideCommand_TCL_DECLARED +#define Tcl_HideCommand_TCL_DECLARED +/* 179 */ +EXTERN int Tcl_HideCommand (Tcl_Interp * interp, + CONST char * cmdName, + CONST char * hiddenCmdToken); +#endif +#ifndef Tcl_Init_TCL_DECLARED +#define Tcl_Init_TCL_DECLARED +/* 180 */ +EXTERN int Tcl_Init (Tcl_Interp * interp); +#endif +#ifndef Tcl_InitHashTable_TCL_DECLARED +#define Tcl_InitHashTable_TCL_DECLARED +/* 181 */ +EXTERN void Tcl_InitHashTable (Tcl_HashTable * tablePtr, + int keyType); +#endif +#ifndef Tcl_InputBlocked_TCL_DECLARED +#define Tcl_InputBlocked_TCL_DECLARED +/* 182 */ +EXTERN int Tcl_InputBlocked (Tcl_Channel chan); +#endif +#ifndef Tcl_InputBuffered_TCL_DECLARED +#define Tcl_InputBuffered_TCL_DECLARED +/* 183 */ +EXTERN int Tcl_InputBuffered (Tcl_Channel chan); +#endif +#ifndef Tcl_InterpDeleted_TCL_DECLARED +#define Tcl_InterpDeleted_TCL_DECLARED +/* 184 */ +EXTERN int Tcl_InterpDeleted (Tcl_Interp * interp); +#endif +#ifndef Tcl_IsSafe_TCL_DECLARED +#define Tcl_IsSafe_TCL_DECLARED +/* 185 */ +EXTERN int Tcl_IsSafe (Tcl_Interp * interp); +#endif +#ifndef Tcl_JoinPath_TCL_DECLARED +#define Tcl_JoinPath_TCL_DECLARED +/* 186 */ +EXTERN char * Tcl_JoinPath (int argc, CONST84 char * CONST * argv, + Tcl_DString * resultPtr); +#endif +#ifndef Tcl_LinkVar_TCL_DECLARED +#define Tcl_LinkVar_TCL_DECLARED +/* 187 */ +EXTERN int Tcl_LinkVar (Tcl_Interp * interp, + CONST char * varName, char * addr, int type); +#endif +/* Slot 188 is reserved */ +#ifndef Tcl_MakeFileChannel_TCL_DECLARED +#define Tcl_MakeFileChannel_TCL_DECLARED +/* 189 */ +EXTERN Tcl_Channel Tcl_MakeFileChannel (ClientData handle, int mode); +#endif +#ifndef Tcl_MakeSafe_TCL_DECLARED +#define Tcl_MakeSafe_TCL_DECLARED +/* 190 */ +EXTERN int Tcl_MakeSafe (Tcl_Interp * interp); +#endif +#ifndef Tcl_MakeTcpClientChannel_TCL_DECLARED +#define Tcl_MakeTcpClientChannel_TCL_DECLARED +/* 191 */ +EXTERN Tcl_Channel Tcl_MakeTcpClientChannel (ClientData tcpSocket); +#endif +#ifndef Tcl_Merge_TCL_DECLARED +#define Tcl_Merge_TCL_DECLARED +/* 192 */ +EXTERN char * Tcl_Merge (int argc, CONST84 char * CONST * argv); +#endif +#ifndef Tcl_NextHashEntry_TCL_DECLARED +#define Tcl_NextHashEntry_TCL_DECLARED +/* 193 */ +EXTERN Tcl_HashEntry * Tcl_NextHashEntry (Tcl_HashSearch * searchPtr); +#endif +#ifndef Tcl_NotifyChannel_TCL_DECLARED +#define Tcl_NotifyChannel_TCL_DECLARED +/* 194 */ +EXTERN void Tcl_NotifyChannel (Tcl_Channel channel, int mask); +#endif +#ifndef Tcl_ObjGetVar2_TCL_DECLARED +#define Tcl_ObjGetVar2_TCL_DECLARED +/* 195 */ +EXTERN Tcl_Obj * Tcl_ObjGetVar2 (Tcl_Interp * interp, + Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, + int flags); +#endif +#ifndef Tcl_ObjSetVar2_TCL_DECLARED +#define Tcl_ObjSetVar2_TCL_DECLARED +/* 196 */ +EXTERN Tcl_Obj * Tcl_ObjSetVar2 (Tcl_Interp * interp, + Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, + Tcl_Obj * newValuePtr, int flags); +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_OpenCommandChannel_TCL_DECLARED +#define Tcl_OpenCommandChannel_TCL_DECLARED +/* 197 */ +EXTERN Tcl_Channel Tcl_OpenCommandChannel (Tcl_Interp * interp, + int argc, CONST84 char ** argv, int flags); +#endif +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ +#ifndef Tcl_OpenCommandChannel_TCL_DECLARED +#define Tcl_OpenCommandChannel_TCL_DECLARED +/* 197 */ +EXTERN Tcl_Channel Tcl_OpenCommandChannel (Tcl_Interp * interp, + int argc, CONST84 char ** argv, int flags); +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_OpenCommandChannel_TCL_DECLARED +#define Tcl_OpenCommandChannel_TCL_DECLARED +/* 197 */ +EXTERN Tcl_Channel Tcl_OpenCommandChannel (Tcl_Interp * interp, + int argc, CONST84 char ** argv, int flags); +#endif +#endif /* MACOSX */ +#ifndef Tcl_OpenFileChannel_TCL_DECLARED +#define Tcl_OpenFileChannel_TCL_DECLARED +/* 198 */ +EXTERN Tcl_Channel Tcl_OpenFileChannel (Tcl_Interp * interp, + CONST char * fileName, + CONST char * modeString, int permissions); +#endif +#ifndef Tcl_OpenTcpClient_TCL_DECLARED +#define Tcl_OpenTcpClient_TCL_DECLARED +/* 199 */ +EXTERN Tcl_Channel Tcl_OpenTcpClient (Tcl_Interp * interp, int port, + CONST char * address, CONST char * myaddr, + int myport, int async); +#endif +#ifndef Tcl_OpenTcpServer_TCL_DECLARED +#define Tcl_OpenTcpServer_TCL_DECLARED +/* 200 */ +EXTERN Tcl_Channel Tcl_OpenTcpServer (Tcl_Interp * interp, int port, + CONST char * host, + Tcl_TcpAcceptProc * acceptProc, + ClientData callbackData); +#endif +#ifndef Tcl_Preserve_TCL_DECLARED +#define Tcl_Preserve_TCL_DECLARED +/* 201 */ +EXTERN void Tcl_Preserve (ClientData data); +#endif +#ifndef Tcl_PrintDouble_TCL_DECLARED +#define Tcl_PrintDouble_TCL_DECLARED +/* 202 */ +EXTERN void Tcl_PrintDouble (Tcl_Interp * interp, double value, + char * dst); +#endif +#ifndef Tcl_PutEnv_TCL_DECLARED +#define Tcl_PutEnv_TCL_DECLARED +/* 203 */ +EXTERN int Tcl_PutEnv (CONST char * assignment); +#endif +#ifndef Tcl_PosixError_TCL_DECLARED +#define Tcl_PosixError_TCL_DECLARED +/* 204 */ +EXTERN CONST84_RETURN char * Tcl_PosixError (Tcl_Interp * interp); +#endif +#ifndef Tcl_QueueEvent_TCL_DECLARED +#define Tcl_QueueEvent_TCL_DECLARED +/* 205 */ +EXTERN void Tcl_QueueEvent (Tcl_Event * evPtr, + Tcl_QueuePosition position); +#endif +#ifndef Tcl_Read_TCL_DECLARED +#define Tcl_Read_TCL_DECLARED +/* 206 */ +EXTERN int Tcl_Read (Tcl_Channel chan, char * bufPtr, + int toRead); +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_ReapDetachedProcs_TCL_DECLARED +#define Tcl_ReapDetachedProcs_TCL_DECLARED +/* 207 */ +EXTERN void Tcl_ReapDetachedProcs (void); +#endif +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ +#ifndef Tcl_ReapDetachedProcs_TCL_DECLARED +#define Tcl_ReapDetachedProcs_TCL_DECLARED +/* 207 */ +EXTERN void Tcl_ReapDetachedProcs (void); +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_ReapDetachedProcs_TCL_DECLARED +#define Tcl_ReapDetachedProcs_TCL_DECLARED +/* 207 */ +EXTERN void Tcl_ReapDetachedProcs (void); +#endif +#endif /* MACOSX */ +#ifndef Tcl_RecordAndEval_TCL_DECLARED +#define Tcl_RecordAndEval_TCL_DECLARED +/* 208 */ +EXTERN int Tcl_RecordAndEval (Tcl_Interp * interp, + CONST char * cmd, int flags); +#endif +#ifndef Tcl_RecordAndEvalObj_TCL_DECLARED +#define Tcl_RecordAndEvalObj_TCL_DECLARED +/* 209 */ +EXTERN int Tcl_RecordAndEvalObj (Tcl_Interp * interp, + Tcl_Obj * cmdPtr, int flags); +#endif +#ifndef Tcl_RegisterChannel_TCL_DECLARED +#define Tcl_RegisterChannel_TCL_DECLARED +/* 210 */ +EXTERN void Tcl_RegisterChannel (Tcl_Interp * interp, + Tcl_Channel chan); +#endif +#ifndef Tcl_RegisterObjType_TCL_DECLARED +#define Tcl_RegisterObjType_TCL_DECLARED +/* 211 */ +EXTERN void Tcl_RegisterObjType (Tcl_ObjType * typePtr); +#endif +#ifndef Tcl_RegExpCompile_TCL_DECLARED +#define Tcl_RegExpCompile_TCL_DECLARED +/* 212 */ +EXTERN Tcl_RegExp Tcl_RegExpCompile (Tcl_Interp * interp, + CONST char * pattern); +#endif +#ifndef Tcl_RegExpExec_TCL_DECLARED +#define Tcl_RegExpExec_TCL_DECLARED +/* 213 */ +EXTERN int Tcl_RegExpExec (Tcl_Interp * interp, + Tcl_RegExp regexp, CONST char * text, + CONST char * start); +#endif +#ifndef Tcl_RegExpMatch_TCL_DECLARED +#define Tcl_RegExpMatch_TCL_DECLARED +/* 214 */ +EXTERN int Tcl_RegExpMatch (Tcl_Interp * interp, + CONST char * text, CONST char * pattern); +#endif +#ifndef Tcl_RegExpRange_TCL_DECLARED +#define Tcl_RegExpRange_TCL_DECLARED +/* 215 */ +EXTERN void Tcl_RegExpRange (Tcl_RegExp regexp, int index, + CONST84 char ** startPtr, + CONST84 char ** endPtr); +#endif +#ifndef Tcl_Release_TCL_DECLARED +#define Tcl_Release_TCL_DECLARED +/* 216 */ +EXTERN void Tcl_Release (ClientData clientData); +#endif +#ifndef Tcl_ResetResult_TCL_DECLARED +#define Tcl_ResetResult_TCL_DECLARED +/* 217 */ +EXTERN void Tcl_ResetResult (Tcl_Interp * interp); +#endif +#ifndef Tcl_ScanElement_TCL_DECLARED +#define Tcl_ScanElement_TCL_DECLARED +/* 218 */ +EXTERN int Tcl_ScanElement (CONST char * str, int * flagPtr); +#endif +#ifndef Tcl_ScanCountedElement_TCL_DECLARED +#define Tcl_ScanCountedElement_TCL_DECLARED +/* 219 */ +EXTERN int Tcl_ScanCountedElement (CONST char * str, int length, + int * flagPtr); +#endif +#ifndef Tcl_SeekOld_TCL_DECLARED +#define Tcl_SeekOld_TCL_DECLARED +/* 220 */ +EXTERN int Tcl_SeekOld (Tcl_Channel chan, int offset, int mode); +#endif +#ifndef Tcl_ServiceAll_TCL_DECLARED +#define Tcl_ServiceAll_TCL_DECLARED +/* 221 */ +EXTERN int Tcl_ServiceAll (void); +#endif +#ifndef Tcl_ServiceEvent_TCL_DECLARED +#define Tcl_ServiceEvent_TCL_DECLARED +/* 222 */ +EXTERN int Tcl_ServiceEvent (int flags); +#endif +#ifndef Tcl_SetAssocData_TCL_DECLARED +#define Tcl_SetAssocData_TCL_DECLARED +/* 223 */ +EXTERN void Tcl_SetAssocData (Tcl_Interp * interp, + CONST char * name, + Tcl_InterpDeleteProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_SetChannelBufferSize_TCL_DECLARED +#define Tcl_SetChannelBufferSize_TCL_DECLARED +/* 224 */ +EXTERN void Tcl_SetChannelBufferSize (Tcl_Channel chan, int sz); +#endif +#ifndef Tcl_SetChannelOption_TCL_DECLARED +#define Tcl_SetChannelOption_TCL_DECLARED +/* 225 */ +EXTERN int Tcl_SetChannelOption (Tcl_Interp * interp, + Tcl_Channel chan, CONST char * optionName, + CONST char * newValue); +#endif +#ifndef Tcl_SetCommandInfo_TCL_DECLARED +#define Tcl_SetCommandInfo_TCL_DECLARED +/* 226 */ +EXTERN int Tcl_SetCommandInfo (Tcl_Interp * interp, + CONST char * cmdName, + CONST Tcl_CmdInfo * infoPtr); +#endif +#ifndef Tcl_SetErrno_TCL_DECLARED +#define Tcl_SetErrno_TCL_DECLARED +/* 227 */ +EXTERN void Tcl_SetErrno (int err); +#endif +#ifndef Tcl_SetErrorCode_TCL_DECLARED +#define Tcl_SetErrorCode_TCL_DECLARED +/* 228 */ +EXTERN void Tcl_SetErrorCode (Tcl_Interp * interp, ...); +#endif +#ifndef Tcl_SetMaxBlockTime_TCL_DECLARED +#define Tcl_SetMaxBlockTime_TCL_DECLARED +/* 229 */ +EXTERN void Tcl_SetMaxBlockTime (Tcl_Time * timePtr); +#endif +#ifndef Tcl_SetPanicProc_TCL_DECLARED +#define Tcl_SetPanicProc_TCL_DECLARED +/* 230 */ +EXTERN void Tcl_SetPanicProc (Tcl_PanicProc * panicProc); +#endif +#ifndef Tcl_SetRecursionLimit_TCL_DECLARED +#define Tcl_SetRecursionLimit_TCL_DECLARED +/* 231 */ +EXTERN int Tcl_SetRecursionLimit (Tcl_Interp * interp, + int depth); +#endif +#ifndef Tcl_SetResult_TCL_DECLARED +#define Tcl_SetResult_TCL_DECLARED +/* 232 */ +EXTERN void Tcl_SetResult (Tcl_Interp * interp, char * result, + Tcl_FreeProc * freeProc); +#endif +#ifndef Tcl_SetServiceMode_TCL_DECLARED +#define Tcl_SetServiceMode_TCL_DECLARED +/* 233 */ +EXTERN int Tcl_SetServiceMode (int mode); +#endif +#ifndef Tcl_SetObjErrorCode_TCL_DECLARED +#define Tcl_SetObjErrorCode_TCL_DECLARED +/* 234 */ +EXTERN void Tcl_SetObjErrorCode (Tcl_Interp * interp, + Tcl_Obj * errorObjPtr); +#endif +#ifndef Tcl_SetObjResult_TCL_DECLARED +#define Tcl_SetObjResult_TCL_DECLARED +/* 235 */ +EXTERN void Tcl_SetObjResult (Tcl_Interp * interp, + Tcl_Obj * resultObjPtr); +#endif +#ifndef Tcl_SetStdChannel_TCL_DECLARED +#define Tcl_SetStdChannel_TCL_DECLARED +/* 236 */ +EXTERN void Tcl_SetStdChannel (Tcl_Channel channel, int type); +#endif +#ifndef Tcl_SetVar_TCL_DECLARED +#define Tcl_SetVar_TCL_DECLARED +/* 237 */ +EXTERN CONST84_RETURN char * Tcl_SetVar (Tcl_Interp * interp, + CONST char * varName, CONST char * newValue, + int flags); +#endif +#ifndef Tcl_SetVar2_TCL_DECLARED +#define Tcl_SetVar2_TCL_DECLARED +/* 238 */ +EXTERN CONST84_RETURN char * Tcl_SetVar2 (Tcl_Interp * interp, + CONST char * part1, CONST char * part2, + CONST char * newValue, int flags); +#endif +#ifndef Tcl_SignalId_TCL_DECLARED +#define Tcl_SignalId_TCL_DECLARED +/* 239 */ +EXTERN CONST84_RETURN char * Tcl_SignalId (int sig); +#endif +#ifndef Tcl_SignalMsg_TCL_DECLARED +#define Tcl_SignalMsg_TCL_DECLARED +/* 240 */ +EXTERN CONST84_RETURN char * Tcl_SignalMsg (int sig); +#endif +#ifndef Tcl_SourceRCFile_TCL_DECLARED +#define Tcl_SourceRCFile_TCL_DECLARED +/* 241 */ +EXTERN void Tcl_SourceRCFile (Tcl_Interp * interp); +#endif +#ifndef Tcl_SplitList_TCL_DECLARED +#define Tcl_SplitList_TCL_DECLARED +/* 242 */ +EXTERN int Tcl_SplitList (Tcl_Interp * interp, + CONST char * listStr, int * argcPtr, + CONST84 char *** argvPtr); +#endif +#ifndef Tcl_SplitPath_TCL_DECLARED +#define Tcl_SplitPath_TCL_DECLARED +/* 243 */ +EXTERN void Tcl_SplitPath (CONST char * path, int * argcPtr, + CONST84 char *** argvPtr); +#endif +#ifndef Tcl_StaticPackage_TCL_DECLARED +#define Tcl_StaticPackage_TCL_DECLARED +/* 244 */ +EXTERN void Tcl_StaticPackage (Tcl_Interp * interp, + CONST char * pkgName, + Tcl_PackageInitProc * initProc, + Tcl_PackageInitProc * safeInitProc); +#endif +#ifndef Tcl_StringMatch_TCL_DECLARED +#define Tcl_StringMatch_TCL_DECLARED +/* 245 */ +EXTERN int Tcl_StringMatch (CONST char * str, + CONST char * pattern); +#endif +#ifndef Tcl_TellOld_TCL_DECLARED +#define Tcl_TellOld_TCL_DECLARED +/* 246 */ +EXTERN int Tcl_TellOld (Tcl_Channel chan); +#endif +#ifndef Tcl_TraceVar_TCL_DECLARED +#define Tcl_TraceVar_TCL_DECLARED +/* 247 */ +EXTERN int Tcl_TraceVar (Tcl_Interp * interp, + CONST char * varName, int flags, + Tcl_VarTraceProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_TraceVar2_TCL_DECLARED +#define Tcl_TraceVar2_TCL_DECLARED +/* 248 */ +EXTERN int Tcl_TraceVar2 (Tcl_Interp * interp, + CONST char * part1, CONST char * part2, + int flags, Tcl_VarTraceProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_TranslateFileName_TCL_DECLARED +#define Tcl_TranslateFileName_TCL_DECLARED +/* 249 */ +EXTERN char * Tcl_TranslateFileName (Tcl_Interp * interp, + CONST char * name, Tcl_DString * bufferPtr); +#endif +#ifndef Tcl_Ungets_TCL_DECLARED +#define Tcl_Ungets_TCL_DECLARED +/* 250 */ +EXTERN int Tcl_Ungets (Tcl_Channel chan, CONST char * str, + int len, int atHead); +#endif +#ifndef Tcl_UnlinkVar_TCL_DECLARED +#define Tcl_UnlinkVar_TCL_DECLARED +/* 251 */ +EXTERN void Tcl_UnlinkVar (Tcl_Interp * interp, + CONST char * varName); +#endif +#ifndef Tcl_UnregisterChannel_TCL_DECLARED +#define Tcl_UnregisterChannel_TCL_DECLARED +/* 252 */ +EXTERN int Tcl_UnregisterChannel (Tcl_Interp * interp, + Tcl_Channel chan); +#endif +#ifndef Tcl_UnsetVar_TCL_DECLARED +#define Tcl_UnsetVar_TCL_DECLARED +/* 253 */ +EXTERN int Tcl_UnsetVar (Tcl_Interp * interp, + CONST char * varName, int flags); +#endif +#ifndef Tcl_UnsetVar2_TCL_DECLARED +#define Tcl_UnsetVar2_TCL_DECLARED +/* 254 */ +EXTERN int Tcl_UnsetVar2 (Tcl_Interp * interp, + CONST char * part1, CONST char * part2, + int flags); +#endif +#ifndef Tcl_UntraceVar_TCL_DECLARED +#define Tcl_UntraceVar_TCL_DECLARED +/* 255 */ +EXTERN void Tcl_UntraceVar (Tcl_Interp * interp, + CONST char * varName, int flags, + Tcl_VarTraceProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_UntraceVar2_TCL_DECLARED +#define Tcl_UntraceVar2_TCL_DECLARED +/* 256 */ +EXTERN void Tcl_UntraceVar2 (Tcl_Interp * interp, + CONST char * part1, CONST char * part2, + int flags, Tcl_VarTraceProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_UpdateLinkedVar_TCL_DECLARED +#define Tcl_UpdateLinkedVar_TCL_DECLARED +/* 257 */ +EXTERN void Tcl_UpdateLinkedVar (Tcl_Interp * interp, + CONST char * varName); +#endif +#ifndef Tcl_UpVar_TCL_DECLARED +#define Tcl_UpVar_TCL_DECLARED +/* 258 */ +EXTERN int Tcl_UpVar (Tcl_Interp * interp, + CONST char * frameName, CONST char * varName, + CONST char * localName, int flags); +#endif +#ifndef Tcl_UpVar2_TCL_DECLARED +#define Tcl_UpVar2_TCL_DECLARED +/* 259 */ +EXTERN int Tcl_UpVar2 (Tcl_Interp * interp, + CONST char * frameName, CONST char * part1, + CONST char * part2, CONST char * localName, + int flags); +#endif +#ifndef Tcl_VarEval_TCL_DECLARED +#define Tcl_VarEval_TCL_DECLARED +/* 260 */ +EXTERN int Tcl_VarEval (Tcl_Interp * interp, ...); +#endif +#ifndef Tcl_VarTraceInfo_TCL_DECLARED +#define Tcl_VarTraceInfo_TCL_DECLARED +/* 261 */ +EXTERN ClientData Tcl_VarTraceInfo (Tcl_Interp * interp, + CONST char * varName, int flags, + Tcl_VarTraceProc * procPtr, + ClientData prevClientData); +#endif +#ifndef Tcl_VarTraceInfo2_TCL_DECLARED +#define Tcl_VarTraceInfo2_TCL_DECLARED +/* 262 */ +EXTERN ClientData Tcl_VarTraceInfo2 (Tcl_Interp * interp, + CONST char * part1, CONST char * part2, + int flags, Tcl_VarTraceProc * procPtr, + ClientData prevClientData); +#endif +#ifndef Tcl_Write_TCL_DECLARED +#define Tcl_Write_TCL_DECLARED +/* 263 */ +EXTERN int Tcl_Write (Tcl_Channel chan, CONST char * s, + int slen); +#endif +#ifndef Tcl_WrongNumArgs_TCL_DECLARED +#define Tcl_WrongNumArgs_TCL_DECLARED +/* 264 */ +EXTERN void Tcl_WrongNumArgs (Tcl_Interp * interp, int objc, + Tcl_Obj *CONST objv[], CONST char * message); +#endif +#ifndef Tcl_DumpActiveMemory_TCL_DECLARED +#define Tcl_DumpActiveMemory_TCL_DECLARED +/* 265 */ +EXTERN int Tcl_DumpActiveMemory (CONST char * fileName); +#endif +#ifndef Tcl_ValidateAllMemory_TCL_DECLARED +#define Tcl_ValidateAllMemory_TCL_DECLARED +/* 266 */ +EXTERN void Tcl_ValidateAllMemory (CONST char * file, int line); +#endif +#ifndef Tcl_AppendResultVA_TCL_DECLARED +#define Tcl_AppendResultVA_TCL_DECLARED +/* 267 */ +EXTERN void Tcl_AppendResultVA (Tcl_Interp * interp, + va_list argList); +#endif +#ifndef Tcl_AppendStringsToObjVA_TCL_DECLARED +#define Tcl_AppendStringsToObjVA_TCL_DECLARED +/* 268 */ +EXTERN void Tcl_AppendStringsToObjVA (Tcl_Obj * objPtr, + va_list argList); +#endif +#ifndef Tcl_HashStats_TCL_DECLARED +#define Tcl_HashStats_TCL_DECLARED +/* 269 */ +EXTERN char * Tcl_HashStats (Tcl_HashTable * tablePtr); +#endif +#ifndef Tcl_ParseVar_TCL_DECLARED +#define Tcl_ParseVar_TCL_DECLARED +/* 270 */ +EXTERN CONST84_RETURN char * Tcl_ParseVar (Tcl_Interp * interp, + CONST char * start, CONST84 char ** termPtr); +#endif +#ifndef Tcl_PkgPresent_TCL_DECLARED +#define Tcl_PkgPresent_TCL_DECLARED +/* 271 */ +EXTERN CONST84_RETURN char * Tcl_PkgPresent (Tcl_Interp * interp, + CONST char * name, CONST char * version, + int exact); +#endif +#ifndef Tcl_PkgPresentEx_TCL_DECLARED +#define Tcl_PkgPresentEx_TCL_DECLARED +/* 272 */ +EXTERN CONST84_RETURN char * Tcl_PkgPresentEx (Tcl_Interp * interp, + CONST char * name, CONST char * version, + int exact, ClientData * clientDataPtr); +#endif +#ifndef Tcl_PkgProvide_TCL_DECLARED +#define Tcl_PkgProvide_TCL_DECLARED +/* 273 */ +EXTERN int Tcl_PkgProvide (Tcl_Interp * interp, + CONST char * name, CONST char * version); +#endif +#ifndef Tcl_PkgRequire_TCL_DECLARED +#define Tcl_PkgRequire_TCL_DECLARED +/* 274 */ +EXTERN CONST84_RETURN char * Tcl_PkgRequire (Tcl_Interp * interp, + CONST char * name, CONST char * version, + int exact); +#endif +#ifndef Tcl_SetErrorCodeVA_TCL_DECLARED +#define Tcl_SetErrorCodeVA_TCL_DECLARED +/* 275 */ +EXTERN void Tcl_SetErrorCodeVA (Tcl_Interp * interp, + va_list argList); +#endif +#ifndef Tcl_VarEvalVA_TCL_DECLARED +#define Tcl_VarEvalVA_TCL_DECLARED +/* 276 */ +EXTERN int Tcl_VarEvalVA (Tcl_Interp * interp, va_list argList); +#endif +#ifndef Tcl_WaitPid_TCL_DECLARED +#define Tcl_WaitPid_TCL_DECLARED +/* 277 */ +EXTERN Tcl_Pid Tcl_WaitPid (Tcl_Pid pid, int * statPtr, int options); +#endif +#ifndef Tcl_PanicVA_TCL_DECLARED +#define Tcl_PanicVA_TCL_DECLARED +/* 278 */ +EXTERN void Tcl_PanicVA (CONST char * format, va_list argList); +#endif +#ifndef Tcl_GetVersion_TCL_DECLARED +#define Tcl_GetVersion_TCL_DECLARED +/* 279 */ +EXTERN void Tcl_GetVersion (int * major, int * minor, + int * patchLevel, int * type); +#endif +#ifndef Tcl_InitMemory_TCL_DECLARED +#define Tcl_InitMemory_TCL_DECLARED +/* 280 */ +EXTERN void Tcl_InitMemory (Tcl_Interp * interp); +#endif +#ifndef Tcl_StackChannel_TCL_DECLARED +#define Tcl_StackChannel_TCL_DECLARED +/* 281 */ +EXTERN Tcl_Channel Tcl_StackChannel (Tcl_Interp * interp, + Tcl_ChannelType * typePtr, + ClientData instanceData, int mask, + Tcl_Channel prevChan); +#endif +#ifndef Tcl_UnstackChannel_TCL_DECLARED +#define Tcl_UnstackChannel_TCL_DECLARED +/* 282 */ +EXTERN int Tcl_UnstackChannel (Tcl_Interp * interp, + Tcl_Channel chan); +#endif +#ifndef Tcl_GetStackedChannel_TCL_DECLARED +#define Tcl_GetStackedChannel_TCL_DECLARED +/* 283 */ +EXTERN Tcl_Channel Tcl_GetStackedChannel (Tcl_Channel chan); +#endif +#ifndef Tcl_SetMainLoop_TCL_DECLARED +#define Tcl_SetMainLoop_TCL_DECLARED +/* 284 */ +EXTERN void Tcl_SetMainLoop (Tcl_MainLoopProc * proc); +#endif +/* Slot 285 is reserved */ +#ifndef Tcl_AppendObjToObj_TCL_DECLARED +#define Tcl_AppendObjToObj_TCL_DECLARED +/* 286 */ +EXTERN void Tcl_AppendObjToObj (Tcl_Obj * objPtr, + Tcl_Obj * appendObjPtr); +#endif +#ifndef Tcl_CreateEncoding_TCL_DECLARED +#define Tcl_CreateEncoding_TCL_DECLARED +/* 287 */ +EXTERN Tcl_Encoding Tcl_CreateEncoding (const Tcl_EncodingType * typePtr); +#endif +#ifndef Tcl_CreateThreadExitHandler_TCL_DECLARED +#define Tcl_CreateThreadExitHandler_TCL_DECLARED +/* 288 */ +EXTERN void Tcl_CreateThreadExitHandler (Tcl_ExitProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_DeleteThreadExitHandler_TCL_DECLARED +#define Tcl_DeleteThreadExitHandler_TCL_DECLARED +/* 289 */ +EXTERN void Tcl_DeleteThreadExitHandler (Tcl_ExitProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_DiscardResult_TCL_DECLARED +#define Tcl_DiscardResult_TCL_DECLARED +/* 290 */ +EXTERN void Tcl_DiscardResult (Tcl_SavedResult * statePtr); +#endif +#ifndef Tcl_EvalEx_TCL_DECLARED +#define Tcl_EvalEx_TCL_DECLARED +/* 291 */ +EXTERN int Tcl_EvalEx (Tcl_Interp * interp, CONST char * script, + int numBytes, int flags); +#endif +#ifndef Tcl_EvalObjv_TCL_DECLARED +#define Tcl_EvalObjv_TCL_DECLARED +/* 292 */ +EXTERN int Tcl_EvalObjv (Tcl_Interp * interp, int objc, + Tcl_Obj *CONST objv[], int flags); +#endif +#ifndef Tcl_EvalObjEx_TCL_DECLARED +#define Tcl_EvalObjEx_TCL_DECLARED +/* 293 */ +EXTERN int Tcl_EvalObjEx (Tcl_Interp * interp, Tcl_Obj * objPtr, + int flags); +#endif +#ifndef Tcl_ExitThread_TCL_DECLARED +#define Tcl_ExitThread_TCL_DECLARED +/* 294 */ +EXTERN void Tcl_ExitThread (int status); +#endif +#ifndef Tcl_ExternalToUtf_TCL_DECLARED +#define Tcl_ExternalToUtf_TCL_DECLARED +/* 295 */ +EXTERN int Tcl_ExternalToUtf (Tcl_Interp * interp, + Tcl_Encoding encoding, CONST char * src, + int srcLen, int flags, + Tcl_EncodingState * statePtr, char * dst, + int dstLen, int * srcReadPtr, + int * dstWrotePtr, int * dstCharsPtr); +#endif +#ifndef Tcl_ExternalToUtfDString_TCL_DECLARED +#define Tcl_ExternalToUtfDString_TCL_DECLARED +/* 296 */ +EXTERN char * Tcl_ExternalToUtfDString (Tcl_Encoding encoding, + CONST char * src, int srcLen, + Tcl_DString * dsPtr); +#endif +#ifndef Tcl_FinalizeThread_TCL_DECLARED +#define Tcl_FinalizeThread_TCL_DECLARED +/* 297 */ +EXTERN void Tcl_FinalizeThread (void); +#endif +#ifndef Tcl_FinalizeNotifier_TCL_DECLARED +#define Tcl_FinalizeNotifier_TCL_DECLARED +/* 298 */ +EXTERN void Tcl_FinalizeNotifier (ClientData clientData); +#endif +#ifndef Tcl_FreeEncoding_TCL_DECLARED +#define Tcl_FreeEncoding_TCL_DECLARED +/* 299 */ +EXTERN void Tcl_FreeEncoding (Tcl_Encoding encoding); +#endif +#ifndef Tcl_GetCurrentThread_TCL_DECLARED +#define Tcl_GetCurrentThread_TCL_DECLARED +/* 300 */ +EXTERN Tcl_ThreadId Tcl_GetCurrentThread (void); +#endif +#ifndef Tcl_GetEncoding_TCL_DECLARED +#define Tcl_GetEncoding_TCL_DECLARED +/* 301 */ +EXTERN Tcl_Encoding Tcl_GetEncoding (Tcl_Interp * interp, + CONST char * name); +#endif +#ifndef Tcl_GetEncodingName_TCL_DECLARED +#define Tcl_GetEncodingName_TCL_DECLARED +/* 302 */ +EXTERN CONST84_RETURN char * Tcl_GetEncodingName (Tcl_Encoding encoding); +#endif +#ifndef Tcl_GetEncodingNames_TCL_DECLARED +#define Tcl_GetEncodingNames_TCL_DECLARED +/* 303 */ +EXTERN void Tcl_GetEncodingNames (Tcl_Interp * interp); +#endif +#ifndef Tcl_GetIndexFromObjStruct_TCL_DECLARED +#define Tcl_GetIndexFromObjStruct_TCL_DECLARED +/* 304 */ +EXTERN int Tcl_GetIndexFromObjStruct (Tcl_Interp * interp, + Tcl_Obj * objPtr, CONST VOID * tablePtr, + int offset, CONST char * msg, int flags, + int * indexPtr); +#endif +#ifndef Tcl_GetThreadData_TCL_DECLARED +#define Tcl_GetThreadData_TCL_DECLARED +/* 305 */ +EXTERN VOID * Tcl_GetThreadData (Tcl_ThreadDataKey * keyPtr, + int size); +#endif +#ifndef Tcl_GetVar2Ex_TCL_DECLARED +#define Tcl_GetVar2Ex_TCL_DECLARED +/* 306 */ +EXTERN Tcl_Obj * Tcl_GetVar2Ex (Tcl_Interp * interp, + CONST char * part1, CONST char * part2, + int flags); +#endif +#ifndef Tcl_InitNotifier_TCL_DECLARED +#define Tcl_InitNotifier_TCL_DECLARED +/* 307 */ +EXTERN ClientData Tcl_InitNotifier (void); +#endif +#ifndef Tcl_MutexLock_TCL_DECLARED +#define Tcl_MutexLock_TCL_DECLARED +/* 308 */ +EXTERN void Tcl_MutexLock (Tcl_Mutex * mutexPtr); +#endif +#ifndef Tcl_MutexUnlock_TCL_DECLARED +#define Tcl_MutexUnlock_TCL_DECLARED +/* 309 */ +EXTERN void Tcl_MutexUnlock (Tcl_Mutex * mutexPtr); +#endif +#ifndef Tcl_ConditionNotify_TCL_DECLARED +#define Tcl_ConditionNotify_TCL_DECLARED +/* 310 */ +EXTERN void Tcl_ConditionNotify (Tcl_Condition * condPtr); +#endif +#ifndef Tcl_ConditionWait_TCL_DECLARED +#define Tcl_ConditionWait_TCL_DECLARED +/* 311 */ +EXTERN void Tcl_ConditionWait (Tcl_Condition * condPtr, + Tcl_Mutex * mutexPtr, Tcl_Time * timePtr); +#endif +#ifndef Tcl_NumUtfChars_TCL_DECLARED +#define Tcl_NumUtfChars_TCL_DECLARED +/* 312 */ +EXTERN int Tcl_NumUtfChars (CONST char * src, int length); +#endif +#ifndef Tcl_ReadChars_TCL_DECLARED +#define Tcl_ReadChars_TCL_DECLARED +/* 313 */ +EXTERN int Tcl_ReadChars (Tcl_Channel channel, Tcl_Obj * objPtr, + int charsToRead, int appendFlag); +#endif +#ifndef Tcl_RestoreResult_TCL_DECLARED +#define Tcl_RestoreResult_TCL_DECLARED +/* 314 */ +EXTERN void Tcl_RestoreResult (Tcl_Interp * interp, + Tcl_SavedResult * statePtr); +#endif +#ifndef Tcl_SaveResult_TCL_DECLARED +#define Tcl_SaveResult_TCL_DECLARED +/* 315 */ +EXTERN void Tcl_SaveResult (Tcl_Interp * interp, + Tcl_SavedResult * statePtr); +#endif +#ifndef Tcl_SetSystemEncoding_TCL_DECLARED +#define Tcl_SetSystemEncoding_TCL_DECLARED +/* 316 */ +EXTERN int Tcl_SetSystemEncoding (Tcl_Interp * interp, + CONST char * name); +#endif +#ifndef Tcl_SetVar2Ex_TCL_DECLARED +#define Tcl_SetVar2Ex_TCL_DECLARED +/* 317 */ +EXTERN Tcl_Obj * Tcl_SetVar2Ex (Tcl_Interp * interp, + CONST char * part1, CONST char * part2, + Tcl_Obj * newValuePtr, int flags); +#endif +#ifndef Tcl_ThreadAlert_TCL_DECLARED +#define Tcl_ThreadAlert_TCL_DECLARED +/* 318 */ +EXTERN void Tcl_ThreadAlert (Tcl_ThreadId threadId); +#endif +#ifndef Tcl_ThreadQueueEvent_TCL_DECLARED +#define Tcl_ThreadQueueEvent_TCL_DECLARED +/* 319 */ +EXTERN void Tcl_ThreadQueueEvent (Tcl_ThreadId threadId, + Tcl_Event* evPtr, Tcl_QueuePosition position); +#endif +#ifndef Tcl_UniCharAtIndex_TCL_DECLARED +#define Tcl_UniCharAtIndex_TCL_DECLARED +/* 320 */ +EXTERN Tcl_UniChar Tcl_UniCharAtIndex (CONST char * src, int index); +#endif +#ifndef Tcl_UniCharToLower_TCL_DECLARED +#define Tcl_UniCharToLower_TCL_DECLARED +/* 321 */ +EXTERN Tcl_UniChar Tcl_UniCharToLower (int ch); +#endif +#ifndef Tcl_UniCharToTitle_TCL_DECLARED +#define Tcl_UniCharToTitle_TCL_DECLARED +/* 322 */ +EXTERN Tcl_UniChar Tcl_UniCharToTitle (int ch); +#endif +#ifndef Tcl_UniCharToUpper_TCL_DECLARED +#define Tcl_UniCharToUpper_TCL_DECLARED +/* 323 */ +EXTERN Tcl_UniChar Tcl_UniCharToUpper (int ch); +#endif +#ifndef Tcl_UniCharToUtf_TCL_DECLARED +#define Tcl_UniCharToUtf_TCL_DECLARED +/* 324 */ +EXTERN int Tcl_UniCharToUtf (int ch, char * buf); +#endif +#ifndef Tcl_UtfAtIndex_TCL_DECLARED +#define Tcl_UtfAtIndex_TCL_DECLARED +/* 325 */ +EXTERN CONST84_RETURN char * Tcl_UtfAtIndex (CONST char * src, int index); +#endif +#ifndef Tcl_UtfCharComplete_TCL_DECLARED +#define Tcl_UtfCharComplete_TCL_DECLARED +/* 326 */ +EXTERN int Tcl_UtfCharComplete (CONST char * src, int length); +#endif +#ifndef Tcl_UtfBackslash_TCL_DECLARED +#define Tcl_UtfBackslash_TCL_DECLARED +/* 327 */ +EXTERN int Tcl_UtfBackslash (CONST char * src, int * readPtr, + char * dst); +#endif +#ifndef Tcl_UtfFindFirst_TCL_DECLARED +#define Tcl_UtfFindFirst_TCL_DECLARED +/* 328 */ +EXTERN CONST84_RETURN char * Tcl_UtfFindFirst (CONST char * src, int ch); +#endif +#ifndef Tcl_UtfFindLast_TCL_DECLARED +#define Tcl_UtfFindLast_TCL_DECLARED +/* 329 */ +EXTERN CONST84_RETURN char * Tcl_UtfFindLast (CONST char * src, int ch); +#endif +#ifndef Tcl_UtfNext_TCL_DECLARED +#define Tcl_UtfNext_TCL_DECLARED +/* 330 */ +EXTERN CONST84_RETURN char * Tcl_UtfNext (CONST char * src); +#endif +#ifndef Tcl_UtfPrev_TCL_DECLARED +#define Tcl_UtfPrev_TCL_DECLARED +/* 331 */ +EXTERN CONST84_RETURN char * Tcl_UtfPrev (CONST char * src, + CONST char * start); +#endif +#ifndef Tcl_UtfToExternal_TCL_DECLARED +#define Tcl_UtfToExternal_TCL_DECLARED +/* 332 */ +EXTERN int Tcl_UtfToExternal (Tcl_Interp * interp, + Tcl_Encoding encoding, CONST char * src, + int srcLen, int flags, + Tcl_EncodingState * statePtr, char * dst, + int dstLen, int * srcReadPtr, + int * dstWrotePtr, int * dstCharsPtr); +#endif +#ifndef Tcl_UtfToExternalDString_TCL_DECLARED +#define Tcl_UtfToExternalDString_TCL_DECLARED +/* 333 */ +EXTERN char * Tcl_UtfToExternalDString (Tcl_Encoding encoding, + CONST char * src, int srcLen, + Tcl_DString * dsPtr); +#endif +#ifndef Tcl_UtfToLower_TCL_DECLARED +#define Tcl_UtfToLower_TCL_DECLARED +/* 334 */ +EXTERN int Tcl_UtfToLower (char * src); +#endif +#ifndef Tcl_UtfToTitle_TCL_DECLARED +#define Tcl_UtfToTitle_TCL_DECLARED +/* 335 */ +EXTERN int Tcl_UtfToTitle (char * src); +#endif +#ifndef Tcl_UtfToUniChar_TCL_DECLARED +#define Tcl_UtfToUniChar_TCL_DECLARED +/* 336 */ +EXTERN int Tcl_UtfToUniChar (CONST char * src, + Tcl_UniChar * chPtr); +#endif +#ifndef Tcl_UtfToUpper_TCL_DECLARED +#define Tcl_UtfToUpper_TCL_DECLARED +/* 337 */ +EXTERN int Tcl_UtfToUpper (char * src); +#endif +#ifndef Tcl_WriteChars_TCL_DECLARED +#define Tcl_WriteChars_TCL_DECLARED +/* 338 */ +EXTERN int Tcl_WriteChars (Tcl_Channel chan, CONST char * src, + int srcLen); +#endif +#ifndef Tcl_WriteObj_TCL_DECLARED +#define Tcl_WriteObj_TCL_DECLARED +/* 339 */ +EXTERN int Tcl_WriteObj (Tcl_Channel chan, Tcl_Obj * objPtr); +#endif +#ifndef Tcl_GetString_TCL_DECLARED +#define Tcl_GetString_TCL_DECLARED +/* 340 */ +EXTERN char * Tcl_GetString (Tcl_Obj * objPtr); +#endif +#ifndef Tcl_GetDefaultEncodingDir_TCL_DECLARED +#define Tcl_GetDefaultEncodingDir_TCL_DECLARED +/* 341 */ +EXTERN CONST84_RETURN char * Tcl_GetDefaultEncodingDir (void); +#endif +#ifndef Tcl_SetDefaultEncodingDir_TCL_DECLARED +#define Tcl_SetDefaultEncodingDir_TCL_DECLARED +/* 342 */ +EXTERN void Tcl_SetDefaultEncodingDir (CONST char * path); +#endif +#ifndef Tcl_AlertNotifier_TCL_DECLARED +#define Tcl_AlertNotifier_TCL_DECLARED +/* 343 */ +EXTERN void Tcl_AlertNotifier (ClientData clientData); +#endif +#ifndef Tcl_ServiceModeHook_TCL_DECLARED +#define Tcl_ServiceModeHook_TCL_DECLARED +/* 344 */ +EXTERN void Tcl_ServiceModeHook (int mode); +#endif +#ifndef Tcl_UniCharIsAlnum_TCL_DECLARED +#define Tcl_UniCharIsAlnum_TCL_DECLARED +/* 345 */ +EXTERN int Tcl_UniCharIsAlnum (int ch); +#endif +#ifndef Tcl_UniCharIsAlpha_TCL_DECLARED +#define Tcl_UniCharIsAlpha_TCL_DECLARED +/* 346 */ +EXTERN int Tcl_UniCharIsAlpha (int ch); +#endif +#ifndef Tcl_UniCharIsDigit_TCL_DECLARED +#define Tcl_UniCharIsDigit_TCL_DECLARED +/* 347 */ +EXTERN int Tcl_UniCharIsDigit (int ch); +#endif +#ifndef Tcl_UniCharIsLower_TCL_DECLARED +#define Tcl_UniCharIsLower_TCL_DECLARED +/* 348 */ +EXTERN int Tcl_UniCharIsLower (int ch); +#endif +#ifndef Tcl_UniCharIsSpace_TCL_DECLARED +#define Tcl_UniCharIsSpace_TCL_DECLARED +/* 349 */ +EXTERN int Tcl_UniCharIsSpace (int ch); +#endif +#ifndef Tcl_UniCharIsUpper_TCL_DECLARED +#define Tcl_UniCharIsUpper_TCL_DECLARED +/* 350 */ +EXTERN int Tcl_UniCharIsUpper (int ch); +#endif +#ifndef Tcl_UniCharIsWordChar_TCL_DECLARED +#define Tcl_UniCharIsWordChar_TCL_DECLARED +/* 351 */ +EXTERN int Tcl_UniCharIsWordChar (int ch); +#endif +#ifndef Tcl_UniCharLen_TCL_DECLARED +#define Tcl_UniCharLen_TCL_DECLARED +/* 352 */ +EXTERN int Tcl_UniCharLen (CONST Tcl_UniChar * uniStr); +#endif +#ifndef Tcl_UniCharNcmp_TCL_DECLARED +#define Tcl_UniCharNcmp_TCL_DECLARED +/* 353 */ +EXTERN int Tcl_UniCharNcmp (CONST Tcl_UniChar * ucs, + CONST Tcl_UniChar * uct, + unsigned long numChars); +#endif +#ifndef Tcl_UniCharToUtfDString_TCL_DECLARED +#define Tcl_UniCharToUtfDString_TCL_DECLARED +/* 354 */ +EXTERN char * Tcl_UniCharToUtfDString (CONST Tcl_UniChar * uniStr, + int uniLength, Tcl_DString * dsPtr); +#endif +#ifndef Tcl_UtfToUniCharDString_TCL_DECLARED +#define Tcl_UtfToUniCharDString_TCL_DECLARED +/* 355 */ +EXTERN Tcl_UniChar * Tcl_UtfToUniCharDString (CONST char * src, + int length, Tcl_DString * dsPtr); +#endif +#ifndef Tcl_GetRegExpFromObj_TCL_DECLARED +#define Tcl_GetRegExpFromObj_TCL_DECLARED +/* 356 */ +EXTERN Tcl_RegExp Tcl_GetRegExpFromObj (Tcl_Interp * interp, + Tcl_Obj * patObj, int flags); +#endif +#ifndef Tcl_EvalTokens_TCL_DECLARED +#define Tcl_EvalTokens_TCL_DECLARED +/* 357 */ +EXTERN Tcl_Obj * Tcl_EvalTokens (Tcl_Interp * interp, + Tcl_Token * tokenPtr, int count); +#endif +#ifndef Tcl_FreeParse_TCL_DECLARED +#define Tcl_FreeParse_TCL_DECLARED +/* 358 */ +EXTERN void Tcl_FreeParse (Tcl_Parse * parsePtr); +#endif +#ifndef Tcl_LogCommandInfo_TCL_DECLARED +#define Tcl_LogCommandInfo_TCL_DECLARED +/* 359 */ +EXTERN void Tcl_LogCommandInfo (Tcl_Interp * interp, + CONST char * script, CONST char * command, + int length); +#endif +#ifndef Tcl_ParseBraces_TCL_DECLARED +#define Tcl_ParseBraces_TCL_DECLARED +/* 360 */ +EXTERN int Tcl_ParseBraces (Tcl_Interp * interp, + CONST char * start, int numBytes, + Tcl_Parse * parsePtr, int append, + CONST84 char ** termPtr); +#endif +#ifndef Tcl_ParseCommand_TCL_DECLARED +#define Tcl_ParseCommand_TCL_DECLARED +/* 361 */ +EXTERN int Tcl_ParseCommand (Tcl_Interp * interp, + CONST char * start, int numBytes, int nested, + Tcl_Parse * parsePtr); +#endif +#ifndef Tcl_ParseExpr_TCL_DECLARED +#define Tcl_ParseExpr_TCL_DECLARED +/* 362 */ +EXTERN int Tcl_ParseExpr (Tcl_Interp * interp, + CONST char * start, int numBytes, + Tcl_Parse * parsePtr); +#endif +#ifndef Tcl_ParseQuotedString_TCL_DECLARED +#define Tcl_ParseQuotedString_TCL_DECLARED +/* 363 */ +EXTERN int Tcl_ParseQuotedString (Tcl_Interp * interp, + CONST char * start, int numBytes, + Tcl_Parse * parsePtr, int append, + CONST84 char ** termPtr); +#endif +#ifndef Tcl_ParseVarName_TCL_DECLARED +#define Tcl_ParseVarName_TCL_DECLARED +/* 364 */ +EXTERN int Tcl_ParseVarName (Tcl_Interp * interp, + CONST char * start, int numBytes, + Tcl_Parse * parsePtr, int append); +#endif +#ifndef Tcl_GetCwd_TCL_DECLARED +#define Tcl_GetCwd_TCL_DECLARED +/* 365 */ +EXTERN char * Tcl_GetCwd (Tcl_Interp * interp, + Tcl_DString * cwdPtr); +#endif +#ifndef Tcl_Chdir_TCL_DECLARED +#define Tcl_Chdir_TCL_DECLARED +/* 366 */ +EXTERN int Tcl_Chdir (CONST char * dirName); +#endif +#ifndef Tcl_Access_TCL_DECLARED +#define Tcl_Access_TCL_DECLARED +/* 367 */ +EXTERN int Tcl_Access (CONST char * path, int mode); +#endif +#ifndef Tcl_Stat_TCL_DECLARED +#define Tcl_Stat_TCL_DECLARED +/* 368 */ +EXTERN int Tcl_Stat (CONST char * path, struct stat * bufPtr); +#endif +#ifndef Tcl_UtfNcmp_TCL_DECLARED +#define Tcl_UtfNcmp_TCL_DECLARED +/* 369 */ +EXTERN int Tcl_UtfNcmp (CONST char * s1, CONST char * s2, + unsigned long n); +#endif +#ifndef Tcl_UtfNcasecmp_TCL_DECLARED +#define Tcl_UtfNcasecmp_TCL_DECLARED +/* 370 */ +EXTERN int Tcl_UtfNcasecmp (CONST char * s1, CONST char * s2, + unsigned long n); +#endif +#ifndef Tcl_StringCaseMatch_TCL_DECLARED +#define Tcl_StringCaseMatch_TCL_DECLARED +/* 371 */ +EXTERN int Tcl_StringCaseMatch (CONST char * str, + CONST char * pattern, int nocase); +#endif +#ifndef Tcl_UniCharIsControl_TCL_DECLARED +#define Tcl_UniCharIsControl_TCL_DECLARED +/* 372 */ +EXTERN int Tcl_UniCharIsControl (int ch); +#endif +#ifndef Tcl_UniCharIsGraph_TCL_DECLARED +#define Tcl_UniCharIsGraph_TCL_DECLARED +/* 373 */ +EXTERN int Tcl_UniCharIsGraph (int ch); +#endif +#ifndef Tcl_UniCharIsPrint_TCL_DECLARED +#define Tcl_UniCharIsPrint_TCL_DECLARED +/* 374 */ +EXTERN int Tcl_UniCharIsPrint (int ch); +#endif +#ifndef Tcl_UniCharIsPunct_TCL_DECLARED +#define Tcl_UniCharIsPunct_TCL_DECLARED +/* 375 */ +EXTERN int Tcl_UniCharIsPunct (int ch); +#endif +#ifndef Tcl_RegExpExecObj_TCL_DECLARED +#define Tcl_RegExpExecObj_TCL_DECLARED +/* 376 */ +EXTERN int Tcl_RegExpExecObj (Tcl_Interp * interp, + Tcl_RegExp regexp, Tcl_Obj * textObj, + int offset, int nmatches, int flags); +#endif +#ifndef Tcl_RegExpGetInfo_TCL_DECLARED +#define Tcl_RegExpGetInfo_TCL_DECLARED +/* 377 */ +EXTERN void Tcl_RegExpGetInfo (Tcl_RegExp regexp, + Tcl_RegExpInfo * infoPtr); +#endif +#ifndef Tcl_NewUnicodeObj_TCL_DECLARED +#define Tcl_NewUnicodeObj_TCL_DECLARED +/* 378 */ +EXTERN Tcl_Obj * Tcl_NewUnicodeObj (CONST Tcl_UniChar * unicode, + int numChars); +#endif +#ifndef Tcl_SetUnicodeObj_TCL_DECLARED +#define Tcl_SetUnicodeObj_TCL_DECLARED +/* 379 */ +EXTERN void Tcl_SetUnicodeObj (Tcl_Obj * objPtr, + CONST Tcl_UniChar * unicode, int numChars); +#endif +#ifndef Tcl_GetCharLength_TCL_DECLARED +#define Tcl_GetCharLength_TCL_DECLARED +/* 380 */ +EXTERN int Tcl_GetCharLength (Tcl_Obj * objPtr); +#endif +#ifndef Tcl_GetUniChar_TCL_DECLARED +#define Tcl_GetUniChar_TCL_DECLARED +/* 381 */ +EXTERN Tcl_UniChar Tcl_GetUniChar (Tcl_Obj * objPtr, int index); +#endif +#ifndef Tcl_GetUnicode_TCL_DECLARED +#define Tcl_GetUnicode_TCL_DECLARED +/* 382 */ +EXTERN Tcl_UniChar * Tcl_GetUnicode (Tcl_Obj * objPtr); +#endif +#ifndef Tcl_GetRange_TCL_DECLARED +#define Tcl_GetRange_TCL_DECLARED +/* 383 */ +EXTERN Tcl_Obj * Tcl_GetRange (Tcl_Obj * objPtr, int first, int last); +#endif +#ifndef Tcl_AppendUnicodeToObj_TCL_DECLARED +#define Tcl_AppendUnicodeToObj_TCL_DECLARED +/* 384 */ +EXTERN void Tcl_AppendUnicodeToObj (Tcl_Obj * objPtr, + CONST Tcl_UniChar * unicode, int length); +#endif +#ifndef Tcl_RegExpMatchObj_TCL_DECLARED +#define Tcl_RegExpMatchObj_TCL_DECLARED +/* 385 */ +EXTERN int Tcl_RegExpMatchObj (Tcl_Interp * interp, + Tcl_Obj * textObj, Tcl_Obj * patternObj); +#endif +#ifndef Tcl_SetNotifier_TCL_DECLARED +#define Tcl_SetNotifier_TCL_DECLARED +/* 386 */ +EXTERN void Tcl_SetNotifier (Tcl_NotifierProcs * notifierProcPtr); +#endif +#ifndef Tcl_GetAllocMutex_TCL_DECLARED +#define Tcl_GetAllocMutex_TCL_DECLARED +/* 387 */ +EXTERN Tcl_Mutex * Tcl_GetAllocMutex (void); +#endif +#ifndef Tcl_GetChannelNames_TCL_DECLARED +#define Tcl_GetChannelNames_TCL_DECLARED +/* 388 */ +EXTERN int Tcl_GetChannelNames (Tcl_Interp * interp); +#endif +#ifndef Tcl_GetChannelNamesEx_TCL_DECLARED +#define Tcl_GetChannelNamesEx_TCL_DECLARED +/* 389 */ +EXTERN int Tcl_GetChannelNamesEx (Tcl_Interp * interp, + CONST char * pattern); +#endif +#ifndef Tcl_ProcObjCmd_TCL_DECLARED +#define Tcl_ProcObjCmd_TCL_DECLARED +/* 390 */ +EXTERN int Tcl_ProcObjCmd (ClientData clientData, + Tcl_Interp * interp, int objc, + Tcl_Obj *CONST objv[]); +#endif +#ifndef Tcl_ConditionFinalize_TCL_DECLARED +#define Tcl_ConditionFinalize_TCL_DECLARED +/* 391 */ +EXTERN void Tcl_ConditionFinalize (Tcl_Condition * condPtr); +#endif +#ifndef Tcl_MutexFinalize_TCL_DECLARED +#define Tcl_MutexFinalize_TCL_DECLARED +/* 392 */ +EXTERN void Tcl_MutexFinalize (Tcl_Mutex * mutex); +#endif +#ifndef Tcl_CreateThread_TCL_DECLARED +#define Tcl_CreateThread_TCL_DECLARED +/* 393 */ +EXTERN int Tcl_CreateThread (Tcl_ThreadId * idPtr, + Tcl_ThreadCreateProc proc, + ClientData clientData, int stackSize, + int flags); +#endif +#ifndef Tcl_ReadRaw_TCL_DECLARED +#define Tcl_ReadRaw_TCL_DECLARED +/* 394 */ +EXTERN int Tcl_ReadRaw (Tcl_Channel chan, char * dst, + int bytesToRead); +#endif +#ifndef Tcl_WriteRaw_TCL_DECLARED +#define Tcl_WriteRaw_TCL_DECLARED +/* 395 */ +EXTERN int Tcl_WriteRaw (Tcl_Channel chan, CONST char * src, + int srcLen); +#endif +#ifndef Tcl_GetTopChannel_TCL_DECLARED +#define Tcl_GetTopChannel_TCL_DECLARED +/* 396 */ +EXTERN Tcl_Channel Tcl_GetTopChannel (Tcl_Channel chan); +#endif +#ifndef Tcl_ChannelBuffered_TCL_DECLARED +#define Tcl_ChannelBuffered_TCL_DECLARED +/* 397 */ +EXTERN int Tcl_ChannelBuffered (Tcl_Channel chan); +#endif +#ifndef Tcl_ChannelName_TCL_DECLARED +#define Tcl_ChannelName_TCL_DECLARED +/* 398 */ +EXTERN CONST84_RETURN char * Tcl_ChannelName ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelVersion_TCL_DECLARED +#define Tcl_ChannelVersion_TCL_DECLARED +/* 399 */ +EXTERN Tcl_ChannelTypeVersion Tcl_ChannelVersion ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelBlockModeProc_TCL_DECLARED +#define Tcl_ChannelBlockModeProc_TCL_DECLARED +/* 400 */ +EXTERN Tcl_DriverBlockModeProc * Tcl_ChannelBlockModeProc ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelCloseProc_TCL_DECLARED +#define Tcl_ChannelCloseProc_TCL_DECLARED +/* 401 */ +EXTERN Tcl_DriverCloseProc * Tcl_ChannelCloseProc ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelClose2Proc_TCL_DECLARED +#define Tcl_ChannelClose2Proc_TCL_DECLARED +/* 402 */ +EXTERN Tcl_DriverClose2Proc * Tcl_ChannelClose2Proc ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelInputProc_TCL_DECLARED +#define Tcl_ChannelInputProc_TCL_DECLARED +/* 403 */ +EXTERN Tcl_DriverInputProc * Tcl_ChannelInputProc ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelOutputProc_TCL_DECLARED +#define Tcl_ChannelOutputProc_TCL_DECLARED +/* 404 */ +EXTERN Tcl_DriverOutputProc * Tcl_ChannelOutputProc ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelSeekProc_TCL_DECLARED +#define Tcl_ChannelSeekProc_TCL_DECLARED +/* 405 */ +EXTERN Tcl_DriverSeekProc * Tcl_ChannelSeekProc ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelSetOptionProc_TCL_DECLARED +#define Tcl_ChannelSetOptionProc_TCL_DECLARED +/* 406 */ +EXTERN Tcl_DriverSetOptionProc * Tcl_ChannelSetOptionProc ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelGetOptionProc_TCL_DECLARED +#define Tcl_ChannelGetOptionProc_TCL_DECLARED +/* 407 */ +EXTERN Tcl_DriverGetOptionProc * Tcl_ChannelGetOptionProc ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelWatchProc_TCL_DECLARED +#define Tcl_ChannelWatchProc_TCL_DECLARED +/* 408 */ +EXTERN Tcl_DriverWatchProc * Tcl_ChannelWatchProc ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelGetHandleProc_TCL_DECLARED +#define Tcl_ChannelGetHandleProc_TCL_DECLARED +/* 409 */ +EXTERN Tcl_DriverGetHandleProc * Tcl_ChannelGetHandleProc ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelFlushProc_TCL_DECLARED +#define Tcl_ChannelFlushProc_TCL_DECLARED +/* 410 */ +EXTERN Tcl_DriverFlushProc * Tcl_ChannelFlushProc ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelHandlerProc_TCL_DECLARED +#define Tcl_ChannelHandlerProc_TCL_DECLARED +/* 411 */ +EXTERN Tcl_DriverHandlerProc * Tcl_ChannelHandlerProc ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_JoinThread_TCL_DECLARED +#define Tcl_JoinThread_TCL_DECLARED +/* 412 */ +EXTERN int Tcl_JoinThread (Tcl_ThreadId threadId, int* result); +#endif +#ifndef Tcl_IsChannelShared_TCL_DECLARED +#define Tcl_IsChannelShared_TCL_DECLARED +/* 413 */ +EXTERN int Tcl_IsChannelShared (Tcl_Channel channel); +#endif +#ifndef Tcl_IsChannelRegistered_TCL_DECLARED +#define Tcl_IsChannelRegistered_TCL_DECLARED +/* 414 */ +EXTERN int Tcl_IsChannelRegistered (Tcl_Interp* interp, + Tcl_Channel channel); +#endif +#ifndef Tcl_CutChannel_TCL_DECLARED +#define Tcl_CutChannel_TCL_DECLARED +/* 415 */ +EXTERN void Tcl_CutChannel (Tcl_Channel channel); +#endif +#ifndef Tcl_SpliceChannel_TCL_DECLARED +#define Tcl_SpliceChannel_TCL_DECLARED +/* 416 */ +EXTERN void Tcl_SpliceChannel (Tcl_Channel channel); +#endif +#ifndef Tcl_ClearChannelHandlers_TCL_DECLARED +#define Tcl_ClearChannelHandlers_TCL_DECLARED +/* 417 */ +EXTERN void Tcl_ClearChannelHandlers (Tcl_Channel channel); +#endif +#ifndef Tcl_IsChannelExisting_TCL_DECLARED +#define Tcl_IsChannelExisting_TCL_DECLARED +/* 418 */ +EXTERN int Tcl_IsChannelExisting (CONST char* channelName); +#endif +#ifndef Tcl_UniCharNcasecmp_TCL_DECLARED +#define Tcl_UniCharNcasecmp_TCL_DECLARED +/* 419 */ +EXTERN int Tcl_UniCharNcasecmp (CONST Tcl_UniChar * ucs, + CONST Tcl_UniChar * uct, + unsigned long numChars); +#endif +#ifndef Tcl_UniCharCaseMatch_TCL_DECLARED +#define Tcl_UniCharCaseMatch_TCL_DECLARED +/* 420 */ +EXTERN int Tcl_UniCharCaseMatch (CONST Tcl_UniChar * uniStr, + CONST Tcl_UniChar * uniPattern, int nocase); +#endif +#ifndef Tcl_FindHashEntry_TCL_DECLARED +#define Tcl_FindHashEntry_TCL_DECLARED +/* 421 */ +EXTERN Tcl_HashEntry * Tcl_FindHashEntry (Tcl_HashTable * tablePtr, + CONST char * key); +#endif +#ifndef Tcl_CreateHashEntry_TCL_DECLARED +#define Tcl_CreateHashEntry_TCL_DECLARED +/* 422 */ +EXTERN Tcl_HashEntry * Tcl_CreateHashEntry (Tcl_HashTable * tablePtr, + CONST char * key, int * newPtr); +#endif +#ifndef Tcl_InitCustomHashTable_TCL_DECLARED +#define Tcl_InitCustomHashTable_TCL_DECLARED +/* 423 */ +EXTERN void Tcl_InitCustomHashTable (Tcl_HashTable * tablePtr, + int keyType, Tcl_HashKeyType * typePtr); +#endif +#ifndef Tcl_InitObjHashTable_TCL_DECLARED +#define Tcl_InitObjHashTable_TCL_DECLARED +/* 424 */ +EXTERN void Tcl_InitObjHashTable (Tcl_HashTable * tablePtr); +#endif +#ifndef Tcl_CommandTraceInfo_TCL_DECLARED +#define Tcl_CommandTraceInfo_TCL_DECLARED +/* 425 */ +EXTERN ClientData Tcl_CommandTraceInfo (Tcl_Interp * interp, + CONST char * varName, int flags, + Tcl_CommandTraceProc * procPtr, + ClientData prevClientData); +#endif +#ifndef Tcl_TraceCommand_TCL_DECLARED +#define Tcl_TraceCommand_TCL_DECLARED +/* 426 */ +EXTERN int Tcl_TraceCommand (Tcl_Interp * interp, + CONST char * varName, int flags, + Tcl_CommandTraceProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_UntraceCommand_TCL_DECLARED +#define Tcl_UntraceCommand_TCL_DECLARED +/* 427 */ +EXTERN void Tcl_UntraceCommand (Tcl_Interp * interp, + CONST char * varName, int flags, + Tcl_CommandTraceProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_AttemptAlloc_TCL_DECLARED +#define Tcl_AttemptAlloc_TCL_DECLARED +/* 428 */ +EXTERN char * Tcl_AttemptAlloc (unsigned int size); +#endif +#ifndef Tcl_AttemptDbCkalloc_TCL_DECLARED +#define Tcl_AttemptDbCkalloc_TCL_DECLARED +/* 429 */ +EXTERN char * Tcl_AttemptDbCkalloc (unsigned int size, + CONST char * file, int line); +#endif +#ifndef Tcl_AttemptRealloc_TCL_DECLARED +#define Tcl_AttemptRealloc_TCL_DECLARED +/* 430 */ +EXTERN char * Tcl_AttemptRealloc (char * ptr, unsigned int size); +#endif +#ifndef Tcl_AttemptDbCkrealloc_TCL_DECLARED +#define Tcl_AttemptDbCkrealloc_TCL_DECLARED +/* 431 */ +EXTERN char * Tcl_AttemptDbCkrealloc (char * ptr, + unsigned int size, CONST char * file, + int line); +#endif +#ifndef Tcl_AttemptSetObjLength_TCL_DECLARED +#define Tcl_AttemptSetObjLength_TCL_DECLARED +/* 432 */ +EXTERN int Tcl_AttemptSetObjLength (Tcl_Obj * objPtr, + int length); +#endif +#ifndef Tcl_GetChannelThread_TCL_DECLARED +#define Tcl_GetChannelThread_TCL_DECLARED +/* 433 */ +EXTERN Tcl_ThreadId Tcl_GetChannelThread (Tcl_Channel channel); +#endif +#ifndef Tcl_GetUnicodeFromObj_TCL_DECLARED +#define Tcl_GetUnicodeFromObj_TCL_DECLARED +/* 434 */ +EXTERN Tcl_UniChar * Tcl_GetUnicodeFromObj (Tcl_Obj * objPtr, + int * lengthPtr); +#endif +#ifndef Tcl_GetMathFuncInfo_TCL_DECLARED +#define Tcl_GetMathFuncInfo_TCL_DECLARED +/* 435 */ +EXTERN int Tcl_GetMathFuncInfo (Tcl_Interp * interp, + CONST char * name, int * numArgsPtr, + Tcl_ValueType ** argTypesPtr, + Tcl_MathProc ** procPtr, + ClientData * clientDataPtr); +#endif +#ifndef Tcl_ListMathFuncs_TCL_DECLARED +#define Tcl_ListMathFuncs_TCL_DECLARED +/* 436 */ +EXTERN Tcl_Obj * Tcl_ListMathFuncs (Tcl_Interp * interp, + CONST char * pattern); +#endif +#ifndef Tcl_SubstObj_TCL_DECLARED +#define Tcl_SubstObj_TCL_DECLARED +/* 437 */ +EXTERN Tcl_Obj * Tcl_SubstObj (Tcl_Interp * interp, Tcl_Obj * objPtr, + int flags); +#endif +#ifndef Tcl_DetachChannel_TCL_DECLARED +#define Tcl_DetachChannel_TCL_DECLARED +/* 438 */ +EXTERN int Tcl_DetachChannel (Tcl_Interp* interp, + Tcl_Channel channel); +#endif +#ifndef Tcl_IsStandardChannel_TCL_DECLARED +#define Tcl_IsStandardChannel_TCL_DECLARED +/* 439 */ +EXTERN int Tcl_IsStandardChannel (Tcl_Channel channel); +#endif +#ifndef Tcl_FSCopyFile_TCL_DECLARED +#define Tcl_FSCopyFile_TCL_DECLARED +/* 440 */ +EXTERN int Tcl_FSCopyFile (Tcl_Obj * srcPathPtr, + Tcl_Obj * destPathPtr); +#endif +#ifndef Tcl_FSCopyDirectory_TCL_DECLARED +#define Tcl_FSCopyDirectory_TCL_DECLARED +/* 441 */ +EXTERN int Tcl_FSCopyDirectory (Tcl_Obj * srcPathPtr, + Tcl_Obj * destPathPtr, Tcl_Obj ** errorPtr); +#endif +#ifndef Tcl_FSCreateDirectory_TCL_DECLARED +#define Tcl_FSCreateDirectory_TCL_DECLARED +/* 442 */ +EXTERN int Tcl_FSCreateDirectory (Tcl_Obj * pathPtr); +#endif +#ifndef Tcl_FSDeleteFile_TCL_DECLARED +#define Tcl_FSDeleteFile_TCL_DECLARED +/* 443 */ +EXTERN int Tcl_FSDeleteFile (Tcl_Obj * pathPtr); +#endif +#ifndef Tcl_FSLoadFile_TCL_DECLARED +#define Tcl_FSLoadFile_TCL_DECLARED +/* 444 */ +EXTERN int Tcl_FSLoadFile (Tcl_Interp * interp, + Tcl_Obj * pathPtr, CONST char * sym1, + CONST char * sym2, + Tcl_PackageInitProc ** proc1Ptr, + Tcl_PackageInitProc ** proc2Ptr, + Tcl_LoadHandle * handlePtr, + Tcl_FSUnloadFileProc ** unloadProcPtr); +#endif +#ifndef Tcl_FSMatchInDirectory_TCL_DECLARED +#define Tcl_FSMatchInDirectory_TCL_DECLARED +/* 445 */ +EXTERN int Tcl_FSMatchInDirectory (Tcl_Interp * interp, + Tcl_Obj * result, Tcl_Obj * pathPtr, + CONST char * pattern, + Tcl_GlobTypeData * types); +#endif +#ifndef Tcl_FSLink_TCL_DECLARED +#define Tcl_FSLink_TCL_DECLARED +/* 446 */ +EXTERN Tcl_Obj * Tcl_FSLink (Tcl_Obj * pathPtr, Tcl_Obj * toPtr, + int linkAction); +#endif +#ifndef Tcl_FSRemoveDirectory_TCL_DECLARED +#define Tcl_FSRemoveDirectory_TCL_DECLARED +/* 447 */ +EXTERN int Tcl_FSRemoveDirectory (Tcl_Obj * pathPtr, + int recursive, Tcl_Obj ** errorPtr); +#endif +#ifndef Tcl_FSRenameFile_TCL_DECLARED +#define Tcl_FSRenameFile_TCL_DECLARED +/* 448 */ +EXTERN int Tcl_FSRenameFile (Tcl_Obj * srcPathPtr, + Tcl_Obj * destPathPtr); +#endif +#ifndef Tcl_FSLstat_TCL_DECLARED +#define Tcl_FSLstat_TCL_DECLARED +/* 449 */ +EXTERN int Tcl_FSLstat (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); +#endif +#ifndef Tcl_FSUtime_TCL_DECLARED +#define Tcl_FSUtime_TCL_DECLARED +/* 450 */ +EXTERN int Tcl_FSUtime (Tcl_Obj * pathPtr, + struct utimbuf * tval); +#endif +#ifndef Tcl_FSFileAttrsGet_TCL_DECLARED +#define Tcl_FSFileAttrsGet_TCL_DECLARED +/* 451 */ +EXTERN int Tcl_FSFileAttrsGet (Tcl_Interp * interp, int index, + Tcl_Obj * pathPtr, Tcl_Obj ** objPtrRef); +#endif +#ifndef Tcl_FSFileAttrsSet_TCL_DECLARED +#define Tcl_FSFileAttrsSet_TCL_DECLARED +/* 452 */ +EXTERN int Tcl_FSFileAttrsSet (Tcl_Interp * interp, int index, + Tcl_Obj * pathPtr, Tcl_Obj * objPtr); +#endif +#ifndef Tcl_FSFileAttrStrings_TCL_DECLARED +#define Tcl_FSFileAttrStrings_TCL_DECLARED +/* 453 */ +EXTERN CONST char ** Tcl_FSFileAttrStrings (Tcl_Obj * pathPtr, + Tcl_Obj ** objPtrRef); +#endif +#ifndef Tcl_FSStat_TCL_DECLARED +#define Tcl_FSStat_TCL_DECLARED +/* 454 */ +EXTERN int Tcl_FSStat (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); +#endif +#ifndef Tcl_FSAccess_TCL_DECLARED +#define Tcl_FSAccess_TCL_DECLARED +/* 455 */ +EXTERN int Tcl_FSAccess (Tcl_Obj * pathPtr, int mode); +#endif +#ifndef Tcl_FSOpenFileChannel_TCL_DECLARED +#define Tcl_FSOpenFileChannel_TCL_DECLARED +/* 456 */ +EXTERN Tcl_Channel Tcl_FSOpenFileChannel (Tcl_Interp * interp, + Tcl_Obj * pathPtr, CONST char * modeString, + int permissions); +#endif +#ifndef Tcl_FSGetCwd_TCL_DECLARED +#define Tcl_FSGetCwd_TCL_DECLARED +/* 457 */ +EXTERN Tcl_Obj* Tcl_FSGetCwd (Tcl_Interp * interp); +#endif +#ifndef Tcl_FSChdir_TCL_DECLARED +#define Tcl_FSChdir_TCL_DECLARED +/* 458 */ +EXTERN int Tcl_FSChdir (Tcl_Obj * pathPtr); +#endif +#ifndef Tcl_FSConvertToPathType_TCL_DECLARED +#define Tcl_FSConvertToPathType_TCL_DECLARED +/* 459 */ +EXTERN int Tcl_FSConvertToPathType (Tcl_Interp * interp, + Tcl_Obj * pathPtr); +#endif +#ifndef Tcl_FSJoinPath_TCL_DECLARED +#define Tcl_FSJoinPath_TCL_DECLARED +/* 460 */ +EXTERN Tcl_Obj* Tcl_FSJoinPath (Tcl_Obj * listObj, int elements); +#endif +#ifndef Tcl_FSSplitPath_TCL_DECLARED +#define Tcl_FSSplitPath_TCL_DECLARED +/* 461 */ +EXTERN Tcl_Obj* Tcl_FSSplitPath (Tcl_Obj* pathPtr, int * lenPtr); +#endif +#ifndef Tcl_FSEqualPaths_TCL_DECLARED +#define Tcl_FSEqualPaths_TCL_DECLARED +/* 462 */ +EXTERN int Tcl_FSEqualPaths (Tcl_Obj* firstPtr, + Tcl_Obj* secondPtr); +#endif +#ifndef Tcl_FSGetNormalizedPath_TCL_DECLARED +#define Tcl_FSGetNormalizedPath_TCL_DECLARED +/* 463 */ +EXTERN Tcl_Obj* Tcl_FSGetNormalizedPath (Tcl_Interp * interp, + Tcl_Obj* pathPtr); +#endif +#ifndef Tcl_FSJoinToPath_TCL_DECLARED +#define Tcl_FSJoinToPath_TCL_DECLARED +/* 464 */ +EXTERN Tcl_Obj* Tcl_FSJoinToPath (Tcl_Obj * pathPtr, int objc, + Tcl_Obj *CONST objv[]); +#endif +#ifndef Tcl_FSGetInternalRep_TCL_DECLARED +#define Tcl_FSGetInternalRep_TCL_DECLARED +/* 465 */ +EXTERN ClientData Tcl_FSGetInternalRep (Tcl_Obj* pathPtr, + Tcl_Filesystem * fsPtr); +#endif +#ifndef Tcl_FSGetTranslatedPath_TCL_DECLARED +#define Tcl_FSGetTranslatedPath_TCL_DECLARED +/* 466 */ +EXTERN Tcl_Obj* Tcl_FSGetTranslatedPath (Tcl_Interp * interp, + Tcl_Obj* pathPtr); +#endif +#ifndef Tcl_FSEvalFile_TCL_DECLARED +#define Tcl_FSEvalFile_TCL_DECLARED +/* 467 */ +EXTERN int Tcl_FSEvalFile (Tcl_Interp * interp, + Tcl_Obj * fileName); +#endif +#ifndef Tcl_FSNewNativePath_TCL_DECLARED +#define Tcl_FSNewNativePath_TCL_DECLARED +/* 468 */ +EXTERN Tcl_Obj* Tcl_FSNewNativePath (Tcl_Filesystem* fromFilesystem, + ClientData clientData); +#endif +#ifndef Tcl_FSGetNativePath_TCL_DECLARED +#define Tcl_FSGetNativePath_TCL_DECLARED +/* 469 */ +EXTERN CONST char* Tcl_FSGetNativePath (Tcl_Obj* pathPtr); +#endif +#ifndef Tcl_FSFileSystemInfo_TCL_DECLARED +#define Tcl_FSFileSystemInfo_TCL_DECLARED +/* 470 */ +EXTERN Tcl_Obj* Tcl_FSFileSystemInfo (Tcl_Obj* pathPtr); +#endif +#ifndef Tcl_FSPathSeparator_TCL_DECLARED +#define Tcl_FSPathSeparator_TCL_DECLARED +/* 471 */ +EXTERN Tcl_Obj* Tcl_FSPathSeparator (Tcl_Obj* pathPtr); +#endif +#ifndef Tcl_FSListVolumes_TCL_DECLARED +#define Tcl_FSListVolumes_TCL_DECLARED +/* 472 */ +EXTERN Tcl_Obj* Tcl_FSListVolumes (void); +#endif +#ifndef Tcl_FSRegister_TCL_DECLARED +#define Tcl_FSRegister_TCL_DECLARED +/* 473 */ +EXTERN int Tcl_FSRegister (ClientData clientData, + Tcl_Filesystem * fsPtr); +#endif +#ifndef Tcl_FSUnregister_TCL_DECLARED +#define Tcl_FSUnregister_TCL_DECLARED +/* 474 */ +EXTERN int Tcl_FSUnregister (Tcl_Filesystem * fsPtr); +#endif +#ifndef Tcl_FSData_TCL_DECLARED +#define Tcl_FSData_TCL_DECLARED +/* 475 */ +EXTERN ClientData Tcl_FSData (Tcl_Filesystem * fsPtr); +#endif +#ifndef Tcl_FSGetTranslatedStringPath_TCL_DECLARED +#define Tcl_FSGetTranslatedStringPath_TCL_DECLARED +/* 476 */ +EXTERN CONST char* Tcl_FSGetTranslatedStringPath (Tcl_Interp * interp, + Tcl_Obj* pathPtr); +#endif +#ifndef Tcl_FSGetFileSystemForPath_TCL_DECLARED +#define Tcl_FSGetFileSystemForPath_TCL_DECLARED +/* 477 */ +EXTERN Tcl_Filesystem* Tcl_FSGetFileSystemForPath (Tcl_Obj* pathPtr); +#endif +#ifndef Tcl_FSGetPathType_TCL_DECLARED +#define Tcl_FSGetPathType_TCL_DECLARED +/* 478 */ +EXTERN Tcl_PathType Tcl_FSGetPathType (Tcl_Obj * pathPtr); +#endif +#ifndef Tcl_OutputBuffered_TCL_DECLARED +#define Tcl_OutputBuffered_TCL_DECLARED +/* 479 */ +EXTERN int Tcl_OutputBuffered (Tcl_Channel chan); +#endif +#ifndef Tcl_FSMountsChanged_TCL_DECLARED +#define Tcl_FSMountsChanged_TCL_DECLARED +/* 480 */ +EXTERN void Tcl_FSMountsChanged (Tcl_Filesystem * fsPtr); +#endif +#ifndef Tcl_EvalTokensStandard_TCL_DECLARED +#define Tcl_EvalTokensStandard_TCL_DECLARED +/* 481 */ +EXTERN int Tcl_EvalTokensStandard (Tcl_Interp * interp, + Tcl_Token * tokenPtr, int count); +#endif +#ifndef Tcl_GetTime_TCL_DECLARED +#define Tcl_GetTime_TCL_DECLARED +/* 482 */ +EXTERN void Tcl_GetTime (Tcl_Time* timeBuf); +#endif +#ifndef Tcl_CreateObjTrace_TCL_DECLARED +#define Tcl_CreateObjTrace_TCL_DECLARED +/* 483 */ +EXTERN Tcl_Trace Tcl_CreateObjTrace (Tcl_Interp* interp, int level, + int flags, Tcl_CmdObjTraceProc* objProc, + ClientData clientData, + Tcl_CmdObjTraceDeleteProc* delProc); +#endif +#ifndef Tcl_GetCommandInfoFromToken_TCL_DECLARED +#define Tcl_GetCommandInfoFromToken_TCL_DECLARED +/* 484 */ +EXTERN int Tcl_GetCommandInfoFromToken (Tcl_Command token, + Tcl_CmdInfo* infoPtr); +#endif +#ifndef Tcl_SetCommandInfoFromToken_TCL_DECLARED +#define Tcl_SetCommandInfoFromToken_TCL_DECLARED +/* 485 */ +EXTERN int Tcl_SetCommandInfoFromToken (Tcl_Command token, + CONST Tcl_CmdInfo* infoPtr); +#endif +#ifndef Tcl_DbNewWideIntObj_TCL_DECLARED +#define Tcl_DbNewWideIntObj_TCL_DECLARED +/* 486 */ +EXTERN Tcl_Obj * Tcl_DbNewWideIntObj (Tcl_WideInt wideValue, + CONST char * file, int line); +#endif +#ifndef Tcl_GetWideIntFromObj_TCL_DECLARED +#define Tcl_GetWideIntFromObj_TCL_DECLARED +/* 487 */ +EXTERN int Tcl_GetWideIntFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, Tcl_WideInt * widePtr); +#endif +#ifndef Tcl_NewWideIntObj_TCL_DECLARED +#define Tcl_NewWideIntObj_TCL_DECLARED +/* 488 */ +EXTERN Tcl_Obj * Tcl_NewWideIntObj (Tcl_WideInt wideValue); +#endif +#ifndef Tcl_SetWideIntObj_TCL_DECLARED +#define Tcl_SetWideIntObj_TCL_DECLARED +/* 489 */ +EXTERN void Tcl_SetWideIntObj (Tcl_Obj * objPtr, + Tcl_WideInt wideValue); +#endif +#ifndef Tcl_AllocStatBuf_TCL_DECLARED +#define Tcl_AllocStatBuf_TCL_DECLARED +/* 490 */ +EXTERN Tcl_StatBuf * Tcl_AllocStatBuf (void); +#endif +#ifndef Tcl_Seek_TCL_DECLARED +#define Tcl_Seek_TCL_DECLARED +/* 491 */ +EXTERN Tcl_WideInt Tcl_Seek (Tcl_Channel chan, Tcl_WideInt offset, + int mode); +#endif +#ifndef Tcl_Tell_TCL_DECLARED +#define Tcl_Tell_TCL_DECLARED +/* 492 */ +EXTERN Tcl_WideInt Tcl_Tell (Tcl_Channel chan); +#endif +#ifndef Tcl_ChannelWideSeekProc_TCL_DECLARED +#define Tcl_ChannelWideSeekProc_TCL_DECLARED +/* 493 */ +EXTERN Tcl_DriverWideSeekProc * Tcl_ChannelWideSeekProc ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_DictObjPut_TCL_DECLARED +#define Tcl_DictObjPut_TCL_DECLARED +/* 494 */ +EXTERN int Tcl_DictObjPut (Tcl_Interp * interp, + Tcl_Obj * dictPtr, Tcl_Obj * keyPtr, + Tcl_Obj * valuePtr); +#endif +#ifndef Tcl_DictObjGet_TCL_DECLARED +#define Tcl_DictObjGet_TCL_DECLARED +/* 495 */ +EXTERN int Tcl_DictObjGet (Tcl_Interp * interp, + Tcl_Obj * dictPtr, Tcl_Obj * keyPtr, + Tcl_Obj ** valuePtrPtr); +#endif +#ifndef Tcl_DictObjRemove_TCL_DECLARED +#define Tcl_DictObjRemove_TCL_DECLARED +/* 496 */ +EXTERN int Tcl_DictObjRemove (Tcl_Interp * interp, + Tcl_Obj * dictPtr, Tcl_Obj * keyPtr); +#endif +#ifndef Tcl_DictObjSize_TCL_DECLARED +#define Tcl_DictObjSize_TCL_DECLARED +/* 497 */ +EXTERN int Tcl_DictObjSize (Tcl_Interp * interp, + Tcl_Obj * dictPtr, int * sizePtr); +#endif +#ifndef Tcl_DictObjFirst_TCL_DECLARED +#define Tcl_DictObjFirst_TCL_DECLARED +/* 498 */ +EXTERN int Tcl_DictObjFirst (Tcl_Interp * interp, + Tcl_Obj * dictPtr, + Tcl_DictSearch * searchPtr, + Tcl_Obj ** keyPtrPtr, Tcl_Obj ** valuePtrPtr, + int * donePtr); +#endif +#ifndef Tcl_DictObjNext_TCL_DECLARED +#define Tcl_DictObjNext_TCL_DECLARED +/* 499 */ +EXTERN void Tcl_DictObjNext (Tcl_DictSearch * searchPtr, + Tcl_Obj ** keyPtrPtr, Tcl_Obj ** valuePtrPtr, + int * donePtr); +#endif +#ifndef Tcl_DictObjDone_TCL_DECLARED +#define Tcl_DictObjDone_TCL_DECLARED +/* 500 */ +EXTERN void Tcl_DictObjDone (Tcl_DictSearch * searchPtr); +#endif +#ifndef Tcl_DictObjPutKeyList_TCL_DECLARED +#define Tcl_DictObjPutKeyList_TCL_DECLARED +/* 501 */ +EXTERN int Tcl_DictObjPutKeyList (Tcl_Interp * interp, + Tcl_Obj * dictPtr, int keyc, + Tcl_Obj *CONST * keyv, Tcl_Obj * valuePtr); +#endif +#ifndef Tcl_DictObjRemoveKeyList_TCL_DECLARED +#define Tcl_DictObjRemoveKeyList_TCL_DECLARED +/* 502 */ +EXTERN int Tcl_DictObjRemoveKeyList (Tcl_Interp * interp, + Tcl_Obj * dictPtr, int keyc, + Tcl_Obj *CONST * keyv); +#endif +#ifndef Tcl_NewDictObj_TCL_DECLARED +#define Tcl_NewDictObj_TCL_DECLARED +/* 503 */ +EXTERN Tcl_Obj * Tcl_NewDictObj (void); +#endif +#ifndef Tcl_DbNewDictObj_TCL_DECLARED +#define Tcl_DbNewDictObj_TCL_DECLARED +/* 504 */ +EXTERN Tcl_Obj * Tcl_DbNewDictObj (CONST char * file, int line); +#endif +#ifndef Tcl_RegisterConfig_TCL_DECLARED +#define Tcl_RegisterConfig_TCL_DECLARED +/* 505 */ +EXTERN void Tcl_RegisterConfig (Tcl_Interp* interp, + CONST char* pkgName, + Tcl_Config* configuration, + CONST char* valEncoding); +#endif +#ifndef Tcl_CreateNamespace_TCL_DECLARED +#define Tcl_CreateNamespace_TCL_DECLARED +/* 506 */ +EXTERN Tcl_Namespace * Tcl_CreateNamespace (Tcl_Interp * interp, + CONST char * name, ClientData clientData, + Tcl_NamespaceDeleteProc * deleteProc); +#endif +#ifndef Tcl_DeleteNamespace_TCL_DECLARED +#define Tcl_DeleteNamespace_TCL_DECLARED +/* 507 */ +EXTERN void Tcl_DeleteNamespace (Tcl_Namespace * nsPtr); +#endif +#ifndef Tcl_AppendExportList_TCL_DECLARED +#define Tcl_AppendExportList_TCL_DECLARED +/* 508 */ +EXTERN int Tcl_AppendExportList (Tcl_Interp * interp, + Tcl_Namespace * nsPtr, Tcl_Obj * objPtr); +#endif +#ifndef Tcl_Export_TCL_DECLARED +#define Tcl_Export_TCL_DECLARED +/* 509 */ +EXTERN int Tcl_Export (Tcl_Interp * interp, + Tcl_Namespace * nsPtr, CONST char * pattern, + int resetListFirst); +#endif +#ifndef Tcl_Import_TCL_DECLARED +#define Tcl_Import_TCL_DECLARED +/* 510 */ +EXTERN int Tcl_Import (Tcl_Interp * interp, + Tcl_Namespace * nsPtr, CONST char * pattern, + int allowOverwrite); +#endif +#ifndef Tcl_ForgetImport_TCL_DECLARED +#define Tcl_ForgetImport_TCL_DECLARED +/* 511 */ +EXTERN int Tcl_ForgetImport (Tcl_Interp * interp, + Tcl_Namespace * nsPtr, CONST char * pattern); +#endif +#ifndef Tcl_GetCurrentNamespace_TCL_DECLARED +#define Tcl_GetCurrentNamespace_TCL_DECLARED +/* 512 */ +EXTERN Tcl_Namespace * Tcl_GetCurrentNamespace (Tcl_Interp * interp); +#endif +#ifndef Tcl_GetGlobalNamespace_TCL_DECLARED +#define Tcl_GetGlobalNamespace_TCL_DECLARED +/* 513 */ +EXTERN Tcl_Namespace * Tcl_GetGlobalNamespace (Tcl_Interp * interp); +#endif +#ifndef Tcl_FindNamespace_TCL_DECLARED +#define Tcl_FindNamespace_TCL_DECLARED +/* 514 */ +EXTERN Tcl_Namespace * Tcl_FindNamespace (Tcl_Interp * interp, + CONST char * name, + Tcl_Namespace * contextNsPtr, int flags); +#endif +#ifndef Tcl_FindCommand_TCL_DECLARED +#define Tcl_FindCommand_TCL_DECLARED +/* 515 */ +EXTERN Tcl_Command Tcl_FindCommand (Tcl_Interp * interp, + CONST char * name, + Tcl_Namespace * contextNsPtr, int flags); +#endif +#ifndef Tcl_GetCommandFromObj_TCL_DECLARED +#define Tcl_GetCommandFromObj_TCL_DECLARED +/* 516 */ +EXTERN Tcl_Command Tcl_GetCommandFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr); +#endif +#ifndef Tcl_GetCommandFullName_TCL_DECLARED +#define Tcl_GetCommandFullName_TCL_DECLARED +/* 517 */ +EXTERN void Tcl_GetCommandFullName (Tcl_Interp * interp, + Tcl_Command command, Tcl_Obj * objPtr); +#endif +#ifndef Tcl_FSEvalFileEx_TCL_DECLARED +#define Tcl_FSEvalFileEx_TCL_DECLARED +/* 518 */ +EXTERN int Tcl_FSEvalFileEx (Tcl_Interp * interp, + Tcl_Obj * fileName, + CONST char * encodingName); +#endif +#ifndef Tcl_SetExitProc_TCL_DECLARED +#define Tcl_SetExitProc_TCL_DECLARED +/* 519 */ +EXTERN Tcl_ExitProc * Tcl_SetExitProc (Tcl_ExitProc * proc); +#endif +#ifndef Tcl_LimitAddHandler_TCL_DECLARED +#define Tcl_LimitAddHandler_TCL_DECLARED +/* 520 */ +EXTERN void Tcl_LimitAddHandler (Tcl_Interp * interp, int type, + Tcl_LimitHandlerProc * handlerProc, + ClientData clientData, + Tcl_LimitHandlerDeleteProc * deleteProc); +#endif +#ifndef Tcl_LimitRemoveHandler_TCL_DECLARED +#define Tcl_LimitRemoveHandler_TCL_DECLARED +/* 521 */ +EXTERN void Tcl_LimitRemoveHandler (Tcl_Interp * interp, + int type, Tcl_LimitHandlerProc * handlerProc, + ClientData clientData); +#endif +#ifndef Tcl_LimitReady_TCL_DECLARED +#define Tcl_LimitReady_TCL_DECLARED +/* 522 */ +EXTERN int Tcl_LimitReady (Tcl_Interp * interp); +#endif +#ifndef Tcl_LimitCheck_TCL_DECLARED +#define Tcl_LimitCheck_TCL_DECLARED +/* 523 */ +EXTERN int Tcl_LimitCheck (Tcl_Interp * interp); +#endif +#ifndef Tcl_LimitExceeded_TCL_DECLARED +#define Tcl_LimitExceeded_TCL_DECLARED +/* 524 */ +EXTERN int Tcl_LimitExceeded (Tcl_Interp * interp); +#endif +#ifndef Tcl_LimitSetCommands_TCL_DECLARED +#define Tcl_LimitSetCommands_TCL_DECLARED +/* 525 */ +EXTERN void Tcl_LimitSetCommands (Tcl_Interp * interp, + int commandLimit); +#endif +#ifndef Tcl_LimitSetTime_TCL_DECLARED +#define Tcl_LimitSetTime_TCL_DECLARED +/* 526 */ +EXTERN void Tcl_LimitSetTime (Tcl_Interp * interp, + Tcl_Time * timeLimitPtr); +#endif +#ifndef Tcl_LimitSetGranularity_TCL_DECLARED +#define Tcl_LimitSetGranularity_TCL_DECLARED +/* 527 */ +EXTERN void Tcl_LimitSetGranularity (Tcl_Interp * interp, + int type, int granularity); +#endif +#ifndef Tcl_LimitTypeEnabled_TCL_DECLARED +#define Tcl_LimitTypeEnabled_TCL_DECLARED +/* 528 */ +EXTERN int Tcl_LimitTypeEnabled (Tcl_Interp * interp, int type); +#endif +#ifndef Tcl_LimitTypeExceeded_TCL_DECLARED +#define Tcl_LimitTypeExceeded_TCL_DECLARED +/* 529 */ +EXTERN int Tcl_LimitTypeExceeded (Tcl_Interp * interp, int type); +#endif +#ifndef Tcl_LimitTypeSet_TCL_DECLARED +#define Tcl_LimitTypeSet_TCL_DECLARED +/* 530 */ +EXTERN void Tcl_LimitTypeSet (Tcl_Interp * interp, int type); +#endif +#ifndef Tcl_LimitTypeReset_TCL_DECLARED +#define Tcl_LimitTypeReset_TCL_DECLARED +/* 531 */ +EXTERN void Tcl_LimitTypeReset (Tcl_Interp * interp, int type); +#endif +#ifndef Tcl_LimitGetCommands_TCL_DECLARED +#define Tcl_LimitGetCommands_TCL_DECLARED +/* 532 */ +EXTERN int Tcl_LimitGetCommands (Tcl_Interp * interp); +#endif +#ifndef Tcl_LimitGetTime_TCL_DECLARED +#define Tcl_LimitGetTime_TCL_DECLARED +/* 533 */ +EXTERN void Tcl_LimitGetTime (Tcl_Interp * interp, + Tcl_Time * timeLimitPtr); +#endif +#ifndef Tcl_LimitGetGranularity_TCL_DECLARED +#define Tcl_LimitGetGranularity_TCL_DECLARED +/* 534 */ +EXTERN int Tcl_LimitGetGranularity (Tcl_Interp * interp, + int type); +#endif +#ifndef Tcl_SaveInterpState_TCL_DECLARED +#define Tcl_SaveInterpState_TCL_DECLARED +/* 535 */ +EXTERN Tcl_InterpState Tcl_SaveInterpState (Tcl_Interp * interp, int status); +#endif +#ifndef Tcl_RestoreInterpState_TCL_DECLARED +#define Tcl_RestoreInterpState_TCL_DECLARED +/* 536 */ +EXTERN int Tcl_RestoreInterpState (Tcl_Interp * interp, + Tcl_InterpState state); +#endif +#ifndef Tcl_DiscardInterpState_TCL_DECLARED +#define Tcl_DiscardInterpState_TCL_DECLARED +/* 537 */ +EXTERN void Tcl_DiscardInterpState (Tcl_InterpState state); +#endif +#ifndef Tcl_SetReturnOptions_TCL_DECLARED +#define Tcl_SetReturnOptions_TCL_DECLARED +/* 538 */ +EXTERN int Tcl_SetReturnOptions (Tcl_Interp * interp, + Tcl_Obj * options); +#endif +#ifndef Tcl_GetReturnOptions_TCL_DECLARED +#define Tcl_GetReturnOptions_TCL_DECLARED +/* 539 */ +EXTERN Tcl_Obj * Tcl_GetReturnOptions (Tcl_Interp * interp, + int result); +#endif +#ifndef Tcl_IsEnsemble_TCL_DECLARED +#define Tcl_IsEnsemble_TCL_DECLARED +/* 540 */ +EXTERN int Tcl_IsEnsemble (Tcl_Command token); +#endif +#ifndef Tcl_CreateEnsemble_TCL_DECLARED +#define Tcl_CreateEnsemble_TCL_DECLARED +/* 541 */ +EXTERN Tcl_Command Tcl_CreateEnsemble (Tcl_Interp * interp, + CONST char * name, + Tcl_Namespace * namespacePtr, int flags); +#endif +#ifndef Tcl_FindEnsemble_TCL_DECLARED +#define Tcl_FindEnsemble_TCL_DECLARED +/* 542 */ +EXTERN Tcl_Command Tcl_FindEnsemble (Tcl_Interp * interp, + Tcl_Obj * cmdNameObj, int flags); +#endif +#ifndef Tcl_SetEnsembleSubcommandList_TCL_DECLARED +#define Tcl_SetEnsembleSubcommandList_TCL_DECLARED +/* 543 */ +EXTERN int Tcl_SetEnsembleSubcommandList (Tcl_Interp * interp, + Tcl_Command token, Tcl_Obj * subcmdList); +#endif +#ifndef Tcl_SetEnsembleMappingDict_TCL_DECLARED +#define Tcl_SetEnsembleMappingDict_TCL_DECLARED +/* 544 */ +EXTERN int Tcl_SetEnsembleMappingDict (Tcl_Interp * interp, + Tcl_Command token, Tcl_Obj * mapDict); +#endif +#ifndef Tcl_SetEnsembleUnknownHandler_TCL_DECLARED +#define Tcl_SetEnsembleUnknownHandler_TCL_DECLARED +/* 545 */ +EXTERN int Tcl_SetEnsembleUnknownHandler (Tcl_Interp * interp, + Tcl_Command token, Tcl_Obj * unknownList); +#endif +#ifndef Tcl_SetEnsembleFlags_TCL_DECLARED +#define Tcl_SetEnsembleFlags_TCL_DECLARED +/* 546 */ +EXTERN int Tcl_SetEnsembleFlags (Tcl_Interp * interp, + Tcl_Command token, int flags); +#endif +#ifndef Tcl_GetEnsembleSubcommandList_TCL_DECLARED +#define Tcl_GetEnsembleSubcommandList_TCL_DECLARED +/* 547 */ +EXTERN int Tcl_GetEnsembleSubcommandList (Tcl_Interp * interp, + Tcl_Command token, Tcl_Obj ** subcmdListPtr); +#endif +#ifndef Tcl_GetEnsembleMappingDict_TCL_DECLARED +#define Tcl_GetEnsembleMappingDict_TCL_DECLARED +/* 548 */ +EXTERN int Tcl_GetEnsembleMappingDict (Tcl_Interp * interp, + Tcl_Command token, Tcl_Obj ** mapDictPtr); +#endif +#ifndef Tcl_GetEnsembleUnknownHandler_TCL_DECLARED +#define Tcl_GetEnsembleUnknownHandler_TCL_DECLARED +/* 549 */ +EXTERN int Tcl_GetEnsembleUnknownHandler (Tcl_Interp * interp, + Tcl_Command token, Tcl_Obj ** unknownListPtr); +#endif +#ifndef Tcl_GetEnsembleFlags_TCL_DECLARED +#define Tcl_GetEnsembleFlags_TCL_DECLARED +/* 550 */ +EXTERN int Tcl_GetEnsembleFlags (Tcl_Interp * interp, + Tcl_Command token, int * flagsPtr); +#endif +#ifndef Tcl_GetEnsembleNamespace_TCL_DECLARED +#define Tcl_GetEnsembleNamespace_TCL_DECLARED +/* 551 */ +EXTERN int Tcl_GetEnsembleNamespace (Tcl_Interp * interp, + Tcl_Command token, + Tcl_Namespace ** namespacePtrPtr); +#endif +#ifndef Tcl_SetTimeProc_TCL_DECLARED +#define Tcl_SetTimeProc_TCL_DECLARED +/* 552 */ +EXTERN void Tcl_SetTimeProc (Tcl_GetTimeProc* getProc, + Tcl_ScaleTimeProc* scaleProc, + ClientData clientData); +#endif +#ifndef Tcl_QueryTimeProc_TCL_DECLARED +#define Tcl_QueryTimeProc_TCL_DECLARED +/* 553 */ +EXTERN void Tcl_QueryTimeProc (Tcl_GetTimeProc** getProc, + Tcl_ScaleTimeProc** scaleProc, + ClientData* clientData); +#endif +#ifndef Tcl_ChannelThreadActionProc_TCL_DECLARED +#define Tcl_ChannelThreadActionProc_TCL_DECLARED +/* 554 */ +EXTERN Tcl_DriverThreadActionProc * Tcl_ChannelThreadActionProc ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_NewBignumObj_TCL_DECLARED +#define Tcl_NewBignumObj_TCL_DECLARED +/* 555 */ +EXTERN Tcl_Obj* Tcl_NewBignumObj (mp_int* value); +#endif +#ifndef Tcl_DbNewBignumObj_TCL_DECLARED +#define Tcl_DbNewBignumObj_TCL_DECLARED +/* 556 */ +EXTERN Tcl_Obj* Tcl_DbNewBignumObj (mp_int* value, CONST char* file, + int line); +#endif +#ifndef Tcl_SetBignumObj_TCL_DECLARED +#define Tcl_SetBignumObj_TCL_DECLARED +/* 557 */ +EXTERN void Tcl_SetBignumObj (Tcl_Obj* obj, mp_int* value); +#endif +#ifndef Tcl_GetBignumFromObj_TCL_DECLARED +#define Tcl_GetBignumFromObj_TCL_DECLARED +/* 558 */ +EXTERN int Tcl_GetBignumFromObj (Tcl_Interp* interp, + Tcl_Obj* obj, mp_int* value); +#endif +#ifndef Tcl_TakeBignumFromObj_TCL_DECLARED +#define Tcl_TakeBignumFromObj_TCL_DECLARED +/* 559 */ +EXTERN int Tcl_TakeBignumFromObj (Tcl_Interp* interp, + Tcl_Obj* obj, mp_int* value); +#endif +#ifndef Tcl_TruncateChannel_TCL_DECLARED +#define Tcl_TruncateChannel_TCL_DECLARED +/* 560 */ +EXTERN int Tcl_TruncateChannel (Tcl_Channel chan, + Tcl_WideInt length); +#endif +#ifndef Tcl_ChannelTruncateProc_TCL_DECLARED +#define Tcl_ChannelTruncateProc_TCL_DECLARED +/* 561 */ +EXTERN Tcl_DriverTruncateProc * Tcl_ChannelTruncateProc ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_SetChannelErrorInterp_TCL_DECLARED +#define Tcl_SetChannelErrorInterp_TCL_DECLARED +/* 562 */ +EXTERN void Tcl_SetChannelErrorInterp (Tcl_Interp* interp, + Tcl_Obj* msg); +#endif +#ifndef Tcl_GetChannelErrorInterp_TCL_DECLARED +#define Tcl_GetChannelErrorInterp_TCL_DECLARED +/* 563 */ +EXTERN void Tcl_GetChannelErrorInterp (Tcl_Interp* interp, + Tcl_Obj** msg); +#endif +#ifndef Tcl_SetChannelError_TCL_DECLARED +#define Tcl_SetChannelError_TCL_DECLARED +/* 564 */ +EXTERN void Tcl_SetChannelError (Tcl_Channel chan, Tcl_Obj* msg); +#endif +#ifndef Tcl_GetChannelError_TCL_DECLARED +#define Tcl_GetChannelError_TCL_DECLARED +/* 565 */ +EXTERN void Tcl_GetChannelError (Tcl_Channel chan, Tcl_Obj** msg); +#endif +#ifndef Tcl_InitBignumFromDouble_TCL_DECLARED +#define Tcl_InitBignumFromDouble_TCL_DECLARED +/* 566 */ +EXTERN int Tcl_InitBignumFromDouble (Tcl_Interp* interp, + double initval, mp_int * toInit); +#endif +#ifndef Tcl_GetNamespaceUnknownHandler_TCL_DECLARED +#define Tcl_GetNamespaceUnknownHandler_TCL_DECLARED +/* 567 */ +EXTERN Tcl_Obj * Tcl_GetNamespaceUnknownHandler (Tcl_Interp * interp, + Tcl_Namespace * nsPtr); +#endif +#ifndef Tcl_SetNamespaceUnknownHandler_TCL_DECLARED +#define Tcl_SetNamespaceUnknownHandler_TCL_DECLARED +/* 568 */ +EXTERN int Tcl_SetNamespaceUnknownHandler (Tcl_Interp * interp, + Tcl_Namespace * nsPtr, Tcl_Obj * handlerPtr); +#endif +#ifndef Tcl_GetEncodingFromObj_TCL_DECLARED +#define Tcl_GetEncodingFromObj_TCL_DECLARED +/* 569 */ +EXTERN int Tcl_GetEncodingFromObj (Tcl_Interp* interp, + Tcl_Obj* objPtr, Tcl_Encoding* encodingPtr); +#endif +#ifndef Tcl_GetEncodingSearchPath_TCL_DECLARED +#define Tcl_GetEncodingSearchPath_TCL_DECLARED +/* 570 */ +EXTERN Tcl_Obj* Tcl_GetEncodingSearchPath (void); +#endif +#ifndef Tcl_SetEncodingSearchPath_TCL_DECLARED +#define Tcl_SetEncodingSearchPath_TCL_DECLARED +/* 571 */ +EXTERN int Tcl_SetEncodingSearchPath (Tcl_Obj* searchPath); +#endif +#ifndef Tcl_GetEncodingNameFromEnvironment_TCL_DECLARED +#define Tcl_GetEncodingNameFromEnvironment_TCL_DECLARED +/* 572 */ +EXTERN CONST char * Tcl_GetEncodingNameFromEnvironment ( + Tcl_DString* bufPtr); +#endif +#ifndef Tcl_PkgRequireProc_TCL_DECLARED +#define Tcl_PkgRequireProc_TCL_DECLARED +/* 573 */ +EXTERN int Tcl_PkgRequireProc (Tcl_Interp * interp, + CONST char * name, int objc, + Tcl_Obj *CONST objv[], + ClientData * clientDataPtr); +#endif +#ifndef Tcl_AppendObjToErrorInfo_TCL_DECLARED +#define Tcl_AppendObjToErrorInfo_TCL_DECLARED +/* 574 */ +EXTERN void Tcl_AppendObjToErrorInfo (Tcl_Interp * interp, + Tcl_Obj * objPtr); +#endif +#ifndef Tcl_AppendLimitedToObj_TCL_DECLARED +#define Tcl_AppendLimitedToObj_TCL_DECLARED +/* 575 */ +EXTERN void Tcl_AppendLimitedToObj (Tcl_Obj * objPtr, + CONST char * bytes, int length, int limit, + CONST char * ellipsis); +#endif +#ifndef Tcl_Format_TCL_DECLARED +#define Tcl_Format_TCL_DECLARED +/* 576 */ +EXTERN Tcl_Obj * Tcl_Format (Tcl_Interp * interp, CONST char * format, + int objc, Tcl_Obj * CONST objv[]); +#endif +#ifndef Tcl_AppendFormatToObj_TCL_DECLARED +#define Tcl_AppendFormatToObj_TCL_DECLARED +/* 577 */ +EXTERN int Tcl_AppendFormatToObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, CONST char * format, + int objc, Tcl_Obj * CONST objv[]); +#endif +#ifndef Tcl_ObjPrintf_TCL_DECLARED +#define Tcl_ObjPrintf_TCL_DECLARED +/* 578 */ +EXTERN Tcl_Obj * Tcl_ObjPrintf (CONST char * format, ...); +#endif +#ifndef Tcl_AppendPrintfToObj_TCL_DECLARED +#define Tcl_AppendPrintfToObj_TCL_DECLARED +/* 579 */ +EXTERN void Tcl_AppendPrintfToObj (Tcl_Obj * objPtr, + CONST char * format, ...); +#endif + +typedef struct TclStubHooks { + struct TclPlatStubs *tclPlatStubs; + struct TclIntStubs *tclIntStubs; + struct TclIntPlatStubs *tclIntPlatStubs; +} TclStubHooks; + +typedef struct TclStubs { + int magic; + struct TclStubHooks *hooks; + + int (*tcl_PkgProvideEx) (Tcl_Interp* interp, CONST char* name, CONST char* version, ClientData clientData); /* 0 */ + CONST84_RETURN char * (*tcl_PkgRequireEx) (Tcl_Interp * interp, CONST char * name, CONST char * version, int exact, ClientData * clientDataPtr); /* 1 */ + void (*tcl_Panic) (CONST char * format, ...); /* 2 */ + char * (*tcl_Alloc) (unsigned int size); /* 3 */ + void (*tcl_Free) (char * ptr); /* 4 */ + char * (*tcl_Realloc) (char * ptr, unsigned int size); /* 5 */ + char * (*tcl_DbCkalloc) (unsigned int size, CONST char * file, int line); /* 6 */ + int (*tcl_DbCkfree) (char * ptr, CONST char * file, int line); /* 7 */ + char * (*tcl_DbCkrealloc) (char * ptr, unsigned int size, CONST char * file, int line); /* 8 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + void (*tcl_CreateFileHandler) (int fd, int mask, Tcl_FileProc * proc, ClientData clientData); /* 9 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + void *reserved9; +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + void (*tcl_CreateFileHandler) (int fd, int mask, Tcl_FileProc * proc, ClientData clientData); /* 9 */ +#endif /* MACOSX */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + void (*tcl_DeleteFileHandler) (int fd); /* 10 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + void *reserved10; +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + void (*tcl_DeleteFileHandler) (int fd); /* 10 */ +#endif /* MACOSX */ + void (*tcl_SetTimer) (Tcl_Time * timePtr); /* 11 */ + void (*tcl_Sleep) (int ms); /* 12 */ + int (*tcl_WaitForEvent) (Tcl_Time * timePtr); /* 13 */ + int (*tcl_AppendAllObjTypes) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 14 */ + void (*tcl_AppendStringsToObj) (Tcl_Obj * objPtr, ...); /* 15 */ + void (*tcl_AppendToObj) (Tcl_Obj* objPtr, CONST char* bytes, int length); /* 16 */ + Tcl_Obj * (*tcl_ConcatObj) (int objc, Tcl_Obj *CONST objv[]); /* 17 */ + int (*tcl_ConvertToType) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_ObjType * typePtr); /* 18 */ + void (*tcl_DbDecrRefCount) (Tcl_Obj * objPtr, CONST char * file, int line); /* 19 */ + void (*tcl_DbIncrRefCount) (Tcl_Obj * objPtr, CONST char * file, int line); /* 20 */ + int (*tcl_DbIsShared) (Tcl_Obj * objPtr, CONST char * file, int line); /* 21 */ + Tcl_Obj * (*tcl_DbNewBooleanObj) (int boolValue, CONST char * file, int line); /* 22 */ + Tcl_Obj * (*tcl_DbNewByteArrayObj) (CONST unsigned char * bytes, int length, CONST char * file, int line); /* 23 */ + Tcl_Obj * (*tcl_DbNewDoubleObj) (double doubleValue, CONST char * file, int line); /* 24 */ + Tcl_Obj * (*tcl_DbNewListObj) (int objc, Tcl_Obj *CONST * objv, CONST char * file, int line); /* 25 */ + Tcl_Obj * (*tcl_DbNewLongObj) (long longValue, CONST char * file, int line); /* 26 */ + Tcl_Obj * (*tcl_DbNewObj) (CONST char * file, int line); /* 27 */ + Tcl_Obj * (*tcl_DbNewStringObj) (CONST char * bytes, int length, CONST char * file, int line); /* 28 */ + Tcl_Obj * (*tcl_DuplicateObj) (Tcl_Obj * objPtr); /* 29 */ + void (*tclFreeObj) (Tcl_Obj * objPtr); /* 30 */ + int (*tcl_GetBoolean) (Tcl_Interp * interp, CONST char * src, int * boolPtr); /* 31 */ + int (*tcl_GetBooleanFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int * boolPtr); /* 32 */ + unsigned char * (*tcl_GetByteArrayFromObj) (Tcl_Obj * objPtr, int * lengthPtr); /* 33 */ + int (*tcl_GetDouble) (Tcl_Interp * interp, CONST char * src, double * doublePtr); /* 34 */ + int (*tcl_GetDoubleFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, double * doublePtr); /* 35 */ + int (*tcl_GetIndexFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, CONST84 char ** tablePtr, CONST char * msg, int flags, int * indexPtr); /* 36 */ + int (*tcl_GetInt) (Tcl_Interp * interp, CONST char * src, int * intPtr); /* 37 */ + int (*tcl_GetIntFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int * intPtr); /* 38 */ + int (*tcl_GetLongFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, long * longPtr); /* 39 */ + Tcl_ObjType * (*tcl_GetObjType) (CONST char * typeName); /* 40 */ + char * (*tcl_GetStringFromObj) (Tcl_Obj * objPtr, int * lengthPtr); /* 41 */ + void (*tcl_InvalidateStringRep) (Tcl_Obj * objPtr); /* 42 */ + int (*tcl_ListObjAppendList) (Tcl_Interp * interp, Tcl_Obj * listPtr, Tcl_Obj * elemListPtr); /* 43 */ + int (*tcl_ListObjAppendElement) (Tcl_Interp * interp, Tcl_Obj * listPtr, Tcl_Obj * objPtr); /* 44 */ + int (*tcl_ListObjGetElements) (Tcl_Interp * interp, Tcl_Obj * listPtr, int * objcPtr, Tcl_Obj *** objvPtr); /* 45 */ + int (*tcl_ListObjIndex) (Tcl_Interp * interp, Tcl_Obj * listPtr, int index, Tcl_Obj ** objPtrPtr); /* 46 */ + int (*tcl_ListObjLength) (Tcl_Interp * interp, Tcl_Obj * listPtr, int * lengthPtr); /* 47 */ + int (*tcl_ListObjReplace) (Tcl_Interp * interp, Tcl_Obj * listPtr, int first, int count, int objc, Tcl_Obj *CONST objv[]); /* 48 */ + Tcl_Obj * (*tcl_NewBooleanObj) (int boolValue); /* 49 */ + Tcl_Obj * (*tcl_NewByteArrayObj) (CONST unsigned char* bytes, int length); /* 50 */ + Tcl_Obj * (*tcl_NewDoubleObj) (double doubleValue); /* 51 */ + Tcl_Obj * (*tcl_NewIntObj) (int intValue); /* 52 */ + Tcl_Obj * (*tcl_NewListObj) (int objc, Tcl_Obj *CONST objv[]); /* 53 */ + Tcl_Obj * (*tcl_NewLongObj) (long longValue); /* 54 */ + Tcl_Obj * (*tcl_NewObj) (void); /* 55 */ + Tcl_Obj * (*tcl_NewStringObj) (CONST char * bytes, int length); /* 56 */ + void (*tcl_SetBooleanObj) (Tcl_Obj * objPtr, int boolValue); /* 57 */ + unsigned char * (*tcl_SetByteArrayLength) (Tcl_Obj * objPtr, int length); /* 58 */ + void (*tcl_SetByteArrayObj) (Tcl_Obj * objPtr, CONST unsigned char * bytes, int length); /* 59 */ + void (*tcl_SetDoubleObj) (Tcl_Obj * objPtr, double doubleValue); /* 60 */ + void (*tcl_SetIntObj) (Tcl_Obj * objPtr, int intValue); /* 61 */ + void (*tcl_SetListObj) (Tcl_Obj * objPtr, int objc, Tcl_Obj *CONST objv[]); /* 62 */ + void (*tcl_SetLongObj) (Tcl_Obj * objPtr, long longValue); /* 63 */ + void (*tcl_SetObjLength) (Tcl_Obj * objPtr, int length); /* 64 */ + void (*tcl_SetStringObj) (Tcl_Obj* objPtr, CONST char* bytes, int length); /* 65 */ + void (*tcl_AddErrorInfo) (Tcl_Interp * interp, CONST char * message); /* 66 */ + void (*tcl_AddObjErrorInfo) (Tcl_Interp * interp, CONST char * message, int length); /* 67 */ + void (*tcl_AllowExceptions) (Tcl_Interp * interp); /* 68 */ + void (*tcl_AppendElement) (Tcl_Interp * interp, CONST char * element); /* 69 */ + void (*tcl_AppendResult) (Tcl_Interp * interp, ...); /* 70 */ + Tcl_AsyncHandler (*tcl_AsyncCreate) (Tcl_AsyncProc * proc, ClientData clientData); /* 71 */ + void (*tcl_AsyncDelete) (Tcl_AsyncHandler async); /* 72 */ + int (*tcl_AsyncInvoke) (Tcl_Interp * interp, int code); /* 73 */ + void (*tcl_AsyncMark) (Tcl_AsyncHandler async); /* 74 */ + int (*tcl_AsyncReady) (void); /* 75 */ + void (*tcl_BackgroundError) (Tcl_Interp * interp); /* 76 */ + char (*tcl_Backslash) (CONST char * src, int * readPtr); /* 77 */ + int (*tcl_BadChannelOption) (Tcl_Interp * interp, CONST char * optionName, CONST char * optionList); /* 78 */ + void (*tcl_CallWhenDeleted) (Tcl_Interp * interp, Tcl_InterpDeleteProc * proc, ClientData clientData); /* 79 */ + void (*tcl_CancelIdleCall) (Tcl_IdleProc * idleProc, ClientData clientData); /* 80 */ + int (*tcl_Close) (Tcl_Interp * interp, Tcl_Channel chan); /* 81 */ + int (*tcl_CommandComplete) (CONST char * cmd); /* 82 */ + char * (*tcl_Concat) (int argc, CONST84 char * CONST * argv); /* 83 */ + int (*tcl_ConvertElement) (CONST char * src, char * dst, int flags); /* 84 */ + int (*tcl_ConvertCountedElement) (CONST char * src, int length, char * dst, int flags); /* 85 */ + int (*tcl_CreateAlias) (Tcl_Interp * slave, CONST char * slaveCmd, Tcl_Interp * target, CONST char * targetCmd, int argc, CONST84 char * CONST * argv); /* 86 */ + int (*tcl_CreateAliasObj) (Tcl_Interp * slave, CONST char * slaveCmd, Tcl_Interp * target, CONST char * targetCmd, int objc, Tcl_Obj *CONST objv[]); /* 87 */ + Tcl_Channel (*tcl_CreateChannel) (Tcl_ChannelType * typePtr, CONST char * chanName, ClientData instanceData, int mask); /* 88 */ + void (*tcl_CreateChannelHandler) (Tcl_Channel chan, int mask, Tcl_ChannelProc * proc, ClientData clientData); /* 89 */ + void (*tcl_CreateCloseHandler) (Tcl_Channel chan, Tcl_CloseProc * proc, ClientData clientData); /* 90 */ + Tcl_Command (*tcl_CreateCommand) (Tcl_Interp * interp, CONST char * cmdName, Tcl_CmdProc * proc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc); /* 91 */ + void (*tcl_CreateEventSource) (Tcl_EventSetupProc * setupProc, Tcl_EventCheckProc * checkProc, ClientData clientData); /* 92 */ + void (*tcl_CreateExitHandler) (Tcl_ExitProc * proc, ClientData clientData); /* 93 */ + Tcl_Interp * (*tcl_CreateInterp) (void); /* 94 */ + void (*tcl_CreateMathFunc) (Tcl_Interp * interp, CONST char * name, int numArgs, Tcl_ValueType * argTypes, Tcl_MathProc * proc, ClientData clientData); /* 95 */ + Tcl_Command (*tcl_CreateObjCommand) (Tcl_Interp * interp, CONST char * cmdName, Tcl_ObjCmdProc * proc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc); /* 96 */ + Tcl_Interp * (*tcl_CreateSlave) (Tcl_Interp * interp, CONST char * slaveName, int isSafe); /* 97 */ + Tcl_TimerToken (*tcl_CreateTimerHandler) (int milliseconds, Tcl_TimerProc * proc, ClientData clientData); /* 98 */ + Tcl_Trace (*tcl_CreateTrace) (Tcl_Interp * interp, int level, Tcl_CmdTraceProc * proc, ClientData clientData); /* 99 */ + void (*tcl_DeleteAssocData) (Tcl_Interp * interp, CONST char * name); /* 100 */ + void (*tcl_DeleteChannelHandler) (Tcl_Channel chan, Tcl_ChannelProc * proc, ClientData clientData); /* 101 */ + void (*tcl_DeleteCloseHandler) (Tcl_Channel chan, Tcl_CloseProc * proc, ClientData clientData); /* 102 */ + int (*tcl_DeleteCommand) (Tcl_Interp * interp, CONST char * cmdName); /* 103 */ + int (*tcl_DeleteCommandFromToken) (Tcl_Interp * interp, Tcl_Command command); /* 104 */ + void (*tcl_DeleteEvents) (Tcl_EventDeleteProc * proc, ClientData clientData); /* 105 */ + void (*tcl_DeleteEventSource) (Tcl_EventSetupProc * setupProc, Tcl_EventCheckProc * checkProc, ClientData clientData); /* 106 */ + void (*tcl_DeleteExitHandler) (Tcl_ExitProc * proc, ClientData clientData); /* 107 */ + void (*tcl_DeleteHashEntry) (Tcl_HashEntry * entryPtr); /* 108 */ + void (*tcl_DeleteHashTable) (Tcl_HashTable * tablePtr); /* 109 */ + void (*tcl_DeleteInterp) (Tcl_Interp * interp); /* 110 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + void (*tcl_DetachPids) (int numPids, Tcl_Pid * pidPtr); /* 111 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + void (*tcl_DetachPids) (int numPids, Tcl_Pid * pidPtr); /* 111 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + void (*tcl_DetachPids) (int numPids, Tcl_Pid * pidPtr); /* 111 */ +#endif /* MACOSX */ + void (*tcl_DeleteTimerHandler) (Tcl_TimerToken token); /* 112 */ + void (*tcl_DeleteTrace) (Tcl_Interp * interp, Tcl_Trace trace); /* 113 */ + void (*tcl_DontCallWhenDeleted) (Tcl_Interp * interp, Tcl_InterpDeleteProc * proc, ClientData clientData); /* 114 */ + int (*tcl_DoOneEvent) (int flags); /* 115 */ + void (*tcl_DoWhenIdle) (Tcl_IdleProc * proc, ClientData clientData); /* 116 */ + char * (*tcl_DStringAppend) (Tcl_DString * dsPtr, CONST char * bytes, int length); /* 117 */ + char * (*tcl_DStringAppendElement) (Tcl_DString * dsPtr, CONST char * element); /* 118 */ + void (*tcl_DStringEndSublist) (Tcl_DString * dsPtr); /* 119 */ + void (*tcl_DStringFree) (Tcl_DString * dsPtr); /* 120 */ + void (*tcl_DStringGetResult) (Tcl_Interp * interp, Tcl_DString * dsPtr); /* 121 */ + void (*tcl_DStringInit) (Tcl_DString * dsPtr); /* 122 */ + void (*tcl_DStringResult) (Tcl_Interp * interp, Tcl_DString * dsPtr); /* 123 */ + void (*tcl_DStringSetLength) (Tcl_DString * dsPtr, int length); /* 124 */ + void (*tcl_DStringStartSublist) (Tcl_DString * dsPtr); /* 125 */ + int (*tcl_Eof) (Tcl_Channel chan); /* 126 */ + CONST84_RETURN char * (*tcl_ErrnoId) (void); /* 127 */ + CONST84_RETURN char * (*tcl_ErrnoMsg) (int err); /* 128 */ + int (*tcl_Eval) (Tcl_Interp * interp, CONST char * script); /* 129 */ + int (*tcl_EvalFile) (Tcl_Interp * interp, CONST char * fileName); /* 130 */ + int (*tcl_EvalObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 131 */ + void (*tcl_EventuallyFree) (ClientData clientData, Tcl_FreeProc * freeProc); /* 132 */ + void (*tcl_Exit) (int status); /* 133 */ + int (*tcl_ExposeCommand) (Tcl_Interp * interp, CONST char * hiddenCmdToken, CONST char * cmdName); /* 134 */ + int (*tcl_ExprBoolean) (Tcl_Interp * interp, CONST char * expr, int * ptr); /* 135 */ + int (*tcl_ExprBooleanObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int * ptr); /* 136 */ + int (*tcl_ExprDouble) (Tcl_Interp * interp, CONST char * expr, double * ptr); /* 137 */ + int (*tcl_ExprDoubleObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, double * ptr); /* 138 */ + int (*tcl_ExprLong) (Tcl_Interp * interp, CONST char * expr, long * ptr); /* 139 */ + int (*tcl_ExprLongObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, long * ptr); /* 140 */ + int (*tcl_ExprObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_Obj ** resultPtrPtr); /* 141 */ + int (*tcl_ExprString) (Tcl_Interp * interp, CONST char * expr); /* 142 */ + void (*tcl_Finalize) (void); /* 143 */ + void (*tcl_FindExecutable) (CONST char * argv0); /* 144 */ + Tcl_HashEntry * (*tcl_FirstHashEntry) (Tcl_HashTable * tablePtr, Tcl_HashSearch * searchPtr); /* 145 */ + int (*tcl_Flush) (Tcl_Channel chan); /* 146 */ + void (*tcl_FreeResult) (Tcl_Interp * interp); /* 147 */ + int (*tcl_GetAlias) (Tcl_Interp * interp, CONST char * slaveCmd, Tcl_Interp ** targetInterpPtr, CONST84 char ** targetCmdPtr, int * argcPtr, CONST84 char *** argvPtr); /* 148 */ + int (*tcl_GetAliasObj) (Tcl_Interp * interp, CONST char * slaveCmd, Tcl_Interp ** targetInterpPtr, CONST84 char ** targetCmdPtr, int * objcPtr, Tcl_Obj *** objv); /* 149 */ + ClientData (*tcl_GetAssocData) (Tcl_Interp * interp, CONST char * name, Tcl_InterpDeleteProc ** procPtr); /* 150 */ + Tcl_Channel (*tcl_GetChannel) (Tcl_Interp * interp, CONST char * chanName, int * modePtr); /* 151 */ + int (*tcl_GetChannelBufferSize) (Tcl_Channel chan); /* 152 */ + int (*tcl_GetChannelHandle) (Tcl_Channel chan, int direction, ClientData * handlePtr); /* 153 */ + ClientData (*tcl_GetChannelInstanceData) (Tcl_Channel chan); /* 154 */ + int (*tcl_GetChannelMode) (Tcl_Channel chan); /* 155 */ + CONST84_RETURN char * (*tcl_GetChannelName) (Tcl_Channel chan); /* 156 */ + int (*tcl_GetChannelOption) (Tcl_Interp * interp, Tcl_Channel chan, CONST char * optionName, Tcl_DString * dsPtr); /* 157 */ + Tcl_ChannelType * (*tcl_GetChannelType) (Tcl_Channel chan); /* 158 */ + int (*tcl_GetCommandInfo) (Tcl_Interp * interp, CONST char * cmdName, Tcl_CmdInfo * infoPtr); /* 159 */ + CONST84_RETURN char * (*tcl_GetCommandName) (Tcl_Interp * interp, Tcl_Command command); /* 160 */ + int (*tcl_GetErrno) (void); /* 161 */ + CONST84_RETURN char * (*tcl_GetHostName) (void); /* 162 */ + int (*tcl_GetInterpPath) (Tcl_Interp * askInterp, Tcl_Interp * slaveInterp); /* 163 */ + Tcl_Interp * (*tcl_GetMaster) (Tcl_Interp * interp); /* 164 */ + CONST char * (*tcl_GetNameOfExecutable) (void); /* 165 */ + Tcl_Obj * (*tcl_GetObjResult) (Tcl_Interp * interp); /* 166 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + int (*tcl_GetOpenFile) (Tcl_Interp * interp, CONST char * chanID, int forWriting, int checkUsage, ClientData * filePtr); /* 167 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + void *reserved167; +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + int (*tcl_GetOpenFile) (Tcl_Interp * interp, CONST char * chanID, int forWriting, int checkUsage, ClientData * filePtr); /* 167 */ +#endif /* MACOSX */ + Tcl_PathType (*tcl_GetPathType) (CONST char * path); /* 168 */ + int (*tcl_Gets) (Tcl_Channel chan, Tcl_DString * dsPtr); /* 169 */ + int (*tcl_GetsObj) (Tcl_Channel chan, Tcl_Obj * objPtr); /* 170 */ + int (*tcl_GetServiceMode) (void); /* 171 */ + Tcl_Interp * (*tcl_GetSlave) (Tcl_Interp * interp, CONST char * slaveName); /* 172 */ + Tcl_Channel (*tcl_GetStdChannel) (int type); /* 173 */ + CONST84_RETURN char * (*tcl_GetStringResult) (Tcl_Interp * interp); /* 174 */ + CONST84_RETURN char * (*tcl_GetVar) (Tcl_Interp * interp, CONST char * varName, int flags); /* 175 */ + CONST84_RETURN char * (*tcl_GetVar2) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags); /* 176 */ + int (*tcl_GlobalEval) (Tcl_Interp * interp, CONST char * command); /* 177 */ + int (*tcl_GlobalEvalObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 178 */ + int (*tcl_HideCommand) (Tcl_Interp * interp, CONST char * cmdName, CONST char * hiddenCmdToken); /* 179 */ + int (*tcl_Init) (Tcl_Interp * interp); /* 180 */ + void (*tcl_InitHashTable) (Tcl_HashTable * tablePtr, int keyType); /* 181 */ + int (*tcl_InputBlocked) (Tcl_Channel chan); /* 182 */ + int (*tcl_InputBuffered) (Tcl_Channel chan); /* 183 */ + int (*tcl_InterpDeleted) (Tcl_Interp * interp); /* 184 */ + int (*tcl_IsSafe) (Tcl_Interp * interp); /* 185 */ + char * (*tcl_JoinPath) (int argc, CONST84 char * CONST * argv, Tcl_DString * resultPtr); /* 186 */ + int (*tcl_LinkVar) (Tcl_Interp * interp, CONST char * varName, char * addr, int type); /* 187 */ + void *reserved188; + Tcl_Channel (*tcl_MakeFileChannel) (ClientData handle, int mode); /* 189 */ + int (*tcl_MakeSafe) (Tcl_Interp * interp); /* 190 */ + Tcl_Channel (*tcl_MakeTcpClientChannel) (ClientData tcpSocket); /* 191 */ + char * (*tcl_Merge) (int argc, CONST84 char * CONST * argv); /* 192 */ + Tcl_HashEntry * (*tcl_NextHashEntry) (Tcl_HashSearch * searchPtr); /* 193 */ + void (*tcl_NotifyChannel) (Tcl_Channel channel, int mask); /* 194 */ + Tcl_Obj * (*tcl_ObjGetVar2) (Tcl_Interp * interp, Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, int flags); /* 195 */ + Tcl_Obj * (*tcl_ObjSetVar2) (Tcl_Interp * interp, Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, Tcl_Obj * newValuePtr, int flags); /* 196 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + Tcl_Channel (*tcl_OpenCommandChannel) (Tcl_Interp * interp, int argc, CONST84 char ** argv, int flags); /* 197 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + Tcl_Channel (*tcl_OpenCommandChannel) (Tcl_Interp * interp, int argc, CONST84 char ** argv, int flags); /* 197 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + Tcl_Channel (*tcl_OpenCommandChannel) (Tcl_Interp * interp, int argc, CONST84 char ** argv, int flags); /* 197 */ +#endif /* MACOSX */ + Tcl_Channel (*tcl_OpenFileChannel) (Tcl_Interp * interp, CONST char * fileName, CONST char * modeString, int permissions); /* 198 */ + Tcl_Channel (*tcl_OpenTcpClient) (Tcl_Interp * interp, int port, CONST char * address, CONST char * myaddr, int myport, int async); /* 199 */ + Tcl_Channel (*tcl_OpenTcpServer) (Tcl_Interp * interp, int port, CONST char * host, Tcl_TcpAcceptProc * acceptProc, ClientData callbackData); /* 200 */ + void (*tcl_Preserve) (ClientData data); /* 201 */ + void (*tcl_PrintDouble) (Tcl_Interp * interp, double value, char * dst); /* 202 */ + int (*tcl_PutEnv) (CONST char * assignment); /* 203 */ + CONST84_RETURN char * (*tcl_PosixError) (Tcl_Interp * interp); /* 204 */ + void (*tcl_QueueEvent) (Tcl_Event * evPtr, Tcl_QueuePosition position); /* 205 */ + int (*tcl_Read) (Tcl_Channel chan, char * bufPtr, int toRead); /* 206 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + void (*tcl_ReapDetachedProcs) (void); /* 207 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + void (*tcl_ReapDetachedProcs) (void); /* 207 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + void (*tcl_ReapDetachedProcs) (void); /* 207 */ +#endif /* MACOSX */ + int (*tcl_RecordAndEval) (Tcl_Interp * interp, CONST char * cmd, int flags); /* 208 */ + int (*tcl_RecordAndEvalObj) (Tcl_Interp * interp, Tcl_Obj * cmdPtr, int flags); /* 209 */ + void (*tcl_RegisterChannel) (Tcl_Interp * interp, Tcl_Channel chan); /* 210 */ + void (*tcl_RegisterObjType) (Tcl_ObjType * typePtr); /* 211 */ + Tcl_RegExp (*tcl_RegExpCompile) (Tcl_Interp * interp, CONST char * pattern); /* 212 */ + int (*tcl_RegExpExec) (Tcl_Interp * interp, Tcl_RegExp regexp, CONST char * text, CONST char * start); /* 213 */ + int (*tcl_RegExpMatch) (Tcl_Interp * interp, CONST char * text, CONST char * pattern); /* 214 */ + void (*tcl_RegExpRange) (Tcl_RegExp regexp, int index, CONST84 char ** startPtr, CONST84 char ** endPtr); /* 215 */ + void (*tcl_Release) (ClientData clientData); /* 216 */ + void (*tcl_ResetResult) (Tcl_Interp * interp); /* 217 */ + int (*tcl_ScanElement) (CONST char * str, int * flagPtr); /* 218 */ + int (*tcl_ScanCountedElement) (CONST char * str, int length, int * flagPtr); /* 219 */ + int (*tcl_SeekOld) (Tcl_Channel chan, int offset, int mode); /* 220 */ + int (*tcl_ServiceAll) (void); /* 221 */ + int (*tcl_ServiceEvent) (int flags); /* 222 */ + void (*tcl_SetAssocData) (Tcl_Interp * interp, CONST char * name, Tcl_InterpDeleteProc * proc, ClientData clientData); /* 223 */ + void (*tcl_SetChannelBufferSize) (Tcl_Channel chan, int sz); /* 224 */ + int (*tcl_SetChannelOption) (Tcl_Interp * interp, Tcl_Channel chan, CONST char * optionName, CONST char * newValue); /* 225 */ + int (*tcl_SetCommandInfo) (Tcl_Interp * interp, CONST char * cmdName, CONST Tcl_CmdInfo * infoPtr); /* 226 */ + void (*tcl_SetErrno) (int err); /* 227 */ + void (*tcl_SetErrorCode) (Tcl_Interp * interp, ...); /* 228 */ + void (*tcl_SetMaxBlockTime) (Tcl_Time * timePtr); /* 229 */ + void (*tcl_SetPanicProc) (Tcl_PanicProc * panicProc); /* 230 */ + int (*tcl_SetRecursionLimit) (Tcl_Interp * interp, int depth); /* 231 */ + void (*tcl_SetResult) (Tcl_Interp * interp, char * result, Tcl_FreeProc * freeProc); /* 232 */ + int (*tcl_SetServiceMode) (int mode); /* 233 */ + void (*tcl_SetObjErrorCode) (Tcl_Interp * interp, Tcl_Obj * errorObjPtr); /* 234 */ + void (*tcl_SetObjResult) (Tcl_Interp * interp, Tcl_Obj * resultObjPtr); /* 235 */ + void (*tcl_SetStdChannel) (Tcl_Channel channel, int type); /* 236 */ + CONST84_RETURN char * (*tcl_SetVar) (Tcl_Interp * interp, CONST char * varName, CONST char * newValue, int flags); /* 237 */ + CONST84_RETURN char * (*tcl_SetVar2) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, CONST char * newValue, int flags); /* 238 */ + CONST84_RETURN char * (*tcl_SignalId) (int sig); /* 239 */ + CONST84_RETURN char * (*tcl_SignalMsg) (int sig); /* 240 */ + void (*tcl_SourceRCFile) (Tcl_Interp * interp); /* 241 */ + int (*tcl_SplitList) (Tcl_Interp * interp, CONST char * listStr, int * argcPtr, CONST84 char *** argvPtr); /* 242 */ + void (*tcl_SplitPath) (CONST char * path, int * argcPtr, CONST84 char *** argvPtr); /* 243 */ + void (*tcl_StaticPackage) (Tcl_Interp * interp, CONST char * pkgName, Tcl_PackageInitProc * initProc, Tcl_PackageInitProc * safeInitProc); /* 244 */ + int (*tcl_StringMatch) (CONST char * str, CONST char * pattern); /* 245 */ + int (*tcl_TellOld) (Tcl_Channel chan); /* 246 */ + int (*tcl_TraceVar) (Tcl_Interp * interp, CONST char * varName, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 247 */ + int (*tcl_TraceVar2) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 248 */ + char * (*tcl_TranslateFileName) (Tcl_Interp * interp, CONST char * name, Tcl_DString * bufferPtr); /* 249 */ + int (*tcl_Ungets) (Tcl_Channel chan, CONST char * str, int len, int atHead); /* 250 */ + void (*tcl_UnlinkVar) (Tcl_Interp * interp, CONST char * varName); /* 251 */ + int (*tcl_UnregisterChannel) (Tcl_Interp * interp, Tcl_Channel chan); /* 252 */ + int (*tcl_UnsetVar) (Tcl_Interp * interp, CONST char * varName, int flags); /* 253 */ + int (*tcl_UnsetVar2) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags); /* 254 */ + void (*tcl_UntraceVar) (Tcl_Interp * interp, CONST char * varName, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 255 */ + void (*tcl_UntraceVar2) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 256 */ + void (*tcl_UpdateLinkedVar) (Tcl_Interp * interp, CONST char * varName); /* 257 */ + int (*tcl_UpVar) (Tcl_Interp * interp, CONST char * frameName, CONST char * varName, CONST char * localName, int flags); /* 258 */ + int (*tcl_UpVar2) (Tcl_Interp * interp, CONST char * frameName, CONST char * part1, CONST char * part2, CONST char * localName, int flags); /* 259 */ + int (*tcl_VarEval) (Tcl_Interp * interp, ...); /* 260 */ + ClientData (*tcl_VarTraceInfo) (Tcl_Interp * interp, CONST char * varName, int flags, Tcl_VarTraceProc * procPtr, ClientData prevClientData); /* 261 */ + ClientData (*tcl_VarTraceInfo2) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags, Tcl_VarTraceProc * procPtr, ClientData prevClientData); /* 262 */ + int (*tcl_Write) (Tcl_Channel chan, CONST char * s, int slen); /* 263 */ + void (*tcl_WrongNumArgs) (Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], CONST char * message); /* 264 */ + int (*tcl_DumpActiveMemory) (CONST char * fileName); /* 265 */ + void (*tcl_ValidateAllMemory) (CONST char * file, int line); /* 266 */ + void (*tcl_AppendResultVA) (Tcl_Interp * interp, va_list argList); /* 267 */ + void (*tcl_AppendStringsToObjVA) (Tcl_Obj * objPtr, va_list argList); /* 268 */ + char * (*tcl_HashStats) (Tcl_HashTable * tablePtr); /* 269 */ + CONST84_RETURN char * (*tcl_ParseVar) (Tcl_Interp * interp, CONST char * start, CONST84 char ** termPtr); /* 270 */ + CONST84_RETURN char * (*tcl_PkgPresent) (Tcl_Interp * interp, CONST char * name, CONST char * version, int exact); /* 271 */ + CONST84_RETURN char * (*tcl_PkgPresentEx) (Tcl_Interp * interp, CONST char * name, CONST char * version, int exact, ClientData * clientDataPtr); /* 272 */ + int (*tcl_PkgProvide) (Tcl_Interp * interp, CONST char * name, CONST char * version); /* 273 */ + CONST84_RETURN char * (*tcl_PkgRequire) (Tcl_Interp * interp, CONST char * name, CONST char * version, int exact); /* 274 */ + void (*tcl_SetErrorCodeVA) (Tcl_Interp * interp, va_list argList); /* 275 */ + int (*tcl_VarEvalVA) (Tcl_Interp * interp, va_list argList); /* 276 */ + Tcl_Pid (*tcl_WaitPid) (Tcl_Pid pid, int * statPtr, int options); /* 277 */ + void (*tcl_PanicVA) (CONST char * format, va_list argList); /* 278 */ + void (*tcl_GetVersion) (int * major, int * minor, int * patchLevel, int * type); /* 279 */ + void (*tcl_InitMemory) (Tcl_Interp * interp); /* 280 */ + Tcl_Channel (*tcl_StackChannel) (Tcl_Interp * interp, Tcl_ChannelType * typePtr, ClientData instanceData, int mask, Tcl_Channel prevChan); /* 281 */ + int (*tcl_UnstackChannel) (Tcl_Interp * interp, Tcl_Channel chan); /* 282 */ + Tcl_Channel (*tcl_GetStackedChannel) (Tcl_Channel chan); /* 283 */ + void (*tcl_SetMainLoop) (Tcl_MainLoopProc * proc); /* 284 */ + void *reserved285; + void (*tcl_AppendObjToObj) (Tcl_Obj * objPtr, Tcl_Obj * appendObjPtr); /* 286 */ + Tcl_Encoding (*tcl_CreateEncoding) (const Tcl_EncodingType * typePtr); /* 287 */ + void (*tcl_CreateThreadExitHandler) (Tcl_ExitProc * proc, ClientData clientData); /* 288 */ + void (*tcl_DeleteThreadExitHandler) (Tcl_ExitProc * proc, ClientData clientData); /* 289 */ + void (*tcl_DiscardResult) (Tcl_SavedResult * statePtr); /* 290 */ + int (*tcl_EvalEx) (Tcl_Interp * interp, CONST char * script, int numBytes, int flags); /* 291 */ + int (*tcl_EvalObjv) (Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], int flags); /* 292 */ + int (*tcl_EvalObjEx) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); /* 293 */ + void (*tcl_ExitThread) (int status); /* 294 */ + int (*tcl_ExternalToUtf) (Tcl_Interp * interp, Tcl_Encoding encoding, CONST char * src, int srcLen, int flags, Tcl_EncodingState * statePtr, char * dst, int dstLen, int * srcReadPtr, int * dstWrotePtr, int * dstCharsPtr); /* 295 */ + char * (*tcl_ExternalToUtfDString) (Tcl_Encoding encoding, CONST char * src, int srcLen, Tcl_DString * dsPtr); /* 296 */ + void (*tcl_FinalizeThread) (void); /* 297 */ + void (*tcl_FinalizeNotifier) (ClientData clientData); /* 298 */ + void (*tcl_FreeEncoding) (Tcl_Encoding encoding); /* 299 */ + Tcl_ThreadId (*tcl_GetCurrentThread) (void); /* 300 */ + Tcl_Encoding (*tcl_GetEncoding) (Tcl_Interp * interp, CONST char * name); /* 301 */ + CONST84_RETURN char * (*tcl_GetEncodingName) (Tcl_Encoding encoding); /* 302 */ + void (*tcl_GetEncodingNames) (Tcl_Interp * interp); /* 303 */ + int (*tcl_GetIndexFromObjStruct) (Tcl_Interp * interp, Tcl_Obj * objPtr, CONST VOID * tablePtr, int offset, CONST char * msg, int flags, int * indexPtr); /* 304 */ + VOID * (*tcl_GetThreadData) (Tcl_ThreadDataKey * keyPtr, int size); /* 305 */ + Tcl_Obj * (*tcl_GetVar2Ex) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags); /* 306 */ + ClientData (*tcl_InitNotifier) (void); /* 307 */ + void (*tcl_MutexLock) (Tcl_Mutex * mutexPtr); /* 308 */ + void (*tcl_MutexUnlock) (Tcl_Mutex * mutexPtr); /* 309 */ + void (*tcl_ConditionNotify) (Tcl_Condition * condPtr); /* 310 */ + void (*tcl_ConditionWait) (Tcl_Condition * condPtr, Tcl_Mutex * mutexPtr, Tcl_Time * timePtr); /* 311 */ + int (*tcl_NumUtfChars) (CONST char * src, int length); /* 312 */ + int (*tcl_ReadChars) (Tcl_Channel channel, Tcl_Obj * objPtr, int charsToRead, int appendFlag); /* 313 */ + void (*tcl_RestoreResult) (Tcl_Interp * interp, Tcl_SavedResult * statePtr); /* 314 */ + void (*tcl_SaveResult) (Tcl_Interp * interp, Tcl_SavedResult * statePtr); /* 315 */ + int (*tcl_SetSystemEncoding) (Tcl_Interp * interp, CONST char * name); /* 316 */ + Tcl_Obj * (*tcl_SetVar2Ex) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, Tcl_Obj * newValuePtr, int flags); /* 317 */ + void (*tcl_ThreadAlert) (Tcl_ThreadId threadId); /* 318 */ + void (*tcl_ThreadQueueEvent) (Tcl_ThreadId threadId, Tcl_Event* evPtr, Tcl_QueuePosition position); /* 319 */ + Tcl_UniChar (*tcl_UniCharAtIndex) (CONST char * src, int index); /* 320 */ + Tcl_UniChar (*tcl_UniCharToLower) (int ch); /* 321 */ + Tcl_UniChar (*tcl_UniCharToTitle) (int ch); /* 322 */ + Tcl_UniChar (*tcl_UniCharToUpper) (int ch); /* 323 */ + int (*tcl_UniCharToUtf) (int ch, char * buf); /* 324 */ + CONST84_RETURN char * (*tcl_UtfAtIndex) (CONST char * src, int index); /* 325 */ + int (*tcl_UtfCharComplete) (CONST char * src, int length); /* 326 */ + int (*tcl_UtfBackslash) (CONST char * src, int * readPtr, char * dst); /* 327 */ + CONST84_RETURN char * (*tcl_UtfFindFirst) (CONST char * src, int ch); /* 328 */ + CONST84_RETURN char * (*tcl_UtfFindLast) (CONST char * src, int ch); /* 329 */ + CONST84_RETURN char * (*tcl_UtfNext) (CONST char * src); /* 330 */ + CONST84_RETURN char * (*tcl_UtfPrev) (CONST char * src, CONST char * start); /* 331 */ + int (*tcl_UtfToExternal) (Tcl_Interp * interp, Tcl_Encoding encoding, CONST char * src, int srcLen, int flags, Tcl_EncodingState * statePtr, char * dst, int dstLen, int * srcReadPtr, int * dstWrotePtr, int * dstCharsPtr); /* 332 */ + char * (*tcl_UtfToExternalDString) (Tcl_Encoding encoding, CONST char * src, int srcLen, Tcl_DString * dsPtr); /* 333 */ + int (*tcl_UtfToLower) (char * src); /* 334 */ + int (*tcl_UtfToTitle) (char * src); /* 335 */ + int (*tcl_UtfToUniChar) (CONST char * src, Tcl_UniChar * chPtr); /* 336 */ + int (*tcl_UtfToUpper) (char * src); /* 337 */ + int (*tcl_WriteChars) (Tcl_Channel chan, CONST char * src, int srcLen); /* 338 */ + int (*tcl_WriteObj) (Tcl_Channel chan, Tcl_Obj * objPtr); /* 339 */ + char * (*tcl_GetString) (Tcl_Obj * objPtr); /* 340 */ + CONST84_RETURN char * (*tcl_GetDefaultEncodingDir) (void); /* 341 */ + void (*tcl_SetDefaultEncodingDir) (CONST char * path); /* 342 */ + void (*tcl_AlertNotifier) (ClientData clientData); /* 343 */ + void (*tcl_ServiceModeHook) (int mode); /* 344 */ + int (*tcl_UniCharIsAlnum) (int ch); /* 345 */ + int (*tcl_UniCharIsAlpha) (int ch); /* 346 */ + int (*tcl_UniCharIsDigit) (int ch); /* 347 */ + int (*tcl_UniCharIsLower) (int ch); /* 348 */ + int (*tcl_UniCharIsSpace) (int ch); /* 349 */ + int (*tcl_UniCharIsUpper) (int ch); /* 350 */ + int (*tcl_UniCharIsWordChar) (int ch); /* 351 */ + int (*tcl_UniCharLen) (CONST Tcl_UniChar * uniStr); /* 352 */ + int (*tcl_UniCharNcmp) (CONST Tcl_UniChar * ucs, CONST Tcl_UniChar * uct, unsigned long numChars); /* 353 */ + char * (*tcl_UniCharToUtfDString) (CONST Tcl_UniChar * uniStr, int uniLength, Tcl_DString * dsPtr); /* 354 */ + Tcl_UniChar * (*tcl_UtfToUniCharDString) (CONST char * src, int length, Tcl_DString * dsPtr); /* 355 */ + Tcl_RegExp (*tcl_GetRegExpFromObj) (Tcl_Interp * interp, Tcl_Obj * patObj, int flags); /* 356 */ + Tcl_Obj * (*tcl_EvalTokens) (Tcl_Interp * interp, Tcl_Token * tokenPtr, int count); /* 357 */ + void (*tcl_FreeParse) (Tcl_Parse * parsePtr); /* 358 */ + void (*tcl_LogCommandInfo) (Tcl_Interp * interp, CONST char * script, CONST char * command, int length); /* 359 */ + int (*tcl_ParseBraces) (Tcl_Interp * interp, CONST char * start, int numBytes, Tcl_Parse * parsePtr, int append, CONST84 char ** termPtr); /* 360 */ + int (*tcl_ParseCommand) (Tcl_Interp * interp, CONST char * start, int numBytes, int nested, Tcl_Parse * parsePtr); /* 361 */ + int (*tcl_ParseExpr) (Tcl_Interp * interp, CONST char * start, int numBytes, Tcl_Parse * parsePtr); /* 362 */ + int (*tcl_ParseQuotedString) (Tcl_Interp * interp, CONST char * start, int numBytes, Tcl_Parse * parsePtr, int append, CONST84 char ** termPtr); /* 363 */ + int (*tcl_ParseVarName) (Tcl_Interp * interp, CONST char * start, int numBytes, Tcl_Parse * parsePtr, int append); /* 364 */ + char * (*tcl_GetCwd) (Tcl_Interp * interp, Tcl_DString * cwdPtr); /* 365 */ + int (*tcl_Chdir) (CONST char * dirName); /* 366 */ + int (*tcl_Access) (CONST char * path, int mode); /* 367 */ + int (*tcl_Stat) (CONST char * path, struct stat * bufPtr); /* 368 */ + int (*tcl_UtfNcmp) (CONST char * s1, CONST char * s2, unsigned long n); /* 369 */ + int (*tcl_UtfNcasecmp) (CONST char * s1, CONST char * s2, unsigned long n); /* 370 */ + int (*tcl_StringCaseMatch) (CONST char * str, CONST char * pattern, int nocase); /* 371 */ + int (*tcl_UniCharIsControl) (int ch); /* 372 */ + int (*tcl_UniCharIsGraph) (int ch); /* 373 */ + int (*tcl_UniCharIsPrint) (int ch); /* 374 */ + int (*tcl_UniCharIsPunct) (int ch); /* 375 */ + int (*tcl_RegExpExecObj) (Tcl_Interp * interp, Tcl_RegExp regexp, Tcl_Obj * textObj, int offset, int nmatches, int flags); /* 376 */ + void (*tcl_RegExpGetInfo) (Tcl_RegExp regexp, Tcl_RegExpInfo * infoPtr); /* 377 */ + Tcl_Obj * (*tcl_NewUnicodeObj) (CONST Tcl_UniChar * unicode, int numChars); /* 378 */ + void (*tcl_SetUnicodeObj) (Tcl_Obj * objPtr, CONST Tcl_UniChar * unicode, int numChars); /* 379 */ + int (*tcl_GetCharLength) (Tcl_Obj * objPtr); /* 380 */ + Tcl_UniChar (*tcl_GetUniChar) (Tcl_Obj * objPtr, int index); /* 381 */ + Tcl_UniChar * (*tcl_GetUnicode) (Tcl_Obj * objPtr); /* 382 */ + Tcl_Obj * (*tcl_GetRange) (Tcl_Obj * objPtr, int first, int last); /* 383 */ + void (*tcl_AppendUnicodeToObj) (Tcl_Obj * objPtr, CONST Tcl_UniChar * unicode, int length); /* 384 */ + int (*tcl_RegExpMatchObj) (Tcl_Interp * interp, Tcl_Obj * textObj, Tcl_Obj * patternObj); /* 385 */ + void (*tcl_SetNotifier) (Tcl_NotifierProcs * notifierProcPtr); /* 386 */ + Tcl_Mutex * (*tcl_GetAllocMutex) (void); /* 387 */ + int (*tcl_GetChannelNames) (Tcl_Interp * interp); /* 388 */ + int (*tcl_GetChannelNamesEx) (Tcl_Interp * interp, CONST char * pattern); /* 389 */ + int (*tcl_ProcObjCmd) (ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[]); /* 390 */ + void (*tcl_ConditionFinalize) (Tcl_Condition * condPtr); /* 391 */ + void (*tcl_MutexFinalize) (Tcl_Mutex * mutex); /* 392 */ + int (*tcl_CreateThread) (Tcl_ThreadId * idPtr, Tcl_ThreadCreateProc proc, ClientData clientData, int stackSize, int flags); /* 393 */ + int (*tcl_ReadRaw) (Tcl_Channel chan, char * dst, int bytesToRead); /* 394 */ + int (*tcl_WriteRaw) (Tcl_Channel chan, CONST char * src, int srcLen); /* 395 */ + Tcl_Channel (*tcl_GetTopChannel) (Tcl_Channel chan); /* 396 */ + int (*tcl_ChannelBuffered) (Tcl_Channel chan); /* 397 */ + CONST84_RETURN char * (*tcl_ChannelName) (CONST Tcl_ChannelType * chanTypePtr); /* 398 */ + Tcl_ChannelTypeVersion (*tcl_ChannelVersion) (CONST Tcl_ChannelType * chanTypePtr); /* 399 */ + Tcl_DriverBlockModeProc * (*tcl_ChannelBlockModeProc) (CONST Tcl_ChannelType * chanTypePtr); /* 400 */ + Tcl_DriverCloseProc * (*tcl_ChannelCloseProc) (CONST Tcl_ChannelType * chanTypePtr); /* 401 */ + Tcl_DriverClose2Proc * (*tcl_ChannelClose2Proc) (CONST Tcl_ChannelType * chanTypePtr); /* 402 */ + Tcl_DriverInputProc * (*tcl_ChannelInputProc) (CONST Tcl_ChannelType * chanTypePtr); /* 403 */ + Tcl_DriverOutputProc * (*tcl_ChannelOutputProc) (CONST Tcl_ChannelType * chanTypePtr); /* 404 */ + Tcl_DriverSeekProc * (*tcl_ChannelSeekProc) (CONST Tcl_ChannelType * chanTypePtr); /* 405 */ + Tcl_DriverSetOptionProc * (*tcl_ChannelSetOptionProc) (CONST Tcl_ChannelType * chanTypePtr); /* 406 */ + Tcl_DriverGetOptionProc * (*tcl_ChannelGetOptionProc) (CONST Tcl_ChannelType * chanTypePtr); /* 407 */ + Tcl_DriverWatchProc * (*tcl_ChannelWatchProc) (CONST Tcl_ChannelType * chanTypePtr); /* 408 */ + Tcl_DriverGetHandleProc * (*tcl_ChannelGetHandleProc) (CONST Tcl_ChannelType * chanTypePtr); /* 409 */ + Tcl_DriverFlushProc * (*tcl_ChannelFlushProc) (CONST Tcl_ChannelType * chanTypePtr); /* 410 */ + Tcl_DriverHandlerProc * (*tcl_ChannelHandlerProc) (CONST Tcl_ChannelType * chanTypePtr); /* 411 */ + int (*tcl_JoinThread) (Tcl_ThreadId threadId, int* result); /* 412 */ + int (*tcl_IsChannelShared) (Tcl_Channel channel); /* 413 */ + int (*tcl_IsChannelRegistered) (Tcl_Interp* interp, Tcl_Channel channel); /* 414 */ + void (*tcl_CutChannel) (Tcl_Channel channel); /* 415 */ + void (*tcl_SpliceChannel) (Tcl_Channel channel); /* 416 */ + void (*tcl_ClearChannelHandlers) (Tcl_Channel channel); /* 417 */ + int (*tcl_IsChannelExisting) (CONST char* channelName); /* 418 */ + int (*tcl_UniCharNcasecmp) (CONST Tcl_UniChar * ucs, CONST Tcl_UniChar * uct, unsigned long numChars); /* 419 */ + int (*tcl_UniCharCaseMatch) (CONST Tcl_UniChar * uniStr, CONST Tcl_UniChar * uniPattern, int nocase); /* 420 */ + Tcl_HashEntry * (*tcl_FindHashEntry) (Tcl_HashTable * tablePtr, CONST char * key); /* 421 */ + Tcl_HashEntry * (*tcl_CreateHashEntry) (Tcl_HashTable * tablePtr, CONST char * key, int * newPtr); /* 422 */ + void (*tcl_InitCustomHashTable) (Tcl_HashTable * tablePtr, int keyType, Tcl_HashKeyType * typePtr); /* 423 */ + void (*tcl_InitObjHashTable) (Tcl_HashTable * tablePtr); /* 424 */ + ClientData (*tcl_CommandTraceInfo) (Tcl_Interp * interp, CONST char * varName, int flags, Tcl_CommandTraceProc * procPtr, ClientData prevClientData); /* 425 */ + int (*tcl_TraceCommand) (Tcl_Interp * interp, CONST char * varName, int flags, Tcl_CommandTraceProc * proc, ClientData clientData); /* 426 */ + void (*tcl_UntraceCommand) (Tcl_Interp * interp, CONST char * varName, int flags, Tcl_CommandTraceProc * proc, ClientData clientData); /* 427 */ + char * (*tcl_AttemptAlloc) (unsigned int size); /* 428 */ + char * (*tcl_AttemptDbCkalloc) (unsigned int size, CONST char * file, int line); /* 429 */ + char * (*tcl_AttemptRealloc) (char * ptr, unsigned int size); /* 430 */ + char * (*tcl_AttemptDbCkrealloc) (char * ptr, unsigned int size, CONST char * file, int line); /* 431 */ + int (*tcl_AttemptSetObjLength) (Tcl_Obj * objPtr, int length); /* 432 */ + Tcl_ThreadId (*tcl_GetChannelThread) (Tcl_Channel channel); /* 433 */ + Tcl_UniChar * (*tcl_GetUnicodeFromObj) (Tcl_Obj * objPtr, int * lengthPtr); /* 434 */ + int (*tcl_GetMathFuncInfo) (Tcl_Interp * interp, CONST char * name, int * numArgsPtr, Tcl_ValueType ** argTypesPtr, Tcl_MathProc ** procPtr, ClientData * clientDataPtr); /* 435 */ + Tcl_Obj * (*tcl_ListMathFuncs) (Tcl_Interp * interp, CONST char * pattern); /* 436 */ + Tcl_Obj * (*tcl_SubstObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); /* 437 */ + int (*tcl_DetachChannel) (Tcl_Interp* interp, Tcl_Channel channel); /* 438 */ + int (*tcl_IsStandardChannel) (Tcl_Channel channel); /* 439 */ + int (*tcl_FSCopyFile) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr); /* 440 */ + int (*tcl_FSCopyDirectory) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr, Tcl_Obj ** errorPtr); /* 441 */ + int (*tcl_FSCreateDirectory) (Tcl_Obj * pathPtr); /* 442 */ + int (*tcl_FSDeleteFile) (Tcl_Obj * pathPtr); /* 443 */ + int (*tcl_FSLoadFile) (Tcl_Interp * interp, Tcl_Obj * pathPtr, CONST char * sym1, CONST char * sym2, Tcl_PackageInitProc ** proc1Ptr, Tcl_PackageInitProc ** proc2Ptr, Tcl_LoadHandle * handlePtr, Tcl_FSUnloadFileProc ** unloadProcPtr); /* 444 */ + int (*tcl_FSMatchInDirectory) (Tcl_Interp * interp, Tcl_Obj * result, Tcl_Obj * pathPtr, CONST char * pattern, Tcl_GlobTypeData * types); /* 445 */ + Tcl_Obj * (*tcl_FSLink) (Tcl_Obj * pathPtr, Tcl_Obj * toPtr, int linkAction); /* 446 */ + int (*tcl_FSRemoveDirectory) (Tcl_Obj * pathPtr, int recursive, Tcl_Obj ** errorPtr); /* 447 */ + int (*tcl_FSRenameFile) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr); /* 448 */ + int (*tcl_FSLstat) (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); /* 449 */ + int (*tcl_FSUtime) (Tcl_Obj * pathPtr, struct utimbuf * tval); /* 450 */ + int (*tcl_FSFileAttrsGet) (Tcl_Interp * interp, int index, Tcl_Obj * pathPtr, Tcl_Obj ** objPtrRef); /* 451 */ + int (*tcl_FSFileAttrsSet) (Tcl_Interp * interp, int index, Tcl_Obj * pathPtr, Tcl_Obj * objPtr); /* 452 */ + CONST char ** (*tcl_FSFileAttrStrings) (Tcl_Obj * pathPtr, Tcl_Obj ** objPtrRef); /* 453 */ + int (*tcl_FSStat) (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); /* 454 */ + int (*tcl_FSAccess) (Tcl_Obj * pathPtr, int mode); /* 455 */ + Tcl_Channel (*tcl_FSOpenFileChannel) (Tcl_Interp * interp, Tcl_Obj * pathPtr, CONST char * modeString, int permissions); /* 456 */ + Tcl_Obj* (*tcl_FSGetCwd) (Tcl_Interp * interp); /* 457 */ + int (*tcl_FSChdir) (Tcl_Obj * pathPtr); /* 458 */ + int (*tcl_FSConvertToPathType) (Tcl_Interp * interp, Tcl_Obj * pathPtr); /* 459 */ + Tcl_Obj* (*tcl_FSJoinPath) (Tcl_Obj * listObj, int elements); /* 460 */ + Tcl_Obj* (*tcl_FSSplitPath) (Tcl_Obj* pathPtr, int * lenPtr); /* 461 */ + int (*tcl_FSEqualPaths) (Tcl_Obj* firstPtr, Tcl_Obj* secondPtr); /* 462 */ + Tcl_Obj* (*tcl_FSGetNormalizedPath) (Tcl_Interp * interp, Tcl_Obj* pathPtr); /* 463 */ + Tcl_Obj* (*tcl_FSJoinToPath) (Tcl_Obj * pathPtr, int objc, Tcl_Obj *CONST objv[]); /* 464 */ + ClientData (*tcl_FSGetInternalRep) (Tcl_Obj* pathPtr, Tcl_Filesystem * fsPtr); /* 465 */ + Tcl_Obj* (*tcl_FSGetTranslatedPath) (Tcl_Interp * interp, Tcl_Obj* pathPtr); /* 466 */ + int (*tcl_FSEvalFile) (Tcl_Interp * interp, Tcl_Obj * fileName); /* 467 */ + Tcl_Obj* (*tcl_FSNewNativePath) (Tcl_Filesystem* fromFilesystem, ClientData clientData); /* 468 */ + CONST char* (*tcl_FSGetNativePath) (Tcl_Obj* pathPtr); /* 469 */ + Tcl_Obj* (*tcl_FSFileSystemInfo) (Tcl_Obj* pathPtr); /* 470 */ + Tcl_Obj* (*tcl_FSPathSeparator) (Tcl_Obj* pathPtr); /* 471 */ + Tcl_Obj* (*tcl_FSListVolumes) (void); /* 472 */ + int (*tcl_FSRegister) (ClientData clientData, Tcl_Filesystem * fsPtr); /* 473 */ + int (*tcl_FSUnregister) (Tcl_Filesystem * fsPtr); /* 474 */ + ClientData (*tcl_FSData) (Tcl_Filesystem * fsPtr); /* 475 */ + CONST char* (*tcl_FSGetTranslatedStringPath) (Tcl_Interp * interp, Tcl_Obj* pathPtr); /* 476 */ + Tcl_Filesystem* (*tcl_FSGetFileSystemForPath) (Tcl_Obj* pathPtr); /* 477 */ + Tcl_PathType (*tcl_FSGetPathType) (Tcl_Obj * pathPtr); /* 478 */ + int (*tcl_OutputBuffered) (Tcl_Channel chan); /* 479 */ + void (*tcl_FSMountsChanged) (Tcl_Filesystem * fsPtr); /* 480 */ + int (*tcl_EvalTokensStandard) (Tcl_Interp * interp, Tcl_Token * tokenPtr, int count); /* 481 */ + void (*tcl_GetTime) (Tcl_Time* timeBuf); /* 482 */ + Tcl_Trace (*tcl_CreateObjTrace) (Tcl_Interp* interp, int level, int flags, Tcl_CmdObjTraceProc* objProc, ClientData clientData, Tcl_CmdObjTraceDeleteProc* delProc); /* 483 */ + int (*tcl_GetCommandInfoFromToken) (Tcl_Command token, Tcl_CmdInfo* infoPtr); /* 484 */ + int (*tcl_SetCommandInfoFromToken) (Tcl_Command token, CONST Tcl_CmdInfo* infoPtr); /* 485 */ + Tcl_Obj * (*tcl_DbNewWideIntObj) (Tcl_WideInt wideValue, CONST char * file, int line); /* 486 */ + int (*tcl_GetWideIntFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_WideInt * widePtr); /* 487 */ + Tcl_Obj * (*tcl_NewWideIntObj) (Tcl_WideInt wideValue); /* 488 */ + void (*tcl_SetWideIntObj) (Tcl_Obj * objPtr, Tcl_WideInt wideValue); /* 489 */ + Tcl_StatBuf * (*tcl_AllocStatBuf) (void); /* 490 */ + Tcl_WideInt (*tcl_Seek) (Tcl_Channel chan, Tcl_WideInt offset, int mode); /* 491 */ + Tcl_WideInt (*tcl_Tell) (Tcl_Channel chan); /* 492 */ + Tcl_DriverWideSeekProc * (*tcl_ChannelWideSeekProc) (CONST Tcl_ChannelType * chanTypePtr); /* 493 */ + int (*tcl_DictObjPut) (Tcl_Interp * interp, Tcl_Obj * dictPtr, Tcl_Obj * keyPtr, Tcl_Obj * valuePtr); /* 494 */ + int (*tcl_DictObjGet) (Tcl_Interp * interp, Tcl_Obj * dictPtr, Tcl_Obj * keyPtr, Tcl_Obj ** valuePtrPtr); /* 495 */ + int (*tcl_DictObjRemove) (Tcl_Interp * interp, Tcl_Obj * dictPtr, Tcl_Obj * keyPtr); /* 496 */ + int (*tcl_DictObjSize) (Tcl_Interp * interp, Tcl_Obj * dictPtr, int * sizePtr); /* 497 */ + int (*tcl_DictObjFirst) (Tcl_Interp * interp, Tcl_Obj * dictPtr, Tcl_DictSearch * searchPtr, Tcl_Obj ** keyPtrPtr, Tcl_Obj ** valuePtrPtr, int * donePtr); /* 498 */ + void (*tcl_DictObjNext) (Tcl_DictSearch * searchPtr, Tcl_Obj ** keyPtrPtr, Tcl_Obj ** valuePtrPtr, int * donePtr); /* 499 */ + void (*tcl_DictObjDone) (Tcl_DictSearch * searchPtr); /* 500 */ + int (*tcl_DictObjPutKeyList) (Tcl_Interp * interp, Tcl_Obj * dictPtr, int keyc, Tcl_Obj *CONST * keyv, Tcl_Obj * valuePtr); /* 501 */ + int (*tcl_DictObjRemoveKeyList) (Tcl_Interp * interp, Tcl_Obj * dictPtr, int keyc, Tcl_Obj *CONST * keyv); /* 502 */ + Tcl_Obj * (*tcl_NewDictObj) (void); /* 503 */ + Tcl_Obj * (*tcl_DbNewDictObj) (CONST char * file, int line); /* 504 */ + void (*tcl_RegisterConfig) (Tcl_Interp* interp, CONST char* pkgName, Tcl_Config* configuration, CONST char* valEncoding); /* 505 */ + Tcl_Namespace * (*tcl_CreateNamespace) (Tcl_Interp * interp, CONST char * name, ClientData clientData, Tcl_NamespaceDeleteProc * deleteProc); /* 506 */ + void (*tcl_DeleteNamespace) (Tcl_Namespace * nsPtr); /* 507 */ + int (*tcl_AppendExportList) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, Tcl_Obj * objPtr); /* 508 */ + int (*tcl_Export) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, CONST char * pattern, int resetListFirst); /* 509 */ + int (*tcl_Import) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, CONST char * pattern, int allowOverwrite); /* 510 */ + int (*tcl_ForgetImport) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, CONST char * pattern); /* 511 */ + Tcl_Namespace * (*tcl_GetCurrentNamespace) (Tcl_Interp * interp); /* 512 */ + Tcl_Namespace * (*tcl_GetGlobalNamespace) (Tcl_Interp * interp); /* 513 */ + Tcl_Namespace * (*tcl_FindNamespace) (Tcl_Interp * interp, CONST char * name, Tcl_Namespace * contextNsPtr, int flags); /* 514 */ + Tcl_Command (*tcl_FindCommand) (Tcl_Interp * interp, CONST char * name, Tcl_Namespace * contextNsPtr, int flags); /* 515 */ + Tcl_Command (*tcl_GetCommandFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 516 */ + void (*tcl_GetCommandFullName) (Tcl_Interp * interp, Tcl_Command command, Tcl_Obj * objPtr); /* 517 */ + int (*tcl_FSEvalFileEx) (Tcl_Interp * interp, Tcl_Obj * fileName, CONST char * encodingName); /* 518 */ + Tcl_ExitProc * (*tcl_SetExitProc) (Tcl_ExitProc * proc); /* 519 */ + void (*tcl_LimitAddHandler) (Tcl_Interp * interp, int type, Tcl_LimitHandlerProc * handlerProc, ClientData clientData, Tcl_LimitHandlerDeleteProc * deleteProc); /* 520 */ + void (*tcl_LimitRemoveHandler) (Tcl_Interp * interp, int type, Tcl_LimitHandlerProc * handlerProc, ClientData clientData); /* 521 */ + int (*tcl_LimitReady) (Tcl_Interp * interp); /* 522 */ + int (*tcl_LimitCheck) (Tcl_Interp * interp); /* 523 */ + int (*tcl_LimitExceeded) (Tcl_Interp * interp); /* 524 */ + void (*tcl_LimitSetCommands) (Tcl_Interp * interp, int commandLimit); /* 525 */ + void (*tcl_LimitSetTime) (Tcl_Interp * interp, Tcl_Time * timeLimitPtr); /* 526 */ + void (*tcl_LimitSetGranularity) (Tcl_Interp * interp, int type, int granularity); /* 527 */ + int (*tcl_LimitTypeEnabled) (Tcl_Interp * interp, int type); /* 528 */ + int (*tcl_LimitTypeExceeded) (Tcl_Interp * interp, int type); /* 529 */ + void (*tcl_LimitTypeSet) (Tcl_Interp * interp, int type); /* 530 */ + void (*tcl_LimitTypeReset) (Tcl_Interp * interp, int type); /* 531 */ + int (*tcl_LimitGetCommands) (Tcl_Interp * interp); /* 532 */ + void (*tcl_LimitGetTime) (Tcl_Interp * interp, Tcl_Time * timeLimitPtr); /* 533 */ + int (*tcl_LimitGetGranularity) (Tcl_Interp * interp, int type); /* 534 */ + Tcl_InterpState (*tcl_SaveInterpState) (Tcl_Interp * interp, int status); /* 535 */ + int (*tcl_RestoreInterpState) (Tcl_Interp * interp, Tcl_InterpState state); /* 536 */ + void (*tcl_DiscardInterpState) (Tcl_InterpState state); /* 537 */ + int (*tcl_SetReturnOptions) (Tcl_Interp * interp, Tcl_Obj * options); /* 538 */ + Tcl_Obj * (*tcl_GetReturnOptions) (Tcl_Interp * interp, int result); /* 539 */ + int (*tcl_IsEnsemble) (Tcl_Command token); /* 540 */ + Tcl_Command (*tcl_CreateEnsemble) (Tcl_Interp * interp, CONST char * name, Tcl_Namespace * namespacePtr, int flags); /* 541 */ + Tcl_Command (*tcl_FindEnsemble) (Tcl_Interp * interp, Tcl_Obj * cmdNameObj, int flags); /* 542 */ + int (*tcl_SetEnsembleSubcommandList) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj * subcmdList); /* 543 */ + int (*tcl_SetEnsembleMappingDict) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj * mapDict); /* 544 */ + int (*tcl_SetEnsembleUnknownHandler) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj * unknownList); /* 545 */ + int (*tcl_SetEnsembleFlags) (Tcl_Interp * interp, Tcl_Command token, int flags); /* 546 */ + int (*tcl_GetEnsembleSubcommandList) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** subcmdListPtr); /* 547 */ + int (*tcl_GetEnsembleMappingDict) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** mapDictPtr); /* 548 */ + int (*tcl_GetEnsembleUnknownHandler) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** unknownListPtr); /* 549 */ + int (*tcl_GetEnsembleFlags) (Tcl_Interp * interp, Tcl_Command token, int * flagsPtr); /* 550 */ + int (*tcl_GetEnsembleNamespace) (Tcl_Interp * interp, Tcl_Command token, Tcl_Namespace ** namespacePtrPtr); /* 551 */ + void (*tcl_SetTimeProc) (Tcl_GetTimeProc* getProc, Tcl_ScaleTimeProc* scaleProc, ClientData clientData); /* 552 */ + void (*tcl_QueryTimeProc) (Tcl_GetTimeProc** getProc, Tcl_ScaleTimeProc** scaleProc, ClientData* clientData); /* 553 */ + Tcl_DriverThreadActionProc * (*tcl_ChannelThreadActionProc) (CONST Tcl_ChannelType * chanTypePtr); /* 554 */ + Tcl_Obj* (*tcl_NewBignumObj) (mp_int* value); /* 555 */ + Tcl_Obj* (*tcl_DbNewBignumObj) (mp_int* value, CONST char* file, int line); /* 556 */ + void (*tcl_SetBignumObj) (Tcl_Obj* obj, mp_int* value); /* 557 */ + int (*tcl_GetBignumFromObj) (Tcl_Interp* interp, Tcl_Obj* obj, mp_int* value); /* 558 */ + int (*tcl_TakeBignumFromObj) (Tcl_Interp* interp, Tcl_Obj* obj, mp_int* value); /* 559 */ + int (*tcl_TruncateChannel) (Tcl_Channel chan, Tcl_WideInt length); /* 560 */ + Tcl_DriverTruncateProc * (*tcl_ChannelTruncateProc) (CONST Tcl_ChannelType * chanTypePtr); /* 561 */ + void (*tcl_SetChannelErrorInterp) (Tcl_Interp* interp, Tcl_Obj* msg); /* 562 */ + void (*tcl_GetChannelErrorInterp) (Tcl_Interp* interp, Tcl_Obj** msg); /* 563 */ + void (*tcl_SetChannelError) (Tcl_Channel chan, Tcl_Obj* msg); /* 564 */ + void (*tcl_GetChannelError) (Tcl_Channel chan, Tcl_Obj** msg); /* 565 */ + int (*tcl_InitBignumFromDouble) (Tcl_Interp* interp, double initval, mp_int * toInit); /* 566 */ + Tcl_Obj * (*tcl_GetNamespaceUnknownHandler) (Tcl_Interp * interp, Tcl_Namespace * nsPtr); /* 567 */ + int (*tcl_SetNamespaceUnknownHandler) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, Tcl_Obj * handlerPtr); /* 568 */ + int (*tcl_GetEncodingFromObj) (Tcl_Interp* interp, Tcl_Obj* objPtr, Tcl_Encoding* encodingPtr); /* 569 */ + Tcl_Obj* (*tcl_GetEncodingSearchPath) (void); /* 570 */ + int (*tcl_SetEncodingSearchPath) (Tcl_Obj* searchPath); /* 571 */ + CONST char * (*tcl_GetEncodingNameFromEnvironment) (Tcl_DString* bufPtr); /* 572 */ + int (*tcl_PkgRequireProc) (Tcl_Interp * interp, CONST char * name, int objc, Tcl_Obj *CONST objv[], ClientData * clientDataPtr); /* 573 */ + void (*tcl_AppendObjToErrorInfo) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 574 */ + void (*tcl_AppendLimitedToObj) (Tcl_Obj * objPtr, CONST char * bytes, int length, int limit, CONST char * ellipsis); /* 575 */ + Tcl_Obj * (*tcl_Format) (Tcl_Interp * interp, CONST char * format, int objc, Tcl_Obj * CONST objv[]); /* 576 */ + int (*tcl_AppendFormatToObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, CONST char * format, int objc, Tcl_Obj * CONST objv[]); /* 577 */ + Tcl_Obj * (*tcl_ObjPrintf) (CONST char * format, ...); /* 578 */ + void (*tcl_AppendPrintfToObj) (Tcl_Obj * objPtr, CONST char * format, ...); /* 579 */ +} TclStubs; + +#ifdef __cplusplus +extern "C" { +#endif +extern TclStubs *tclStubsPtr; +#ifdef __cplusplus +} +#endif + +#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) + +/* + * Inline function declarations: + */ + +#ifndef Tcl_PkgProvideEx +#define Tcl_PkgProvideEx \ + (tclStubsPtr->tcl_PkgProvideEx) /* 0 */ +#endif +#ifndef Tcl_PkgRequireEx +#define Tcl_PkgRequireEx \ + (tclStubsPtr->tcl_PkgRequireEx) /* 1 */ +#endif +#ifndef Tcl_Panic +#define Tcl_Panic \ + (tclStubsPtr->tcl_Panic) /* 2 */ +#endif +#ifndef Tcl_Alloc +#define Tcl_Alloc \ + (tclStubsPtr->tcl_Alloc) /* 3 */ +#endif +#ifndef Tcl_Free +#define Tcl_Free \ + (tclStubsPtr->tcl_Free) /* 4 */ +#endif +#ifndef Tcl_Realloc +#define Tcl_Realloc \ + (tclStubsPtr->tcl_Realloc) /* 5 */ +#endif +#ifndef Tcl_DbCkalloc +#define Tcl_DbCkalloc \ + (tclStubsPtr->tcl_DbCkalloc) /* 6 */ +#endif +#ifndef Tcl_DbCkfree +#define Tcl_DbCkfree \ + (tclStubsPtr->tcl_DbCkfree) /* 7 */ +#endif +#ifndef Tcl_DbCkrealloc +#define Tcl_DbCkrealloc \ + (tclStubsPtr->tcl_DbCkrealloc) /* 8 */ +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_CreateFileHandler +#define Tcl_CreateFileHandler \ + (tclStubsPtr->tcl_CreateFileHandler) /* 9 */ +#endif +#endif /* UNIX */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_CreateFileHandler +#define Tcl_CreateFileHandler \ + (tclStubsPtr->tcl_CreateFileHandler) /* 9 */ +#endif +#endif /* MACOSX */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_DeleteFileHandler +#define Tcl_DeleteFileHandler \ + (tclStubsPtr->tcl_DeleteFileHandler) /* 10 */ +#endif +#endif /* UNIX */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_DeleteFileHandler +#define Tcl_DeleteFileHandler \ + (tclStubsPtr->tcl_DeleteFileHandler) /* 10 */ +#endif +#endif /* MACOSX */ +#ifndef Tcl_SetTimer +#define Tcl_SetTimer \ + (tclStubsPtr->tcl_SetTimer) /* 11 */ +#endif +#ifndef Tcl_Sleep +#define Tcl_Sleep \ + (tclStubsPtr->tcl_Sleep) /* 12 */ +#endif +#ifndef Tcl_WaitForEvent +#define Tcl_WaitForEvent \ + (tclStubsPtr->tcl_WaitForEvent) /* 13 */ +#endif +#ifndef Tcl_AppendAllObjTypes +#define Tcl_AppendAllObjTypes \ + (tclStubsPtr->tcl_AppendAllObjTypes) /* 14 */ +#endif +#ifndef Tcl_AppendStringsToObj +#define Tcl_AppendStringsToObj \ + (tclStubsPtr->tcl_AppendStringsToObj) /* 15 */ +#endif +#ifndef Tcl_AppendToObj +#define Tcl_AppendToObj \ + (tclStubsPtr->tcl_AppendToObj) /* 16 */ +#endif +#ifndef Tcl_ConcatObj +#define Tcl_ConcatObj \ + (tclStubsPtr->tcl_ConcatObj) /* 17 */ +#endif +#ifndef Tcl_ConvertToType +#define Tcl_ConvertToType \ + (tclStubsPtr->tcl_ConvertToType) /* 18 */ +#endif +#ifndef Tcl_DbDecrRefCount +#define Tcl_DbDecrRefCount \ + (tclStubsPtr->tcl_DbDecrRefCount) /* 19 */ +#endif +#ifndef Tcl_DbIncrRefCount +#define Tcl_DbIncrRefCount \ + (tclStubsPtr->tcl_DbIncrRefCount) /* 20 */ +#endif +#ifndef Tcl_DbIsShared +#define Tcl_DbIsShared \ + (tclStubsPtr->tcl_DbIsShared) /* 21 */ +#endif +#ifndef Tcl_DbNewBooleanObj +#define Tcl_DbNewBooleanObj \ + (tclStubsPtr->tcl_DbNewBooleanObj) /* 22 */ +#endif +#ifndef Tcl_DbNewByteArrayObj +#define Tcl_DbNewByteArrayObj \ + (tclStubsPtr->tcl_DbNewByteArrayObj) /* 23 */ +#endif +#ifndef Tcl_DbNewDoubleObj +#define Tcl_DbNewDoubleObj \ + (tclStubsPtr->tcl_DbNewDoubleObj) /* 24 */ +#endif +#ifndef Tcl_DbNewListObj +#define Tcl_DbNewListObj \ + (tclStubsPtr->tcl_DbNewListObj) /* 25 */ +#endif +#ifndef Tcl_DbNewLongObj +#define Tcl_DbNewLongObj \ + (tclStubsPtr->tcl_DbNewLongObj) /* 26 */ +#endif +#ifndef Tcl_DbNewObj +#define Tcl_DbNewObj \ + (tclStubsPtr->tcl_DbNewObj) /* 27 */ +#endif +#ifndef Tcl_DbNewStringObj +#define Tcl_DbNewStringObj \ + (tclStubsPtr->tcl_DbNewStringObj) /* 28 */ +#endif +#ifndef Tcl_DuplicateObj +#define Tcl_DuplicateObj \ + (tclStubsPtr->tcl_DuplicateObj) /* 29 */ +#endif +#ifndef TclFreeObj +#define TclFreeObj \ + (tclStubsPtr->tclFreeObj) /* 30 */ +#endif +#ifndef Tcl_GetBoolean +#define Tcl_GetBoolean \ + (tclStubsPtr->tcl_GetBoolean) /* 31 */ +#endif +#ifndef Tcl_GetBooleanFromObj +#define Tcl_GetBooleanFromObj \ + (tclStubsPtr->tcl_GetBooleanFromObj) /* 32 */ +#endif +#ifndef Tcl_GetByteArrayFromObj +#define Tcl_GetByteArrayFromObj \ + (tclStubsPtr->tcl_GetByteArrayFromObj) /* 33 */ +#endif +#ifndef Tcl_GetDouble +#define Tcl_GetDouble \ + (tclStubsPtr->tcl_GetDouble) /* 34 */ +#endif +#ifndef Tcl_GetDoubleFromObj +#define Tcl_GetDoubleFromObj \ + (tclStubsPtr->tcl_GetDoubleFromObj) /* 35 */ +#endif +#ifndef Tcl_GetIndexFromObj +#define Tcl_GetIndexFromObj \ + (tclStubsPtr->tcl_GetIndexFromObj) /* 36 */ +#endif +#ifndef Tcl_GetInt +#define Tcl_GetInt \ + (tclStubsPtr->tcl_GetInt) /* 37 */ +#endif +#ifndef Tcl_GetIntFromObj +#define Tcl_GetIntFromObj \ + (tclStubsPtr->tcl_GetIntFromObj) /* 38 */ +#endif +#ifndef Tcl_GetLongFromObj +#define Tcl_GetLongFromObj \ + (tclStubsPtr->tcl_GetLongFromObj) /* 39 */ +#endif +#ifndef Tcl_GetObjType +#define Tcl_GetObjType \ + (tclStubsPtr->tcl_GetObjType) /* 40 */ +#endif +#ifndef Tcl_GetStringFromObj +#define Tcl_GetStringFromObj \ + (tclStubsPtr->tcl_GetStringFromObj) /* 41 */ +#endif +#ifndef Tcl_InvalidateStringRep +#define Tcl_InvalidateStringRep \ + (tclStubsPtr->tcl_InvalidateStringRep) /* 42 */ +#endif +#ifndef Tcl_ListObjAppendList +#define Tcl_ListObjAppendList \ + (tclStubsPtr->tcl_ListObjAppendList) /* 43 */ +#endif +#ifndef Tcl_ListObjAppendElement +#define Tcl_ListObjAppendElement \ + (tclStubsPtr->tcl_ListObjAppendElement) /* 44 */ +#endif +#ifndef Tcl_ListObjGetElements +#define Tcl_ListObjGetElements \ + (tclStubsPtr->tcl_ListObjGetElements) /* 45 */ +#endif +#ifndef Tcl_ListObjIndex +#define Tcl_ListObjIndex \ + (tclStubsPtr->tcl_ListObjIndex) /* 46 */ +#endif +#ifndef Tcl_ListObjLength +#define Tcl_ListObjLength \ + (tclStubsPtr->tcl_ListObjLength) /* 47 */ +#endif +#ifndef Tcl_ListObjReplace +#define Tcl_ListObjReplace \ + (tclStubsPtr->tcl_ListObjReplace) /* 48 */ +#endif +#ifndef Tcl_NewBooleanObj +#define Tcl_NewBooleanObj \ + (tclStubsPtr->tcl_NewBooleanObj) /* 49 */ +#endif +#ifndef Tcl_NewByteArrayObj +#define Tcl_NewByteArrayObj \ + (tclStubsPtr->tcl_NewByteArrayObj) /* 50 */ +#endif +#ifndef Tcl_NewDoubleObj +#define Tcl_NewDoubleObj \ + (tclStubsPtr->tcl_NewDoubleObj) /* 51 */ +#endif +#ifndef Tcl_NewIntObj +#define Tcl_NewIntObj \ + (tclStubsPtr->tcl_NewIntObj) /* 52 */ +#endif +#ifndef Tcl_NewListObj +#define Tcl_NewListObj \ + (tclStubsPtr->tcl_NewListObj) /* 53 */ +#endif +#ifndef Tcl_NewLongObj +#define Tcl_NewLongObj \ + (tclStubsPtr->tcl_NewLongObj) /* 54 */ +#endif +#ifndef Tcl_NewObj +#define Tcl_NewObj \ + (tclStubsPtr->tcl_NewObj) /* 55 */ +#endif +#ifndef Tcl_NewStringObj +#define Tcl_NewStringObj \ + (tclStubsPtr->tcl_NewStringObj) /* 56 */ +#endif +#ifndef Tcl_SetBooleanObj +#define Tcl_SetBooleanObj \ + (tclStubsPtr->tcl_SetBooleanObj) /* 57 */ +#endif +#ifndef Tcl_SetByteArrayLength +#define Tcl_SetByteArrayLength \ + (tclStubsPtr->tcl_SetByteArrayLength) /* 58 */ +#endif +#ifndef Tcl_SetByteArrayObj +#define Tcl_SetByteArrayObj \ + (tclStubsPtr->tcl_SetByteArrayObj) /* 59 */ +#endif +#ifndef Tcl_SetDoubleObj +#define Tcl_SetDoubleObj \ + (tclStubsPtr->tcl_SetDoubleObj) /* 60 */ +#endif +#ifndef Tcl_SetIntObj +#define Tcl_SetIntObj \ + (tclStubsPtr->tcl_SetIntObj) /* 61 */ +#endif +#ifndef Tcl_SetListObj +#define Tcl_SetListObj \ + (tclStubsPtr->tcl_SetListObj) /* 62 */ +#endif +#ifndef Tcl_SetLongObj +#define Tcl_SetLongObj \ + (tclStubsPtr->tcl_SetLongObj) /* 63 */ +#endif +#ifndef Tcl_SetObjLength +#define Tcl_SetObjLength \ + (tclStubsPtr->tcl_SetObjLength) /* 64 */ +#endif +#ifndef Tcl_SetStringObj +#define Tcl_SetStringObj \ + (tclStubsPtr->tcl_SetStringObj) /* 65 */ +#endif +#ifndef Tcl_AddErrorInfo +#define Tcl_AddErrorInfo \ + (tclStubsPtr->tcl_AddErrorInfo) /* 66 */ +#endif +#ifndef Tcl_AddObjErrorInfo +#define Tcl_AddObjErrorInfo \ + (tclStubsPtr->tcl_AddObjErrorInfo) /* 67 */ +#endif +#ifndef Tcl_AllowExceptions +#define Tcl_AllowExceptions \ + (tclStubsPtr->tcl_AllowExceptions) /* 68 */ +#endif +#ifndef Tcl_AppendElement +#define Tcl_AppendElement \ + (tclStubsPtr->tcl_AppendElement) /* 69 */ +#endif +#ifndef Tcl_AppendResult +#define Tcl_AppendResult \ + (tclStubsPtr->tcl_AppendResult) /* 70 */ +#endif +#ifndef Tcl_AsyncCreate +#define Tcl_AsyncCreate \ + (tclStubsPtr->tcl_AsyncCreate) /* 71 */ +#endif +#ifndef Tcl_AsyncDelete +#define Tcl_AsyncDelete \ + (tclStubsPtr->tcl_AsyncDelete) /* 72 */ +#endif +#ifndef Tcl_AsyncInvoke +#define Tcl_AsyncInvoke \ + (tclStubsPtr->tcl_AsyncInvoke) /* 73 */ +#endif +#ifndef Tcl_AsyncMark +#define Tcl_AsyncMark \ + (tclStubsPtr->tcl_AsyncMark) /* 74 */ +#endif +#ifndef Tcl_AsyncReady +#define Tcl_AsyncReady \ + (tclStubsPtr->tcl_AsyncReady) /* 75 */ +#endif +#ifndef Tcl_BackgroundError +#define Tcl_BackgroundError \ + (tclStubsPtr->tcl_BackgroundError) /* 76 */ +#endif +#ifndef Tcl_Backslash +#define Tcl_Backslash \ + (tclStubsPtr->tcl_Backslash) /* 77 */ +#endif +#ifndef Tcl_BadChannelOption +#define Tcl_BadChannelOption \ + (tclStubsPtr->tcl_BadChannelOption) /* 78 */ +#endif +#ifndef Tcl_CallWhenDeleted +#define Tcl_CallWhenDeleted \ + (tclStubsPtr->tcl_CallWhenDeleted) /* 79 */ +#endif +#ifndef Tcl_CancelIdleCall +#define Tcl_CancelIdleCall \ + (tclStubsPtr->tcl_CancelIdleCall) /* 80 */ +#endif +#ifndef Tcl_Close +#define Tcl_Close \ + (tclStubsPtr->tcl_Close) /* 81 */ +#endif +#ifndef Tcl_CommandComplete +#define Tcl_CommandComplete \ + (tclStubsPtr->tcl_CommandComplete) /* 82 */ +#endif +#ifndef Tcl_Concat +#define Tcl_Concat \ + (tclStubsPtr->tcl_Concat) /* 83 */ +#endif +#ifndef Tcl_ConvertElement +#define Tcl_ConvertElement \ + (tclStubsPtr->tcl_ConvertElement) /* 84 */ +#endif +#ifndef Tcl_ConvertCountedElement +#define Tcl_ConvertCountedElement \ + (tclStubsPtr->tcl_ConvertCountedElement) /* 85 */ +#endif +#ifndef Tcl_CreateAlias +#define Tcl_CreateAlias \ + (tclStubsPtr->tcl_CreateAlias) /* 86 */ +#endif +#ifndef Tcl_CreateAliasObj +#define Tcl_CreateAliasObj \ + (tclStubsPtr->tcl_CreateAliasObj) /* 87 */ +#endif +#ifndef Tcl_CreateChannel +#define Tcl_CreateChannel \ + (tclStubsPtr->tcl_CreateChannel) /* 88 */ +#endif +#ifndef Tcl_CreateChannelHandler +#define Tcl_CreateChannelHandler \ + (tclStubsPtr->tcl_CreateChannelHandler) /* 89 */ +#endif +#ifndef Tcl_CreateCloseHandler +#define Tcl_CreateCloseHandler \ + (tclStubsPtr->tcl_CreateCloseHandler) /* 90 */ +#endif +#ifndef Tcl_CreateCommand +#define Tcl_CreateCommand \ + (tclStubsPtr->tcl_CreateCommand) /* 91 */ +#endif +#ifndef Tcl_CreateEventSource +#define Tcl_CreateEventSource \ + (tclStubsPtr->tcl_CreateEventSource) /* 92 */ +#endif +#ifndef Tcl_CreateExitHandler +#define Tcl_CreateExitHandler \ + (tclStubsPtr->tcl_CreateExitHandler) /* 93 */ +#endif +#ifndef Tcl_CreateInterp +#define Tcl_CreateInterp \ + (tclStubsPtr->tcl_CreateInterp) /* 94 */ +#endif +#ifndef Tcl_CreateMathFunc +#define Tcl_CreateMathFunc \ + (tclStubsPtr->tcl_CreateMathFunc) /* 95 */ +#endif +#ifndef Tcl_CreateObjCommand +#define Tcl_CreateObjCommand \ + (tclStubsPtr->tcl_CreateObjCommand) /* 96 */ +#endif +#ifndef Tcl_CreateSlave +#define Tcl_CreateSlave \ + (tclStubsPtr->tcl_CreateSlave) /* 97 */ +#endif +#ifndef Tcl_CreateTimerHandler +#define Tcl_CreateTimerHandler \ + (tclStubsPtr->tcl_CreateTimerHandler) /* 98 */ +#endif +#ifndef Tcl_CreateTrace +#define Tcl_CreateTrace \ + (tclStubsPtr->tcl_CreateTrace) /* 99 */ +#endif +#ifndef Tcl_DeleteAssocData +#define Tcl_DeleteAssocData \ + (tclStubsPtr->tcl_DeleteAssocData) /* 100 */ +#endif +#ifndef Tcl_DeleteChannelHandler +#define Tcl_DeleteChannelHandler \ + (tclStubsPtr->tcl_DeleteChannelHandler) /* 101 */ +#endif +#ifndef Tcl_DeleteCloseHandler +#define Tcl_DeleteCloseHandler \ + (tclStubsPtr->tcl_DeleteCloseHandler) /* 102 */ +#endif +#ifndef Tcl_DeleteCommand +#define Tcl_DeleteCommand \ + (tclStubsPtr->tcl_DeleteCommand) /* 103 */ +#endif +#ifndef Tcl_DeleteCommandFromToken +#define Tcl_DeleteCommandFromToken \ + (tclStubsPtr->tcl_DeleteCommandFromToken) /* 104 */ +#endif +#ifndef Tcl_DeleteEvents +#define Tcl_DeleteEvents \ + (tclStubsPtr->tcl_DeleteEvents) /* 105 */ +#endif +#ifndef Tcl_DeleteEventSource +#define Tcl_DeleteEventSource \ + (tclStubsPtr->tcl_DeleteEventSource) /* 106 */ +#endif +#ifndef Tcl_DeleteExitHandler +#define Tcl_DeleteExitHandler \ + (tclStubsPtr->tcl_DeleteExitHandler) /* 107 */ +#endif +#ifndef Tcl_DeleteHashEntry +#define Tcl_DeleteHashEntry \ + (tclStubsPtr->tcl_DeleteHashEntry) /* 108 */ +#endif +#ifndef Tcl_DeleteHashTable +#define Tcl_DeleteHashTable \ + (tclStubsPtr->tcl_DeleteHashTable) /* 109 */ +#endif +#ifndef Tcl_DeleteInterp +#define Tcl_DeleteInterp \ + (tclStubsPtr->tcl_DeleteInterp) /* 110 */ +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_DetachPids +#define Tcl_DetachPids \ + (tclStubsPtr->tcl_DetachPids) /* 111 */ +#endif +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ +#ifndef Tcl_DetachPids +#define Tcl_DetachPids \ + (tclStubsPtr->tcl_DetachPids) /* 111 */ +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_DetachPids +#define Tcl_DetachPids \ + (tclStubsPtr->tcl_DetachPids) /* 111 */ +#endif +#endif /* MACOSX */ +#ifndef Tcl_DeleteTimerHandler +#define Tcl_DeleteTimerHandler \ + (tclStubsPtr->tcl_DeleteTimerHandler) /* 112 */ +#endif +#ifndef Tcl_DeleteTrace +#define Tcl_DeleteTrace \ + (tclStubsPtr->tcl_DeleteTrace) /* 113 */ +#endif +#ifndef Tcl_DontCallWhenDeleted +#define Tcl_DontCallWhenDeleted \ + (tclStubsPtr->tcl_DontCallWhenDeleted) /* 114 */ +#endif +#ifndef Tcl_DoOneEvent +#define Tcl_DoOneEvent \ + (tclStubsPtr->tcl_DoOneEvent) /* 115 */ +#endif +#ifndef Tcl_DoWhenIdle +#define Tcl_DoWhenIdle \ + (tclStubsPtr->tcl_DoWhenIdle) /* 116 */ +#endif +#ifndef Tcl_DStringAppend +#define Tcl_DStringAppend \ + (tclStubsPtr->tcl_DStringAppend) /* 117 */ +#endif +#ifndef Tcl_DStringAppendElement +#define Tcl_DStringAppendElement \ + (tclStubsPtr->tcl_DStringAppendElement) /* 118 */ +#endif +#ifndef Tcl_DStringEndSublist +#define Tcl_DStringEndSublist \ + (tclStubsPtr->tcl_DStringEndSublist) /* 119 */ +#endif +#ifndef Tcl_DStringFree +#define Tcl_DStringFree \ + (tclStubsPtr->tcl_DStringFree) /* 120 */ +#endif +#ifndef Tcl_DStringGetResult +#define Tcl_DStringGetResult \ + (tclStubsPtr->tcl_DStringGetResult) /* 121 */ +#endif +#ifndef Tcl_DStringInit +#define Tcl_DStringInit \ + (tclStubsPtr->tcl_DStringInit) /* 122 */ +#endif +#ifndef Tcl_DStringResult +#define Tcl_DStringResult \ + (tclStubsPtr->tcl_DStringResult) /* 123 */ +#endif +#ifndef Tcl_DStringSetLength +#define Tcl_DStringSetLength \ + (tclStubsPtr->tcl_DStringSetLength) /* 124 */ +#endif +#ifndef Tcl_DStringStartSublist +#define Tcl_DStringStartSublist \ + (tclStubsPtr->tcl_DStringStartSublist) /* 125 */ +#endif +#ifndef Tcl_Eof +#define Tcl_Eof \ + (tclStubsPtr->tcl_Eof) /* 126 */ +#endif +#ifndef Tcl_ErrnoId +#define Tcl_ErrnoId \ + (tclStubsPtr->tcl_ErrnoId) /* 127 */ +#endif +#ifndef Tcl_ErrnoMsg +#define Tcl_ErrnoMsg \ + (tclStubsPtr->tcl_ErrnoMsg) /* 128 */ +#endif +#ifndef Tcl_Eval +#define Tcl_Eval \ + (tclStubsPtr->tcl_Eval) /* 129 */ +#endif +#ifndef Tcl_EvalFile +#define Tcl_EvalFile \ + (tclStubsPtr->tcl_EvalFile) /* 130 */ +#endif +#ifndef Tcl_EvalObj +#define Tcl_EvalObj \ + (tclStubsPtr->tcl_EvalObj) /* 131 */ +#endif +#ifndef Tcl_EventuallyFree +#define Tcl_EventuallyFree \ + (tclStubsPtr->tcl_EventuallyFree) /* 132 */ +#endif +#ifndef Tcl_Exit +#define Tcl_Exit \ + (tclStubsPtr->tcl_Exit) /* 133 */ +#endif +#ifndef Tcl_ExposeCommand +#define Tcl_ExposeCommand \ + (tclStubsPtr->tcl_ExposeCommand) /* 134 */ +#endif +#ifndef Tcl_ExprBoolean +#define Tcl_ExprBoolean \ + (tclStubsPtr->tcl_ExprBoolean) /* 135 */ +#endif +#ifndef Tcl_ExprBooleanObj +#define Tcl_ExprBooleanObj \ + (tclStubsPtr->tcl_ExprBooleanObj) /* 136 */ +#endif +#ifndef Tcl_ExprDouble +#define Tcl_ExprDouble \ + (tclStubsPtr->tcl_ExprDouble) /* 137 */ +#endif +#ifndef Tcl_ExprDoubleObj +#define Tcl_ExprDoubleObj \ + (tclStubsPtr->tcl_ExprDoubleObj) /* 138 */ +#endif +#ifndef Tcl_ExprLong +#define Tcl_ExprLong \ + (tclStubsPtr->tcl_ExprLong) /* 139 */ +#endif +#ifndef Tcl_ExprLongObj +#define Tcl_ExprLongObj \ + (tclStubsPtr->tcl_ExprLongObj) /* 140 */ +#endif +#ifndef Tcl_ExprObj +#define Tcl_ExprObj \ + (tclStubsPtr->tcl_ExprObj) /* 141 */ +#endif +#ifndef Tcl_ExprString +#define Tcl_ExprString \ + (tclStubsPtr->tcl_ExprString) /* 142 */ +#endif +#ifndef Tcl_Finalize +#define Tcl_Finalize \ + (tclStubsPtr->tcl_Finalize) /* 143 */ +#endif +#ifndef Tcl_FindExecutable +#define Tcl_FindExecutable \ + (tclStubsPtr->tcl_FindExecutable) /* 144 */ +#endif +#ifndef Tcl_FirstHashEntry +#define Tcl_FirstHashEntry \ + (tclStubsPtr->tcl_FirstHashEntry) /* 145 */ +#endif +#ifndef Tcl_Flush +#define Tcl_Flush \ + (tclStubsPtr->tcl_Flush) /* 146 */ +#endif +#ifndef Tcl_FreeResult +#define Tcl_FreeResult \ + (tclStubsPtr->tcl_FreeResult) /* 147 */ +#endif +#ifndef Tcl_GetAlias +#define Tcl_GetAlias \ + (tclStubsPtr->tcl_GetAlias) /* 148 */ +#endif +#ifndef Tcl_GetAliasObj +#define Tcl_GetAliasObj \ + (tclStubsPtr->tcl_GetAliasObj) /* 149 */ +#endif +#ifndef Tcl_GetAssocData +#define Tcl_GetAssocData \ + (tclStubsPtr->tcl_GetAssocData) /* 150 */ +#endif +#ifndef Tcl_GetChannel +#define Tcl_GetChannel \ + (tclStubsPtr->tcl_GetChannel) /* 151 */ +#endif +#ifndef Tcl_GetChannelBufferSize +#define Tcl_GetChannelBufferSize \ + (tclStubsPtr->tcl_GetChannelBufferSize) /* 152 */ +#endif +#ifndef Tcl_GetChannelHandle +#define Tcl_GetChannelHandle \ + (tclStubsPtr->tcl_GetChannelHandle) /* 153 */ +#endif +#ifndef Tcl_GetChannelInstanceData +#define Tcl_GetChannelInstanceData \ + (tclStubsPtr->tcl_GetChannelInstanceData) /* 154 */ +#endif +#ifndef Tcl_GetChannelMode +#define Tcl_GetChannelMode \ + (tclStubsPtr->tcl_GetChannelMode) /* 155 */ +#endif +#ifndef Tcl_GetChannelName +#define Tcl_GetChannelName \ + (tclStubsPtr->tcl_GetChannelName) /* 156 */ +#endif +#ifndef Tcl_GetChannelOption +#define Tcl_GetChannelOption \ + (tclStubsPtr->tcl_GetChannelOption) /* 157 */ +#endif +#ifndef Tcl_GetChannelType +#define Tcl_GetChannelType \ + (tclStubsPtr->tcl_GetChannelType) /* 158 */ +#endif +#ifndef Tcl_GetCommandInfo +#define Tcl_GetCommandInfo \ + (tclStubsPtr->tcl_GetCommandInfo) /* 159 */ +#endif +#ifndef Tcl_GetCommandName +#define Tcl_GetCommandName \ + (tclStubsPtr->tcl_GetCommandName) /* 160 */ +#endif +#ifndef Tcl_GetErrno +#define Tcl_GetErrno \ + (tclStubsPtr->tcl_GetErrno) /* 161 */ +#endif +#ifndef Tcl_GetHostName +#define Tcl_GetHostName \ + (tclStubsPtr->tcl_GetHostName) /* 162 */ +#endif +#ifndef Tcl_GetInterpPath +#define Tcl_GetInterpPath \ + (tclStubsPtr->tcl_GetInterpPath) /* 163 */ +#endif +#ifndef Tcl_GetMaster +#define Tcl_GetMaster \ + (tclStubsPtr->tcl_GetMaster) /* 164 */ +#endif +#ifndef Tcl_GetNameOfExecutable +#define Tcl_GetNameOfExecutable \ + (tclStubsPtr->tcl_GetNameOfExecutable) /* 165 */ +#endif +#ifndef Tcl_GetObjResult +#define Tcl_GetObjResult \ + (tclStubsPtr->tcl_GetObjResult) /* 166 */ +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_GetOpenFile +#define Tcl_GetOpenFile \ + (tclStubsPtr->tcl_GetOpenFile) /* 167 */ +#endif +#endif /* UNIX */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_GetOpenFile +#define Tcl_GetOpenFile \ + (tclStubsPtr->tcl_GetOpenFile) /* 167 */ +#endif +#endif /* MACOSX */ +#ifndef Tcl_GetPathType +#define Tcl_GetPathType \ + (tclStubsPtr->tcl_GetPathType) /* 168 */ +#endif +#ifndef Tcl_Gets +#define Tcl_Gets \ + (tclStubsPtr->tcl_Gets) /* 169 */ +#endif +#ifndef Tcl_GetsObj +#define Tcl_GetsObj \ + (tclStubsPtr->tcl_GetsObj) /* 170 */ +#endif +#ifndef Tcl_GetServiceMode +#define Tcl_GetServiceMode \ + (tclStubsPtr->tcl_GetServiceMode) /* 171 */ +#endif +#ifndef Tcl_GetSlave +#define Tcl_GetSlave \ + (tclStubsPtr->tcl_GetSlave) /* 172 */ +#endif +#ifndef Tcl_GetStdChannel +#define Tcl_GetStdChannel \ + (tclStubsPtr->tcl_GetStdChannel) /* 173 */ +#endif +#ifndef Tcl_GetStringResult +#define Tcl_GetStringResult \ + (tclStubsPtr->tcl_GetStringResult) /* 174 */ +#endif +#ifndef Tcl_GetVar +#define Tcl_GetVar \ + (tclStubsPtr->tcl_GetVar) /* 175 */ +#endif +#ifndef Tcl_GetVar2 +#define Tcl_GetVar2 \ + (tclStubsPtr->tcl_GetVar2) /* 176 */ +#endif +#ifndef Tcl_GlobalEval +#define Tcl_GlobalEval \ + (tclStubsPtr->tcl_GlobalEval) /* 177 */ +#endif +#ifndef Tcl_GlobalEvalObj +#define Tcl_GlobalEvalObj \ + (tclStubsPtr->tcl_GlobalEvalObj) /* 178 */ +#endif +#ifndef Tcl_HideCommand +#define Tcl_HideCommand \ + (tclStubsPtr->tcl_HideCommand) /* 179 */ +#endif +#ifndef Tcl_Init +#define Tcl_Init \ + (tclStubsPtr->tcl_Init) /* 180 */ +#endif +#ifndef Tcl_InitHashTable +#define Tcl_InitHashTable \ + (tclStubsPtr->tcl_InitHashTable) /* 181 */ +#endif +#ifndef Tcl_InputBlocked +#define Tcl_InputBlocked \ + (tclStubsPtr->tcl_InputBlocked) /* 182 */ +#endif +#ifndef Tcl_InputBuffered +#define Tcl_InputBuffered \ + (tclStubsPtr->tcl_InputBuffered) /* 183 */ +#endif +#ifndef Tcl_InterpDeleted +#define Tcl_InterpDeleted \ + (tclStubsPtr->tcl_InterpDeleted) /* 184 */ +#endif +#ifndef Tcl_IsSafe +#define Tcl_IsSafe \ + (tclStubsPtr->tcl_IsSafe) /* 185 */ +#endif +#ifndef Tcl_JoinPath +#define Tcl_JoinPath \ + (tclStubsPtr->tcl_JoinPath) /* 186 */ +#endif +#ifndef Tcl_LinkVar +#define Tcl_LinkVar \ + (tclStubsPtr->tcl_LinkVar) /* 187 */ +#endif +/* Slot 188 is reserved */ +#ifndef Tcl_MakeFileChannel +#define Tcl_MakeFileChannel \ + (tclStubsPtr->tcl_MakeFileChannel) /* 189 */ +#endif +#ifndef Tcl_MakeSafe +#define Tcl_MakeSafe \ + (tclStubsPtr->tcl_MakeSafe) /* 190 */ +#endif +#ifndef Tcl_MakeTcpClientChannel +#define Tcl_MakeTcpClientChannel \ + (tclStubsPtr->tcl_MakeTcpClientChannel) /* 191 */ +#endif +#ifndef Tcl_Merge +#define Tcl_Merge \ + (tclStubsPtr->tcl_Merge) /* 192 */ +#endif +#ifndef Tcl_NextHashEntry +#define Tcl_NextHashEntry \ + (tclStubsPtr->tcl_NextHashEntry) /* 193 */ +#endif +#ifndef Tcl_NotifyChannel +#define Tcl_NotifyChannel \ + (tclStubsPtr->tcl_NotifyChannel) /* 194 */ +#endif +#ifndef Tcl_ObjGetVar2 +#define Tcl_ObjGetVar2 \ + (tclStubsPtr->tcl_ObjGetVar2) /* 195 */ +#endif +#ifndef Tcl_ObjSetVar2 +#define Tcl_ObjSetVar2 \ + (tclStubsPtr->tcl_ObjSetVar2) /* 196 */ +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_OpenCommandChannel +#define Tcl_OpenCommandChannel \ + (tclStubsPtr->tcl_OpenCommandChannel) /* 197 */ +#endif +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ +#ifndef Tcl_OpenCommandChannel +#define Tcl_OpenCommandChannel \ + (tclStubsPtr->tcl_OpenCommandChannel) /* 197 */ +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_OpenCommandChannel +#define Tcl_OpenCommandChannel \ + (tclStubsPtr->tcl_OpenCommandChannel) /* 197 */ +#endif +#endif /* MACOSX */ +#ifndef Tcl_OpenFileChannel +#define Tcl_OpenFileChannel \ + (tclStubsPtr->tcl_OpenFileChannel) /* 198 */ +#endif +#ifndef Tcl_OpenTcpClient +#define Tcl_OpenTcpClient \ + (tclStubsPtr->tcl_OpenTcpClient) /* 199 */ +#endif +#ifndef Tcl_OpenTcpServer +#define Tcl_OpenTcpServer \ + (tclStubsPtr->tcl_OpenTcpServer) /* 200 */ +#endif +#ifndef Tcl_Preserve +#define Tcl_Preserve \ + (tclStubsPtr->tcl_Preserve) /* 201 */ +#endif +#ifndef Tcl_PrintDouble +#define Tcl_PrintDouble \ + (tclStubsPtr->tcl_PrintDouble) /* 202 */ +#endif +#ifndef Tcl_PutEnv +#define Tcl_PutEnv \ + (tclStubsPtr->tcl_PutEnv) /* 203 */ +#endif +#ifndef Tcl_PosixError +#define Tcl_PosixError \ + (tclStubsPtr->tcl_PosixError) /* 204 */ +#endif +#ifndef Tcl_QueueEvent +#define Tcl_QueueEvent \ + (tclStubsPtr->tcl_QueueEvent) /* 205 */ +#endif +#ifndef Tcl_Read +#define Tcl_Read \ + (tclStubsPtr->tcl_Read) /* 206 */ +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_ReapDetachedProcs +#define Tcl_ReapDetachedProcs \ + (tclStubsPtr->tcl_ReapDetachedProcs) /* 207 */ +#endif +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ +#ifndef Tcl_ReapDetachedProcs +#define Tcl_ReapDetachedProcs \ + (tclStubsPtr->tcl_ReapDetachedProcs) /* 207 */ +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_ReapDetachedProcs +#define Tcl_ReapDetachedProcs \ + (tclStubsPtr->tcl_ReapDetachedProcs) /* 207 */ +#endif +#endif /* MACOSX */ +#ifndef Tcl_RecordAndEval +#define Tcl_RecordAndEval \ + (tclStubsPtr->tcl_RecordAndEval) /* 208 */ +#endif +#ifndef Tcl_RecordAndEvalObj +#define Tcl_RecordAndEvalObj \ + (tclStubsPtr->tcl_RecordAndEvalObj) /* 209 */ +#endif +#ifndef Tcl_RegisterChannel +#define Tcl_RegisterChannel \ + (tclStubsPtr->tcl_RegisterChannel) /* 210 */ +#endif +#ifndef Tcl_RegisterObjType +#define Tcl_RegisterObjType \ + (tclStubsPtr->tcl_RegisterObjType) /* 211 */ +#endif +#ifndef Tcl_RegExpCompile +#define Tcl_RegExpCompile \ + (tclStubsPtr->tcl_RegExpCompile) /* 212 */ +#endif +#ifndef Tcl_RegExpExec +#define Tcl_RegExpExec \ + (tclStubsPtr->tcl_RegExpExec) /* 213 */ +#endif +#ifndef Tcl_RegExpMatch +#define Tcl_RegExpMatch \ + (tclStubsPtr->tcl_RegExpMatch) /* 214 */ +#endif +#ifndef Tcl_RegExpRange +#define Tcl_RegExpRange \ + (tclStubsPtr->tcl_RegExpRange) /* 215 */ +#endif +#ifndef Tcl_Release +#define Tcl_Release \ + (tclStubsPtr->tcl_Release) /* 216 */ +#endif +#ifndef Tcl_ResetResult +#define Tcl_ResetResult \ + (tclStubsPtr->tcl_ResetResult) /* 217 */ +#endif +#ifndef Tcl_ScanElement +#define Tcl_ScanElement \ + (tclStubsPtr->tcl_ScanElement) /* 218 */ +#endif +#ifndef Tcl_ScanCountedElement +#define Tcl_ScanCountedElement \ + (tclStubsPtr->tcl_ScanCountedElement) /* 219 */ +#endif +#ifndef Tcl_SeekOld +#define Tcl_SeekOld \ + (tclStubsPtr->tcl_SeekOld) /* 220 */ +#endif +#ifndef Tcl_ServiceAll +#define Tcl_ServiceAll \ + (tclStubsPtr->tcl_ServiceAll) /* 221 */ +#endif +#ifndef Tcl_ServiceEvent +#define Tcl_ServiceEvent \ + (tclStubsPtr->tcl_ServiceEvent) /* 222 */ +#endif +#ifndef Tcl_SetAssocData +#define Tcl_SetAssocData \ + (tclStubsPtr->tcl_SetAssocData) /* 223 */ +#endif +#ifndef Tcl_SetChannelBufferSize +#define Tcl_SetChannelBufferSize \ + (tclStubsPtr->tcl_SetChannelBufferSize) /* 224 */ +#endif +#ifndef Tcl_SetChannelOption +#define Tcl_SetChannelOption \ + (tclStubsPtr->tcl_SetChannelOption) /* 225 */ +#endif +#ifndef Tcl_SetCommandInfo +#define Tcl_SetCommandInfo \ + (tclStubsPtr->tcl_SetCommandInfo) /* 226 */ +#endif +#ifndef Tcl_SetErrno +#define Tcl_SetErrno \ + (tclStubsPtr->tcl_SetErrno) /* 227 */ +#endif +#ifndef Tcl_SetErrorCode +#define Tcl_SetErrorCode \ + (tclStubsPtr->tcl_SetErrorCode) /* 228 */ +#endif +#ifndef Tcl_SetMaxBlockTime +#define Tcl_SetMaxBlockTime \ + (tclStubsPtr->tcl_SetMaxBlockTime) /* 229 */ +#endif +#ifndef Tcl_SetPanicProc +#define Tcl_SetPanicProc \ + (tclStubsPtr->tcl_SetPanicProc) /* 230 */ +#endif +#ifndef Tcl_SetRecursionLimit +#define Tcl_SetRecursionLimit \ + (tclStubsPtr->tcl_SetRecursionLimit) /* 231 */ +#endif +#ifndef Tcl_SetResult +#define Tcl_SetResult \ + (tclStubsPtr->tcl_SetResult) /* 232 */ +#endif +#ifndef Tcl_SetServiceMode +#define Tcl_SetServiceMode \ + (tclStubsPtr->tcl_SetServiceMode) /* 233 */ +#endif +#ifndef Tcl_SetObjErrorCode +#define Tcl_SetObjErrorCode \ + (tclStubsPtr->tcl_SetObjErrorCode) /* 234 */ +#endif +#ifndef Tcl_SetObjResult +#define Tcl_SetObjResult \ + (tclStubsPtr->tcl_SetObjResult) /* 235 */ +#endif +#ifndef Tcl_SetStdChannel +#define Tcl_SetStdChannel \ + (tclStubsPtr->tcl_SetStdChannel) /* 236 */ +#endif +#ifndef Tcl_SetVar +#define Tcl_SetVar \ + (tclStubsPtr->tcl_SetVar) /* 237 */ +#endif +#ifndef Tcl_SetVar2 +#define Tcl_SetVar2 \ + (tclStubsPtr->tcl_SetVar2) /* 238 */ +#endif +#ifndef Tcl_SignalId +#define Tcl_SignalId \ + (tclStubsPtr->tcl_SignalId) /* 239 */ +#endif +#ifndef Tcl_SignalMsg +#define Tcl_SignalMsg \ + (tclStubsPtr->tcl_SignalMsg) /* 240 */ +#endif +#ifndef Tcl_SourceRCFile +#define Tcl_SourceRCFile \ + (tclStubsPtr->tcl_SourceRCFile) /* 241 */ +#endif +#ifndef Tcl_SplitList +#define Tcl_SplitList \ + (tclStubsPtr->tcl_SplitList) /* 242 */ +#endif +#ifndef Tcl_SplitPath +#define Tcl_SplitPath \ + (tclStubsPtr->tcl_SplitPath) /* 243 */ +#endif +#ifndef Tcl_StaticPackage +#define Tcl_StaticPackage \ + (tclStubsPtr->tcl_StaticPackage) /* 244 */ +#endif +#ifndef Tcl_StringMatch +#define Tcl_StringMatch \ + (tclStubsPtr->tcl_StringMatch) /* 245 */ +#endif +#ifndef Tcl_TellOld +#define Tcl_TellOld \ + (tclStubsPtr->tcl_TellOld) /* 246 */ +#endif +#ifndef Tcl_TraceVar +#define Tcl_TraceVar \ + (tclStubsPtr->tcl_TraceVar) /* 247 */ +#endif +#ifndef Tcl_TraceVar2 +#define Tcl_TraceVar2 \ + (tclStubsPtr->tcl_TraceVar2) /* 248 */ +#endif +#ifndef Tcl_TranslateFileName +#define Tcl_TranslateFileName \ + (tclStubsPtr->tcl_TranslateFileName) /* 249 */ +#endif +#ifndef Tcl_Ungets +#define Tcl_Ungets \ + (tclStubsPtr->tcl_Ungets) /* 250 */ +#endif +#ifndef Tcl_UnlinkVar +#define Tcl_UnlinkVar \ + (tclStubsPtr->tcl_UnlinkVar) /* 251 */ +#endif +#ifndef Tcl_UnregisterChannel +#define Tcl_UnregisterChannel \ + (tclStubsPtr->tcl_UnregisterChannel) /* 252 */ +#endif +#ifndef Tcl_UnsetVar +#define Tcl_UnsetVar \ + (tclStubsPtr->tcl_UnsetVar) /* 253 */ +#endif +#ifndef Tcl_UnsetVar2 +#define Tcl_UnsetVar2 \ + (tclStubsPtr->tcl_UnsetVar2) /* 254 */ +#endif +#ifndef Tcl_UntraceVar +#define Tcl_UntraceVar \ + (tclStubsPtr->tcl_UntraceVar) /* 255 */ +#endif +#ifndef Tcl_UntraceVar2 +#define Tcl_UntraceVar2 \ + (tclStubsPtr->tcl_UntraceVar2) /* 256 */ +#endif +#ifndef Tcl_UpdateLinkedVar +#define Tcl_UpdateLinkedVar \ + (tclStubsPtr->tcl_UpdateLinkedVar) /* 257 */ +#endif +#ifndef Tcl_UpVar +#define Tcl_UpVar \ + (tclStubsPtr->tcl_UpVar) /* 258 */ +#endif +#ifndef Tcl_UpVar2 +#define Tcl_UpVar2 \ + (tclStubsPtr->tcl_UpVar2) /* 259 */ +#endif +#ifndef Tcl_VarEval +#define Tcl_VarEval \ + (tclStubsPtr->tcl_VarEval) /* 260 */ +#endif +#ifndef Tcl_VarTraceInfo +#define Tcl_VarTraceInfo \ + (tclStubsPtr->tcl_VarTraceInfo) /* 261 */ +#endif +#ifndef Tcl_VarTraceInfo2 +#define Tcl_VarTraceInfo2 \ + (tclStubsPtr->tcl_VarTraceInfo2) /* 262 */ +#endif +#ifndef Tcl_Write +#define Tcl_Write \ + (tclStubsPtr->tcl_Write) /* 263 */ +#endif +#ifndef Tcl_WrongNumArgs +#define Tcl_WrongNumArgs \ + (tclStubsPtr->tcl_WrongNumArgs) /* 264 */ +#endif +#ifndef Tcl_DumpActiveMemory +#define Tcl_DumpActiveMemory \ + (tclStubsPtr->tcl_DumpActiveMemory) /* 265 */ +#endif +#ifndef Tcl_ValidateAllMemory +#define Tcl_ValidateAllMemory \ + (tclStubsPtr->tcl_ValidateAllMemory) /* 266 */ +#endif +#ifndef Tcl_AppendResultVA +#define Tcl_AppendResultVA \ + (tclStubsPtr->tcl_AppendResultVA) /* 267 */ +#endif +#ifndef Tcl_AppendStringsToObjVA +#define Tcl_AppendStringsToObjVA \ + (tclStubsPtr->tcl_AppendStringsToObjVA) /* 268 */ +#endif +#ifndef Tcl_HashStats +#define Tcl_HashStats \ + (tclStubsPtr->tcl_HashStats) /* 269 */ +#endif +#ifndef Tcl_ParseVar +#define Tcl_ParseVar \ + (tclStubsPtr->tcl_ParseVar) /* 270 */ +#endif +#ifndef Tcl_PkgPresent +#define Tcl_PkgPresent \ + (tclStubsPtr->tcl_PkgPresent) /* 271 */ +#endif +#ifndef Tcl_PkgPresentEx +#define Tcl_PkgPresentEx \ + (tclStubsPtr->tcl_PkgPresentEx) /* 272 */ +#endif +#ifndef Tcl_PkgProvide +#define Tcl_PkgProvide \ + (tclStubsPtr->tcl_PkgProvide) /* 273 */ +#endif +#ifndef Tcl_PkgRequire +#define Tcl_PkgRequire \ + (tclStubsPtr->tcl_PkgRequire) /* 274 */ +#endif +#ifndef Tcl_SetErrorCodeVA +#define Tcl_SetErrorCodeVA \ + (tclStubsPtr->tcl_SetErrorCodeVA) /* 275 */ +#endif +#ifndef Tcl_VarEvalVA +#define Tcl_VarEvalVA \ + (tclStubsPtr->tcl_VarEvalVA) /* 276 */ +#endif +#ifndef Tcl_WaitPid +#define Tcl_WaitPid \ + (tclStubsPtr->tcl_WaitPid) /* 277 */ +#endif +#ifndef Tcl_PanicVA +#define Tcl_PanicVA \ + (tclStubsPtr->tcl_PanicVA) /* 278 */ +#endif +#ifndef Tcl_GetVersion +#define Tcl_GetVersion \ + (tclStubsPtr->tcl_GetVersion) /* 279 */ +#endif +#ifndef Tcl_InitMemory +#define Tcl_InitMemory \ + (tclStubsPtr->tcl_InitMemory) /* 280 */ +#endif +#ifndef Tcl_StackChannel +#define Tcl_StackChannel \ + (tclStubsPtr->tcl_StackChannel) /* 281 */ +#endif +#ifndef Tcl_UnstackChannel +#define Tcl_UnstackChannel \ + (tclStubsPtr->tcl_UnstackChannel) /* 282 */ +#endif +#ifndef Tcl_GetStackedChannel +#define Tcl_GetStackedChannel \ + (tclStubsPtr->tcl_GetStackedChannel) /* 283 */ +#endif +#ifndef Tcl_SetMainLoop +#define Tcl_SetMainLoop \ + (tclStubsPtr->tcl_SetMainLoop) /* 284 */ +#endif +/* Slot 285 is reserved */ +#ifndef Tcl_AppendObjToObj +#define Tcl_AppendObjToObj \ + (tclStubsPtr->tcl_AppendObjToObj) /* 286 */ +#endif +#ifndef Tcl_CreateEncoding +#define Tcl_CreateEncoding \ + (tclStubsPtr->tcl_CreateEncoding) /* 287 */ +#endif +#ifndef Tcl_CreateThreadExitHandler +#define Tcl_CreateThreadExitHandler \ + (tclStubsPtr->tcl_CreateThreadExitHandler) /* 288 */ +#endif +#ifndef Tcl_DeleteThreadExitHandler +#define Tcl_DeleteThreadExitHandler \ + (tclStubsPtr->tcl_DeleteThreadExitHandler) /* 289 */ +#endif +#ifndef Tcl_DiscardResult +#define Tcl_DiscardResult \ + (tclStubsPtr->tcl_DiscardResult) /* 290 */ +#endif +#ifndef Tcl_EvalEx +#define Tcl_EvalEx \ + (tclStubsPtr->tcl_EvalEx) /* 291 */ +#endif +#ifndef Tcl_EvalObjv +#define Tcl_EvalObjv \ + (tclStubsPtr->tcl_EvalObjv) /* 292 */ +#endif +#ifndef Tcl_EvalObjEx +#define Tcl_EvalObjEx \ + (tclStubsPtr->tcl_EvalObjEx) /* 293 */ +#endif +#ifndef Tcl_ExitThread +#define Tcl_ExitThread \ + (tclStubsPtr->tcl_ExitThread) /* 294 */ +#endif +#ifndef Tcl_ExternalToUtf +#define Tcl_ExternalToUtf \ + (tclStubsPtr->tcl_ExternalToUtf) /* 295 */ +#endif +#ifndef Tcl_ExternalToUtfDString +#define Tcl_ExternalToUtfDString \ + (tclStubsPtr->tcl_ExternalToUtfDString) /* 296 */ +#endif +#ifndef Tcl_FinalizeThread +#define Tcl_FinalizeThread \ + (tclStubsPtr->tcl_FinalizeThread) /* 297 */ +#endif +#ifndef Tcl_FinalizeNotifier +#define Tcl_FinalizeNotifier \ + (tclStubsPtr->tcl_FinalizeNotifier) /* 298 */ +#endif +#ifndef Tcl_FreeEncoding +#define Tcl_FreeEncoding \ + (tclStubsPtr->tcl_FreeEncoding) /* 299 */ +#endif +#ifndef Tcl_GetCurrentThread +#define Tcl_GetCurrentThread \ + (tclStubsPtr->tcl_GetCurrentThread) /* 300 */ +#endif +#ifndef Tcl_GetEncoding +#define Tcl_GetEncoding \ + (tclStubsPtr->tcl_GetEncoding) /* 301 */ +#endif +#ifndef Tcl_GetEncodingName +#define Tcl_GetEncodingName \ + (tclStubsPtr->tcl_GetEncodingName) /* 302 */ +#endif +#ifndef Tcl_GetEncodingNames +#define Tcl_GetEncodingNames \ + (tclStubsPtr->tcl_GetEncodingNames) /* 303 */ +#endif +#ifndef Tcl_GetIndexFromObjStruct +#define Tcl_GetIndexFromObjStruct \ + (tclStubsPtr->tcl_GetIndexFromObjStruct) /* 304 */ +#endif +#ifndef Tcl_GetThreadData +#define Tcl_GetThreadData \ + (tclStubsPtr->tcl_GetThreadData) /* 305 */ +#endif +#ifndef Tcl_GetVar2Ex +#define Tcl_GetVar2Ex \ + (tclStubsPtr->tcl_GetVar2Ex) /* 306 */ +#endif +#ifndef Tcl_InitNotifier +#define Tcl_InitNotifier \ + (tclStubsPtr->tcl_InitNotifier) /* 307 */ +#endif +#ifndef Tcl_MutexLock +#define Tcl_MutexLock \ + (tclStubsPtr->tcl_MutexLock) /* 308 */ +#endif +#ifndef Tcl_MutexUnlock +#define Tcl_MutexUnlock \ + (tclStubsPtr->tcl_MutexUnlock) /* 309 */ +#endif +#ifndef Tcl_ConditionNotify +#define Tcl_ConditionNotify \ + (tclStubsPtr->tcl_ConditionNotify) /* 310 */ +#endif +#ifndef Tcl_ConditionWait +#define Tcl_ConditionWait \ + (tclStubsPtr->tcl_ConditionWait) /* 311 */ +#endif +#ifndef Tcl_NumUtfChars +#define Tcl_NumUtfChars \ + (tclStubsPtr->tcl_NumUtfChars) /* 312 */ +#endif +#ifndef Tcl_ReadChars +#define Tcl_ReadChars \ + (tclStubsPtr->tcl_ReadChars) /* 313 */ +#endif +#ifndef Tcl_RestoreResult +#define Tcl_RestoreResult \ + (tclStubsPtr->tcl_RestoreResult) /* 314 */ +#endif +#ifndef Tcl_SaveResult +#define Tcl_SaveResult \ + (tclStubsPtr->tcl_SaveResult) /* 315 */ +#endif +#ifndef Tcl_SetSystemEncoding +#define Tcl_SetSystemEncoding \ + (tclStubsPtr->tcl_SetSystemEncoding) /* 316 */ +#endif +#ifndef Tcl_SetVar2Ex +#define Tcl_SetVar2Ex \ + (tclStubsPtr->tcl_SetVar2Ex) /* 317 */ +#endif +#ifndef Tcl_ThreadAlert +#define Tcl_ThreadAlert \ + (tclStubsPtr->tcl_ThreadAlert) /* 318 */ +#endif +#ifndef Tcl_ThreadQueueEvent +#define Tcl_ThreadQueueEvent \ + (tclStubsPtr->tcl_ThreadQueueEvent) /* 319 */ +#endif +#ifndef Tcl_UniCharAtIndex +#define Tcl_UniCharAtIndex \ + (tclStubsPtr->tcl_UniCharAtIndex) /* 320 */ +#endif +#ifndef Tcl_UniCharToLower +#define Tcl_UniCharToLower \ + (tclStubsPtr->tcl_UniCharToLower) /* 321 */ +#endif +#ifndef Tcl_UniCharToTitle +#define Tcl_UniCharToTitle \ + (tclStubsPtr->tcl_UniCharToTitle) /* 322 */ +#endif +#ifndef Tcl_UniCharToUpper +#define Tcl_UniCharToUpper \ + (tclStubsPtr->tcl_UniCharToUpper) /* 323 */ +#endif +#ifndef Tcl_UniCharToUtf +#define Tcl_UniCharToUtf \ + (tclStubsPtr->tcl_UniCharToUtf) /* 324 */ +#endif +#ifndef Tcl_UtfAtIndex +#define Tcl_UtfAtIndex \ + (tclStubsPtr->tcl_UtfAtIndex) /* 325 */ +#endif +#ifndef Tcl_UtfCharComplete +#define Tcl_UtfCharComplete \ + (tclStubsPtr->tcl_UtfCharComplete) /* 326 */ +#endif +#ifndef Tcl_UtfBackslash +#define Tcl_UtfBackslash \ + (tclStubsPtr->tcl_UtfBackslash) /* 327 */ +#endif +#ifndef Tcl_UtfFindFirst +#define Tcl_UtfFindFirst \ + (tclStubsPtr->tcl_UtfFindFirst) /* 328 */ +#endif +#ifndef Tcl_UtfFindLast +#define Tcl_UtfFindLast \ + (tclStubsPtr->tcl_UtfFindLast) /* 329 */ +#endif +#ifndef Tcl_UtfNext +#define Tcl_UtfNext \ + (tclStubsPtr->tcl_UtfNext) /* 330 */ +#endif +#ifndef Tcl_UtfPrev +#define Tcl_UtfPrev \ + (tclStubsPtr->tcl_UtfPrev) /* 331 */ +#endif +#ifndef Tcl_UtfToExternal +#define Tcl_UtfToExternal \ + (tclStubsPtr->tcl_UtfToExternal) /* 332 */ +#endif +#ifndef Tcl_UtfToExternalDString +#define Tcl_UtfToExternalDString \ + (tclStubsPtr->tcl_UtfToExternalDString) /* 333 */ +#endif +#ifndef Tcl_UtfToLower +#define Tcl_UtfToLower \ + (tclStubsPtr->tcl_UtfToLower) /* 334 */ +#endif +#ifndef Tcl_UtfToTitle +#define Tcl_UtfToTitle \ + (tclStubsPtr->tcl_UtfToTitle) /* 335 */ +#endif +#ifndef Tcl_UtfToUniChar +#define Tcl_UtfToUniChar \ + (tclStubsPtr->tcl_UtfToUniChar) /* 336 */ +#endif +#ifndef Tcl_UtfToUpper +#define Tcl_UtfToUpper \ + (tclStubsPtr->tcl_UtfToUpper) /* 337 */ +#endif +#ifndef Tcl_WriteChars +#define Tcl_WriteChars \ + (tclStubsPtr->tcl_WriteChars) /* 338 */ +#endif +#ifndef Tcl_WriteObj +#define Tcl_WriteObj \ + (tclStubsPtr->tcl_WriteObj) /* 339 */ +#endif +#ifndef Tcl_GetString +#define Tcl_GetString \ + (tclStubsPtr->tcl_GetString) /* 340 */ +#endif +#ifndef Tcl_GetDefaultEncodingDir +#define Tcl_GetDefaultEncodingDir \ + (tclStubsPtr->tcl_GetDefaultEncodingDir) /* 341 */ +#endif +#ifndef Tcl_SetDefaultEncodingDir +#define Tcl_SetDefaultEncodingDir \ + (tclStubsPtr->tcl_SetDefaultEncodingDir) /* 342 */ +#endif +#ifndef Tcl_AlertNotifier +#define Tcl_AlertNotifier \ + (tclStubsPtr->tcl_AlertNotifier) /* 343 */ +#endif +#ifndef Tcl_ServiceModeHook +#define Tcl_ServiceModeHook \ + (tclStubsPtr->tcl_ServiceModeHook) /* 344 */ +#endif +#ifndef Tcl_UniCharIsAlnum +#define Tcl_UniCharIsAlnum \ + (tclStubsPtr->tcl_UniCharIsAlnum) /* 345 */ +#endif +#ifndef Tcl_UniCharIsAlpha +#define Tcl_UniCharIsAlpha \ + (tclStubsPtr->tcl_UniCharIsAlpha) /* 346 */ +#endif +#ifndef Tcl_UniCharIsDigit +#define Tcl_UniCharIsDigit \ + (tclStubsPtr->tcl_UniCharIsDigit) /* 347 */ +#endif +#ifndef Tcl_UniCharIsLower +#define Tcl_UniCharIsLower \ + (tclStubsPtr->tcl_UniCharIsLower) /* 348 */ +#endif +#ifndef Tcl_UniCharIsSpace +#define Tcl_UniCharIsSpace \ + (tclStubsPtr->tcl_UniCharIsSpace) /* 349 */ +#endif +#ifndef Tcl_UniCharIsUpper +#define Tcl_UniCharIsUpper \ + (tclStubsPtr->tcl_UniCharIsUpper) /* 350 */ +#endif +#ifndef Tcl_UniCharIsWordChar +#define Tcl_UniCharIsWordChar \ + (tclStubsPtr->tcl_UniCharIsWordChar) /* 351 */ +#endif +#ifndef Tcl_UniCharLen +#define Tcl_UniCharLen \ + (tclStubsPtr->tcl_UniCharLen) /* 352 */ +#endif +#ifndef Tcl_UniCharNcmp +#define Tcl_UniCharNcmp \ + (tclStubsPtr->tcl_UniCharNcmp) /* 353 */ +#endif +#ifndef Tcl_UniCharToUtfDString +#define Tcl_UniCharToUtfDString \ + (tclStubsPtr->tcl_UniCharToUtfDString) /* 354 */ +#endif +#ifndef Tcl_UtfToUniCharDString +#define Tcl_UtfToUniCharDString \ + (tclStubsPtr->tcl_UtfToUniCharDString) /* 355 */ +#endif +#ifndef Tcl_GetRegExpFromObj +#define Tcl_GetRegExpFromObj \ + (tclStubsPtr->tcl_GetRegExpFromObj) /* 356 */ +#endif +#ifndef Tcl_EvalTokens +#define Tcl_EvalTokens \ + (tclStubsPtr->tcl_EvalTokens) /* 357 */ +#endif +#ifndef Tcl_FreeParse +#define Tcl_FreeParse \ + (tclStubsPtr->tcl_FreeParse) /* 358 */ +#endif +#ifndef Tcl_LogCommandInfo +#define Tcl_LogCommandInfo \ + (tclStubsPtr->tcl_LogCommandInfo) /* 359 */ +#endif +#ifndef Tcl_ParseBraces +#define Tcl_ParseBraces \ + (tclStubsPtr->tcl_ParseBraces) /* 360 */ +#endif +#ifndef Tcl_ParseCommand +#define Tcl_ParseCommand \ + (tclStubsPtr->tcl_ParseCommand) /* 361 */ +#endif +#ifndef Tcl_ParseExpr +#define Tcl_ParseExpr \ + (tclStubsPtr->tcl_ParseExpr) /* 362 */ +#endif +#ifndef Tcl_ParseQuotedString +#define Tcl_ParseQuotedString \ + (tclStubsPtr->tcl_ParseQuotedString) /* 363 */ +#endif +#ifndef Tcl_ParseVarName +#define Tcl_ParseVarName \ + (tclStubsPtr->tcl_ParseVarName) /* 364 */ +#endif +#ifndef Tcl_GetCwd +#define Tcl_GetCwd \ + (tclStubsPtr->tcl_GetCwd) /* 365 */ +#endif +#ifndef Tcl_Chdir +#define Tcl_Chdir \ + (tclStubsPtr->tcl_Chdir) /* 366 */ +#endif +#ifndef Tcl_Access +#define Tcl_Access \ + (tclStubsPtr->tcl_Access) /* 367 */ +#endif +#ifndef Tcl_Stat +#define Tcl_Stat \ + (tclStubsPtr->tcl_Stat) /* 368 */ +#endif +#ifndef Tcl_UtfNcmp +#define Tcl_UtfNcmp \ + (tclStubsPtr->tcl_UtfNcmp) /* 369 */ +#endif +#ifndef Tcl_UtfNcasecmp +#define Tcl_UtfNcasecmp \ + (tclStubsPtr->tcl_UtfNcasecmp) /* 370 */ +#endif +#ifndef Tcl_StringCaseMatch +#define Tcl_StringCaseMatch \ + (tclStubsPtr->tcl_StringCaseMatch) /* 371 */ +#endif +#ifndef Tcl_UniCharIsControl +#define Tcl_UniCharIsControl \ + (tclStubsPtr->tcl_UniCharIsControl) /* 372 */ +#endif +#ifndef Tcl_UniCharIsGraph +#define Tcl_UniCharIsGraph \ + (tclStubsPtr->tcl_UniCharIsGraph) /* 373 */ +#endif +#ifndef Tcl_UniCharIsPrint +#define Tcl_UniCharIsPrint \ + (tclStubsPtr->tcl_UniCharIsPrint) /* 374 */ +#endif +#ifndef Tcl_UniCharIsPunct +#define Tcl_UniCharIsPunct \ + (tclStubsPtr->tcl_UniCharIsPunct) /* 375 */ +#endif +#ifndef Tcl_RegExpExecObj +#define Tcl_RegExpExecObj \ + (tclStubsPtr->tcl_RegExpExecObj) /* 376 */ +#endif +#ifndef Tcl_RegExpGetInfo +#define Tcl_RegExpGetInfo \ + (tclStubsPtr->tcl_RegExpGetInfo) /* 377 */ +#endif +#ifndef Tcl_NewUnicodeObj +#define Tcl_NewUnicodeObj \ + (tclStubsPtr->tcl_NewUnicodeObj) /* 378 */ +#endif +#ifndef Tcl_SetUnicodeObj +#define Tcl_SetUnicodeObj \ + (tclStubsPtr->tcl_SetUnicodeObj) /* 379 */ +#endif +#ifndef Tcl_GetCharLength +#define Tcl_GetCharLength \ + (tclStubsPtr->tcl_GetCharLength) /* 380 */ +#endif +#ifndef Tcl_GetUniChar +#define Tcl_GetUniChar \ + (tclStubsPtr->tcl_GetUniChar) /* 381 */ +#endif +#ifndef Tcl_GetUnicode +#define Tcl_GetUnicode \ + (tclStubsPtr->tcl_GetUnicode) /* 382 */ +#endif +#ifndef Tcl_GetRange +#define Tcl_GetRange \ + (tclStubsPtr->tcl_GetRange) /* 383 */ +#endif +#ifndef Tcl_AppendUnicodeToObj +#define Tcl_AppendUnicodeToObj \ + (tclStubsPtr->tcl_AppendUnicodeToObj) /* 384 */ +#endif +#ifndef Tcl_RegExpMatchObj +#define Tcl_RegExpMatchObj \ + (tclStubsPtr->tcl_RegExpMatchObj) /* 385 */ +#endif +#ifndef Tcl_SetNotifier +#define Tcl_SetNotifier \ + (tclStubsPtr->tcl_SetNotifier) /* 386 */ +#endif +#ifndef Tcl_GetAllocMutex +#define Tcl_GetAllocMutex \ + (tclStubsPtr->tcl_GetAllocMutex) /* 387 */ +#endif +#ifndef Tcl_GetChannelNames +#define Tcl_GetChannelNames \ + (tclStubsPtr->tcl_GetChannelNames) /* 388 */ +#endif +#ifndef Tcl_GetChannelNamesEx +#define Tcl_GetChannelNamesEx \ + (tclStubsPtr->tcl_GetChannelNamesEx) /* 389 */ +#endif +#ifndef Tcl_ProcObjCmd +#define Tcl_ProcObjCmd \ + (tclStubsPtr->tcl_ProcObjCmd) /* 390 */ +#endif +#ifndef Tcl_ConditionFinalize +#define Tcl_ConditionFinalize \ + (tclStubsPtr->tcl_ConditionFinalize) /* 391 */ +#endif +#ifndef Tcl_MutexFinalize +#define Tcl_MutexFinalize \ + (tclStubsPtr->tcl_MutexFinalize) /* 392 */ +#endif +#ifndef Tcl_CreateThread +#define Tcl_CreateThread \ + (tclStubsPtr->tcl_CreateThread) /* 393 */ +#endif +#ifndef Tcl_ReadRaw +#define Tcl_ReadRaw \ + (tclStubsPtr->tcl_ReadRaw) /* 394 */ +#endif +#ifndef Tcl_WriteRaw +#define Tcl_WriteRaw \ + (tclStubsPtr->tcl_WriteRaw) /* 395 */ +#endif +#ifndef Tcl_GetTopChannel +#define Tcl_GetTopChannel \ + (tclStubsPtr->tcl_GetTopChannel) /* 396 */ +#endif +#ifndef Tcl_ChannelBuffered +#define Tcl_ChannelBuffered \ + (tclStubsPtr->tcl_ChannelBuffered) /* 397 */ +#endif +#ifndef Tcl_ChannelName +#define Tcl_ChannelName \ + (tclStubsPtr->tcl_ChannelName) /* 398 */ +#endif +#ifndef Tcl_ChannelVersion +#define Tcl_ChannelVersion \ + (tclStubsPtr->tcl_ChannelVersion) /* 399 */ +#endif +#ifndef Tcl_ChannelBlockModeProc +#define Tcl_ChannelBlockModeProc \ + (tclStubsPtr->tcl_ChannelBlockModeProc) /* 400 */ +#endif +#ifndef Tcl_ChannelCloseProc +#define Tcl_ChannelCloseProc \ + (tclStubsPtr->tcl_ChannelCloseProc) /* 401 */ +#endif +#ifndef Tcl_ChannelClose2Proc +#define Tcl_ChannelClose2Proc \ + (tclStubsPtr->tcl_ChannelClose2Proc) /* 402 */ +#endif +#ifndef Tcl_ChannelInputProc +#define Tcl_ChannelInputProc \ + (tclStubsPtr->tcl_ChannelInputProc) /* 403 */ +#endif +#ifndef Tcl_ChannelOutputProc +#define Tcl_ChannelOutputProc \ + (tclStubsPtr->tcl_ChannelOutputProc) /* 404 */ +#endif +#ifndef Tcl_ChannelSeekProc +#define Tcl_ChannelSeekProc \ + (tclStubsPtr->tcl_ChannelSeekProc) /* 405 */ +#endif +#ifndef Tcl_ChannelSetOptionProc +#define Tcl_ChannelSetOptionProc \ + (tclStubsPtr->tcl_ChannelSetOptionProc) /* 406 */ +#endif +#ifndef Tcl_ChannelGetOptionProc +#define Tcl_ChannelGetOptionProc \ + (tclStubsPtr->tcl_ChannelGetOptionProc) /* 407 */ +#endif +#ifndef Tcl_ChannelWatchProc +#define Tcl_ChannelWatchProc \ + (tclStubsPtr->tcl_ChannelWatchProc) /* 408 */ +#endif +#ifndef Tcl_ChannelGetHandleProc +#define Tcl_ChannelGetHandleProc \ + (tclStubsPtr->tcl_ChannelGetHandleProc) /* 409 */ +#endif +#ifndef Tcl_ChannelFlushProc +#define Tcl_ChannelFlushProc \ + (tclStubsPtr->tcl_ChannelFlushProc) /* 410 */ +#endif +#ifndef Tcl_ChannelHandlerProc +#define Tcl_ChannelHandlerProc \ + (tclStubsPtr->tcl_ChannelHandlerProc) /* 411 */ +#endif +#ifndef Tcl_JoinThread +#define Tcl_JoinThread \ + (tclStubsPtr->tcl_JoinThread) /* 412 */ +#endif +#ifndef Tcl_IsChannelShared +#define Tcl_IsChannelShared \ + (tclStubsPtr->tcl_IsChannelShared) /* 413 */ +#endif +#ifndef Tcl_IsChannelRegistered +#define Tcl_IsChannelRegistered \ + (tclStubsPtr->tcl_IsChannelRegistered) /* 414 */ +#endif +#ifndef Tcl_CutChannel +#define Tcl_CutChannel \ + (tclStubsPtr->tcl_CutChannel) /* 415 */ +#endif +#ifndef Tcl_SpliceChannel +#define Tcl_SpliceChannel \ + (tclStubsPtr->tcl_SpliceChannel) /* 416 */ +#endif +#ifndef Tcl_ClearChannelHandlers +#define Tcl_ClearChannelHandlers \ + (tclStubsPtr->tcl_ClearChannelHandlers) /* 417 */ +#endif +#ifndef Tcl_IsChannelExisting +#define Tcl_IsChannelExisting \ + (tclStubsPtr->tcl_IsChannelExisting) /* 418 */ +#endif +#ifndef Tcl_UniCharNcasecmp +#define Tcl_UniCharNcasecmp \ + (tclStubsPtr->tcl_UniCharNcasecmp) /* 419 */ +#endif +#ifndef Tcl_UniCharCaseMatch +#define Tcl_UniCharCaseMatch \ + (tclStubsPtr->tcl_UniCharCaseMatch) /* 420 */ +#endif +#ifndef Tcl_FindHashEntry +#define Tcl_FindHashEntry \ + (tclStubsPtr->tcl_FindHashEntry) /* 421 */ +#endif +#ifndef Tcl_CreateHashEntry +#define Tcl_CreateHashEntry \ + (tclStubsPtr->tcl_CreateHashEntry) /* 422 */ +#endif +#ifndef Tcl_InitCustomHashTable +#define Tcl_InitCustomHashTable \ + (tclStubsPtr->tcl_InitCustomHashTable) /* 423 */ +#endif +#ifndef Tcl_InitObjHashTable +#define Tcl_InitObjHashTable \ + (tclStubsPtr->tcl_InitObjHashTable) /* 424 */ +#endif +#ifndef Tcl_CommandTraceInfo +#define Tcl_CommandTraceInfo \ + (tclStubsPtr->tcl_CommandTraceInfo) /* 425 */ +#endif +#ifndef Tcl_TraceCommand +#define Tcl_TraceCommand \ + (tclStubsPtr->tcl_TraceCommand) /* 426 */ +#endif +#ifndef Tcl_UntraceCommand +#define Tcl_UntraceCommand \ + (tclStubsPtr->tcl_UntraceCommand) /* 427 */ +#endif +#ifndef Tcl_AttemptAlloc +#define Tcl_AttemptAlloc \ + (tclStubsPtr->tcl_AttemptAlloc) /* 428 */ +#endif +#ifndef Tcl_AttemptDbCkalloc +#define Tcl_AttemptDbCkalloc \ + (tclStubsPtr->tcl_AttemptDbCkalloc) /* 429 */ +#endif +#ifndef Tcl_AttemptRealloc +#define Tcl_AttemptRealloc \ + (tclStubsPtr->tcl_AttemptRealloc) /* 430 */ +#endif +#ifndef Tcl_AttemptDbCkrealloc +#define Tcl_AttemptDbCkrealloc \ + (tclStubsPtr->tcl_AttemptDbCkrealloc) /* 431 */ +#endif +#ifndef Tcl_AttemptSetObjLength +#define Tcl_AttemptSetObjLength \ + (tclStubsPtr->tcl_AttemptSetObjLength) /* 432 */ +#endif +#ifndef Tcl_GetChannelThread +#define Tcl_GetChannelThread \ + (tclStubsPtr->tcl_GetChannelThread) /* 433 */ +#endif +#ifndef Tcl_GetUnicodeFromObj +#define Tcl_GetUnicodeFromObj \ + (tclStubsPtr->tcl_GetUnicodeFromObj) /* 434 */ +#endif +#ifndef Tcl_GetMathFuncInfo +#define Tcl_GetMathFuncInfo \ + (tclStubsPtr->tcl_GetMathFuncInfo) /* 435 */ +#endif +#ifndef Tcl_ListMathFuncs +#define Tcl_ListMathFuncs \ + (tclStubsPtr->tcl_ListMathFuncs) /* 436 */ +#endif +#ifndef Tcl_SubstObj +#define Tcl_SubstObj \ + (tclStubsPtr->tcl_SubstObj) /* 437 */ +#endif +#ifndef Tcl_DetachChannel +#define Tcl_DetachChannel \ + (tclStubsPtr->tcl_DetachChannel) /* 438 */ +#endif +#ifndef Tcl_IsStandardChannel +#define Tcl_IsStandardChannel \ + (tclStubsPtr->tcl_IsStandardChannel) /* 439 */ +#endif +#ifndef Tcl_FSCopyFile +#define Tcl_FSCopyFile \ + (tclStubsPtr->tcl_FSCopyFile) /* 440 */ +#endif +#ifndef Tcl_FSCopyDirectory +#define Tcl_FSCopyDirectory \ + (tclStubsPtr->tcl_FSCopyDirectory) /* 441 */ +#endif +#ifndef Tcl_FSCreateDirectory +#define Tcl_FSCreateDirectory \ + (tclStubsPtr->tcl_FSCreateDirectory) /* 442 */ +#endif +#ifndef Tcl_FSDeleteFile +#define Tcl_FSDeleteFile \ + (tclStubsPtr->tcl_FSDeleteFile) /* 443 */ +#endif +#ifndef Tcl_FSLoadFile +#define Tcl_FSLoadFile \ + (tclStubsPtr->tcl_FSLoadFile) /* 444 */ +#endif +#ifndef Tcl_FSMatchInDirectory +#define Tcl_FSMatchInDirectory \ + (tclStubsPtr->tcl_FSMatchInDirectory) /* 445 */ +#endif +#ifndef Tcl_FSLink +#define Tcl_FSLink \ + (tclStubsPtr->tcl_FSLink) /* 446 */ +#endif +#ifndef Tcl_FSRemoveDirectory +#define Tcl_FSRemoveDirectory \ + (tclStubsPtr->tcl_FSRemoveDirectory) /* 447 */ +#endif +#ifndef Tcl_FSRenameFile +#define Tcl_FSRenameFile \ + (tclStubsPtr->tcl_FSRenameFile) /* 448 */ +#endif +#ifndef Tcl_FSLstat +#define Tcl_FSLstat \ + (tclStubsPtr->tcl_FSLstat) /* 449 */ +#endif +#ifndef Tcl_FSUtime +#define Tcl_FSUtime \ + (tclStubsPtr->tcl_FSUtime) /* 450 */ +#endif +#ifndef Tcl_FSFileAttrsGet +#define Tcl_FSFileAttrsGet \ + (tclStubsPtr->tcl_FSFileAttrsGet) /* 451 */ +#endif +#ifndef Tcl_FSFileAttrsSet +#define Tcl_FSFileAttrsSet \ + (tclStubsPtr->tcl_FSFileAttrsSet) /* 452 */ +#endif +#ifndef Tcl_FSFileAttrStrings +#define Tcl_FSFileAttrStrings \ + (tclStubsPtr->tcl_FSFileAttrStrings) /* 453 */ +#endif +#ifndef Tcl_FSStat +#define Tcl_FSStat \ + (tclStubsPtr->tcl_FSStat) /* 454 */ +#endif +#ifndef Tcl_FSAccess +#define Tcl_FSAccess \ + (tclStubsPtr->tcl_FSAccess) /* 455 */ +#endif +#ifndef Tcl_FSOpenFileChannel +#define Tcl_FSOpenFileChannel \ + (tclStubsPtr->tcl_FSOpenFileChannel) /* 456 */ +#endif +#ifndef Tcl_FSGetCwd +#define Tcl_FSGetCwd \ + (tclStubsPtr->tcl_FSGetCwd) /* 457 */ +#endif +#ifndef Tcl_FSChdir +#define Tcl_FSChdir \ + (tclStubsPtr->tcl_FSChdir) /* 458 */ +#endif +#ifndef Tcl_FSConvertToPathType +#define Tcl_FSConvertToPathType \ + (tclStubsPtr->tcl_FSConvertToPathType) /* 459 */ +#endif +#ifndef Tcl_FSJoinPath +#define Tcl_FSJoinPath \ + (tclStubsPtr->tcl_FSJoinPath) /* 460 */ +#endif +#ifndef Tcl_FSSplitPath +#define Tcl_FSSplitPath \ + (tclStubsPtr->tcl_FSSplitPath) /* 461 */ +#endif +#ifndef Tcl_FSEqualPaths +#define Tcl_FSEqualPaths \ + (tclStubsPtr->tcl_FSEqualPaths) /* 462 */ +#endif +#ifndef Tcl_FSGetNormalizedPath +#define Tcl_FSGetNormalizedPath \ + (tclStubsPtr->tcl_FSGetNormalizedPath) /* 463 */ +#endif +#ifndef Tcl_FSJoinToPath +#define Tcl_FSJoinToPath \ + (tclStubsPtr->tcl_FSJoinToPath) /* 464 */ +#endif +#ifndef Tcl_FSGetInternalRep +#define Tcl_FSGetInternalRep \ + (tclStubsPtr->tcl_FSGetInternalRep) /* 465 */ +#endif +#ifndef Tcl_FSGetTranslatedPath +#define Tcl_FSGetTranslatedPath \ + (tclStubsPtr->tcl_FSGetTranslatedPath) /* 466 */ +#endif +#ifndef Tcl_FSEvalFile +#define Tcl_FSEvalFile \ + (tclStubsPtr->tcl_FSEvalFile) /* 467 */ +#endif +#ifndef Tcl_FSNewNativePath +#define Tcl_FSNewNativePath \ + (tclStubsPtr->tcl_FSNewNativePath) /* 468 */ +#endif +#ifndef Tcl_FSGetNativePath +#define Tcl_FSGetNativePath \ + (tclStubsPtr->tcl_FSGetNativePath) /* 469 */ +#endif +#ifndef Tcl_FSFileSystemInfo +#define Tcl_FSFileSystemInfo \ + (tclStubsPtr->tcl_FSFileSystemInfo) /* 470 */ +#endif +#ifndef Tcl_FSPathSeparator +#define Tcl_FSPathSeparator \ + (tclStubsPtr->tcl_FSPathSeparator) /* 471 */ +#endif +#ifndef Tcl_FSListVolumes +#define Tcl_FSListVolumes \ + (tclStubsPtr->tcl_FSListVolumes) /* 472 */ +#endif +#ifndef Tcl_FSRegister +#define Tcl_FSRegister \ + (tclStubsPtr->tcl_FSRegister) /* 473 */ +#endif +#ifndef Tcl_FSUnregister +#define Tcl_FSUnregister \ + (tclStubsPtr->tcl_FSUnregister) /* 474 */ +#endif +#ifndef Tcl_FSData +#define Tcl_FSData \ + (tclStubsPtr->tcl_FSData) /* 475 */ +#endif +#ifndef Tcl_FSGetTranslatedStringPath +#define Tcl_FSGetTranslatedStringPath \ + (tclStubsPtr->tcl_FSGetTranslatedStringPath) /* 476 */ +#endif +#ifndef Tcl_FSGetFileSystemForPath +#define Tcl_FSGetFileSystemForPath \ + (tclStubsPtr->tcl_FSGetFileSystemForPath) /* 477 */ +#endif +#ifndef Tcl_FSGetPathType +#define Tcl_FSGetPathType \ + (tclStubsPtr->tcl_FSGetPathType) /* 478 */ +#endif +#ifndef Tcl_OutputBuffered +#define Tcl_OutputBuffered \ + (tclStubsPtr->tcl_OutputBuffered) /* 479 */ +#endif +#ifndef Tcl_FSMountsChanged +#define Tcl_FSMountsChanged \ + (tclStubsPtr->tcl_FSMountsChanged) /* 480 */ +#endif +#ifndef Tcl_EvalTokensStandard +#define Tcl_EvalTokensStandard \ + (tclStubsPtr->tcl_EvalTokensStandard) /* 481 */ +#endif +#ifndef Tcl_GetTime +#define Tcl_GetTime \ + (tclStubsPtr->tcl_GetTime) /* 482 */ +#endif +#ifndef Tcl_CreateObjTrace +#define Tcl_CreateObjTrace \ + (tclStubsPtr->tcl_CreateObjTrace) /* 483 */ +#endif +#ifndef Tcl_GetCommandInfoFromToken +#define Tcl_GetCommandInfoFromToken \ + (tclStubsPtr->tcl_GetCommandInfoFromToken) /* 484 */ +#endif +#ifndef Tcl_SetCommandInfoFromToken +#define Tcl_SetCommandInfoFromToken \ + (tclStubsPtr->tcl_SetCommandInfoFromToken) /* 485 */ +#endif +#ifndef Tcl_DbNewWideIntObj +#define Tcl_DbNewWideIntObj \ + (tclStubsPtr->tcl_DbNewWideIntObj) /* 486 */ +#endif +#ifndef Tcl_GetWideIntFromObj +#define Tcl_GetWideIntFromObj \ + (tclStubsPtr->tcl_GetWideIntFromObj) /* 487 */ +#endif +#ifndef Tcl_NewWideIntObj +#define Tcl_NewWideIntObj \ + (tclStubsPtr->tcl_NewWideIntObj) /* 488 */ +#endif +#ifndef Tcl_SetWideIntObj +#define Tcl_SetWideIntObj \ + (tclStubsPtr->tcl_SetWideIntObj) /* 489 */ +#endif +#ifndef Tcl_AllocStatBuf +#define Tcl_AllocStatBuf \ + (tclStubsPtr->tcl_AllocStatBuf) /* 490 */ +#endif +#ifndef Tcl_Seek +#define Tcl_Seek \ + (tclStubsPtr->tcl_Seek) /* 491 */ +#endif +#ifndef Tcl_Tell +#define Tcl_Tell \ + (tclStubsPtr->tcl_Tell) /* 492 */ +#endif +#ifndef Tcl_ChannelWideSeekProc +#define Tcl_ChannelWideSeekProc \ + (tclStubsPtr->tcl_ChannelWideSeekProc) /* 493 */ +#endif +#ifndef Tcl_DictObjPut +#define Tcl_DictObjPut \ + (tclStubsPtr->tcl_DictObjPut) /* 494 */ +#endif +#ifndef Tcl_DictObjGet +#define Tcl_DictObjGet \ + (tclStubsPtr->tcl_DictObjGet) /* 495 */ +#endif +#ifndef Tcl_DictObjRemove +#define Tcl_DictObjRemove \ + (tclStubsPtr->tcl_DictObjRemove) /* 496 */ +#endif +#ifndef Tcl_DictObjSize +#define Tcl_DictObjSize \ + (tclStubsPtr->tcl_DictObjSize) /* 497 */ +#endif +#ifndef Tcl_DictObjFirst +#define Tcl_DictObjFirst \ + (tclStubsPtr->tcl_DictObjFirst) /* 498 */ +#endif +#ifndef Tcl_DictObjNext +#define Tcl_DictObjNext \ + (tclStubsPtr->tcl_DictObjNext) /* 499 */ +#endif +#ifndef Tcl_DictObjDone +#define Tcl_DictObjDone \ + (tclStubsPtr->tcl_DictObjDone) /* 500 */ +#endif +#ifndef Tcl_DictObjPutKeyList +#define Tcl_DictObjPutKeyList \ + (tclStubsPtr->tcl_DictObjPutKeyList) /* 501 */ +#endif +#ifndef Tcl_DictObjRemoveKeyList +#define Tcl_DictObjRemoveKeyList \ + (tclStubsPtr->tcl_DictObjRemoveKeyList) /* 502 */ +#endif +#ifndef Tcl_NewDictObj +#define Tcl_NewDictObj \ + (tclStubsPtr->tcl_NewDictObj) /* 503 */ +#endif +#ifndef Tcl_DbNewDictObj +#define Tcl_DbNewDictObj \ + (tclStubsPtr->tcl_DbNewDictObj) /* 504 */ +#endif +#ifndef Tcl_RegisterConfig +#define Tcl_RegisterConfig \ + (tclStubsPtr->tcl_RegisterConfig) /* 505 */ +#endif +#ifndef Tcl_CreateNamespace +#define Tcl_CreateNamespace \ + (tclStubsPtr->tcl_CreateNamespace) /* 506 */ +#endif +#ifndef Tcl_DeleteNamespace +#define Tcl_DeleteNamespace \ + (tclStubsPtr->tcl_DeleteNamespace) /* 507 */ +#endif +#ifndef Tcl_AppendExportList +#define Tcl_AppendExportList \ + (tclStubsPtr->tcl_AppendExportList) /* 508 */ +#endif +#ifndef Tcl_Export +#define Tcl_Export \ + (tclStubsPtr->tcl_Export) /* 509 */ +#endif +#ifndef Tcl_Import +#define Tcl_Import \ + (tclStubsPtr->tcl_Import) /* 510 */ +#endif +#ifndef Tcl_ForgetImport +#define Tcl_ForgetImport \ + (tclStubsPtr->tcl_ForgetImport) /* 511 */ +#endif +#ifndef Tcl_GetCurrentNamespace +#define Tcl_GetCurrentNamespace \ + (tclStubsPtr->tcl_GetCurrentNamespace) /* 512 */ +#endif +#ifndef Tcl_GetGlobalNamespace +#define Tcl_GetGlobalNamespace \ + (tclStubsPtr->tcl_GetGlobalNamespace) /* 513 */ +#endif +#ifndef Tcl_FindNamespace +#define Tcl_FindNamespace \ + (tclStubsPtr->tcl_FindNamespace) /* 514 */ +#endif +#ifndef Tcl_FindCommand +#define Tcl_FindCommand \ + (tclStubsPtr->tcl_FindCommand) /* 515 */ +#endif +#ifndef Tcl_GetCommandFromObj +#define Tcl_GetCommandFromObj \ + (tclStubsPtr->tcl_GetCommandFromObj) /* 516 */ +#endif +#ifndef Tcl_GetCommandFullName +#define Tcl_GetCommandFullName \ + (tclStubsPtr->tcl_GetCommandFullName) /* 517 */ +#endif +#ifndef Tcl_FSEvalFileEx +#define Tcl_FSEvalFileEx \ + (tclStubsPtr->tcl_FSEvalFileEx) /* 518 */ +#endif +#ifndef Tcl_SetExitProc +#define Tcl_SetExitProc \ + (tclStubsPtr->tcl_SetExitProc) /* 519 */ +#endif +#ifndef Tcl_LimitAddHandler +#define Tcl_LimitAddHandler \ + (tclStubsPtr->tcl_LimitAddHandler) /* 520 */ +#endif +#ifndef Tcl_LimitRemoveHandler +#define Tcl_LimitRemoveHandler \ + (tclStubsPtr->tcl_LimitRemoveHandler) /* 521 */ +#endif +#ifndef Tcl_LimitReady +#define Tcl_LimitReady \ + (tclStubsPtr->tcl_LimitReady) /* 522 */ +#endif +#ifndef Tcl_LimitCheck +#define Tcl_LimitCheck \ + (tclStubsPtr->tcl_LimitCheck) /* 523 */ +#endif +#ifndef Tcl_LimitExceeded +#define Tcl_LimitExceeded \ + (tclStubsPtr->tcl_LimitExceeded) /* 524 */ +#endif +#ifndef Tcl_LimitSetCommands +#define Tcl_LimitSetCommands \ + (tclStubsPtr->tcl_LimitSetCommands) /* 525 */ +#endif +#ifndef Tcl_LimitSetTime +#define Tcl_LimitSetTime \ + (tclStubsPtr->tcl_LimitSetTime) /* 526 */ +#endif +#ifndef Tcl_LimitSetGranularity +#define Tcl_LimitSetGranularity \ + (tclStubsPtr->tcl_LimitSetGranularity) /* 527 */ +#endif +#ifndef Tcl_LimitTypeEnabled +#define Tcl_LimitTypeEnabled \ + (tclStubsPtr->tcl_LimitTypeEnabled) /* 528 */ +#endif +#ifndef Tcl_LimitTypeExceeded +#define Tcl_LimitTypeExceeded \ + (tclStubsPtr->tcl_LimitTypeExceeded) /* 529 */ +#endif +#ifndef Tcl_LimitTypeSet +#define Tcl_LimitTypeSet \ + (tclStubsPtr->tcl_LimitTypeSet) /* 530 */ +#endif +#ifndef Tcl_LimitTypeReset +#define Tcl_LimitTypeReset \ + (tclStubsPtr->tcl_LimitTypeReset) /* 531 */ +#endif +#ifndef Tcl_LimitGetCommands +#define Tcl_LimitGetCommands \ + (tclStubsPtr->tcl_LimitGetCommands) /* 532 */ +#endif +#ifndef Tcl_LimitGetTime +#define Tcl_LimitGetTime \ + (tclStubsPtr->tcl_LimitGetTime) /* 533 */ +#endif +#ifndef Tcl_LimitGetGranularity +#define Tcl_LimitGetGranularity \ + (tclStubsPtr->tcl_LimitGetGranularity) /* 534 */ +#endif +#ifndef Tcl_SaveInterpState +#define Tcl_SaveInterpState \ + (tclStubsPtr->tcl_SaveInterpState) /* 535 */ +#endif +#ifndef Tcl_RestoreInterpState +#define Tcl_RestoreInterpState \ + (tclStubsPtr->tcl_RestoreInterpState) /* 536 */ +#endif +#ifndef Tcl_DiscardInterpState +#define Tcl_DiscardInterpState \ + (tclStubsPtr->tcl_DiscardInterpState) /* 537 */ +#endif +#ifndef Tcl_SetReturnOptions +#define Tcl_SetReturnOptions \ + (tclStubsPtr->tcl_SetReturnOptions) /* 538 */ +#endif +#ifndef Tcl_GetReturnOptions +#define Tcl_GetReturnOptions \ + (tclStubsPtr->tcl_GetReturnOptions) /* 539 */ +#endif +#ifndef Tcl_IsEnsemble +#define Tcl_IsEnsemble \ + (tclStubsPtr->tcl_IsEnsemble) /* 540 */ +#endif +#ifndef Tcl_CreateEnsemble +#define Tcl_CreateEnsemble \ + (tclStubsPtr->tcl_CreateEnsemble) /* 541 */ +#endif +#ifndef Tcl_FindEnsemble +#define Tcl_FindEnsemble \ + (tclStubsPtr->tcl_FindEnsemble) /* 542 */ +#endif +#ifndef Tcl_SetEnsembleSubcommandList +#define Tcl_SetEnsembleSubcommandList \ + (tclStubsPtr->tcl_SetEnsembleSubcommandList) /* 543 */ +#endif +#ifndef Tcl_SetEnsembleMappingDict +#define Tcl_SetEnsembleMappingDict \ + (tclStubsPtr->tcl_SetEnsembleMappingDict) /* 544 */ +#endif +#ifndef Tcl_SetEnsembleUnknownHandler +#define Tcl_SetEnsembleUnknownHandler \ + (tclStubsPtr->tcl_SetEnsembleUnknownHandler) /* 545 */ +#endif +#ifndef Tcl_SetEnsembleFlags +#define Tcl_SetEnsembleFlags \ + (tclStubsPtr->tcl_SetEnsembleFlags) /* 546 */ +#endif +#ifndef Tcl_GetEnsembleSubcommandList +#define Tcl_GetEnsembleSubcommandList \ + (tclStubsPtr->tcl_GetEnsembleSubcommandList) /* 547 */ +#endif +#ifndef Tcl_GetEnsembleMappingDict +#define Tcl_GetEnsembleMappingDict \ + (tclStubsPtr->tcl_GetEnsembleMappingDict) /* 548 */ +#endif +#ifndef Tcl_GetEnsembleUnknownHandler +#define Tcl_GetEnsembleUnknownHandler \ + (tclStubsPtr->tcl_GetEnsembleUnknownHandler) /* 549 */ +#endif +#ifndef Tcl_GetEnsembleFlags +#define Tcl_GetEnsembleFlags \ + (tclStubsPtr->tcl_GetEnsembleFlags) /* 550 */ +#endif +#ifndef Tcl_GetEnsembleNamespace +#define Tcl_GetEnsembleNamespace \ + (tclStubsPtr->tcl_GetEnsembleNamespace) /* 551 */ +#endif +#ifndef Tcl_SetTimeProc +#define Tcl_SetTimeProc \ + (tclStubsPtr->tcl_SetTimeProc) /* 552 */ +#endif +#ifndef Tcl_QueryTimeProc +#define Tcl_QueryTimeProc \ + (tclStubsPtr->tcl_QueryTimeProc) /* 553 */ +#endif +#ifndef Tcl_ChannelThreadActionProc +#define Tcl_ChannelThreadActionProc \ + (tclStubsPtr->tcl_ChannelThreadActionProc) /* 554 */ +#endif +#ifndef Tcl_NewBignumObj +#define Tcl_NewBignumObj \ + (tclStubsPtr->tcl_NewBignumObj) /* 555 */ +#endif +#ifndef Tcl_DbNewBignumObj +#define Tcl_DbNewBignumObj \ + (tclStubsPtr->tcl_DbNewBignumObj) /* 556 */ +#endif +#ifndef Tcl_SetBignumObj +#define Tcl_SetBignumObj \ + (tclStubsPtr->tcl_SetBignumObj) /* 557 */ +#endif +#ifndef Tcl_GetBignumFromObj +#define Tcl_GetBignumFromObj \ + (tclStubsPtr->tcl_GetBignumFromObj) /* 558 */ +#endif +#ifndef Tcl_TakeBignumFromObj +#define Tcl_TakeBignumFromObj \ + (tclStubsPtr->tcl_TakeBignumFromObj) /* 559 */ +#endif +#ifndef Tcl_TruncateChannel +#define Tcl_TruncateChannel \ + (tclStubsPtr->tcl_TruncateChannel) /* 560 */ +#endif +#ifndef Tcl_ChannelTruncateProc +#define Tcl_ChannelTruncateProc \ + (tclStubsPtr->tcl_ChannelTruncateProc) /* 561 */ +#endif +#ifndef Tcl_SetChannelErrorInterp +#define Tcl_SetChannelErrorInterp \ + (tclStubsPtr->tcl_SetChannelErrorInterp) /* 562 */ +#endif +#ifndef Tcl_GetChannelErrorInterp +#define Tcl_GetChannelErrorInterp \ + (tclStubsPtr->tcl_GetChannelErrorInterp) /* 563 */ +#endif +#ifndef Tcl_SetChannelError +#define Tcl_SetChannelError \ + (tclStubsPtr->tcl_SetChannelError) /* 564 */ +#endif +#ifndef Tcl_GetChannelError +#define Tcl_GetChannelError \ + (tclStubsPtr->tcl_GetChannelError) /* 565 */ +#endif +#ifndef Tcl_InitBignumFromDouble +#define Tcl_InitBignumFromDouble \ + (tclStubsPtr->tcl_InitBignumFromDouble) /* 566 */ +#endif +#ifndef Tcl_GetNamespaceUnknownHandler +#define Tcl_GetNamespaceUnknownHandler \ + (tclStubsPtr->tcl_GetNamespaceUnknownHandler) /* 567 */ +#endif +#ifndef Tcl_SetNamespaceUnknownHandler +#define Tcl_SetNamespaceUnknownHandler \ + (tclStubsPtr->tcl_SetNamespaceUnknownHandler) /* 568 */ +#endif +#ifndef Tcl_GetEncodingFromObj +#define Tcl_GetEncodingFromObj \ + (tclStubsPtr->tcl_GetEncodingFromObj) /* 569 */ +#endif +#ifndef Tcl_GetEncodingSearchPath +#define Tcl_GetEncodingSearchPath \ + (tclStubsPtr->tcl_GetEncodingSearchPath) /* 570 */ +#endif +#ifndef Tcl_SetEncodingSearchPath +#define Tcl_SetEncodingSearchPath \ + (tclStubsPtr->tcl_SetEncodingSearchPath) /* 571 */ +#endif +#ifndef Tcl_GetEncodingNameFromEnvironment +#define Tcl_GetEncodingNameFromEnvironment \ + (tclStubsPtr->tcl_GetEncodingNameFromEnvironment) /* 572 */ +#endif +#ifndef Tcl_PkgRequireProc +#define Tcl_PkgRequireProc \ + (tclStubsPtr->tcl_PkgRequireProc) /* 573 */ +#endif +#ifndef Tcl_AppendObjToErrorInfo +#define Tcl_AppendObjToErrorInfo \ + (tclStubsPtr->tcl_AppendObjToErrorInfo) /* 574 */ +#endif +#ifndef Tcl_AppendLimitedToObj +#define Tcl_AppendLimitedToObj \ + (tclStubsPtr->tcl_AppendLimitedToObj) /* 575 */ +#endif +#ifndef Tcl_Format +#define Tcl_Format \ + (tclStubsPtr->tcl_Format) /* 576 */ +#endif +#ifndef Tcl_AppendFormatToObj +#define Tcl_AppendFormatToObj \ + (tclStubsPtr->tcl_AppendFormatToObj) /* 577 */ +#endif +#ifndef Tcl_ObjPrintf +#define Tcl_ObjPrintf \ + (tclStubsPtr->tcl_ObjPrintf) /* 578 */ +#endif +#ifndef Tcl_AppendPrintfToObj +#define Tcl_AppendPrintfToObj \ + (tclStubsPtr->tcl_AppendPrintfToObj) /* 579 */ +#endif + +#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ + +/* !END!: Do not edit above this line. */ + +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLIMPORT + +#endif /* _TCLDECLS */ + diff --git a/cobroutines/tclPlatDecls.h b/cobroutines/tclPlatDecls.h new file mode 100644 index 0000000..c581274 --- /dev/null +++ b/cobroutines/tclPlatDecls.h @@ -0,0 +1,141 @@ +/* + * tclPlatDecls.h -- + * + * Declarations of platform specific Tcl APIs. + * + * Copyright (c) 1998-1999 by Scriptics Corporation. + * All rights reserved. + * + * RCS: @(#) $Id: tclPlatDecls.h,v 1.27 2007/12/13 15:23:20 dgp Exp $ + */ + +#ifndef _TCLPLATDECLS +#define _TCLPLATDECLS + +#undef TCL_STORAGE_CLASS +#ifdef BUILD_tcl +# define TCL_STORAGE_CLASS DLLEXPORT +#else +# ifdef USE_TCL_STUBS +# define TCL_STORAGE_CLASS +# else +# define TCL_STORAGE_CLASS DLLIMPORT +# endif +#endif + +/* + * Pull in the typedef of TCHAR for windows. + */ +#if defined(__CYGWIN__) + typedef char TCHAR; +#elif defined(__WIN32__) && !defined(_TCHAR_DEFINED) +# include +# ifndef _TCHAR_DEFINED + /* Borland seems to forget to set this. */ + typedef _TCHAR TCHAR; +# define _TCHAR_DEFINED +# endif +# if defined(_MSC_VER) && defined(__STDC__) + /* MSVC++ misses this. */ + typedef _TCHAR TCHAR; +# endif +#endif + +/* !BEGIN!: Do not edit below this line. */ + +/* + * Exported function declarations: + */ + +#ifdef __WIN32__ /* WIN */ +#ifndef Tcl_WinUtfToTChar_TCL_DECLARED +#define Tcl_WinUtfToTChar_TCL_DECLARED +/* 0 */ +EXTERN TCHAR * Tcl_WinUtfToTChar (CONST char * str, int len, + Tcl_DString * dsPtr); +#endif +#ifndef Tcl_WinTCharToUtf_TCL_DECLARED +#define Tcl_WinTCharToUtf_TCL_DECLARED +/* 1 */ +EXTERN char * Tcl_WinTCharToUtf (CONST TCHAR * str, int len, + Tcl_DString * dsPtr); +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_MacOSXOpenBundleResources_TCL_DECLARED +#define Tcl_MacOSXOpenBundleResources_TCL_DECLARED +/* 0 */ +EXTERN int Tcl_MacOSXOpenBundleResources (Tcl_Interp * interp, + CONST char * bundleName, int hasResourceFile, + int maxPathLen, char * libraryPath); +#endif +#ifndef Tcl_MacOSXOpenVersionedBundleResources_TCL_DECLARED +#define Tcl_MacOSXOpenVersionedBundleResources_TCL_DECLARED +/* 1 */ +EXTERN int Tcl_MacOSXOpenVersionedBundleResources ( + Tcl_Interp * interp, CONST char * bundleName, + CONST char * bundleVersion, + int hasResourceFile, int maxPathLen, + char * libraryPath); +#endif +#endif /* MACOSX */ + +typedef struct TclPlatStubs { + int magic; + struct TclPlatStubHooks *hooks; + +#ifdef __WIN32__ /* WIN */ + TCHAR * (*tcl_WinUtfToTChar) (CONST char * str, int len, Tcl_DString * dsPtr); /* 0 */ + char * (*tcl_WinTCharToUtf) (CONST TCHAR * str, int len, Tcl_DString * dsPtr); /* 1 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + int (*tcl_MacOSXOpenBundleResources) (Tcl_Interp * interp, CONST char * bundleName, int hasResourceFile, int maxPathLen, char * libraryPath); /* 0 */ + int (*tcl_MacOSXOpenVersionedBundleResources) (Tcl_Interp * interp, CONST char * bundleName, CONST char * bundleVersion, int hasResourceFile, int maxPathLen, char * libraryPath); /* 1 */ +#endif /* MACOSX */ +} TclPlatStubs; + +#ifdef __cplusplus +extern "C" { +#endif +extern TclPlatStubs *tclPlatStubsPtr; +#ifdef __cplusplus +} +#endif + +#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) + +/* + * Inline function declarations: + */ + +#ifdef __WIN32__ /* WIN */ +#ifndef Tcl_WinUtfToTChar +#define Tcl_WinUtfToTChar \ + (tclPlatStubsPtr->tcl_WinUtfToTChar) /* 0 */ +#endif +#ifndef Tcl_WinTCharToUtf +#define Tcl_WinTCharToUtf \ + (tclPlatStubsPtr->tcl_WinTCharToUtf) /* 1 */ +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_MacOSXOpenBundleResources +#define Tcl_MacOSXOpenBundleResources \ + (tclPlatStubsPtr->tcl_MacOSXOpenBundleResources) /* 0 */ +#endif +#ifndef Tcl_MacOSXOpenVersionedBundleResources +#define Tcl_MacOSXOpenVersionedBundleResources \ + (tclPlatStubsPtr->tcl_MacOSXOpenVersionedBundleResources) /* 1 */ +#endif +#endif /* MACOSX */ + +#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ + +/* !END!: Do not edit above this line. */ + +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLIMPORT + +#endif /* _TCLPLATDECLS */ + + diff --git a/cobroutines/tcpgres.def b/cobroutines/tcpgres.def new file mode 100644 index 0000000..ebf0a07 --- /dev/null +++ b/cobroutines/tcpgres.def @@ -0,0 +1,167 @@ +EXPORTS + sql_clear_query @1 + sql_connect_db @2 + sql_disconnect_db @3 + sql_exec_query @4 + sql_free_memory @5 + sql_get_tuple @6 + sql_get_value @7 + sql_max_field @8 + sql_max_tuple @9 + sql_status_message @10 + +IMPORTS + + LIBPQ.dll.PQbackendPID + LIBPQ.dll.PQbinaryTuples + LIBPQ.dll.PQcancel + LIBPQ.dll.PQclear + LIBPQ.dll.PQclientEncoding + LIBPQ.dll.PQcmdStatus + LIBPQ.dll.PQcmdTuples + LIBPQ.dll.PQconndefaults + LIBPQ.dll.PQconnectPoll + LIBPQ.dll.PQconnectStart + LIBPQ.dll.PQconnectdb + LIBPQ.dll.PQconnectionNeedsPassword + LIBPQ.dll.PQconnectionUsedPassword + LIBPQ.dll.PQconninfoFree + LIBPQ.dll.PQconninfoParse + LIBPQ.dll.PQconsumeInput + LIBPQ.dll.PQcopyResult + LIBPQ.dll.PQdb + LIBPQ.dll.PQdescribePortal + LIBPQ.dll.PQdescribePrepared + LIBPQ.dll.PQdisplayTuples + LIBPQ.dll.PQdsplen + LIBPQ.dll.PQencryptPassword + LIBPQ.dll.PQendcopy + LIBPQ.dll.PQenv2encoding + LIBPQ.dll.PQerrorMessage + LIBPQ.dll.PQescapeBytea + LIBPQ.dll.PQescapeByteaConn + LIBPQ.dll.PQescapeString + LIBPQ.dll.PQescapeStringConn + LIBPQ.dll.PQexec + LIBPQ.dll.PQexecParams + LIBPQ.dll.PQexecPrepared + LIBPQ.dll.PQfformat + LIBPQ.dll.PQfinish + LIBPQ.dll.PQfireResultCreateEvents + LIBPQ.dll.PQflush + LIBPQ.dll.PQfmod + LIBPQ.dll.PQfn + LIBPQ.dll.PQfname + LIBPQ.dll.PQfnumber + LIBPQ.dll.PQfreeCancel + LIBPQ.dll.PQfreeNotify + LIBPQ.dll.PQfreemem + LIBPQ.dll.PQfsize + LIBPQ.dll.PQftable + LIBPQ.dll.PQftablecol + LIBPQ.dll.PQftype + LIBPQ.dll.PQgetCancel + LIBPQ.dll.PQgetCopyData + LIBPQ.dll.PQgetResult + LIBPQ.dll.PQgetisnull + LIBPQ.dll.PQgetlength + LIBPQ.dll.PQgetline + LIBPQ.dll.PQgetlineAsync + LIBPQ.dll.PQgetssl + LIBPQ.dll.PQgetvalue + LIBPQ.dll.PQhost + LIBPQ.dll.PQinitOpenSSL + LIBPQ.dll.PQinitSSL + LIBPQ.dll.PQinstanceData + LIBPQ.dll.PQisBusy + LIBPQ.dll.PQisnonblocking + LIBPQ.dll.PQisthreadsafe + LIBPQ.dll.PQmakeEmptyPGresult + LIBPQ.dll.PQmblen + LIBPQ.dll.PQnfields + LIBPQ.dll.PQnotifies + LIBPQ.dll.PQnparams + LIBPQ.dll.PQntuples + LIBPQ.dll.PQoidStatus + LIBPQ.dll.PQoidValue + LIBPQ.dll.PQoptions + LIBPQ.dll.PQparameterStatus + LIBPQ.dll.PQparamtype + LIBPQ.dll.PQpass + LIBPQ.dll.PQport + LIBPQ.dll.PQprepare + LIBPQ.dll.PQprint + LIBPQ.dll.PQprintTuples + LIBPQ.dll.PQprotocolVersion + LIBPQ.dll.PQputCopyData + LIBPQ.dll.PQputCopyEnd + LIBPQ.dll.PQputline + LIBPQ.dll.PQputnbytes + LIBPQ.dll.PQregisterEventProc + LIBPQ.dll.PQregisterThreadLock + LIBPQ.dll.PQrequestCancel + LIBPQ.dll.PQresStatus + LIBPQ.dll.PQreset + LIBPQ.dll.PQresetPoll + LIBPQ.dll.PQresetStart + LIBPQ.dll.PQresultAlloc + LIBPQ.dll.PQresultErrorField + LIBPQ.dll.PQresultErrorMessage + LIBPQ.dll.PQresultInstanceData + LIBPQ.dll.PQresultSetInstanceData + LIBPQ.dll.PQresultStatus + LIBPQ.dll.PQsendDescribePortal + LIBPQ.dll.PQsendDescribePrepared + LIBPQ.dll.PQsendPrepare + LIBPQ.dll.PQsendQuery + LIBPQ.dll.PQsendQueryParams + LIBPQ.dll.PQsendQueryPrepared + LIBPQ.dll.PQserverVersion + LIBPQ.dll.PQsetClientEncoding + LIBPQ.dll.PQsetErrorVerbosity + LIBPQ.dll.PQsetInstanceData + LIBPQ.dll.PQsetNoticeProcessor + LIBPQ.dll.PQsetNoticeReceiver + LIBPQ.dll.PQsetResultAttrs + LIBPQ.dll.PQsetdbLogin + LIBPQ.dll.PQsetnonblocking + LIBPQ.dll.PQsetvalue + LIBPQ.dll.PQsocket + LIBPQ.dll.PQstatus + LIBPQ.dll.PQtrace + LIBPQ.dll.PQtransactionStatus + LIBPQ.dll.PQtty + LIBPQ.dll.PQunescapeBytea + LIBPQ.dll.PQuntrace + LIBPQ.dll.PQuser + LIBPQ.dll.appendBinaryPQExpBuffer + LIBPQ.dll.appendPQExpBuffer + LIBPQ.dll.appendPQExpBufferChar + LIBPQ.dll.appendPQExpBufferStr + LIBPQ.dll.createPQExpBuffer + LIBPQ.dll.destroyPQExpBuffer + LIBPQ.dll.enlargePQExpBuffer + LIBPQ.dll.initPQExpBuffer + LIBPQ.dll.lo_close + LIBPQ.dll.lo_creat + LIBPQ.dll.lo_create + LIBPQ.dll.lo_export + LIBPQ.dll.lo_import + LIBPQ.dll.lo_import_with_oid + LIBPQ.dll.lo_lseek + LIBPQ.dll.lo_open + LIBPQ.dll.lo_read + LIBPQ.dll.lo_tell + LIBPQ.dll.lo_truncate + LIBPQ.dll.lo_unlink + LIBPQ.dll.lo_write + LIBPQ.dll.pg_char_to_encoding + LIBPQ.dll.pg_encoding_to_char + LIBPQ.dll.pg_utf_mblen + LIBPQ.dll.pg_valid_server_encoding + LIBPQ.dll.pg_valid_server_encoding_id + LIBPQ.dll.pgresStatus + LIBPQ.dll.pqsignal + LIBPQ.dll.printfPQExpBuffer + LIBPQ.dll.resetPQExpBuffer + LIBPQ.dll.termPQExpBuffer diff --git a/cobroutines/tcpgres.dll b/cobroutines/tcpgres.dll new file mode 100644 index 0000000..ee8eeaa Binary files /dev/null and b/cobroutines/tcpgres.dll differ diff --git a/cobroutines/tcpgres.dll.a b/cobroutines/tcpgres.dll.a new file mode 100644 index 0000000..ceddb2c Binary files /dev/null and b/cobroutines/tcpgres.dll.a differ diff --git a/cobroutines/tcroutines.def b/cobroutines/tcroutines.def new file mode 100644 index 0000000..2ec096b --- /dev/null +++ b/cobroutines/tcroutines.def @@ -0,0 +1,74 @@ +EXPORTS + cbl_align @1 + cbl_alloc_mem @2 + cbl_call_system @3 + cbl_change_dir @4 + cbl_check_file_exist @5 + cbl_clear @6 + cbl_clear_scr @7 + cbl_close_dir @8 + cbl_close_file @9 + cbl_copy @10 + cbl_copy_dir @11 + cbl_copy_file @12 + cbl_create_dir @13 + cbl_delete_dir @14 + cbl_delete_file @15 + cbl_flush_file @16 + cbl_free_mem @17 + cbl_get @18 + cbl_get_csr_pos @19 + cbl_get_current_dir @20 + cbl_get_kbd_status @21 + cbl_get_os_info @22 + cbl_get_per @23 + cbl_get_scr_size @24 + cbl_move_dir @25 + cbl_move_file @26 + cbl_open_dir @27 + cbl_open_file @28 + cbl_parm @29 + cbl_read_dir @30 + cbl_read_file @31 + cbl_remove_file @32 + cbl_rename_file @33 + cbl_restore_partial_screen @34 + cbl_restore_screen @35 + cbl_rewind_dir @36 + cbl_save_partial_screen @37 + cbl_save_screen @38 + cbl_sleep @39 + cbl_stream @40 DATA + cbl_test @41 + cbl_windms_color_pair @42 + cbl_windms_display_menu @43 + cbl_windms_escreve @44 + cbl_windms_guarda @45 + cbl_windms_inicia_cor @46 + cbl_windms_menu @47 + cbl_windms_moldura @48 + cbl_windms_monta_cor @49 + cbl_windms_mudacor @50 + cbl_windms_pos @51 + cbl_windms_remove @52 + cbl_write_file @53 + cblsys @54 + close_keyboard @55 + clr_clear_kbd_buffer @56 + cobpri @57 DATA + cobpro @58 DATA + current_directory @59 DATA + current_file @60 DATA + initColor @61 DATA + init_keyboard @62 + lastWindow @63 DATA + os_info @64 DATA + readch @65 + screenArea @66 DATA + screenposition @67 DATA + show @68 + var @69 DATA + windmenu @70 DATA + windms @71 + windows @72 DATA + windpos @73 DATA diff --git a/cobroutines/tcroutines.dll b/cobroutines/tcroutines.dll new file mode 100644 index 0000000..06318db Binary files /dev/null and b/cobroutines/tcroutines.dll differ diff --git a/cobroutines/tcroutines.dll.a b/cobroutines/tcroutines.dll.a new file mode 100644 index 0000000..ff96f3a Binary files /dev/null and b/cobroutines/tcroutines.dll.a differ diff --git a/cobroutines/tctcl.c b/cobroutines/tctcl.c new file mode 100644 index 0000000..694cfd5 --- /dev/null +++ b/cobroutines/tctcl.c @@ -0,0 +1,156 @@ +/* + Example embedding a tcl interpreter + for GUI enabling a Cobol program. + + Recife, Brazil, 2001 -- Rildo Pragana + */ + +#include +#include +#include +#include +#include + +/**** general use tcl procs for processing arguments ****/ +#include "cobtools.h" + +#ifdef WINDOWS +#include +#define TCTCL_PATH_DELIM_STR '\\' + +BOOL _export WINAPI DllEntryPoint(HINSTANCE hInstance, DWORD seginfo, + LPVOID lpCmdLine) +{ + /* Microsoft ONLY MAKES CRAP!!!!!!!! + THIS DUMB FUNCTION EXISTS ONLY TO FULFILL MS-WINDOWS NEEDS. + Bill Gates will burn in HELL. */ + return TRUE; +} +#else +#define TCTCL_PATH_DELIM_STR '/' +#endif + +Tcl_Interp *interp; +int error_code; +Tk_Window mainwin; +int script_sourced = 0; + +int tclErr(const char *msg) +{ + char *r; + r = (char *) Tcl_GetVar(interp, "errorInfo", TCL_GLOBAL_ONLY); + fprintf(stderr, "%s:%s\n", msg, r); + exit(1); +} + +int initTcl() +{ + // int argc=0; + // char *argv[]= { "tinycobol", ""}; + Tcl_FindExecutable(""); + interp = Tcl_CreateInterp(); + Tcl_AppInit(interp); + mainwin = Tk_MainWindow(interp); + return TCL_OK; +} + +int newGui() +{ + script_sourced = 0; + error_code = Tcl_Eval(interp, newgui); + if (error_code != TCL_OK) + { + tclErr("newGui: error in Tcl_Eval"); + } + return TCL_OK; +} + +int endTcl() +{ + Tcl_DeleteInterp(interp); + return TCL_OK; +} + +int tcleval(char *data, char *scriptn) +{ + char *r; + char *cobbuf; + int size; + char script[128], *s, *s1, *d; + d = getenv("TCTCL_LIBRARY_PATH"); + s = script; + s1 = scriptn; + if (d) + { + while (*d != 0) *s++ = *d++; + + if (*d != TCTCL_PATH_DELIM_STR) *s++ = TCTCL_PATH_DELIM_STR; + } + + while (*s1 != ' ') *s++ = *s1++; + *s = 0; + if (!script_sourced) + { + script_sourced++; + error_code = Tcl_Eval(interp, cobtools); + if (error_code != TCL_OK) + { + tclErr("tcleval: error evaluating cobtools"); + } + error_code = Tcl_EvalFile(interp, script); + if (error_code != TCL_OK) + { + tclErr("tcleval: error evaluating script"); + } + } + else + { + error_code = Tcl_Eval(interp, "cobol_update"); + if (error_code != TCL_OK) + { + tclErr("tcleval: error evaluating cobol_update"); + } + } + error_code = Tcl_Eval(interp, compute_block_size); + if (error_code != TCL_OK) + { + tclErr("tcleval: error evaluating compute_block_size"); + } + Tcl_GetInt(interp, Tcl_GetVar(interp, "block_size", TCL_GLOBAL_ONLY), &size); + cobbuf = malloc(size + 1); + memmove(cobbuf, data, size); + cobbuf[size] = 0; + /*printf("C script: %s received: %s\n",script,cobbuf);*/ + Tcl_SetVar(interp, "data_block", cobbuf, TCL_GLOBAL_ONLY); + Tcl_Eval(interp, wait_ready); + r = (char *) Tcl_GetVar(interp, "result", TCL_GLOBAL_ONLY); + if (r != NULL) + { + memmove(data, r, strlen(r)); + } + free(cobbuf); + return TCL_OK; +} + +int +Tcl_AppInit(Tcl_Interp *interp) +{ + + if (Tcl_Init(interp) == TCL_ERROR) + { + return TCL_ERROR; + } + /* Tcl_Eval(interp,"set dir $tcl_library;source $dir/tclIndex;unset dir"); + */ + if (Tk_Init(interp) == TCL_ERROR) + { + return TCL_ERROR; + } + Tcl_StaticPackage(interp, "Tk", Tk_Init, 0); + /*Tcl_StaticPackage(interp, "Tk", Tk_Init, Tk_SafeInit);*/ + /* Tcl_Eval(interp,"set dir $tk_library;source $dir/tclIndex;unset dir"); + */ + Tcl_SetVar(interp, "tcl_rcFileName", "~/.tctclrc", TCL_GLOBAL_ONLY); + return TCL_OK; +} + diff --git a/cobroutines/tctcl.def b/cobroutines/tctcl.def new file mode 100644 index 0000000..aba39b4 --- /dev/null +++ b/cobroutines/tctcl.def @@ -0,0 +1,1677 @@ +EXPORTS + Tcl_AppInit @1 + cobtools @2 DATA + compute_block_size @3 DATA + endTcl @4 + error_code @5 DATA + initTcl @6 + interp @7 DATA + mainwin @8 DATA + newGui @9 + newgui @10 DATA + script_sourced @11 DATA + tclErr @12 + tcleval @13 + wait_ready @14 DATA + +IMPORTS + + tcl84.dll.TclAccessDeleteProc + tcl84.dll.TclAccessInsertProc + tcl84.dll.TclAddLiteralObj + tcl84.dll.TclAllocateFreeObjects + tcl84.dll.TclArraySet + tcl84.dll.TclChannelEventScriptInvoker + tcl84.dll.TclChannelTransform + tcl84.dll.TclCheckBadOctal + tcl84.dll.TclCheckExecutionTraces + tcl84.dll.TclCheckInterpTraces + tcl84.dll.TclCleanupByteCode + tcl84.dll.TclCleanupChildren + tcl84.dll.TclCleanupCommand + tcl84.dll.TclCompEvalObj + tcl84.dll.TclCompileAppendCmd + tcl84.dll.TclCompileBreakCmd + tcl84.dll.TclCompileCatchCmd + tcl84.dll.TclCompileCmdWord + tcl84.dll.TclCompileContinueCmd + tcl84.dll.TclCompileExpr + tcl84.dll.TclCompileExprCmd + tcl84.dll.TclCompileExprWords + tcl84.dll.TclCompileForCmd + tcl84.dll.TclCompileForeachCmd + tcl84.dll.TclCompileIfCmd + tcl84.dll.TclCompileIncrCmd + tcl84.dll.TclCompileLappendCmd + tcl84.dll.TclCompileLindexCmd + tcl84.dll.TclCompileListCmd + tcl84.dll.TclCompileLlengthCmd + tcl84.dll.TclCompileLsetCmd + tcl84.dll.TclCompileRegexpCmd + tcl84.dll.TclCompileReturnCmd + tcl84.dll.TclCompileScript + tcl84.dll.TclCompileSetCmd + tcl84.dll.TclCompileStringCmd + tcl84.dll.TclCompileTokens + tcl84.dll.TclCompileVariableCmd + tcl84.dll.TclCompileWhileCmd + tcl84.dll.TclCopyAndCollapse + tcl84.dll.TclCopyChannel + tcl84.dll.TclCreateAuxData + tcl84.dll.TclCreateExceptRange + tcl84.dll.TclCreateExecEnv + tcl84.dll.TclCreatePipeline + tcl84.dll.TclCreateProc + tcl84.dll.TclCrossFilesystemCopy + tcl84.dll.TclDeleteCompiledLocalVars + tcl84.dll.TclDeleteExecEnv + tcl84.dll.TclDeleteLiteralTable + tcl84.dll.TclDeleteVars + tcl84.dll.TclDoGlob + tcl84.dll.TclDumpMemoryInfo + tcl84.dll.TclEmitForwardJump + tcl84.dll.TclEvalObjvInternal + tcl84.dll.TclExpandCodeArray + tcl84.dll.TclExpandJumpFixupArray + tcl84.dll.TclExpandTokenArray + tcl84.dll.TclExprFloatError + tcl84.dll.TclFileAttrsCmd + tcl84.dll.TclFileCopyCmd + tcl84.dll.TclFileDeleteCmd + tcl84.dll.TclFileDirname + tcl84.dll.TclFileMakeDirsCmd + tcl84.dll.TclFileRenameCmd + tcl84.dll.TclFinalizeAsync + tcl84.dll.TclFinalizeAuxDataTypeTable + tcl84.dll.TclFinalizeCompExecEnv + tcl84.dll.TclFinalizeCompilation + tcl84.dll.TclFinalizeEncodingSubsystem + tcl84.dll.TclFinalizeEnvironment + tcl84.dll.TclFinalizeExecution + tcl84.dll.TclFinalizeFilesystem + tcl84.dll.TclFinalizeIOSubsystem + tcl84.dll.TclFinalizeLoad + tcl84.dll.TclFinalizeMemorySubsystem + tcl84.dll.TclFinalizeNotifier + tcl84.dll.TclFinalizeSynchronization + tcl84.dll.TclFinalizeThreadData + tcl84.dll.TclFindCompiledLocal + tcl84.dll.TclFindElement + tcl84.dll.TclFindEncodings + tcl84.dll.TclFindProc + tcl84.dll.TclFixupForwardJump + tcl84.dll.TclFormatInt + tcl84.dll.TclFreeCompileEnv + tcl84.dll.TclFreeJumpFixupArray + tcl84.dll.TclFreeObj + tcl84.dll.TclFreePackageInfo + tcl84.dll.TclGetAndDetachPids + tcl84.dll.TclGetAuxDataType + tcl84.dll.TclGetDate + tcl84.dll.TclGetEnv + tcl84.dll.TclGetExtension + tcl84.dll.TclGetFrame + tcl84.dll.TclGetInstructionTable + tcl84.dll.TclGetIntForIndex + tcl84.dll.TclGetInterpProc + tcl84.dll.TclGetLibraryPath + tcl84.dll.TclGetLoadedPackages + tcl84.dll.TclGetLong + tcl84.dll.TclGetNamespaceForQualName + tcl84.dll.TclGetObjInterpProc + tcl84.dll.TclGetOpenMode + tcl84.dll.TclGetOriginalCommand + tcl84.dll.TclGetStartupScriptFileName + tcl84.dll.TclGetStartupScriptPath + tcl84.dll.TclGlob + tcl84.dll.TclGlobalInvoke + tcl84.dll.TclGuessPackageName + tcl84.dll.TclHandleCreate + tcl84.dll.TclHandleFree + tcl84.dll.TclHandlePreserve + tcl84.dll.TclHandleRelease + tcl84.dll.TclHideLiteral + tcl84.dll.TclHideUnsafeCommands + tcl84.dll.TclInExit + tcl84.dll.TclIncrVar2 + tcl84.dll.TclInitAuxDataTypeTable + tcl84.dll.TclInitByteCodeObj + tcl84.dll.TclInitCompileEnv + tcl84.dll.TclInitCompiledLocals + tcl84.dll.TclInitEncodingSubsystem + tcl84.dll.TclInitIOSubsystem + tcl84.dll.TclInitJumpFixupArray + tcl84.dll.TclInitLiteralTable + tcl84.dll.TclInitNamespaceSubsystem + tcl84.dll.TclInitNotifier + tcl84.dll.TclInitObjSubsystem + tcl84.dll.TclInitSubsystems + tcl84.dll.TclInterpInit + tcl84.dll.TclInterpReady + tcl84.dll.TclInvoke + tcl84.dll.TclInvokeObjectCommand + tcl84.dll.TclInvokeStringCommand + tcl84.dll.TclIsLocalScalar + tcl84.dll.TclIsProc + tcl84.dll.TclJoinThread + tcl84.dll.TclLindexFlat + tcl84.dll.TclLindexList + tcl84.dll.TclListObjSetElement + tcl84.dll.TclLooksLikeInt + tcl84.dll.TclLookupArrayElement + tcl84.dll.TclLookupLiteralEntry + tcl84.dll.TclLookupVar + tcl84.dll.TclLsetFlat + tcl84.dll.TclLsetList + tcl84.dll.TclNeedSpace + tcl84.dll.TclNewProcBodyObj + tcl84.dll.TclObjCommandComplete + tcl84.dll.TclObjInterpProc + tcl84.dll.TclObjInvoke + tcl84.dll.TclObjInvokeGlobal + tcl84.dll.TclObjLookupVar + tcl84.dll.TclOpenFileChannelDeleteProc + tcl84.dll.TclOpenFileChannelInsertProc + tcl84.dll.TclParseBackslash + tcl84.dll.TclParseHex + tcl84.dll.TclParseInteger + tcl84.dll.TclParseWhiteSpace + tcl84.dll.TclPrecTraceProc + tcl84.dll.TclPreventAliasLoop + tcl84.dll.TclPrintInstruction + tcl84.dll.TclPrintObject + tcl84.dll.TclPrintSource + tcl84.dll.TclProcCleanupProc + tcl84.dll.TclProcCompileProc + tcl84.dll.TclProcDeleteProc + tcl84.dll.TclProcInterpProc + tcl84.dll.TclPtrGetVar + tcl84.dll.TclPtrIncrVar + tcl84.dll.TclPtrSetVar + tcl84.dll.TclRegAbout + tcl84.dll.TclRegError + tcl84.dll.TclRegExpRangeUniChar + tcl84.dll.TclRegisterAuxDataType + tcl84.dll.TclRegisterLiteral + tcl84.dll.TclReleaseLiteral + tcl84.dll.TclRememberCondition + tcl84.dll.TclRememberDataKey + tcl84.dll.TclRememberJoinableThread + tcl84.dll.TclRememberMutex + tcl84.dll.TclRenameCommand + tcl84.dll.TclResetShadowedCmdRefs + tcl84.dll.TclServiceIdle + tcl84.dll.TclSetByteCodeFromAny + tcl84.dll.TclSetCmdNameObj + tcl84.dll.TclSetLibraryPath + tcl84.dll.TclSetPreInitScript + tcl84.dll.TclSetStartupScriptFileName + tcl84.dll.TclSetStartupScriptPath + tcl84.dll.TclSetupEnv + tcl84.dll.TclSignalExitThread + tcl84.dll.TclSockGetPort + tcl84.dll.TclSockMinimumBuffers + tcl84.dll.TclStatDeleteProc + tcl84.dll.TclStatInsertProc + tcl84.dll.TclTeardownNamespace + tcl84.dll.TclThreadDataKeyGet + tcl84.dll.TclThreadDataKeySet + tcl84.dll.TclTransferResult + tcl84.dll.TclUpdateReturnInfo + tcl84.dll.TclVarTraceExists + tcl84.dll.TclWinAddProcess + tcl84.dll.TclWinConvertError + tcl84.dll.TclWinConvertWSAError + tcl84.dll.TclWinFlushDirtyChannels + tcl84.dll.TclWinGetPlatform + tcl84.dll.TclWinGetPlatformId + tcl84.dll.TclWinGetServByName + tcl84.dll.TclWinGetSockOpt + tcl84.dll.TclWinGetTclInstance + tcl84.dll.TclWinInit + tcl84.dll.TclWinMakeFile + tcl84.dll.TclWinNToHS + tcl84.dll.TclWinNoBackslash + tcl84.dll.TclWinOpenConsoleChannel + tcl84.dll.TclWinOpenFileChannel + tcl84.dll.TclWinOpenSerialChannel + tcl84.dll.TclWinSerialReopen + tcl84.dll.TclWinSetInterfaces + tcl84.dll.TclWinSetSockOpt + tcl84.dll.TclWinSymLinkCopyDirectory + tcl84.dll.TclWinSymLinkDelete + tcl84.dll.Tcl_Access + tcl84.dll.Tcl_AddErrorInfo + tcl84.dll.Tcl_AddInterpResolvers + tcl84.dll.Tcl_AddObjErrorInfo + tcl84.dll.Tcl_AfterObjCmd + tcl84.dll.Tcl_AlertNotifier + tcl84.dll.Tcl_Alloc + tcl84.dll.Tcl_AllocStatBuf + tcl84.dll.Tcl_AllowExceptions + tcl84.dll.Tcl_AppendAllObjTypes + tcl84.dll.Tcl_AppendElement + tcl84.dll.Tcl_AppendExportList + tcl84.dll.Tcl_AppendObjCmd + tcl84.dll.Tcl_AppendObjToObj + tcl84.dll.Tcl_AppendResult + tcl84.dll.Tcl_AppendResultVA + tcl84.dll.Tcl_AppendStringsToObj + tcl84.dll.Tcl_AppendStringsToObjVA + tcl84.dll.Tcl_AppendToObj + tcl84.dll.Tcl_AppendUnicodeToObj + tcl84.dll.Tcl_ArrayObjCmd + tcl84.dll.Tcl_AsyncCreate + tcl84.dll.Tcl_AsyncDelete + tcl84.dll.Tcl_AsyncInvoke + tcl84.dll.Tcl_AsyncMark + tcl84.dll.Tcl_AsyncReady + tcl84.dll.Tcl_AttemptAlloc + tcl84.dll.Tcl_AttemptDbCkalloc + tcl84.dll.Tcl_AttemptDbCkrealloc + tcl84.dll.Tcl_AttemptRealloc + tcl84.dll.Tcl_AttemptSetObjLength + tcl84.dll.Tcl_BackgroundError + tcl84.dll.Tcl_Backslash + tcl84.dll.Tcl_BadChannelOption + tcl84.dll.Tcl_BinaryObjCmd + tcl84.dll.Tcl_BreakObjCmd + tcl84.dll.Tcl_CallWhenDeleted + tcl84.dll.Tcl_CancelIdleCall + tcl84.dll.Tcl_CaseObjCmd + tcl84.dll.Tcl_CatchObjCmd + tcl84.dll.Tcl_CdObjCmd + tcl84.dll.Tcl_ChannelBlockModeProc + tcl84.dll.Tcl_ChannelBuffered + tcl84.dll.Tcl_ChannelClose2Proc + tcl84.dll.Tcl_ChannelCloseProc + tcl84.dll.Tcl_ChannelFlushProc + tcl84.dll.Tcl_ChannelGetHandleProc + tcl84.dll.Tcl_ChannelGetOptionProc + tcl84.dll.Tcl_ChannelHandlerProc + tcl84.dll.Tcl_ChannelInputProc + tcl84.dll.Tcl_ChannelName + tcl84.dll.Tcl_ChannelOutputProc + tcl84.dll.Tcl_ChannelSeekProc + tcl84.dll.Tcl_ChannelSetOptionProc + tcl84.dll.Tcl_ChannelVersion + tcl84.dll.Tcl_ChannelWatchProc + tcl84.dll.Tcl_ChannelWideSeekProc + tcl84.dll.Tcl_Chdir + tcl84.dll.Tcl_ClearChannelHandlers + tcl84.dll.Tcl_ClockObjCmd + tcl84.dll.Tcl_Close + tcl84.dll.Tcl_CloseObjCmd + tcl84.dll.Tcl_CommandComplete + tcl84.dll.Tcl_CommandTraceInfo + tcl84.dll.Tcl_Concat + tcl84.dll.Tcl_ConcatObj + tcl84.dll.Tcl_ConcatObjCmd + tcl84.dll.Tcl_ConditionFinalize + tcl84.dll.Tcl_ConditionNotify + tcl84.dll.Tcl_ConditionWait + tcl84.dll.Tcl_ContinueObjCmd + tcl84.dll.Tcl_ConvertCountedElement + tcl84.dll.Tcl_ConvertElement + tcl84.dll.Tcl_ConvertToType + tcl84.dll.Tcl_CreateAlias + tcl84.dll.Tcl_CreateAliasObj + tcl84.dll.Tcl_CreateChannel + tcl84.dll.Tcl_CreateChannelHandler + tcl84.dll.Tcl_CreateCloseHandler + tcl84.dll.Tcl_CreateCommand + tcl84.dll.Tcl_CreateEncoding + tcl84.dll.Tcl_CreateEventSource + tcl84.dll.Tcl_CreateExitHandler + tcl84.dll.Tcl_CreateHashEntry + tcl84.dll.Tcl_CreateInterp + tcl84.dll.Tcl_CreateMathFunc + tcl84.dll.Tcl_CreateNamespace + tcl84.dll.Tcl_CreateObjCommand + tcl84.dll.Tcl_CreateObjTrace + tcl84.dll.Tcl_CreateSlave + tcl84.dll.Tcl_CreateThread + tcl84.dll.Tcl_CreateThreadExitHandler + tcl84.dll.Tcl_CreateTimerHandler + tcl84.dll.Tcl_CreateTrace + tcl84.dll.Tcl_CutChannel + tcl84.dll.Tcl_DStringAppend + tcl84.dll.Tcl_DStringAppendElement + tcl84.dll.Tcl_DStringEndSublist + tcl84.dll.Tcl_DStringFree + tcl84.dll.Tcl_DStringGetResult + tcl84.dll.Tcl_DStringInit + tcl84.dll.Tcl_DStringResult + tcl84.dll.Tcl_DStringSetLength + tcl84.dll.Tcl_DStringStartSublist + tcl84.dll.Tcl_DbCkalloc + tcl84.dll.Tcl_DbCkfree + tcl84.dll.Tcl_DbCkrealloc + tcl84.dll.Tcl_DbDecrRefCount + tcl84.dll.Tcl_DbIncrRefCount + tcl84.dll.Tcl_DbIsShared + tcl84.dll.Tcl_DbNewBooleanObj + tcl84.dll.Tcl_DbNewByteArrayObj + tcl84.dll.Tcl_DbNewDoubleObj + tcl84.dll.Tcl_DbNewListObj + tcl84.dll.Tcl_DbNewLongObj + tcl84.dll.Tcl_DbNewObj + tcl84.dll.Tcl_DbNewStringObj + tcl84.dll.Tcl_DbNewWideIntObj + tcl84.dll.Tcl_DeleteAssocData + tcl84.dll.Tcl_DeleteChannelHandler + tcl84.dll.Tcl_DeleteCloseHandler + tcl84.dll.Tcl_DeleteCommand + tcl84.dll.Tcl_DeleteCommandFromToken + tcl84.dll.Tcl_DeleteEventSource + tcl84.dll.Tcl_DeleteEvents + tcl84.dll.Tcl_DeleteExitHandler + tcl84.dll.Tcl_DeleteHashEntry + tcl84.dll.Tcl_DeleteHashTable + tcl84.dll.Tcl_DeleteInterp + tcl84.dll.Tcl_DeleteNamespace + tcl84.dll.Tcl_DeleteThreadExitHandler + tcl84.dll.Tcl_DeleteTimerHandler + tcl84.dll.Tcl_DeleteTrace + tcl84.dll.Tcl_DetachChannel + tcl84.dll.Tcl_DetachPids + tcl84.dll.Tcl_DiscardResult + tcl84.dll.Tcl_DoOneEvent + tcl84.dll.Tcl_DoWhenIdle + tcl84.dll.Tcl_DontCallWhenDeleted + tcl84.dll.Tcl_DumpActiveMemory + tcl84.dll.Tcl_DuplicateObj + tcl84.dll.Tcl_EncodingObjCmd + tcl84.dll.Tcl_Eof + tcl84.dll.Tcl_EofObjCmd + tcl84.dll.Tcl_ErrnoId + tcl84.dll.Tcl_ErrnoMsg + tcl84.dll.Tcl_ErrorObjCmd + tcl84.dll.Tcl_Eval + tcl84.dll.Tcl_EvalEx + tcl84.dll.Tcl_EvalFile + tcl84.dll.Tcl_EvalObj + tcl84.dll.Tcl_EvalObjCmd + tcl84.dll.Tcl_EvalObjEx + tcl84.dll.Tcl_EvalObjv + tcl84.dll.Tcl_EvalTokens + tcl84.dll.Tcl_EvalTokensStandard + tcl84.dll.Tcl_EventuallyFree + tcl84.dll.Tcl_ExecObjCmd + tcl84.dll.Tcl_Exit + tcl84.dll.Tcl_ExitObjCmd + tcl84.dll.Tcl_ExitThread + tcl84.dll.Tcl_Export + tcl84.dll.Tcl_ExposeCommand + tcl84.dll.Tcl_ExprBoolean + tcl84.dll.Tcl_ExprBooleanObj + tcl84.dll.Tcl_ExprDouble + tcl84.dll.Tcl_ExprDoubleObj + tcl84.dll.Tcl_ExprLong + tcl84.dll.Tcl_ExprLongObj + tcl84.dll.Tcl_ExprObj + tcl84.dll.Tcl_ExprObjCmd + tcl84.dll.Tcl_ExprString + tcl84.dll.Tcl_ExternalToUtf + tcl84.dll.Tcl_ExternalToUtfDString + tcl84.dll.Tcl_FSAccess + tcl84.dll.Tcl_FSChdir + tcl84.dll.Tcl_FSConvertToPathType + tcl84.dll.Tcl_FSCopyDirectory + tcl84.dll.Tcl_FSCopyFile + tcl84.dll.Tcl_FSCreateDirectory + tcl84.dll.Tcl_FSData + tcl84.dll.Tcl_FSDeleteFile + tcl84.dll.Tcl_FSEqualPaths + tcl84.dll.Tcl_FSEvalFile + tcl84.dll.Tcl_FSFileAttrStrings + tcl84.dll.Tcl_FSFileAttrsGet + tcl84.dll.Tcl_FSFileAttrsSet + tcl84.dll.Tcl_FSFileSystemInfo + tcl84.dll.Tcl_FSGetCwd + tcl84.dll.Tcl_FSGetFileSystemForPath + tcl84.dll.Tcl_FSGetInternalRep + tcl84.dll.Tcl_FSGetNativePath + tcl84.dll.Tcl_FSGetNormalizedPath + tcl84.dll.Tcl_FSGetPathType + tcl84.dll.Tcl_FSGetTranslatedPath + tcl84.dll.Tcl_FSGetTranslatedStringPath + tcl84.dll.Tcl_FSJoinPath + tcl84.dll.Tcl_FSJoinToPath + tcl84.dll.Tcl_FSLink + tcl84.dll.Tcl_FSListVolumes + tcl84.dll.Tcl_FSLoadFile + tcl84.dll.Tcl_FSLstat + tcl84.dll.Tcl_FSMatchInDirectory + tcl84.dll.Tcl_FSMountsChanged + tcl84.dll.Tcl_FSNewNativePath + tcl84.dll.Tcl_FSOpenFileChannel + tcl84.dll.Tcl_FSPathSeparator + tcl84.dll.Tcl_FSRegister + tcl84.dll.Tcl_FSRemoveDirectory + tcl84.dll.Tcl_FSRenameFile + tcl84.dll.Tcl_FSSplitPath + tcl84.dll.Tcl_FSStat + tcl84.dll.Tcl_FSUnregister + tcl84.dll.Tcl_FSUtime + tcl84.dll.Tcl_FblockedObjCmd + tcl84.dll.Tcl_FconfigureObjCmd + tcl84.dll.Tcl_FcopyObjCmd + tcl84.dll.Tcl_FileEventObjCmd + tcl84.dll.Tcl_FileObjCmd + tcl84.dll.Tcl_Finalize + tcl84.dll.Tcl_FinalizeNotifier + tcl84.dll.Tcl_FinalizeThread + tcl84.dll.Tcl_FindCommand + tcl84.dll.Tcl_FindExecutable + tcl84.dll.Tcl_FindHashEntry + tcl84.dll.Tcl_FindNamespace + tcl84.dll.Tcl_FindNamespaceVar + tcl84.dll.Tcl_FirstHashEntry + tcl84.dll.Tcl_Flush + tcl84.dll.Tcl_FlushObjCmd + tcl84.dll.Tcl_ForObjCmd + tcl84.dll.Tcl_ForeachObjCmd + tcl84.dll.Tcl_ForgetImport + tcl84.dll.Tcl_FormatObjCmd + tcl84.dll.Tcl_Free + tcl84.dll.Tcl_FreeEncoding + tcl84.dll.Tcl_FreeParse + tcl84.dll.Tcl_FreeResult + tcl84.dll.Tcl_GetAlias + tcl84.dll.Tcl_GetAliasObj + tcl84.dll.Tcl_GetAllocMutex + tcl84.dll.Tcl_GetAssocData + tcl84.dll.Tcl_GetBoolean + tcl84.dll.Tcl_GetBooleanFromObj + tcl84.dll.Tcl_GetByteArrayFromObj + tcl84.dll.Tcl_GetChannel + tcl84.dll.Tcl_GetChannelBufferSize + tcl84.dll.Tcl_GetChannelHandle + tcl84.dll.Tcl_GetChannelInstanceData + tcl84.dll.Tcl_GetChannelMode + tcl84.dll.Tcl_GetChannelName + tcl84.dll.Tcl_GetChannelNames + tcl84.dll.Tcl_GetChannelNamesEx + tcl84.dll.Tcl_GetChannelOption + tcl84.dll.Tcl_GetChannelThread + tcl84.dll.Tcl_GetChannelType + tcl84.dll.Tcl_GetCharLength + tcl84.dll.Tcl_GetCommandFromObj + tcl84.dll.Tcl_GetCommandFullName + tcl84.dll.Tcl_GetCommandInfo + tcl84.dll.Tcl_GetCommandInfoFromToken + tcl84.dll.Tcl_GetCommandName + tcl84.dll.Tcl_GetCurrentNamespace + tcl84.dll.Tcl_GetCurrentThread + tcl84.dll.Tcl_GetCwd + tcl84.dll.Tcl_GetDefaultEncodingDir + tcl84.dll.Tcl_GetDouble + tcl84.dll.Tcl_GetDoubleFromObj + tcl84.dll.Tcl_GetEncoding + tcl84.dll.Tcl_GetEncodingName + tcl84.dll.Tcl_GetEncodingNames + tcl84.dll.Tcl_GetErrno + tcl84.dll.Tcl_GetGlobalNamespace + tcl84.dll.Tcl_GetHostName + tcl84.dll.Tcl_GetIndexFromObj + tcl84.dll.Tcl_GetIndexFromObjStruct + tcl84.dll.Tcl_GetInt + tcl84.dll.Tcl_GetIntFromObj + tcl84.dll.Tcl_GetInterpPath + tcl84.dll.Tcl_GetInterpResolvers + tcl84.dll.Tcl_GetLongFromObj + tcl84.dll.Tcl_GetMaster + tcl84.dll.Tcl_GetMathFuncInfo + tcl84.dll.Tcl_GetNameOfExecutable + tcl84.dll.Tcl_GetNamespaceResolvers + tcl84.dll.Tcl_GetObjResult + tcl84.dll.Tcl_GetObjType + tcl84.dll.Tcl_GetPathType + tcl84.dll.Tcl_GetRange + tcl84.dll.Tcl_GetRegExpFromObj + tcl84.dll.Tcl_GetServiceMode + tcl84.dll.Tcl_GetSlave + tcl84.dll.Tcl_GetStackedChannel + tcl84.dll.Tcl_GetStdChannel + tcl84.dll.Tcl_GetString + tcl84.dll.Tcl_GetStringFromObj + tcl84.dll.Tcl_GetStringResult + tcl84.dll.Tcl_GetThreadData + tcl84.dll.Tcl_GetTime + tcl84.dll.Tcl_GetTopChannel + tcl84.dll.Tcl_GetUniChar + tcl84.dll.Tcl_GetUnicode + tcl84.dll.Tcl_GetUnicodeFromObj + tcl84.dll.Tcl_GetVar + tcl84.dll.Tcl_GetVar2 + tcl84.dll.Tcl_GetVar2Ex + tcl84.dll.Tcl_GetVariableFullName + tcl84.dll.Tcl_GetVersion + tcl84.dll.Tcl_GetWideIntFromObj + tcl84.dll.Tcl_Gets + tcl84.dll.Tcl_GetsObj + tcl84.dll.Tcl_GetsObjCmd + tcl84.dll.Tcl_GlobObjCmd + tcl84.dll.Tcl_GlobalEval + tcl84.dll.Tcl_GlobalEvalObj + tcl84.dll.Tcl_GlobalObjCmd + tcl84.dll.Tcl_HashStats + tcl84.dll.Tcl_HideCommand + tcl84.dll.Tcl_IfObjCmd + tcl84.dll.Tcl_Import + tcl84.dll.Tcl_IncrObjCmd + tcl84.dll.Tcl_InfoObjCmd + tcl84.dll.Tcl_Init + tcl84.dll.Tcl_InitCustomHashTable + tcl84.dll.Tcl_InitHashTable + tcl84.dll.Tcl_InitMemory + tcl84.dll.Tcl_InitNotifier + tcl84.dll.Tcl_InitObjHashTable + tcl84.dll.Tcl_InputBlocked + tcl84.dll.Tcl_InputBuffered + tcl84.dll.Tcl_InterpDeleted + tcl84.dll.Tcl_InterpObjCmd + tcl84.dll.Tcl_InvalidateStringRep + tcl84.dll.Tcl_IsChannelExisting + tcl84.dll.Tcl_IsChannelRegistered + tcl84.dll.Tcl_IsChannelShared + tcl84.dll.Tcl_IsSafe + tcl84.dll.Tcl_IsStandardChannel + tcl84.dll.Tcl_JoinObjCmd + tcl84.dll.Tcl_JoinPath + tcl84.dll.Tcl_JoinThread + tcl84.dll.Tcl_LappendObjCmd + tcl84.dll.Tcl_LindexObjCmd + tcl84.dll.Tcl_LinkVar + tcl84.dll.Tcl_LinsertObjCmd + tcl84.dll.Tcl_ListMathFuncs + tcl84.dll.Tcl_ListObjAppendElement + tcl84.dll.Tcl_ListObjAppendList + tcl84.dll.Tcl_ListObjCmd + tcl84.dll.Tcl_ListObjGetElements + tcl84.dll.Tcl_ListObjIndex + tcl84.dll.Tcl_ListObjLength + tcl84.dll.Tcl_ListObjReplace + tcl84.dll.Tcl_LlengthObjCmd + tcl84.dll.Tcl_LoadObjCmd + tcl84.dll.Tcl_LogCommandInfo + tcl84.dll.Tcl_LrangeObjCmd + tcl84.dll.Tcl_LreplaceObjCmd + tcl84.dll.Tcl_LsearchObjCmd + tcl84.dll.Tcl_LsetObjCmd + tcl84.dll.Tcl_LsortObjCmd + tcl84.dll.Tcl_Main + tcl84.dll.Tcl_MakeFileChannel + tcl84.dll.Tcl_MakeSafe + tcl84.dll.Tcl_MakeTcpClientChannel + tcl84.dll.Tcl_Merge + tcl84.dll.Tcl_MutexFinalize + tcl84.dll.Tcl_MutexLock + tcl84.dll.Tcl_MutexUnlock + tcl84.dll.Tcl_NamespaceObjCmd + tcl84.dll.Tcl_NewBooleanObj + tcl84.dll.Tcl_NewByteArrayObj + tcl84.dll.Tcl_NewDoubleObj + tcl84.dll.Tcl_NewIntObj + tcl84.dll.Tcl_NewListObj + tcl84.dll.Tcl_NewLongObj + tcl84.dll.Tcl_NewObj + tcl84.dll.Tcl_NewStringObj + tcl84.dll.Tcl_NewUnicodeObj + tcl84.dll.Tcl_NewWideIntObj + tcl84.dll.Tcl_NextHashEntry + tcl84.dll.Tcl_NotifyChannel + tcl84.dll.Tcl_NumUtfChars + tcl84.dll.Tcl_ObjGetVar2 + tcl84.dll.Tcl_ObjSetVar2 + tcl84.dll.Tcl_OpenCommandChannel + tcl84.dll.Tcl_OpenFileChannel + tcl84.dll.Tcl_OpenObjCmd + tcl84.dll.Tcl_OpenTcpClient + tcl84.dll.Tcl_OpenTcpServer + tcl84.dll.Tcl_OutputBuffered + tcl84.dll.Tcl_PackageObjCmd + tcl84.dll.Tcl_Panic + tcl84.dll.Tcl_PanicVA + tcl84.dll.Tcl_ParseBraces + tcl84.dll.Tcl_ParseCommand + tcl84.dll.Tcl_ParseExpr + tcl84.dll.Tcl_ParseQuotedString + tcl84.dll.Tcl_ParseVar + tcl84.dll.Tcl_ParseVarName + tcl84.dll.Tcl_PidObjCmd + tcl84.dll.Tcl_PkgPresent + tcl84.dll.Tcl_PkgPresentEx + tcl84.dll.Tcl_PkgProvide + tcl84.dll.Tcl_PkgProvideEx + tcl84.dll.Tcl_PkgRequire + tcl84.dll.Tcl_PkgRequireEx + tcl84.dll.Tcl_PopCallFrame + tcl84.dll.Tcl_PosixError + tcl84.dll.Tcl_Preserve + tcl84.dll.Tcl_PrintDouble + tcl84.dll.Tcl_ProcObjCmd + tcl84.dll.Tcl_PushCallFrame + tcl84.dll.Tcl_PutEnv + tcl84.dll.Tcl_PutsObjCmd + tcl84.dll.Tcl_PwdObjCmd + tcl84.dll.Tcl_QueueEvent + tcl84.dll.Tcl_Read + tcl84.dll.Tcl_ReadChars + tcl84.dll.Tcl_ReadObjCmd + tcl84.dll.Tcl_ReadRaw + tcl84.dll.Tcl_Realloc + tcl84.dll.Tcl_ReapDetachedProcs + tcl84.dll.Tcl_RecordAndEval + tcl84.dll.Tcl_RecordAndEvalObj + tcl84.dll.Tcl_RegExpCompile + tcl84.dll.Tcl_RegExpExec + tcl84.dll.Tcl_RegExpExecObj + tcl84.dll.Tcl_RegExpGetInfo + tcl84.dll.Tcl_RegExpMatch + tcl84.dll.Tcl_RegExpMatchObj + tcl84.dll.Tcl_RegExpRange + tcl84.dll.Tcl_RegexpObjCmd + tcl84.dll.Tcl_RegisterChannel + tcl84.dll.Tcl_RegisterObjType + tcl84.dll.Tcl_RegsubObjCmd + tcl84.dll.Tcl_Release + tcl84.dll.Tcl_RemoveInterpResolvers + tcl84.dll.Tcl_RenameObjCmd + tcl84.dll.Tcl_ResetResult + tcl84.dll.Tcl_RestoreResult + tcl84.dll.Tcl_ReturnObjCmd + tcl84.dll.Tcl_SaveResult + tcl84.dll.Tcl_ScanCountedElement + tcl84.dll.Tcl_ScanElement + tcl84.dll.Tcl_ScanObjCmd + tcl84.dll.Tcl_Seek + tcl84.dll.Tcl_SeekObjCmd + tcl84.dll.Tcl_SeekOld + tcl84.dll.Tcl_ServiceAll + tcl84.dll.Tcl_ServiceEvent + tcl84.dll.Tcl_ServiceModeHook + tcl84.dll.Tcl_SetAssocData + tcl84.dll.Tcl_SetBooleanObj + tcl84.dll.Tcl_SetByteArrayLength + tcl84.dll.Tcl_SetByteArrayObj + tcl84.dll.Tcl_SetChannelBufferSize + tcl84.dll.Tcl_SetChannelOption + tcl84.dll.Tcl_SetCommandInfo + tcl84.dll.Tcl_SetCommandInfoFromToken + tcl84.dll.Tcl_SetDefaultEncodingDir + tcl84.dll.Tcl_SetDoubleObj + tcl84.dll.Tcl_SetErrno + tcl84.dll.Tcl_SetErrorCode + tcl84.dll.Tcl_SetErrorCodeVA + tcl84.dll.Tcl_SetIntObj + tcl84.dll.Tcl_SetListObj + tcl84.dll.Tcl_SetLongObj + tcl84.dll.Tcl_SetMainLoop + tcl84.dll.Tcl_SetMaxBlockTime + tcl84.dll.Tcl_SetNamespaceResolvers + tcl84.dll.Tcl_SetNotifier + tcl84.dll.Tcl_SetObjCmd + tcl84.dll.Tcl_SetObjErrorCode + tcl84.dll.Tcl_SetObjLength + tcl84.dll.Tcl_SetObjResult + tcl84.dll.Tcl_SetPanicProc + tcl84.dll.Tcl_SetRecursionLimit + tcl84.dll.Tcl_SetResult + tcl84.dll.Tcl_SetServiceMode + tcl84.dll.Tcl_SetStdChannel + tcl84.dll.Tcl_SetStringObj + tcl84.dll.Tcl_SetSystemEncoding + tcl84.dll.Tcl_SetTimer + tcl84.dll.Tcl_SetUnicodeObj + tcl84.dll.Tcl_SetVar + tcl84.dll.Tcl_SetVar2 + tcl84.dll.Tcl_SetVar2Ex + tcl84.dll.Tcl_SetWideIntObj + tcl84.dll.Tcl_SignalId + tcl84.dll.Tcl_SignalMsg + tcl84.dll.Tcl_Sleep + tcl84.dll.Tcl_SocketObjCmd + tcl84.dll.Tcl_SourceObjCmd + tcl84.dll.Tcl_SourceRCFile + tcl84.dll.Tcl_SpliceChannel + tcl84.dll.Tcl_SplitList + tcl84.dll.Tcl_SplitObjCmd + tcl84.dll.Tcl_SplitPath + tcl84.dll.Tcl_StackChannel + tcl84.dll.Tcl_Stat + tcl84.dll.Tcl_StaticPackage + tcl84.dll.Tcl_StringCaseMatch + tcl84.dll.Tcl_StringMatch + tcl84.dll.Tcl_StringObjCmd + tcl84.dll.Tcl_SubstObj + tcl84.dll.Tcl_SubstObjCmd + tcl84.dll.Tcl_SwitchObjCmd + tcl84.dll.Tcl_Tell + tcl84.dll.Tcl_TellObjCmd + tcl84.dll.Tcl_TellOld + tcl84.dll.Tcl_ThreadAlert + tcl84.dll.Tcl_ThreadQueueEvent + tcl84.dll.Tcl_TimeObjCmd + tcl84.dll.Tcl_TraceCommand + tcl84.dll.Tcl_TraceObjCmd + tcl84.dll.Tcl_TraceVar + tcl84.dll.Tcl_TraceVar2 + tcl84.dll.Tcl_TranslateFileName + tcl84.dll.Tcl_Ungets + tcl84.dll.Tcl_UniCharAtIndex + tcl84.dll.Tcl_UniCharCaseMatch + tcl84.dll.Tcl_UniCharIsAlnum + tcl84.dll.Tcl_UniCharIsAlpha + tcl84.dll.Tcl_UniCharIsControl + tcl84.dll.Tcl_UniCharIsDigit + tcl84.dll.Tcl_UniCharIsGraph + tcl84.dll.Tcl_UniCharIsLower + tcl84.dll.Tcl_UniCharIsPrint + tcl84.dll.Tcl_UniCharIsPunct + tcl84.dll.Tcl_UniCharIsSpace + tcl84.dll.Tcl_UniCharIsUpper + tcl84.dll.Tcl_UniCharIsWordChar + tcl84.dll.Tcl_UniCharLen + tcl84.dll.Tcl_UniCharNcasecmp + tcl84.dll.Tcl_UniCharNcmp + tcl84.dll.Tcl_UniCharToLower + tcl84.dll.Tcl_UniCharToTitle + tcl84.dll.Tcl_UniCharToUpper + tcl84.dll.Tcl_UniCharToUtf + tcl84.dll.Tcl_UniCharToUtfDString + tcl84.dll.Tcl_UnlinkVar + tcl84.dll.Tcl_UnregisterChannel + tcl84.dll.Tcl_UnsetObjCmd + tcl84.dll.Tcl_UnsetVar + tcl84.dll.Tcl_UnsetVar2 + tcl84.dll.Tcl_UnstackChannel + tcl84.dll.Tcl_UntraceCommand + tcl84.dll.Tcl_UntraceVar + tcl84.dll.Tcl_UntraceVar2 + tcl84.dll.Tcl_UpVar + tcl84.dll.Tcl_UpVar2 + tcl84.dll.Tcl_UpdateLinkedVar + tcl84.dll.Tcl_UpdateObjCmd + tcl84.dll.Tcl_UplevelObjCmd + tcl84.dll.Tcl_UpvarObjCmd + tcl84.dll.Tcl_UtfAtIndex + tcl84.dll.Tcl_UtfBackslash + tcl84.dll.Tcl_UtfCharComplete + tcl84.dll.Tcl_UtfFindFirst + tcl84.dll.Tcl_UtfFindLast + tcl84.dll.Tcl_UtfNcasecmp + tcl84.dll.Tcl_UtfNcmp + tcl84.dll.Tcl_UtfNext + tcl84.dll.Tcl_UtfPrev + tcl84.dll.Tcl_UtfToExternal + tcl84.dll.Tcl_UtfToExternalDString + tcl84.dll.Tcl_UtfToLower + tcl84.dll.Tcl_UtfToTitle + tcl84.dll.Tcl_UtfToUniChar + tcl84.dll.Tcl_UtfToUniCharDString + tcl84.dll.Tcl_UtfToUpper + tcl84.dll.Tcl_ValidateAllMemory + tcl84.dll.Tcl_VarEval + tcl84.dll.Tcl_VarEvalVA + tcl84.dll.Tcl_VarTraceInfo + tcl84.dll.Tcl_VarTraceInfo2 + tcl84.dll.Tcl_VariableObjCmd + tcl84.dll.Tcl_VwaitObjCmd + tcl84.dll.Tcl_WaitForEvent + tcl84.dll.Tcl_WaitPid + tcl84.dll.Tcl_WhileObjCmd + tcl84.dll.Tcl_WinTCharToUtf + tcl84.dll.Tcl_WinUtfToTChar + tcl84.dll.Tcl_Write + tcl84.dll.Tcl_WriteChars + tcl84.dll.Tcl_WriteObj + tcl84.dll.Tcl_WriteRaw + tcl84.dll.Tcl_WrongNumArgs + tcl84.dll.TclpAlloc + tcl84.dll.TclpCheckStackSpace + tcl84.dll.TclpCloseFile + tcl84.dll.TclpCreateCommandChannel + tcl84.dll.TclpCreatePipe + tcl84.dll.TclpCreateProcess + tcl84.dll.TclpCreateTempFile + tcl84.dll.TclpDlopen + tcl84.dll.TclpFilesystemPathType + tcl84.dll.TclpFindExecutable + tcl84.dll.TclpFindSymbol + tcl84.dll.TclpFindVariable + tcl84.dll.TclpFree + tcl84.dll.TclpGetClicks + tcl84.dll.TclpGetCwd + tcl84.dll.TclpGetDate + tcl84.dll.TclpGetDefaultStdChannel + tcl84.dll.TclpGetNativePathType + tcl84.dll.TclpGetPid + tcl84.dll.TclpGetSeconds + tcl84.dll.TclpGetTZName + tcl84.dll.TclpGetTime + tcl84.dll.TclpGetTimeZone + tcl84.dll.TclpGetUserHome + tcl84.dll.TclpHasSockets + tcl84.dll.TclpInitLibraryPath + tcl84.dll.TclpInitLock + tcl84.dll.TclpInitPlatform + tcl84.dll.TclpInitUnlock + tcl84.dll.TclpLoadFile + tcl84.dll.TclpMakeFile + tcl84.dll.TclpMasterLock + tcl84.dll.TclpMatchInDirectory + tcl84.dll.TclpNativeJoinPath + tcl84.dll.TclpNativeSplitPath + tcl84.dll.TclpNativeToNormalized + tcl84.dll.TclpObjAccess + tcl84.dll.TclpObjChdir + tcl84.dll.TclpObjCopyDirectory + tcl84.dll.TclpObjCopyFile + tcl84.dll.TclpObjCreateDirectory + tcl84.dll.TclpObjDeleteFile + tcl84.dll.TclpObjGetCwd + tcl84.dll.TclpObjLink + tcl84.dll.TclpObjListVolumes + tcl84.dll.TclpObjLstat + tcl84.dll.TclpObjNormalizePath + tcl84.dll.TclpObjRemoveDirectory + tcl84.dll.TclpObjRenameFile + tcl84.dll.TclpObjStat + tcl84.dll.TclpOpenFile + tcl84.dll.TclpOpenFileChannel + tcl84.dll.TclpRealloc + tcl84.dll.TclpSetInitialEncodings + tcl84.dll.TclpSetVariables + tcl84.dll.TclpStrftime + tcl84.dll.TclpTempFileName + tcl84.dll.TclpThreadExit + tcl84.dll.TclpUnloadFile + tcl84.dll.TclpUtfNcmp2 + tk84.dll.TkActivateMenuEntry + tk84.dll.TkAllocWindow + tk84.dll.TkBTreeBytesInLine + tk84.dll.TkBTreeCharTagged + tk84.dll.TkBTreeCharsInLine + tk84.dll.TkBTreeCheck + tk84.dll.TkBTreeCreate + tk84.dll.TkBTreeDeleteChars + tk84.dll.TkBTreeDestroy + tk84.dll.TkBTreeFindLine + tk84.dll.TkBTreeGetTags + tk84.dll.TkBTreeInsertChars + tk84.dll.TkBTreeLineIndex + tk84.dll.TkBTreeLinkSegment + tk84.dll.TkBTreeNextLine + tk84.dll.TkBTreeNextTag + tk84.dll.TkBTreeNumLines + tk84.dll.TkBTreePrevTag + tk84.dll.TkBTreePreviousLine + tk84.dll.TkBTreeStartSearch + tk84.dll.TkBTreeStartSearchBack + tk84.dll.TkBTreeTag + tk84.dll.TkBTreeUnlinkSegment + tk84.dll.TkBezierPoints + tk84.dll.TkBezierScreenPoints + tk84.dll.TkBindDeadWindow + tk84.dll.TkBindEventProc + tk84.dll.TkBindFree + tk84.dll.TkBindInit + tk84.dll.TkButtonWorldChanged + tk84.dll.TkCanvasDashParseProc + tk84.dll.TkCanvasDashPrintProc + tk84.dll.TkChangeEventWindow + tk84.dll.TkClipBox + tk84.dll.TkClipCleanup + tk84.dll.TkClipInit + tk84.dll.TkComputeAnchor + tk84.dll.TkConsolePrint + tk84.dll.TkCopyAndGlobalEval + tk84.dll.TkCreateBindingProcedure + tk84.dll.TkCreateCursorFromData + tk84.dll.TkCreateFrame + tk84.dll.TkCreateMainWindow + tk84.dll.TkCreateMenuCmd + tk84.dll.TkCreateMenuReferences + tk84.dll.TkCreateRegion + tk84.dll.TkCurrentTime + tk84.dll.TkDeadAppCmd + tk84.dll.TkDebugBitmap + tk84.dll.TkDebugBorder + tk84.dll.TkDebugColor + tk84.dll.TkDebugConfig + tk84.dll.TkDebugCursor + tk84.dll.TkDebugFont + tk84.dll.TkDeleteAllImages + tk84.dll.TkDestroyMenu + tk84.dll.TkDestroyRegion + tk84.dll.TkDoConfigureNotify + tk84.dll.TkDrawInsetFocusHighlight + tk84.dll.TkEventDeadWindow + tk84.dll.TkEventInit + tk84.dll.TkEventuallyRecomputeMenu + tk84.dll.TkEventuallyRedrawMenu + tk84.dll.TkEventuallyRedrawScale + tk84.dll.TkFillPolygon + tk84.dll.TkFindMenuReferences + tk84.dll.TkFindMenuReferencesObj + tk84.dll.TkFindStateNum + tk84.dll.TkFindStateNumObj + tk84.dll.TkFindStateString + tk84.dll.TkFocusDeadWindow + tk84.dll.TkFocusFilterEvent + tk84.dll.TkFocusFree + tk84.dll.TkFocusKeyEvent + tk84.dll.TkFontGetAliasList + tk84.dll.TkFontGetFallbacks + tk84.dll.TkFontGetGlobalClass + tk84.dll.TkFontGetPixels + tk84.dll.TkFontGetPoints + tk84.dll.TkFontGetSymbolClass + tk84.dll.TkFontParseXLFD + tk84.dll.TkFontPkgFree + tk84.dll.TkFontPkgInit + tk84.dll.TkFreeBindingTags + tk84.dll.TkFreeFileFilters + tk84.dll.TkFreeMenuReferences + tk84.dll.TkGCCleanup + tk84.dll.TkGenerateActivateEvents + tk84.dll.TkGetBitmapData + tk84.dll.TkGetBitmapPredefTable + tk84.dll.TkGetButtPoints + tk84.dll.TkGetCursorByName + tk84.dll.TkGetDefaultScreenName + tk84.dll.TkGetDisplay + tk84.dll.TkGetDisplayList + tk84.dll.TkGetDisplayOf + tk84.dll.TkGetDoublePixels + tk84.dll.TkGetFileFilters + tk84.dll.TkGetFocusWin + tk84.dll.TkGetInterpNames + tk84.dll.TkGetMainInfoList + tk84.dll.TkGetMenuHashTable + tk84.dll.TkGetMenuIndex + tk84.dll.TkGetMiterPoints + tk84.dll.TkGetOptionSpec + tk84.dll.TkGetPointerCoords + tk84.dll.TkGetServerInfo + tk84.dll.TkGetWindowFromObj + tk84.dll.TkGrabDeadWindow + tk84.dll.TkGrabState + tk84.dll.TkInOutEvents + tk84.dll.TkIncludePoint + tk84.dll.TkInitFileFilters + tk84.dll.TkInstallFrameMenu + tk84.dll.TkIntersectRegion + tk84.dll.TkInvokeButton + tk84.dll.TkInvokeMenu + tk84.dll.TkKeysymToString + tk84.dll.TkLineToArea + tk84.dll.TkLineToPoint + tk84.dll.TkMakeBezierCurve + tk84.dll.TkMakeBezierPostscript + tk84.dll.TkMenuButtonWorldChanged + tk84.dll.TkMenuConfigureDrawOptions + tk84.dll.TkMenuConfigureEntryDrawOptions + tk84.dll.TkMenuEntryFreeDrawOptions + tk84.dll.TkMenuEventProc + tk84.dll.TkMenuFreeDrawOptions + tk84.dll.TkMenuImageProc + tk84.dll.TkMenuInit + tk84.dll.TkMenuInitializeDrawingFields + tk84.dll.TkMenuInitializeEntryDrawingFields + tk84.dll.TkMenuSelectImageProc + tk84.dll.TkNewMenuName + tk84.dll.TkOffsetParseProc + tk84.dll.TkOffsetPrintProc + tk84.dll.TkOptionClassChanged + tk84.dll.TkOptionDeadWindow + tk84.dll.TkOrientParseProc + tk84.dll.TkOrientPrintProc + tk84.dll.TkOvalToArea + tk84.dll.TkOvalToPoint + tk84.dll.TkPhotoGetValidRegion + tk84.dll.TkPixelParseProc + tk84.dll.TkPixelPrintProc + tk84.dll.TkPointerDeadWindow + tk84.dll.TkPointerEvent + tk84.dll.TkPolygonToArea + tk84.dll.TkPolygonToPoint + tk84.dll.TkPositionInTree + tk84.dll.TkPostCommand + tk84.dll.TkPostSubmenu + tk84.dll.TkPostTearoffMenu + tk84.dll.TkPostscriptImage + tk84.dll.TkPreprocessMenu + tk84.dll.TkPutImage + tk84.dll.TkQueueEventForAllChildren + tk84.dll.TkReadBitmapFile + tk84.dll.TkRecomputeMenu + tk84.dll.TkRectInRegion + tk84.dll.TkRegisterObjTypes + tk84.dll.TkRoundToResolution + tk84.dll.TkScalePixelToValue + tk84.dll.TkScaleSetValue + tk84.dll.TkScaleValueToPixel + tk84.dll.TkScrollWindow + tk84.dll.TkScrollbarEventProc + tk84.dll.TkScrollbarEventuallyRedraw + tk84.dll.TkSelDeadWindow + tk84.dll.TkSelEventProc + tk84.dll.TkSelInit + tk84.dll.TkSelPropProc + tk84.dll.TkSetFocusWin + tk84.dll.TkSetPixmapColormap + tk84.dll.TkSetRegion + tk84.dll.TkSetWindowMenuBar + tk84.dll.TkSmoothParseProc + tk84.dll.TkSmoothPrintProc + tk84.dll.TkStateParseProc + tk84.dll.TkStatePrintProc + tk84.dll.TkStringToKeysym + tk84.dll.TkStylePkgFree + tk84.dll.TkStylePkgInit + tk84.dll.TkSubtractRegion + tk84.dll.TkTextBindProc + tk84.dll.TkTextChanged + tk84.dll.TkTextCharBbox + tk84.dll.TkTextCharLayoutProc + tk84.dll.TkTextCreateDInfo + tk84.dll.TkTextCreateTag + tk84.dll.TkTextDLineInfo + tk84.dll.TkTextEventuallyRepick + tk84.dll.TkTextFreeDInfo + tk84.dll.TkTextFreeTag + tk84.dll.TkTextGetIndex + tk84.dll.TkTextGetTabs + tk84.dll.TkTextImageCmd + tk84.dll.TkTextImageIndex + tk84.dll.TkTextIndexBackBytes + tk84.dll.TkTextIndexBackChars + tk84.dll.TkTextIndexCmp + tk84.dll.TkTextIndexForwBytes + tk84.dll.TkTextIndexForwChars + tk84.dll.TkTextIndexToSeg + tk84.dll.TkTextInsertDisplayProc + tk84.dll.TkTextIsElided + tk84.dll.TkTextLostSelection + tk84.dll.TkTextMakeByteIndex + tk84.dll.TkTextMakeCharIndex + tk84.dll.TkTextMarkCmd + tk84.dll.TkTextMarkNameToIndex + tk84.dll.TkTextMarkSegToIndex + tk84.dll.TkTextPickCurrent + tk84.dll.TkTextPixelIndex + tk84.dll.TkTextPrintIndex + tk84.dll.TkTextRedrawRegion + tk84.dll.TkTextRedrawTag + tk84.dll.TkTextRelayoutWindow + tk84.dll.TkTextScanCmd + tk84.dll.TkTextSeeCmd + tk84.dll.TkTextSegToOffset + tk84.dll.TkTextSetMark + tk84.dll.TkTextSetYView + tk84.dll.TkTextTagCmd + tk84.dll.TkTextWindowCmd + tk84.dll.TkTextWindowIndex + tk84.dll.TkTextXviewCmd + tk84.dll.TkTextYviewCmd + tk84.dll.TkThickPolyLineToArea + tk84.dll.TkUndoApply + tk84.dll.TkUndoClearStack + tk84.dll.TkUndoClearStacks + tk84.dll.TkUndoFreeStack + tk84.dll.TkUndoInitStack + tk84.dll.TkUndoInsertSeparator + tk84.dll.TkUndoInsertUndoSeparator + tk84.dll.TkUndoPopStack + tk84.dll.TkUndoPushAction + tk84.dll.TkUndoPushStack + tk84.dll.TkUndoRevert + tk84.dll.TkUndoSetDepth + tk84.dll.TkUnionRectWithRegion + tk84.dll.TkWinCancelMouseTimer + tk84.dll.TkWinChildProc@16 + tk84.dll.TkWinClipboardRender + tk84.dll.TkWinDialogDebug + tk84.dll.TkWinEmbeddedEventProc + tk84.dll.TkWinFillRect + tk84.dll.TkWinGetBorderPixels + tk84.dll.TkWinGetDrawableDC + tk84.dll.TkWinGetMenuSystemDefault + tk84.dll.TkWinGetModifierState + tk84.dll.TkWinGetPlatformId + tk84.dll.TkWinGetSystemPalette + tk84.dll.TkWinGetWrapperWindow + tk84.dll.TkWinHandleMenuEvent + tk84.dll.TkWinIndexOfColor + tk84.dll.TkWinReleaseDrawableDC + tk84.dll.TkWinResendEvent + tk84.dll.TkWinSelectPalette + tk84.dll.TkWinSetForegroundWindow + tk84.dll.TkWinSetMenu + tk84.dll.TkWinSetWindowPos + tk84.dll.TkWinUpdatingClipboard + tk84.dll.TkWinWmCleanup + tk84.dll.TkWinXCleanup + tk84.dll.TkWinXInit + tk84.dll.TkWmAddToColormapWindows + tk84.dll.TkWmDeadWindow + tk84.dll.TkWmFocusToplevel + tk84.dll.TkWmMapWindow + tk84.dll.TkWmNewWindow + tk84.dll.TkWmProtocolEventProc + tk84.dll.TkWmRemoveFromColormapWindows + tk84.dll.TkWmRestackToplevel + tk84.dll.TkWmSetClass + tk84.dll.TkWmStackorderToplevel + tk84.dll.TkWmUnmapWindow + tk84.dll.Tk_3DBorderColor + tk84.dll.Tk_3DBorderGC + tk84.dll.Tk_3DHorizontalBevel + tk84.dll.Tk_3DVerticalBevel + tk84.dll.Tk_AddOption + tk84.dll.Tk_Alloc3DBorderFromObj + tk84.dll.Tk_AllocBitmapFromObj + tk84.dll.Tk_AllocColorFromObj + tk84.dll.Tk_AllocCursorFromObj + tk84.dll.Tk_AllocFontFromObj + tk84.dll.Tk_AllocStyleFromObj + tk84.dll.Tk_AttachHWND + tk84.dll.Tk_BellObjCmd + tk84.dll.Tk_BindEvent + tk84.dll.Tk_BindObjCmd + tk84.dll.Tk_BindtagsObjCmd + tk84.dll.Tk_ButtonObjCmd + tk84.dll.Tk_CanvasDrawableCoords + tk84.dll.Tk_CanvasEventuallyRedraw + tk84.dll.Tk_CanvasGetCoord + tk84.dll.Tk_CanvasGetCoordFromObj + tk84.dll.Tk_CanvasGetTextInfo + tk84.dll.Tk_CanvasObjCmd + tk84.dll.Tk_CanvasPsBitmap + tk84.dll.Tk_CanvasPsColor + tk84.dll.Tk_CanvasPsFont + tk84.dll.Tk_CanvasPsOutline + tk84.dll.Tk_CanvasPsPath + tk84.dll.Tk_CanvasPsStipple + tk84.dll.Tk_CanvasPsY + tk84.dll.Tk_CanvasSetOffset + tk84.dll.Tk_CanvasSetStippleOrigin + tk84.dll.Tk_CanvasTagsParseProc + tk84.dll.Tk_CanvasTagsPrintProc + tk84.dll.Tk_CanvasTkwin + tk84.dll.Tk_CanvasWindowCoords + tk84.dll.Tk_ChangeOutlineGC + tk84.dll.Tk_ChangeWindowAttributes + tk84.dll.Tk_CharBbox + tk84.dll.Tk_CheckbuttonObjCmd + tk84.dll.Tk_ChooseColorObjCmd + tk84.dll.Tk_ChooseDirectoryObjCmd + tk84.dll.Tk_ClearSelection + tk84.dll.Tk_ClipboardAppend + tk84.dll.Tk_ClipboardClear + tk84.dll.Tk_ClipboardObjCmd + tk84.dll.Tk_CollapseMotionEvents + tk84.dll.Tk_ComputeTextLayout + tk84.dll.Tk_ConfigOutlineGC + tk84.dll.Tk_ConfigureInfo + tk84.dll.Tk_ConfigureValue + tk84.dll.Tk_ConfigureWidget + tk84.dll.Tk_ConfigureWindow + tk84.dll.Tk_CoordsToWindow + tk84.dll.Tk_CreateAnonymousWindow + tk84.dll.Tk_CreateBinding + tk84.dll.Tk_CreateBindingTable + tk84.dll.Tk_CreateClientMessageHandler + tk84.dll.Tk_CreateConsoleWindow + tk84.dll.Tk_CreateErrorHandler + tk84.dll.Tk_CreateEventHandler + tk84.dll.Tk_CreateGenericHandler + tk84.dll.Tk_CreateImageType + tk84.dll.Tk_CreateItemType + tk84.dll.Tk_CreateOldImageType + tk84.dll.Tk_CreateOldPhotoImageFormat + tk84.dll.Tk_CreateOptionTable + tk84.dll.Tk_CreateOutline + tk84.dll.Tk_CreatePhotoImageFormat + tk84.dll.Tk_CreateSelHandler + tk84.dll.Tk_CreateSmoothMethod + tk84.dll.Tk_CreateStyle + tk84.dll.Tk_CreateWindow + tk84.dll.Tk_CreateWindowFromPath + tk84.dll.Tk_DefineBitmap + tk84.dll.Tk_DefineCursor + tk84.dll.Tk_DeleteAllBindings + tk84.dll.Tk_DeleteBinding + tk84.dll.Tk_DeleteBindingTable + tk84.dll.Tk_DeleteClientMessageHandler + tk84.dll.Tk_DeleteErrorHandler + tk84.dll.Tk_DeleteEventHandler + tk84.dll.Tk_DeleteGenericHandler + tk84.dll.Tk_DeleteImage + tk84.dll.Tk_DeleteOptionTable + tk84.dll.Tk_DeleteOutline + tk84.dll.Tk_DeleteSelHandler + tk84.dll.Tk_DestroyObjCmd + tk84.dll.Tk_DestroyWindow + tk84.dll.Tk_DisplayName + tk84.dll.Tk_DistanceToTextLayout + tk84.dll.Tk_DitherPhoto + tk84.dll.Tk_Draw3DPolygon + tk84.dll.Tk_Draw3DRectangle + tk84.dll.Tk_DrawChars + tk84.dll.Tk_DrawElement + tk84.dll.Tk_DrawFocusHighlight + tk84.dll.Tk_DrawTextLayout + tk84.dll.Tk_EntryObjCmd + tk84.dll.Tk_EventObjCmd + tk84.dll.Tk_Fill3DPolygon + tk84.dll.Tk_Fill3DRectangle + tk84.dll.Tk_FindPhoto + tk84.dll.Tk_FocusObjCmd + tk84.dll.Tk_FontId + tk84.dll.Tk_FontObjCmd + tk84.dll.Tk_FrameObjCmd + tk84.dll.Tk_Free3DBorder + tk84.dll.Tk_Free3DBorderFromObj + tk84.dll.Tk_FreeBitmap + tk84.dll.Tk_FreeBitmapFromObj + tk84.dll.Tk_FreeColor + tk84.dll.Tk_FreeColorFromObj + tk84.dll.Tk_FreeColormap + tk84.dll.Tk_FreeConfigOptions + tk84.dll.Tk_FreeCursor + tk84.dll.Tk_FreeCursorFromObj + tk84.dll.Tk_FreeFont + tk84.dll.Tk_FreeFontFromObj + tk84.dll.Tk_FreeGC + tk84.dll.Tk_FreeImage + tk84.dll.Tk_FreeOptions + tk84.dll.Tk_FreePixmap + tk84.dll.Tk_FreeSavedOptions + tk84.dll.Tk_FreeStyle + tk84.dll.Tk_FreeStyleFromObj + tk84.dll.Tk_FreeTextLayout + tk84.dll.Tk_FreeXId + tk84.dll.Tk_GCForColor + tk84.dll.Tk_GeometryRequest + tk84.dll.Tk_Get3DBorder + tk84.dll.Tk_Get3DBorderFromObj + tk84.dll.Tk_GetAllBindings + tk84.dll.Tk_GetAnchor + tk84.dll.Tk_GetAnchorFromObj + tk84.dll.Tk_GetAtomName + tk84.dll.Tk_GetBinding + tk84.dll.Tk_GetBitmap + tk84.dll.Tk_GetBitmapFromData + tk84.dll.Tk_GetBitmapFromObj + tk84.dll.Tk_GetCapStyle + tk84.dll.Tk_GetColor + tk84.dll.Tk_GetColorByValue + tk84.dll.Tk_GetColorFromObj + tk84.dll.Tk_GetColormap + tk84.dll.Tk_GetCursor + tk84.dll.Tk_GetCursorFromData + tk84.dll.Tk_GetCursorFromObj + tk84.dll.Tk_GetDash + tk84.dll.Tk_GetElementBorderWidth + tk84.dll.Tk_GetElementBox + tk84.dll.Tk_GetElementId + tk84.dll.Tk_GetElementSize + tk84.dll.Tk_GetFont + tk84.dll.Tk_GetFontFromObj + tk84.dll.Tk_GetFontMetrics + tk84.dll.Tk_GetGC + tk84.dll.Tk_GetHINSTANCE + tk84.dll.Tk_GetHWND + tk84.dll.Tk_GetImage + tk84.dll.Tk_GetImageMasterData + tk84.dll.Tk_GetItemTypes + tk84.dll.Tk_GetJoinStyle + tk84.dll.Tk_GetJustify + tk84.dll.Tk_GetJustifyFromObj + tk84.dll.Tk_GetMMFromObj + tk84.dll.Tk_GetNumMainWindows + tk84.dll.Tk_GetOpenFileObjCmd + tk84.dll.Tk_GetOption + tk84.dll.Tk_GetOptionInfo + tk84.dll.Tk_GetOptionValue + tk84.dll.Tk_GetPixels + tk84.dll.Tk_GetPixelsFromObj + tk84.dll.Tk_GetPixmap + tk84.dll.Tk_GetRelief + tk84.dll.Tk_GetReliefFromObj + tk84.dll.Tk_GetRootCoords + tk84.dll.Tk_GetSaveFileObjCmd + tk84.dll.Tk_GetScreenMM + tk84.dll.Tk_GetScrollInfo + tk84.dll.Tk_GetScrollInfoObj + tk84.dll.Tk_GetSelection + tk84.dll.Tk_GetStyle + tk84.dll.Tk_GetStyleEngine + tk84.dll.Tk_GetStyleFromObj + tk84.dll.Tk_GetStyledElement + tk84.dll.Tk_GetUid + tk84.dll.Tk_GetVRootGeometry + tk84.dll.Tk_GetVisual + tk84.dll.Tk_Grab + tk84.dll.Tk_GrabObjCmd + tk84.dll.Tk_GridObjCmd + tk84.dll.Tk_HWNDToWindow + tk84.dll.Tk_HandleEvent + tk84.dll.Tk_IdToWindow + tk84.dll.Tk_ImageChanged + tk84.dll.Tk_ImageObjCmd + tk84.dll.Tk_Init + tk84.dll.Tk_InitConsoleChannels + tk84.dll.Tk_InitOptions + tk84.dll.Tk_InternAtom + tk84.dll.Tk_IntersectTextLayout + tk84.dll.Tk_LabelObjCmd + tk84.dll.Tk_LabelframeObjCmd + tk84.dll.Tk_ListboxObjCmd + tk84.dll.Tk_LowerObjCmd + tk84.dll.Tk_MainEx + tk84.dll.Tk_MainLoop + tk84.dll.Tk_MainWindow + tk84.dll.Tk_MaintainGeometry + tk84.dll.Tk_MakeWindowExist + tk84.dll.Tk_ManageGeometry + tk84.dll.Tk_MapWindow + tk84.dll.Tk_MeasureChars + tk84.dll.Tk_MenubuttonObjCmd + tk84.dll.Tk_MessageBoxObjCmd + tk84.dll.Tk_MessageObjCmd + tk84.dll.Tk_MoveResizeWindow + tk84.dll.Tk_MoveToplevelWindow + tk84.dll.Tk_MoveWindow + tk84.dll.Tk_NameOf3DBorder + tk84.dll.Tk_NameOfAnchor + tk84.dll.Tk_NameOfBitmap + tk84.dll.Tk_NameOfCapStyle + tk84.dll.Tk_NameOfColor + tk84.dll.Tk_NameOfCursor + tk84.dll.Tk_NameOfFont + tk84.dll.Tk_NameOfImage + tk84.dll.Tk_NameOfJoinStyle + tk84.dll.Tk_NameOfJustify + tk84.dll.Tk_NameOfRelief + tk84.dll.Tk_NameOfStyle + tk84.dll.Tk_NameToWindow + tk84.dll.Tk_OptionObjCmd + tk84.dll.Tk_OwnSelection + tk84.dll.Tk_PackObjCmd + tk84.dll.Tk_PanedWindowObjCmd + tk84.dll.Tk_ParseArgv + tk84.dll.Tk_PhotoBlank + tk84.dll.Tk_PhotoExpand + tk84.dll.Tk_PhotoGetImage + tk84.dll.Tk_PhotoGetSize + tk84.dll.Tk_PhotoPutBlock + tk84.dll.Tk_PhotoPutBlock_NoComposite + tk84.dll.Tk_PhotoPutZoomedBlock + tk84.dll.Tk_PhotoPutZoomedBlock_NoComposite + tk84.dll.Tk_PhotoSetSize + tk84.dll.Tk_PlaceObjCmd + tk84.dll.Tk_PointToChar + tk84.dll.Tk_PointerEvent + tk84.dll.Tk_PostscriptBitmap + tk84.dll.Tk_PostscriptColor + tk84.dll.Tk_PostscriptFont + tk84.dll.Tk_PostscriptFontName + tk84.dll.Tk_PostscriptImage + tk84.dll.Tk_PostscriptPath + tk84.dll.Tk_PostscriptPhoto + tk84.dll.Tk_PostscriptStipple + tk84.dll.Tk_PostscriptY + tk84.dll.Tk_PreserveColormap + tk84.dll.Tk_QueueWindowEvent + tk84.dll.Tk_RadiobuttonObjCmd + tk84.dll.Tk_RaiseObjCmd + tk84.dll.Tk_RedrawImage + tk84.dll.Tk_RegisterStyleEngine + tk84.dll.Tk_RegisterStyledElement + tk84.dll.Tk_ResetOutlineGC + tk84.dll.Tk_ResizeWindow + tk84.dll.Tk_RestackWindow + tk84.dll.Tk_RestoreSavedOptions + tk84.dll.Tk_RestrictEvents + tk84.dll.Tk_SafeInit + tk84.dll.Tk_ScaleObjCmd + tk84.dll.Tk_ScrollbarCmd + tk84.dll.Tk_SelectionObjCmd + tk84.dll.Tk_SetAppName + tk84.dll.Tk_SetBackgroundFromBorder + tk84.dll.Tk_SetCaretPos + tk84.dll.Tk_SetClass + tk84.dll.Tk_SetClassProcs + tk84.dll.Tk_SetGrid + tk84.dll.Tk_SetInternalBorder + tk84.dll.Tk_SetInternalBorderEx + tk84.dll.Tk_SetMinimumRequestSize + tk84.dll.Tk_SetOptions + tk84.dll.Tk_SetTSOrigin + tk84.dll.Tk_SetWindowBackground + tk84.dll.Tk_SetWindowBackgroundPixmap + tk84.dll.Tk_SetWindowBorder + tk84.dll.Tk_SetWindowBorderPixmap + tk84.dll.Tk_SetWindowBorderWidth + tk84.dll.Tk_SetWindowColormap + tk84.dll.Tk_SetWindowVisual + tk84.dll.Tk_SizeOfBitmap + tk84.dll.Tk_SizeOfImage + tk84.dll.Tk_SpinboxObjCmd + tk84.dll.Tk_StrictMotif + tk84.dll.Tk_TextCmd + tk84.dll.Tk_TextLayoutToPostscript + tk84.dll.Tk_TextWidth + tk84.dll.Tk_TkObjCmd + tk84.dll.Tk_TkwaitObjCmd + tk84.dll.Tk_ToplevelObjCmd + tk84.dll.Tk_TranslateWinEvent + tk84.dll.Tk_UndefineCursor + tk84.dll.Tk_UnderlineChars + tk84.dll.Tk_UnderlineTextLayout + tk84.dll.Tk_Ungrab + tk84.dll.Tk_UnmaintainGeometry + tk84.dll.Tk_UnmapWindow + tk84.dll.Tk_UnsetGrid + tk84.dll.Tk_UpdateObjCmd + tk84.dll.Tk_UpdatePointer + tk84.dll.Tk_WinfoObjCmd + tk84.dll.Tk_WmObjCmd + tk84.dll.TkpButtonSetDefaults + tk84.dll.TkpChangeFocus + tk84.dll.TkpClaimFocus + tk84.dll.TkpCloseDisplay + tk84.dll.TkpComputeButtonGeometry + tk84.dll.TkpComputeMenuButtonGeometry + tk84.dll.TkpComputeMenubarGeometry + tk84.dll.TkpComputeScrollbarGeometry + tk84.dll.TkpComputeStandardMenuGeometry + tk84.dll.TkpConfigureMenuEntry + tk84.dll.TkpConfigureScrollbar + tk84.dll.TkpCreateButton + tk84.dll.TkpCreateMenuButton + tk84.dll.TkpCreateScale + tk84.dll.TkpCreateScrollbar + tk84.dll.TkpDeleteFont + tk84.dll.TkpDestroyButton + tk84.dll.TkpDestroyMenu + tk84.dll.TkpDestroyMenuButton + tk84.dll.TkpDestroyMenuEntry + tk84.dll.TkpDestroyScale + tk84.dll.TkpDestroyScrollbar + tk84.dll.TkpDisplayButton + tk84.dll.TkpDisplayMenuButton + tk84.dll.TkpDisplayScale + tk84.dll.TkpDisplayScrollbar + tk84.dll.TkpDisplayWarning + tk84.dll.TkpDrawHighlightBorder + tk84.dll.TkpDrawMenuEntry + tk84.dll.TkpFontPkgInit + tk84.dll.TkpFreeBorder + tk84.dll.TkpFreeColor + tk84.dll.TkpFreeCursor + tk84.dll.TkpGetAppName + tk84.dll.TkpGetBorder + tk84.dll.TkpGetColor + tk84.dll.TkpGetColorByValue + tk84.dll.TkpGetFontFamilies + tk84.dll.TkpGetFontFromAttributes + tk84.dll.TkpGetKeySym + tk84.dll.TkpGetMS + tk84.dll.TkpGetNativeFont + tk84.dll.TkpGetOtherWindow + tk84.dll.TkpGetShadows + tk84.dll.TkpGetString + tk84.dll.TkpGetSubFonts + tk84.dll.TkpGetSystemDefault + tk84.dll.TkpGetWrapperWindow + tk84.dll.TkpInit + tk84.dll.TkpInitKeymapInfo + tk84.dll.TkpInitializeMenuBindings + tk84.dll.TkpMakeContainer + tk84.dll.TkpMakeMenuWindow + tk84.dll.TkpMakeWindow + tk84.dll.TkpMenuInit + tk84.dll.TkpMenuNewEntry + tk84.dll.TkpMenuNotifyToplevelCreate + tk84.dll.TkpMenuThreadInit + tk84.dll.TkpNewMenu + tk84.dll.TkpOpenDisplay + tk84.dll.TkpPostMenu + tk84.dll.TkpPrintWindowId + tk84.dll.TkpRedirectKeyEvent + tk84.dll.TkpScaleElement + tk84.dll.TkpScanWindowId + tk84.dll.TkpScrollbarPosition + tk84.dll.TkpSetCapture + tk84.dll.TkpSetCursor + tk84.dll.TkpSetKeycodeAndState + tk84.dll.TkpSetMainMenubar + tk84.dll.TkpSetWindowMenuBar + tk84.dll.TkpTestembedCmd + tk84.dll.TkpUseWindow + tk84.dll.TkpWindowWasRecentlyDeleted + tk84.dll.TkpWmSetState + tk84.dll.XAllocColor + tk84.dll.XBell + tk84.dll.XChangeGC + tk84.dll.XChangeProperty + tk84.dll.XChangeWindowAttributes + tk84.dll.XClearWindow + tk84.dll.XConfigureWindow + tk84.dll.XCopyArea + tk84.dll.XCopyPlane + tk84.dll.XCreateBitmapFromData + tk84.dll.XCreateColormap + tk84.dll.XCreateGC + tk84.dll.XCreateGlyphCursor + tk84.dll.XCreateIC + tk84.dll.XCreateImage + tk84.dll.XCreatePixmapCursor + tk84.dll.XDefineCursor + tk84.dll.XDeleteProperty + tk84.dll.XDestroyIC + tk84.dll.XDestroyWindow + tk84.dll.XDrawArc + tk84.dll.XDrawLine + tk84.dll.XDrawLines + tk84.dll.XDrawRectangle + tk84.dll.XFillArc + tk84.dll.XFillPolygon + tk84.dll.XFillRectangle + tk84.dll.XFillRectangles + tk84.dll.XFilterEvent + tk84.dll.XForceScreenSaver + tk84.dll.XFreeColormap + tk84.dll.XFreeColors + tk84.dll.XFreeCursor + tk84.dll.XFreeGC + tk84.dll.XFreeModifiermap + tk84.dll.XGContextFromGC + tk84.dll.XGetAtomName + tk84.dll.XGetGeometry + tk84.dll.XGetImage + tk84.dll.XGetInputFocus + tk84.dll.XGetModifierMapping + tk84.dll.XGetVisualInfo + tk84.dll.XGetWMColormapWindows + tk84.dll.XGetWindowAttributes + tk84.dll.XGetWindowProperty + tk84.dll.XGrabKeyboard + tk84.dll.XGrabPointer + tk84.dll.XIconifyWindow + tk84.dll.XInternAtom + tk84.dll.XKeycodeToKeysym + tk84.dll.XKeysymToKeycode + tk84.dll.XKeysymToString + tk84.dll.XListHosts + tk84.dll.XLookupColor + tk84.dll.XMapWindow + tk84.dll.XMoveResizeWindow + tk84.dll.XMoveWindow + tk84.dll.XNextEvent + tk84.dll.XParseColor + tk84.dll.XPutBackEvent + tk84.dll.XQueryColors + tk84.dll.XQueryPointer + tk84.dll.XQueryTree + tk84.dll.XRaiseWindow + tk84.dll.XRefreshKeyboardMapping + tk84.dll.XResizeWindow + tk84.dll.XRootWindow + tk84.dll.XSelectInput + tk84.dll.XSendEvent + tk84.dll.XSetArcMode + tk84.dll.XSetBackground + tk84.dll.XSetClipMask + tk84.dll.XSetClipOrigin + tk84.dll.XSetCommand + tk84.dll.XSetDashes + tk84.dll.XSetErrorHandler + tk84.dll.XSetFillRule + tk84.dll.XSetFillStyle + tk84.dll.XSetFont + tk84.dll.XSetForeground + tk84.dll.XSetFunction + tk84.dll.XSetIconName + tk84.dll.XSetInputFocus + tk84.dll.XSetLineAttributes + tk84.dll.XSetSelectionOwner + tk84.dll.XSetStipple + tk84.dll.XSetTSOrigin + tk84.dll.XSetWMClientMachine + tk84.dll.XSetWindowBackground + tk84.dll.XSetWindowBackgroundPixmap + tk84.dll.XSetWindowBorder + tk84.dll.XSetWindowBorderPixmap + tk84.dll.XSetWindowBorderWidth + tk84.dll.XSetWindowColormap + tk84.dll.XStringListToTextProperty + tk84.dll.XStringToKeysym + tk84.dll.XTranslateCoordinates + tk84.dll.XUngrabKeyboard + tk84.dll.XUngrabPointer + tk84.dll.XUnmapWindow + tk84.dll.XWarpPointer + tk84.dll.XWindowEvent + tk84.dll.XWithdrawWindow + tk84.dll.XmbLookupString + tk84.dll._XInitImageFuncPtrs + tcl84.dll.strtoll + tcl84.dll.strtoull + tcl84.dll.tclWinProcs + tk84.dll.textWrapModeOption + tk84.dll.tkBTreeDebug + tk84.dll.tkMenuStateStrings + tk84.dll.tkTextCharType + tk84.dll.tkTextDebug + tk84.dll.tkTextLeftMarkType + tk84.dll.tkTextRightMarkType + tk84.dll.tkTextToggleOffType + tk84.dll.tkTextToggleOnType + tk84.dll.tkWinProcs diff --git a/cobroutines/tctcl.dll b/cobroutines/tctcl.dll new file mode 100644 index 0000000..03baf5c Binary files /dev/null and b/cobroutines/tctcl.dll differ diff --git a/cobroutines/tctcl.dll.a b/cobroutines/tctcl.dll.a new file mode 100644 index 0000000..11b1a91 Binary files /dev/null and b/cobroutines/tctcl.dll.a differ diff --git a/cobroutines/tctcl.o b/cobroutines/tctcl.o new file mode 100644 index 0000000..bbc6590 Binary files /dev/null and b/cobroutines/tctcl.o differ diff --git a/cobroutines/tk.h b/cobroutines/tk.h new file mode 100644 index 0000000..84d0b38 --- /dev/null +++ b/cobroutines/tk.h @@ -0,0 +1,1605 @@ +/* + * tk.h -- + * + * Declarations for Tk-related things that are visible outside of the Tk + * module itself. + * + * Copyright (c) 1989-1994 The Regents of the University of California. + * Copyright (c) 1994 The Australian National University. + * Copyright (c) 1994-1998 Sun Microsystems, Inc. + * Copyright (c) 1998-2000 Ajuba Solutions. + * + * See the file "license.terms" for information on usage and redistribution of + * this file, and for a DISCLAIMER OF ALL WARRANTIES. + * + * RCS: @(#) $Id: tk.h,v 1.109.2.12 2009/11/03 20:15:25 dgp Exp $ + */ + +#ifndef _TK +#define _TK + +#include +#if (TCL_MAJOR_VERSION != 8) || (TCL_MINOR_VERSION != 5) +# error Tk 8.5 must be compiled with tcl.h from Tcl 8.5 +#endif + +/* + * For C++ compilers, use extern "C" + */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * When version numbers change here, you must also go into the following files + * and update the version numbers: + * + * library/tk.tcl (2 LOC patch) + * unix/configure.in (2 LOC Major, 2 LOC minor, 1 LOC patch) + * win/configure.in (as above) + * README (sections 0 and 1) + * macosx/Wish.xcode/project.pbxproj (not patchlevel) 1 LOC + * macosx/Wish-Common.xcconfig (not patchlevel) 1 LOC + * win/README (not patchlevel) + * unix/README (not patchlevel) + * unix/tk.spec (1 LOC patch) + * win/tcl.m4 (not patchlevel) + * + * You may also need to update some of these files when the numbers change for + * the version of Tcl that this release of Tk is compiled against. + */ + +#define TK_MAJOR_VERSION 8 +#define TK_MINOR_VERSION 5 +#define TK_RELEASE_LEVEL TCL_FINAL_RELEASE +#define TK_RELEASE_SERIAL 8 + +#define TK_VERSION "8.5" +#define TK_PATCH_LEVEL "8.5.8" + +/* + * A special definition used to allow this header file to be included from + * windows or mac resource files so that they can obtain version information. + * RC_INVOKED is defined by default by the windows RC tool and manually set + * for macintosh. + * + * Resource compilers don't like all the C stuff, like typedefs and procedure + * declarations, that occur below, so block them out. + */ + +#ifndef RC_INVOKED + +#ifndef _XLIB_H +# if defined(MAC_OSX_TK) +# include +# include +# else +# include +# endif +#endif +#ifdef __STDC__ +# include +#endif + +#ifdef BUILD_tk +# undef TCL_STORAGE_CLASS +# define TCL_STORAGE_CLASS DLLEXPORT +#endif + +/* + * Decide whether or not to use input methods. + */ + +#ifdef XNQueryInputStyle +#define TK_USE_INPUT_METHODS +#endif + +/* + * Dummy types that are used by clients: + */ + +typedef struct Tk_BindingTable_ *Tk_BindingTable; +typedef struct Tk_Canvas_ *Tk_Canvas; +typedef struct Tk_Cursor_ *Tk_Cursor; +typedef struct Tk_ErrorHandler_ *Tk_ErrorHandler; +typedef struct Tk_Font_ *Tk_Font; +typedef struct Tk_Image__ *Tk_Image; +typedef struct Tk_ImageMaster_ *Tk_ImageMaster; +typedef struct Tk_OptionTable_ *Tk_OptionTable; +typedef struct Tk_PostscriptInfo_ *Tk_PostscriptInfo; +typedef struct Tk_TextLayout_ *Tk_TextLayout; +typedef struct Tk_Window_ *Tk_Window; +typedef struct Tk_3DBorder_ *Tk_3DBorder; +typedef struct Tk_Style_ *Tk_Style; +typedef struct Tk_StyleEngine_ *Tk_StyleEngine; +typedef struct Tk_StyledElement_ *Tk_StyledElement; + +/* + * Additional types exported to clients. + */ + +typedef const char *Tk_Uid; + +/* + * The enum below defines the valid types for Tk configuration options as + * implemented by Tk_InitOptions, Tk_SetOptions, etc. + */ + +typedef enum { + TK_OPTION_BOOLEAN, + TK_OPTION_INT, + TK_OPTION_DOUBLE, + TK_OPTION_STRING, + TK_OPTION_STRING_TABLE, + TK_OPTION_COLOR, + TK_OPTION_FONT, + TK_OPTION_BITMAP, + TK_OPTION_BORDER, + TK_OPTION_RELIEF, + TK_OPTION_CURSOR, + TK_OPTION_JUSTIFY, + TK_OPTION_ANCHOR, + TK_OPTION_SYNONYM, + TK_OPTION_PIXELS, + TK_OPTION_WINDOW, + TK_OPTION_END, + TK_OPTION_CUSTOM, + TK_OPTION_STYLE +} Tk_OptionType; + +/* + * Structures of the following type are used by widgets to specify their + * configuration options. Typically each widget has a static array of these + * structures, where each element of the array describes a single + * configuration option. The array is passed to Tk_CreateOptionTable. + */ + +typedef struct Tk_OptionSpec { + Tk_OptionType type; /* Type of option, such as TK_OPTION_COLOR; + * see definitions above. Last option in table + * must have type TK_OPTION_END. */ + const char *optionName; /* Name used to specify option in Tcl + * commands. */ + const char *dbName; /* Name for option in option database. */ + const char *dbClass; /* Class for option in database. */ + const char *defValue; /* Default value for option if not specified + * in command line, the option database, or + * the system. */ + int objOffset; /* Where in record to store a Tcl_Obj * that + * holds the value of this option, specified + * as an offset in bytes from the start of the + * record. Use the Tk_Offset macro to generate + * values for this. -1 means don't store the + * Tcl_Obj in the record. */ + int internalOffset; /* Where in record to store the internal + * representation of the value of this option, + * such as an int or XColor *. This field is + * specified as an offset in bytes from the + * start of the record. Use the Tk_Offset + * macro to generate values for it. -1 means + * don't store the internal representation in + * the record. */ + int flags; /* Any combination of the values defined + * below. */ + ClientData clientData; /* An alternate place to put option-specific + * data. Used for the monochrome default value + * for colors, etc. */ + int typeMask; /* An arbitrary bit mask defined by the class + * manager; typically bits correspond to + * certain kinds of options such as all those + * that require a redisplay when they change. + * Tk_SetOptions returns the bit-wise OR of + * the typeMasks of all options that were + * changed. */ +} Tk_OptionSpec; + +/* + * Flag values for Tk_OptionSpec structures. These flags are shared by + * Tk_ConfigSpec structures, so be sure to coordinate any changes carefully. + */ + +#define TK_OPTION_NULL_OK (1 << 0) +#define TK_OPTION_DONT_SET_DEFAULT (1 << 3) + +/* + * The following structure and function types are used by TK_OPTION_CUSTOM + * options; the structure holds pointers to the functions needed by the Tk + * option config code to handle a custom option. + */ + +typedef int (Tk_CustomOptionSetProc) _ANSI_ARGS_((ClientData clientData, + Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj **value, char *widgRec, + int offset, char *saveInternalPtr, int flags)); +typedef Tcl_Obj *(Tk_CustomOptionGetProc) _ANSI_ARGS_((ClientData clientData, + Tk_Window tkwin, char *widgRec, int offset)); +typedef void (Tk_CustomOptionRestoreProc) _ANSI_ARGS_((ClientData clientData, + Tk_Window tkwin, char *internalPtr, char *saveInternalPtr)); +typedef void (Tk_CustomOptionFreeProc) _ANSI_ARGS_((ClientData clientData, + Tk_Window tkwin, char *internalPtr)); + +typedef struct Tk_ObjCustomOption { + const char *name; /* Name of the custom option. */ + Tk_CustomOptionSetProc *setProc; + /* Function to use to set a record's option + * value from a Tcl_Obj */ + Tk_CustomOptionGetProc *getProc; + /* Function to use to get a Tcl_Obj + * representation from an internal + * representation of an option. */ + Tk_CustomOptionRestoreProc *restoreProc; + /* Function to use to restore a saved value + * for the internal representation. */ + Tk_CustomOptionFreeProc *freeProc; + /* Function to use to free the internal + * representation of an option. */ + ClientData clientData; /* Arbitrary one-word value passed to the + * handling procs. */ +} Tk_ObjCustomOption; + +/* + * Macro to use to fill in "offset" fields of the Tk_OptionSpec structure. + * Computes number of bytes from beginning of structure to a given field. + */ + +#ifdef offsetof +#define Tk_Offset(type, field) ((int) offsetof(type, field)) +#else +#define Tk_Offset(type, field) ((int) ((char *) &((type *) 0)->field)) +#endif + +/* + * The following two structures are used for error handling. When config + * options are being modified, the old values are saved in a Tk_SavedOptions + * structure. If an error occurs, then the contents of the structure can be + * used to restore all of the old values. The contents of this structure are + * for the private use Tk. No-one outside Tk should ever read or write any of + * the fields of these structures. + */ + +typedef struct Tk_SavedOption { + struct TkOption *optionPtr; /* Points to information that describes the + * option. */ + Tcl_Obj *valuePtr; /* The old value of the option, in the form of + * a Tcl object; may be NULL if the value was + * not saved as an object. */ + double internalForm; /* The old value of the option, in some + * internal representation such as an int or + * (XColor *). Valid only if the field + * optionPtr->specPtr->objOffset is < 0. The + * space must be large enough to accommodate a + * double, a long, or a pointer; right now it + * looks like a double (i.e., 8 bytes) is big + * enough. Also, using a double guarantees + * that the field is properly aligned for + * storing large values. */ +} Tk_SavedOption; + +#ifdef TCL_MEM_DEBUG +# define TK_NUM_SAVED_OPTIONS 2 +#else +# define TK_NUM_SAVED_OPTIONS 20 +#endif + +typedef struct Tk_SavedOptions { + char *recordPtr; /* The data structure in which to restore + * configuration options. */ + Tk_Window tkwin; /* Window associated with recordPtr; needed to + * restore certain options. */ + int numItems; /* The number of valid items in items field. */ + Tk_SavedOption items[TK_NUM_SAVED_OPTIONS]; + /* Items used to hold old values. */ + struct Tk_SavedOptions *nextPtr; + /* Points to next structure in list; needed if + * too many options changed to hold all the + * old values in a single structure. NULL + * means no more structures. */ +} Tk_SavedOptions; + +/* + * Structure used to describe application-specific configuration options: + * indicates procedures to call to parse an option and to return a text string + * describing an option. THESE ARE DEPRECATED; PLEASE USE THE NEW STRUCTURES + * LISTED ABOVE. + */ + +/* + * This is a temporary flag used while tkObjConfig and new widgets are in + * development. + */ + +#ifndef __NO_OLD_CONFIG + +typedef int (Tk_OptionParseProc) _ANSI_ARGS_((ClientData clientData, + Tcl_Interp *interp, Tk_Window tkwin, CONST84 char *value, char *widgRec, + int offset)); +typedef char *(Tk_OptionPrintProc) _ANSI_ARGS_((ClientData clientData, + Tk_Window tkwin, char *widgRec, int offset, + Tcl_FreeProc **freeProcPtr)); + +typedef struct Tk_CustomOption { + Tk_OptionParseProc *parseProc; + /* Procedure to call to parse an option and + * store it in converted form. */ + Tk_OptionPrintProc *printProc; + /* Procedure to return a printable string + * describing an existing option. */ + ClientData clientData; /* Arbitrary one-word value used by option + * parser: passed to parseProc and + * printProc. */ +} Tk_CustomOption; + +/* + * Structure used to specify information for Tk_ConfigureWidget. Each + * structure gives complete information for one option, including how the + * option is specified on the command line, where it appears in the option + * database, etc. + */ + +typedef struct Tk_ConfigSpec { + int type; /* Type of option, such as TK_CONFIG_COLOR; + * see definitions below. Last option in table + * must have type TK_CONFIG_END. */ + char *argvName; /* Switch used to specify option in argv. NULL + * means this spec is part of a group. */ + Tk_Uid dbName; /* Name for option in option database. */ + Tk_Uid dbClass; /* Class for option in database. */ + Tk_Uid defValue; /* Default value for option if not specified + * in command line or database. */ + int offset; /* Where in widget record to store value; use + * Tk_Offset macro to generate values for + * this. */ + int specFlags; /* Any combination of the values defined + * below; other bits are used internally by + * tkConfig.c. */ + Tk_CustomOption *customPtr; /* If type is TK_CONFIG_CUSTOM then this is a + * pointer to info about how to parse and + * print the option. Otherwise it is + * irrelevant. */ +} Tk_ConfigSpec; + +/* + * Type values for Tk_ConfigSpec structures. See the user documentation for + * details. + */ + +typedef enum { + TK_CONFIG_BOOLEAN, TK_CONFIG_INT, TK_CONFIG_DOUBLE, TK_CONFIG_STRING, + TK_CONFIG_UID, TK_CONFIG_COLOR, TK_CONFIG_FONT, TK_CONFIG_BITMAP, + TK_CONFIG_BORDER, TK_CONFIG_RELIEF, TK_CONFIG_CURSOR, + TK_CONFIG_ACTIVE_CURSOR, TK_CONFIG_JUSTIFY, TK_CONFIG_ANCHOR, + TK_CONFIG_SYNONYM, TK_CONFIG_CAP_STYLE, TK_CONFIG_JOIN_STYLE, + TK_CONFIG_PIXELS, TK_CONFIG_MM, TK_CONFIG_WINDOW, TK_CONFIG_CUSTOM, + TK_CONFIG_END +} Tk_ConfigTypes; + +/* + * Possible values for flags argument to Tk_ConfigureWidget: + */ + +#define TK_CONFIG_ARGV_ONLY 1 +#define TK_CONFIG_OBJS 0x80 + +/* + * Possible flag values for Tk_ConfigSpec structures. Any bits at or above + * TK_CONFIG_USER_BIT may be used by clients for selecting certain entries. + * Before changing any values here, coordinate with tkOldConfig.c + * (internal-use-only flags are defined there). + */ + +#define TK_CONFIG_NULL_OK (1 << 0) +#define TK_CONFIG_COLOR_ONLY (1 << 1) +#define TK_CONFIG_MONO_ONLY (1 << 2) +#define TK_CONFIG_DONT_SET_DEFAULT (1 << 3) +#define TK_CONFIG_OPTION_SPECIFIED (1 << 4) +#define TK_CONFIG_USER_BIT 0x100 +#endif /* __NO_OLD_CONFIG */ + +/* + * Structure used to specify how to handle argv options. + */ + +typedef struct { + char *key; /* The key string that flags the option in the + * argv array. */ + int type; /* Indicates option type; see below. */ + char *src; /* Value to be used in setting dst; usage + * depends on type. */ + char *dst; /* Address of value to be modified; usage + * depends on type. */ + char *help; /* Documentation message describing this + * option. */ +} Tk_ArgvInfo; + +/* + * Legal values for the type field of a Tk_ArgvInfo: see the user + * documentation for details. + */ + +#define TK_ARGV_CONSTANT 15 +#define TK_ARGV_INT 16 +#define TK_ARGV_STRING 17 +#define TK_ARGV_UID 18 +#define TK_ARGV_REST 19 +#define TK_ARGV_FLOAT 20 +#define TK_ARGV_FUNC 21 +#define TK_ARGV_GENFUNC 22 +#define TK_ARGV_HELP 23 +#define TK_ARGV_CONST_OPTION 24 +#define TK_ARGV_OPTION_VALUE 25 +#define TK_ARGV_OPTION_NAME_VALUE 26 +#define TK_ARGV_END 27 + +/* + * Flag bits for passing to Tk_ParseArgv: + */ + +#define TK_ARGV_NO_DEFAULTS 0x1 +#define TK_ARGV_NO_LEFTOVERS 0x2 +#define TK_ARGV_NO_ABBREV 0x4 +#define TK_ARGV_DONT_SKIP_FIRST_ARG 0x8 + +/* + * Enumerated type for describing actions to be taken in response to a + * restrictProc established by Tk_RestrictEvents. + */ + +typedef enum { + TK_DEFER_EVENT, TK_PROCESS_EVENT, TK_DISCARD_EVENT +} Tk_RestrictAction; + +/* + * Priority levels to pass to Tk_AddOption: + */ + +#define TK_WIDGET_DEFAULT_PRIO 20 +#define TK_STARTUP_FILE_PRIO 40 +#define TK_USER_DEFAULT_PRIO 60 +#define TK_INTERACTIVE_PRIO 80 +#define TK_MAX_PRIO 100 + +/* + * Relief values returned by Tk_GetRelief: + */ + +#define TK_RELIEF_NULL -1 +#define TK_RELIEF_FLAT 0 +#define TK_RELIEF_GROOVE 1 +#define TK_RELIEF_RAISED 2 +#define TK_RELIEF_RIDGE 3 +#define TK_RELIEF_SOLID 4 +#define TK_RELIEF_SUNKEN 5 + +/* + * "Which" argument values for Tk_3DBorderGC: + */ + +#define TK_3D_FLAT_GC 1 +#define TK_3D_LIGHT_GC 2 +#define TK_3D_DARK_GC 3 + +/* + * Special EnterNotify/LeaveNotify "mode" for use in events generated by + * tkShare.c. Pick a high enough value that it's unlikely to conflict with + * existing values (like NotifyNormal) or any new values defined in the + * future. + */ + +#define TK_NOTIFY_SHARE 20 + +/* + * Enumerated type for describing a point by which to anchor something: + */ + +typedef enum { + TK_ANCHOR_N, TK_ANCHOR_NE, TK_ANCHOR_E, TK_ANCHOR_SE, + TK_ANCHOR_S, TK_ANCHOR_SW, TK_ANCHOR_W, TK_ANCHOR_NW, + TK_ANCHOR_CENTER +} Tk_Anchor; + +/* + * Enumerated type for describing a style of justification: + */ + +typedef enum { + TK_JUSTIFY_LEFT, TK_JUSTIFY_RIGHT, TK_JUSTIFY_CENTER +} Tk_Justify; + +/* + * The following structure is used by Tk_GetFontMetrics() to return + * information about the properties of a Tk_Font. + */ + +typedef struct Tk_FontMetrics { + int ascent; /* The amount in pixels that the tallest + * letter sticks up above the baseline, plus + * any extra blank space added by the designer + * of the font. */ + int descent; /* The largest amount in pixels that any + * letter sticks below the baseline, plus any + * extra blank space added by the designer of + * the font. */ + int linespace; /* The sum of the ascent and descent. How far + * apart two lines of text in the same font + * should be placed so that none of the + * characters in one line overlap any of the + * characters in the other line. */ +} Tk_FontMetrics; + +/* + * Flags passed to Tk_MeasureChars: + */ + +#define TK_WHOLE_WORDS 1 +#define TK_AT_LEAST_ONE 2 +#define TK_PARTIAL_OK 4 + +/* + * Flags passed to Tk_ComputeTextLayout: + */ + +#define TK_IGNORE_TABS 8 +#define TK_IGNORE_NEWLINES 16 + +/* + * Widget class procedures used to implement platform specific widget + * behavior. + */ + +typedef Window (Tk_ClassCreateProc) _ANSI_ARGS_((Tk_Window tkwin, + Window parent, ClientData instanceData)); +typedef void (Tk_ClassWorldChangedProc) _ANSI_ARGS_((ClientData instanceData)); +typedef void (Tk_ClassModalProc) _ANSI_ARGS_((Tk_Window tkwin, + XEvent *eventPtr)); + +typedef struct Tk_ClassProcs { + unsigned int size; + Tk_ClassWorldChangedProc *worldChangedProc; + /* Procedure to invoke when the widget needs + * to respond in some way to a change in the + * world (font changes, etc.) */ + Tk_ClassCreateProc *createProc; + /* Procedure to invoke when the platform- + * dependent window needs to be created. */ + Tk_ClassModalProc *modalProc; + /* Procedure to invoke after all bindings on a + * widget have been triggered in order to + * handle a modal loop. */ +} Tk_ClassProcs; + +/* + * Simple accessor for Tk_ClassProcs structure. Checks that the structure is + * not NULL, then checks the size field and returns either the requested + * field, if present, or NULL if the structure is too small to have the field + * (or NULL if the structure is NULL). + * + * A more general version of this function may be useful if other + * size-versioned structure pop up in the future: + * + * #define Tk_GetField(name, who, which) \ + * (((who) == NULL) ? NULL : + * (((who)->size <= Tk_Offset(name, which)) ? NULL :(name)->which)) + */ + +#define Tk_GetClassProc(procs, which) \ + (((procs) == NULL) ? NULL : \ + (((procs)->size <= Tk_Offset(Tk_ClassProcs, which)) ? NULL:(procs)->which)) + +/* + * Each geometry manager (the packer, the placer, etc.) is represented by a + * structure of the following form, which indicates procedures to invoke in + * the geometry manager to carry out certain functions. + */ + +typedef void (Tk_GeomRequestProc) _ANSI_ARGS_((ClientData clientData, + Tk_Window tkwin)); +typedef void (Tk_GeomLostSlaveProc) _ANSI_ARGS_((ClientData clientData, + Tk_Window tkwin)); + +typedef struct Tk_GeomMgr { + const char *name; /* Name of the geometry manager (command used + * to invoke it, or name of widget class that + * allows embedded widgets). */ + Tk_GeomRequestProc *requestProc; + /* Procedure to invoke when a slave's + * requested geometry changes. */ + Tk_GeomLostSlaveProc *lostSlaveProc; + /* Procedure to invoke when a slave is taken + * away from one geometry manager by another. + * NULL means geometry manager doesn't care + * when slaves are lost. */ +} Tk_GeomMgr; + +/* + * Result values returned by Tk_GetScrollInfo: + */ + +#define TK_SCROLL_MOVETO 1 +#define TK_SCROLL_PAGES 2 +#define TK_SCROLL_UNITS 3 +#define TK_SCROLL_ERROR 4 + +/* + *--------------------------------------------------------------------------- + * + * Extensions to the X event set + * + *--------------------------------------------------------------------------- + */ + +#define VirtualEvent (MappingNotify + 1) +#define ActivateNotify (MappingNotify + 2) +#define DeactivateNotify (MappingNotify + 3) +#define MouseWheelEvent (MappingNotify + 4) +#define TK_LASTEVENT (MappingNotify + 5) + +#define MouseWheelMask (1L << 28) +#define ActivateMask (1L << 29) +#define VirtualEventMask (1L << 30) + +/* + * A virtual event shares most of its fields with the XKeyEvent and + * XButtonEvent structures. 99% of the time a virtual event will be an + * abstraction of a key or button event, so this structure provides the most + * information to the user. The only difference is the changing of the detail + * field for a virtual event so that it holds the name of the virtual event + * being triggered. + * + * When using this structure, you should ensure that you zero out all the + * fields first using memset() or bzero(). + */ + +typedef struct { + int type; + unsigned long serial; /* # of last request processed by server. */ + Bool send_event; /* True if this came from a SendEvent + * request. */ + Display *display; /* Display the event was read from. */ + Window event; /* Window on which event was requested. */ + Window root; /* Root window that the event occured on. */ + Window subwindow; /* Child window. */ + Time time; /* Milliseconds. */ + int x, y; /* Pointer x, y coordinates in event + * window. */ + int x_root, y_root; /* Coordinates relative to root. */ + unsigned int state; /* Key or button mask */ + Tk_Uid name; /* Name of virtual event. */ + Bool same_screen; /* Same screen flag. */ + Tcl_Obj *user_data; /* Application-specific data reference; Tk + * will decrement the reference count *once* + * when it has finished processing the + * event. */ +} XVirtualEvent; + +typedef struct { + int type; + unsigned long serial; /* # of last request processed by server. */ + Bool send_event; /* True if this came from a SendEvent + * request. */ + Display *display; /* Display the event was read from. */ + Window window; /* Window in which event occurred. */ +} XActivateDeactivateEvent; +typedef XActivateDeactivateEvent XActivateEvent; +typedef XActivateDeactivateEvent XDeactivateEvent; + +/* + *-------------------------------------------------------------- + * + * Macros for querying Tk_Window structures. See the manual entries for + * documentation. + * + *-------------------------------------------------------------- + */ + +#define Tk_Display(tkwin) (((Tk_FakeWin *) (tkwin))->display) +#define Tk_ScreenNumber(tkwin) (((Tk_FakeWin *) (tkwin))->screenNum) +#define Tk_Screen(tkwin) \ + (ScreenOfDisplay(Tk_Display(tkwin), Tk_ScreenNumber(tkwin))) +#define Tk_Depth(tkwin) (((Tk_FakeWin *) (tkwin))->depth) +#define Tk_Visual(tkwin) (((Tk_FakeWin *) (tkwin))->visual) +#define Tk_WindowId(tkwin) (((Tk_FakeWin *) (tkwin))->window) +#define Tk_PathName(tkwin) (((Tk_FakeWin *) (tkwin))->pathName) +#define Tk_Name(tkwin) (((Tk_FakeWin *) (tkwin))->nameUid) +#define Tk_Class(tkwin) (((Tk_FakeWin *) (tkwin))->classUid) +#define Tk_X(tkwin) (((Tk_FakeWin *) (tkwin))->changes.x) +#define Tk_Y(tkwin) (((Tk_FakeWin *) (tkwin))->changes.y) +#define Tk_Width(tkwin) (((Tk_FakeWin *) (tkwin))->changes.width) +#define Tk_Height(tkwin) \ + (((Tk_FakeWin *) (tkwin))->changes.height) +#define Tk_Changes(tkwin) (&((Tk_FakeWin *) (tkwin))->changes) +#define Tk_Attributes(tkwin) (&((Tk_FakeWin *) (tkwin))->atts) +#define Tk_IsEmbedded(tkwin) \ + (((Tk_FakeWin *) (tkwin))->flags & TK_EMBEDDED) +#define Tk_IsContainer(tkwin) \ + (((Tk_FakeWin *) (tkwin))->flags & TK_CONTAINER) +#define Tk_IsMapped(tkwin) \ + (((Tk_FakeWin *) (tkwin))->flags & TK_MAPPED) +#define Tk_IsTopLevel(tkwin) \ + (((Tk_FakeWin *) (tkwin))->flags & TK_TOP_LEVEL) +#define Tk_HasWrapper(tkwin) \ + (((Tk_FakeWin *) (tkwin))->flags & TK_HAS_WRAPPER) +#define Tk_WinManaged(tkwin) \ + (((Tk_FakeWin *) (tkwin))->flags & TK_WIN_MANAGED) +#define Tk_TopWinHierarchy(tkwin) \ + (((Tk_FakeWin *) (tkwin))->flags & TK_TOP_HIERARCHY) +#define Tk_IsManageable(tkwin) \ + (((Tk_FakeWin *) (tkwin))->flags & TK_WM_MANAGEABLE) +#define Tk_ReqWidth(tkwin) (((Tk_FakeWin *) (tkwin))->reqWidth) +#define Tk_ReqHeight(tkwin) (((Tk_FakeWin *) (tkwin))->reqHeight) +/* Tk_InternalBorderWidth is deprecated */ +#define Tk_InternalBorderWidth(tkwin) \ + (((Tk_FakeWin *) (tkwin))->internalBorderLeft) +#define Tk_InternalBorderLeft(tkwin) \ + (((Tk_FakeWin *) (tkwin))->internalBorderLeft) +#define Tk_InternalBorderRight(tkwin) \ + (((Tk_FakeWin *) (tkwin))->internalBorderRight) +#define Tk_InternalBorderTop(tkwin) \ + (((Tk_FakeWin *) (tkwin))->internalBorderTop) +#define Tk_InternalBorderBottom(tkwin) \ + (((Tk_FakeWin *) (tkwin))->internalBorderBottom) +#define Tk_MinReqWidth(tkwin) (((Tk_FakeWin *) (tkwin))->minReqWidth) +#define Tk_MinReqHeight(tkwin) (((Tk_FakeWin *) (tkwin))->minReqHeight) +#define Tk_Parent(tkwin) (((Tk_FakeWin *) (tkwin))->parentPtr) +#define Tk_Colormap(tkwin) (((Tk_FakeWin *) (tkwin))->atts.colormap) + +/* + * The structure below is needed by the macros above so that they can access + * the fields of a Tk_Window. The fields not needed by the macros are declared + * as "dummyX". The structure has its own type in order to prevent apps from + * accessing Tk_Window fields except using official macros. WARNING!! The + * structure definition must be kept consistent with the TkWindow structure in + * tkInt.h. If you change one, then change the other. See the declaration in + * tkInt.h for documentation on what the fields are used for internally. + */ + +typedef struct Tk_FakeWin { + Display *display; + char *dummy1; /* dispPtr */ + int screenNum; + Visual *visual; + int depth; + Window window; + char *dummy2; /* childList */ + char *dummy3; /* lastChildPtr */ + Tk_Window parentPtr; /* parentPtr */ + char *dummy4; /* nextPtr */ + char *dummy5; /* mainPtr */ + char *pathName; + Tk_Uid nameUid; + Tk_Uid classUid; + XWindowChanges changes; + unsigned int dummy6; /* dirtyChanges */ + XSetWindowAttributes atts; + unsigned long dummy7; /* dirtyAtts */ + unsigned int flags; + char *dummy8; /* handlerList */ +#ifdef TK_USE_INPUT_METHODS + XIC dummy9; /* inputContext */ +#endif /* TK_USE_INPUT_METHODS */ + ClientData *dummy10; /* tagPtr */ + int dummy11; /* numTags */ + int dummy12; /* optionLevel */ + char *dummy13; /* selHandlerList */ + char *dummy14; /* geomMgrPtr */ + ClientData dummy15; /* geomData */ + int reqWidth, reqHeight; + int internalBorderLeft; + char *dummy16; /* wmInfoPtr */ + char *dummy17; /* classProcPtr */ + ClientData dummy18; /* instanceData */ + char *dummy19; /* privatePtr */ + int internalBorderRight; + int internalBorderTop; + int internalBorderBottom; + int minReqWidth; + int minReqHeight; +} Tk_FakeWin; + +/* + * Flag values for TkWindow (and Tk_FakeWin) structures are: + * + * TK_MAPPED: 1 means window is currently mapped, + * 0 means unmapped. + * TK_TOP_LEVEL: 1 means this is a top-level widget. + * TK_ALREADY_DEAD: 1 means the window is in the process of + * being destroyed already. + * TK_NEED_CONFIG_NOTIFY: 1 means that the window has been reconfigured + * before it was made to exist. At the time of + * making it exist a ConfigureNotify event needs + * to be generated. + * TK_GRAB_FLAG: Used to manage grabs. See tkGrab.c for details + * TK_CHECKED_IC: 1 means we've already tried to get an input + * context for this window; if the ic field is + * NULL it means that there isn't a context for + * the field. + * TK_DONT_DESTROY_WINDOW: 1 means that Tk_DestroyWindow should not + * invoke XDestroyWindow to destroy this widget's + * X window. The flag is set when the window has + * already been destroyed elsewhere (e.g. by + * another application) or when it will be + * destroyed later (e.g. by destroying its parent) + * TK_WM_COLORMAP_WINDOW: 1 means that this window has at some time + * appeared in the WM_COLORMAP_WINDOWS property + * for its toplevel, so we have to remove it from + * that property if the window is deleted and the + * toplevel isn't. + * TK_EMBEDDED: 1 means that this window (which must be a + * toplevel) is not a free-standing window but + * rather is embedded in some other application. + * TK_CONTAINER: 1 means that this window is a container, and + * that some other application (either in this + * process or elsewhere) may be embedding itself + * inside the window. + * TK_BOTH_HALVES: 1 means that this window is used for + * application embedding (either as container or + * embedded application), and both the containing + * and embedded halves are associated with + * windows in this particular process. + * TK_DEFER_MODAL: 1 means that this window has deferred a modal + * loop until all of the bindings for the current + * event have been invoked. + * TK_WRAPPER: 1 means that this window is the extra wrapper + * window created around a toplevel to hold the + * menubar under Unix. See tkUnixWm.c for more + * information. + * TK_REPARENTED: 1 means that this window has been reparented + * so that as far as the window system is + * concerned it isn't a child of its Tk parent. + * Initially this is used only for special Unix + * menubar windows. + * TK_ANONYMOUS_WINDOW: 1 means that this window has no name, and is + * thus not accessible from Tk. + * TK_HAS_WRAPPER 1 means that this window has a wrapper window + * TK_WIN_MANAGED 1 means that this window is a child of the root + * window, and is managed by the window manager. + * TK_TOP_HIERARCHY 1 means this window is at the top of a physical + * window hierarchy within this process, i.e. the + * window's parent either doesn't exist or is not + * owned by this Tk application. + * TK_PROP_PROPCHANGE 1 means that PropertyNotify events in the + * window's children should propagate up to this + * window. + * TK_WM_MANAGEABLE 1 marks a window as capable of being converted + * into a toplevel using [wm manage]. + */ + +#define TK_MAPPED 1 +#define TK_TOP_LEVEL 2 +#define TK_ALREADY_DEAD 4 +#define TK_NEED_CONFIG_NOTIFY 8 +#define TK_GRAB_FLAG 0x10 +#define TK_CHECKED_IC 0x20 +#define TK_DONT_DESTROY_WINDOW 0x40 +#define TK_WM_COLORMAP_WINDOW 0x80 +#define TK_EMBEDDED 0x100 +#define TK_CONTAINER 0x200 +#define TK_BOTH_HALVES 0x400 +#define TK_DEFER_MODAL 0x800 +#define TK_WRAPPER 0x1000 +#define TK_REPARENTED 0x2000 +#define TK_ANONYMOUS_WINDOW 0x4000 +#define TK_HAS_WRAPPER 0x8000 +#define TK_WIN_MANAGED 0x10000 +#define TK_TOP_HIERARCHY 0x20000 +#define TK_PROP_PROPCHANGE 0x40000 +#define TK_WM_MANAGEABLE 0x80000 + +/* + *-------------------------------------------------------------- + * + * Procedure prototypes and structures used for defining new canvas items: + * + *-------------------------------------------------------------- + */ + +typedef enum { + TK_STATE_NULL = -1, TK_STATE_ACTIVE, TK_STATE_DISABLED, + TK_STATE_NORMAL, TK_STATE_HIDDEN +} Tk_State; + +typedef struct Tk_SmoothMethod { + char *name; + int (*coordProc) _ANSI_ARGS_((Tk_Canvas canvas, + double *pointPtr, int numPoints, int numSteps, + XPoint xPoints[], double dblPoints[])); + void (*postscriptProc) _ANSI_ARGS_((Tcl_Interp *interp, + Tk_Canvas canvas, double *coordPtr, + int numPoints, int numSteps)); +} Tk_SmoothMethod; + +/* + * For each item in a canvas widget there exists one record with the following + * structure. Each actual item is represented by a record with the following + * stuff at its beginning, plus additional type-specific stuff after that. + */ + +#define TK_TAG_SPACE 3 + +typedef struct Tk_Item { + int id; /* Unique identifier for this item (also + * serves as first tag for item). */ + struct Tk_Item *nextPtr; /* Next in display list of all items in this + * canvas. Later items in list are drawn on + * top of earlier ones. */ + Tk_Uid staticTagSpace[TK_TAG_SPACE]; + /* Built-in space for limited # of tags. */ + Tk_Uid *tagPtr; /* Pointer to array of tags. Usually points to + * staticTagSpace, but may point to malloc-ed + * space if there are lots of tags. */ + int tagSpace; /* Total amount of tag space available at + * tagPtr. */ + int numTags; /* Number of tag slots actually used at + * *tagPtr. */ + struct Tk_ItemType *typePtr;/* Table of procedures that implement this + * type of item. */ + int x1, y1, x2, y2; /* Bounding box for item, in integer canvas + * units. Set by item-specific code and + * guaranteed to contain every pixel drawn in + * item. Item area includes x1 and y1 but not + * x2 and y2. */ + struct Tk_Item *prevPtr; /* Previous in display list of all items in + * this canvas. Later items in list are drawn + * just below earlier ones. */ + Tk_State state; /* State of item. */ + char *reserved1; /* reserved for future use */ + int redraw_flags; /* Some flags used in the canvas */ + + /* + *------------------------------------------------------------------ + * Starting here is additional type-specific stuff; see the declarations + * for individual types to see what is part of each type. The actual space + * below is determined by the "itemInfoSize" of the type's Tk_ItemType + * record. + *------------------------------------------------------------------ + */ +} Tk_Item; + +/* + * Flag bits for canvases (redraw_flags): + * + * TK_ITEM_STATE_DEPENDANT - 1 means that object needs to be redrawn if the + * canvas state changes. + * TK_ITEM_DONT_REDRAW - 1 means that the object redraw is already been + * prepared, so the general canvas code doesn't + * need to do that any more. + */ + +#define TK_ITEM_STATE_DEPENDANT 1 +#define TK_ITEM_DONT_REDRAW 2 + +/* + * Records of the following type are used to describe a type of item (e.g. + * lines, circles, etc.) that can form part of a canvas widget. + */ + +#ifdef USE_OLD_CANVAS +typedef int Tk_ItemCreateProc _ANSI_ARGS_((Tcl_Interp *interp, + Tk_Canvas canvas, Tk_Item *itemPtr, int argc, + char **argv)); +typedef int Tk_ItemConfigureProc _ANSI_ARGS_((Tcl_Interp *interp, + Tk_Canvas canvas, Tk_Item *itemPtr, int argc, + char **argv, int flags)); +typedef int Tk_ItemCoordProc _ANSI_ARGS_((Tcl_Interp *interp, + Tk_Canvas canvas, Tk_Item *itemPtr, int argc, + char **argv)); +#else +typedef int Tk_ItemCreateProc _ANSI_ARGS_((Tcl_Interp *interp, + Tk_Canvas canvas, Tk_Item *itemPtr, int argc, + Tcl_Obj *const objv[])); +typedef int Tk_ItemConfigureProc _ANSI_ARGS_((Tcl_Interp *interp, + Tk_Canvas canvas, Tk_Item *itemPtr, int argc, + Tcl_Obj *const objv[], int flags)); +typedef int Tk_ItemCoordProc _ANSI_ARGS_((Tcl_Interp *interp, + Tk_Canvas canvas, Tk_Item *itemPtr, int argc, + Tcl_Obj *const argv[])); +#endif +typedef void Tk_ItemDeleteProc _ANSI_ARGS_((Tk_Canvas canvas, + Tk_Item *itemPtr, Display *display)); +typedef void Tk_ItemDisplayProc _ANSI_ARGS_((Tk_Canvas canvas, + Tk_Item *itemPtr, Display *display, Drawable dst, + int x, int y, int width, int height)); +typedef double Tk_ItemPointProc _ANSI_ARGS_((Tk_Canvas canvas, + Tk_Item *itemPtr, double *pointPtr)); +typedef int Tk_ItemAreaProc _ANSI_ARGS_((Tk_Canvas canvas, + Tk_Item *itemPtr, double *rectPtr)); +typedef int Tk_ItemPostscriptProc _ANSI_ARGS_((Tcl_Interp *interp, + Tk_Canvas canvas, Tk_Item *itemPtr, int prepass)); +typedef void Tk_ItemScaleProc _ANSI_ARGS_((Tk_Canvas canvas, + Tk_Item *itemPtr, double originX, double originY, + double scaleX, double scaleY)); +typedef void Tk_ItemTranslateProc _ANSI_ARGS_((Tk_Canvas canvas, + Tk_Item *itemPtr, double deltaX, double deltaY)); +typedef int Tk_ItemIndexProc _ANSI_ARGS_((Tcl_Interp *interp, + Tk_Canvas canvas, Tk_Item *itemPtr, char *indexString, + int *indexPtr)); +typedef void Tk_ItemCursorProc _ANSI_ARGS_((Tk_Canvas canvas, + Tk_Item *itemPtr, int index)); +typedef int Tk_ItemSelectionProc _ANSI_ARGS_((Tk_Canvas canvas, + Tk_Item *itemPtr, int offset, char *buffer, + int maxBytes)); +typedef void Tk_ItemInsertProc _ANSI_ARGS_((Tk_Canvas canvas, + Tk_Item *itemPtr, int beforeThis, char *string)); +typedef void Tk_ItemDCharsProc _ANSI_ARGS_((Tk_Canvas canvas, + Tk_Item *itemPtr, int first, int last)); + +#ifndef __NO_OLD_CONFIG + +typedef struct Tk_ItemType { + char *name; /* The name of this type of item, such as + * "line". */ + int itemSize; /* Total amount of space needed for item's + * record. */ + Tk_ItemCreateProc *createProc; + /* Procedure to create a new item of this + * type. */ + Tk_ConfigSpec *configSpecs; /* Pointer to array of configuration specs for + * this type. Used for returning configuration + * info. */ + Tk_ItemConfigureProc *configProc; + /* Procedure to call to change configuration + * options. */ + Tk_ItemCoordProc *coordProc;/* Procedure to call to get and set the item's + * coordinates. */ + Tk_ItemDeleteProc *deleteProc; + /* Procedure to delete existing item of this + * type. */ + Tk_ItemDisplayProc *displayProc; + /* Procedure to display items of this type. */ + int alwaysRedraw; /* Non-zero means displayProc should be called + * even when the item has been moved + * off-screen. */ + Tk_ItemPointProc *pointProc;/* Computes distance from item to a given + * point. */ + Tk_ItemAreaProc *areaProc; /* Computes whether item is inside, outside, + * or overlapping an area. */ + Tk_ItemPostscriptProc *postscriptProc; + /* Procedure to write a Postscript description + * for items of this type. */ + Tk_ItemScaleProc *scaleProc;/* Procedure to rescale items of this type. */ + Tk_ItemTranslateProc *translateProc; + /* Procedure to translate items of this + * type. */ + Tk_ItemIndexProc *indexProc;/* Procedure to determine index of indicated + * character. NULL if item doesn't support + * indexing. */ + Tk_ItemCursorProc *icursorProc; + /* Procedure to set insert cursor posn to just + * before a given position. */ + Tk_ItemSelectionProc *selectionProc; + /* Procedure to return selection (in STRING + * format) when it is in this item. */ + Tk_ItemInsertProc *insertProc; + /* Procedure to insert something into an + * item. */ + Tk_ItemDCharsProc *dCharsProc; + /* Procedure to delete characters from an + * item. */ + struct Tk_ItemType *nextPtr;/* Used to link types together into a list. */ + char *reserved1; /* Reserved for future extension. */ + int reserved2; /* Carefully compatible with */ + char *reserved3; /* Jan Nijtmans dash patch */ + char *reserved4; +} Tk_ItemType; + +#endif + +/* + * The following structure provides information about the selection and the + * insertion cursor. It is needed by only a few items, such as those that + * display text. It is shared by the generic canvas code and the item-specific + * code, but most of the fields should be written only by the canvas generic + * code. + */ + +typedef struct Tk_CanvasTextInfo { + Tk_3DBorder selBorder; /* Border and background for selected + * characters. Read-only to items.*/ + int selBorderWidth; /* Width of border around selection. Read-only + * to items. */ + XColor *selFgColorPtr; /* Foreground color for selected text. + * Read-only to items. */ + Tk_Item *selItemPtr; /* Pointer to selected item. NULL means + * selection isn't in this canvas. Writable by + * items. */ + int selectFirst; /* Character index of first selected + * character. Writable by items. */ + int selectLast; /* Character index of last selected character. + * Writable by items. */ + Tk_Item *anchorItemPtr; /* Item corresponding to "selectAnchor": not + * necessarily selItemPtr. Read-only to + * items. */ + int selectAnchor; /* Character index of fixed end of selection + * (i.e. "select to" operation will use this + * as one end of the selection). Writable by + * items. */ + Tk_3DBorder insertBorder; /* Used to draw vertical bar for insertion + * cursor. Read-only to items. */ + int insertWidth; /* Total width of insertion cursor. Read-only + * to items. */ + int insertBorderWidth; /* Width of 3-D border around insert cursor. + * Read-only to items. */ + Tk_Item *focusItemPtr; /* Item that currently has the input focus, or + * NULL if no such item. Read-only to items. */ + int gotFocus; /* Non-zero means that the canvas widget has + * the input focus. Read-only to items.*/ + int cursorOn; /* Non-zero means that an insertion cursor + * should be displayed in focusItemPtr. + * Read-only to items.*/ +} Tk_CanvasTextInfo; + +/* + * Structures used for Dashing and Outline. + */ + +typedef struct Tk_Dash { + int number; + union { + char *pt; + char array[sizeof(char *)]; + } pattern; +} Tk_Dash; + +typedef struct Tk_TSOffset { + int flags; /* Flags; see below for possible values */ + int xoffset; /* x offset */ + int yoffset; /* y offset */ +} Tk_TSOffset; + +/* + * Bit fields in Tk_Offset->flags: + */ + +#define TK_OFFSET_INDEX 1 +#define TK_OFFSET_RELATIVE 2 +#define TK_OFFSET_LEFT 4 +#define TK_OFFSET_CENTER 8 +#define TK_OFFSET_RIGHT 16 +#define TK_OFFSET_TOP 32 +#define TK_OFFSET_MIDDLE 64 +#define TK_OFFSET_BOTTOM 128 + +typedef struct Tk_Outline { + GC gc; /* Graphics context. */ + double width; /* Width of outline. */ + double activeWidth; /* Width of outline. */ + double disabledWidth; /* Width of outline. */ + int offset; /* Dash offset. */ + Tk_Dash dash; /* Dash pattern. */ + Tk_Dash activeDash; /* Dash pattern if state is active. */ + Tk_Dash disabledDash; /* Dash pattern if state is disabled. */ + VOID *reserved1; /* Reserved for future expansion. */ + VOID *reserved2; + VOID *reserved3; + Tk_TSOffset tsoffset; /* Stipple offset for outline. */ + XColor *color; /* Outline color. */ + XColor *activeColor; /* Outline color if state is active. */ + XColor *disabledColor; /* Outline color if state is disabled. */ + Pixmap stipple; /* Outline Stipple pattern. */ + Pixmap activeStipple; /* Outline Stipple pattern if state is + * active. */ + Pixmap disabledStipple; /* Outline Stipple pattern if state is + * disabled. */ +} Tk_Outline; + +/* + *-------------------------------------------------------------- + * + * Procedure prototypes and structures used for managing images: + * + *-------------------------------------------------------------- + */ + +typedef struct Tk_ImageType Tk_ImageType; +#ifdef USE_OLD_IMAGE +typedef int (Tk_ImageCreateProc) _ANSI_ARGS_((Tcl_Interp *interp, + char *name, int argc, char **argv, Tk_ImageType *typePtr, + Tk_ImageMaster master, ClientData *masterDataPtr)); +#else +typedef int (Tk_ImageCreateProc) _ANSI_ARGS_((Tcl_Interp *interp, + char *name, int objc, Tcl_Obj *const objv[], Tk_ImageType *typePtr, + Tk_ImageMaster master, ClientData *masterDataPtr)); +#endif +typedef ClientData (Tk_ImageGetProc) _ANSI_ARGS_((Tk_Window tkwin, + ClientData masterData)); +typedef void (Tk_ImageDisplayProc) _ANSI_ARGS_((ClientData instanceData, + Display *display, Drawable drawable, int imageX, int imageY, + int width, int height, int drawableX, int drawableY)); +typedef void (Tk_ImageFreeProc) _ANSI_ARGS_((ClientData instanceData, + Display *display)); +typedef void (Tk_ImageDeleteProc) _ANSI_ARGS_((ClientData masterData)); +typedef void (Tk_ImageChangedProc) _ANSI_ARGS_((ClientData clientData, + int x, int y, int width, int height, int imageWidth, + int imageHeight)); +typedef int (Tk_ImagePostscriptProc) _ANSI_ARGS_((ClientData clientData, + Tcl_Interp *interp, Tk_Window tkwin, Tk_PostscriptInfo psinfo, + int x, int y, int width, int height, int prepass)); + +/* + * The following structure represents a particular type of image (bitmap, xpm + * image, etc.). It provides information common to all images of that type, + * such as the type name and a collection of procedures in the image manager + * that respond to various events. Each image manager is represented by one of + * these structures. + */ + +struct Tk_ImageType { + char *name; /* Name of image type. */ + Tk_ImageCreateProc *createProc; + /* Procedure to call to create a new image of + * this type. */ + Tk_ImageGetProc *getProc; /* Procedure to call the first time + * Tk_GetImage is called in a new way (new + * visual or screen). */ + Tk_ImageDisplayProc *displayProc; + /* Call to draw image, in response to + * Tk_RedrawImage calls. */ + Tk_ImageFreeProc *freeProc; /* Procedure to call whenever Tk_FreeImage is + * called to release an instance of an + * image. */ + Tk_ImageDeleteProc *deleteProc; + /* Procedure to call to delete image. It will + * not be called until after freeProc has been + * called for each instance of the image. */ + Tk_ImagePostscriptProc *postscriptProc; + /* Procedure to call to produce postscript + * output for the image. */ + struct Tk_ImageType *nextPtr; + /* Next in list of all image types currently + * known. Filled in by Tk, not by image + * manager. */ + char *reserved; /* reserved for future expansion */ +}; + +/* + *-------------------------------------------------------------- + * + * Additional definitions used to manage images of type "photo". + * + *-------------------------------------------------------------- + */ + +/* + * The following type is used to identify a particular photo image to be + * manipulated: + */ + +typedef void *Tk_PhotoHandle; + +/* + * The following structure describes a block of pixels in memory: + */ + +typedef struct Tk_PhotoImageBlock { + unsigned char *pixelPtr; /* Pointer to the first pixel. */ + int width; /* Width of block, in pixels. */ + int height; /* Height of block, in pixels. */ + int pitch; /* Address difference between corresponding + * pixels in successive lines. */ + int pixelSize; /* Address difference between successive + * pixels in the same line. */ + int offset[4]; /* Address differences between the red, green, + * blue and alpha components of the pixel and + * the pixel as a whole. */ +} Tk_PhotoImageBlock; + +/* + * The following values control how blocks are combined into photo images when + * the alpha component of a pixel is not 255, a.k.a. the compositing rule. + */ + +#define TK_PHOTO_COMPOSITE_OVERLAY 0 +#define TK_PHOTO_COMPOSITE_SET 1 + +/* + * Procedure prototypes and structures used in reading and writing photo + * images: + */ + +typedef struct Tk_PhotoImageFormat Tk_PhotoImageFormat; +#ifdef USE_OLD_IMAGE +typedef int (Tk_ImageFileMatchProc) _ANSI_ARGS_((Tcl_Channel chan, + char *fileName, char *formatString, int *widthPtr, int *heightPtr)); +typedef int (Tk_ImageStringMatchProc) _ANSI_ARGS_((char *string, + char *formatString, int *widthPtr, int *heightPtr)); +typedef int (Tk_ImageFileReadProc) _ANSI_ARGS_((Tcl_Interp *interp, + Tcl_Channel chan, char *fileName, char *formatString, + Tk_PhotoHandle imageHandle, int destX, int destY, + int width, int height, int srcX, int srcY)); +typedef int (Tk_ImageStringReadProc) _ANSI_ARGS_((Tcl_Interp *interp, + char *string, char *formatString, Tk_PhotoHandle imageHandle, + int destX, int destY, int width, int height, int srcX, int srcY)); +typedef int (Tk_ImageFileWriteProc) _ANSI_ARGS_((Tcl_Interp *interp, + char *fileName, char *formatString, Tk_PhotoImageBlock *blockPtr)); +typedef int (Tk_ImageStringWriteProc) _ANSI_ARGS_((Tcl_Interp *interp, + Tcl_DString *dataPtr, char *formatString, + Tk_PhotoImageBlock *blockPtr)); +#else +typedef int (Tk_ImageFileMatchProc) _ANSI_ARGS_((Tcl_Channel chan, + const char *fileName, Tcl_Obj *format, int *widthPtr, + int *heightPtr, Tcl_Interp *interp)); +typedef int (Tk_ImageStringMatchProc) _ANSI_ARGS_((Tcl_Obj *dataObj, + Tcl_Obj *format, int *widthPtr, int *heightPtr, + Tcl_Interp *interp)); +typedef int (Tk_ImageFileReadProc) _ANSI_ARGS_((Tcl_Interp *interp, + Tcl_Channel chan, const char *fileName, Tcl_Obj *format, + Tk_PhotoHandle imageHandle, int destX, int destY, + int width, int height, int srcX, int srcY)); +typedef int (Tk_ImageStringReadProc) _ANSI_ARGS_((Tcl_Interp *interp, + Tcl_Obj *dataObj, Tcl_Obj *format, Tk_PhotoHandle imageHandle, + int destX, int destY, int width, int height, int srcX, int srcY)); +typedef int (Tk_ImageFileWriteProc) _ANSI_ARGS_((Tcl_Interp *interp, + const char *fileName, Tcl_Obj *format, Tk_PhotoImageBlock *blockPtr)); +typedef int (Tk_ImageStringWriteProc) _ANSI_ARGS_((Tcl_Interp *interp, + Tcl_Obj *format, Tk_PhotoImageBlock *blockPtr)); +#endif + +/* + * The following structure represents a particular file format for storing + * images (e.g., PPM, GIF, JPEG, etc.). It provides information to allow image + * files of that format to be recognized and read into a photo image. + */ + +struct Tk_PhotoImageFormat { + char *name; /* Name of image file format */ + Tk_ImageFileMatchProc *fileMatchProc; + /* Procedure to call to determine whether an + * image file matches this format. */ + Tk_ImageStringMatchProc *stringMatchProc; + /* Procedure to call to determine whether the + * data in a string matches this format. */ + Tk_ImageFileReadProc *fileReadProc; + /* Procedure to call to read data from an + * image file into a photo image. */ + Tk_ImageStringReadProc *stringReadProc; + /* Procedure to call to read data from a + * string into a photo image. */ + Tk_ImageFileWriteProc *fileWriteProc; + /* Procedure to call to write data from a + * photo image to a file. */ + Tk_ImageStringWriteProc *stringWriteProc; + /* Procedure to call to obtain a string + * representation of the data in a photo + * image.*/ + struct Tk_PhotoImageFormat *nextPtr; + /* Next in list of all photo image formats + * currently known. Filled in by Tk, not by + * image format handler. */ +}; + +#ifdef USE_OLD_IMAGE +#define Tk_CreateImageType Tk_CreateOldImageType +#define Tk_CreatePhotoImageFormat Tk_CreateOldPhotoImageFormat +#endif + +/* + *-------------------------------------------------------------- + * + * Procedure prototypes and structures used for managing styles: + * + *-------------------------------------------------------------- + */ + +/* + * Style support version tag. + */ + +#define TK_STYLE_VERSION_1 0x1 +#define TK_STYLE_VERSION TK_STYLE_VERSION_1 + +/* + * The following structures and prototypes are used as static templates to + * declare widget elements. + */ + +typedef void (Tk_GetElementSizeProc) _ANSI_ARGS_((ClientData clientData, + char *recordPtr, const Tk_OptionSpec **optionsPtr, Tk_Window tkwin, + int width, int height, int inner, int *widthPtr, int *heightPtr)); +typedef void (Tk_GetElementBoxProc) _ANSI_ARGS_((ClientData clientData, + char *recordPtr, const Tk_OptionSpec **optionsPtr, Tk_Window tkwin, + int x, int y, int width, int height, int inner, int *xPtr, int *yPtr, + int *widthPtr, int *heightPtr)); +typedef int (Tk_GetElementBorderWidthProc) _ANSI_ARGS_((ClientData clientData, + char *recordPtr, const Tk_OptionSpec **optionsPtr, Tk_Window tkwin)); +typedef void (Tk_DrawElementProc) _ANSI_ARGS_((ClientData clientData, + char *recordPtr, const Tk_OptionSpec **optionsPtr, Tk_Window tkwin, + Drawable d, int x, int y, int width, int height, int state)); + +typedef struct Tk_ElementOptionSpec { + char *name; /* Name of the required option. */ + Tk_OptionType type; /* Accepted option type. TK_OPTION_END means + * any. */ +} Tk_ElementOptionSpec; + +typedef struct Tk_ElementSpec { + int version; /* Version of the style support. */ + char *name; /* Name of element. */ + Tk_ElementOptionSpec *options; + /* List of required options. Last one's name + * must be NULL. */ + Tk_GetElementSizeProc *getSize; + /* Compute the external (resp. internal) size + * of the element from its desired internal + * (resp. external) size. */ + Tk_GetElementBoxProc *getBox; + /* Compute the inscribed or bounding boxes + * within a given area. */ + Tk_GetElementBorderWidthProc *getBorderWidth; + /* Return the element's internal border width. + * Mostly useful for widgets. */ + Tk_DrawElementProc *draw; /* Draw the element in the given bounding + * box. */ +} Tk_ElementSpec; + +/* + * Element state flags. Can be OR'ed. + */ + +#define TK_ELEMENT_STATE_ACTIVE 1<<0 +#define TK_ELEMENT_STATE_DISABLED 1<<1 +#define TK_ELEMENT_STATE_FOCUS 1<<2 +#define TK_ELEMENT_STATE_PRESSED 1<<3 + +/* + *-------------------------------------------------------------- + * + * The definitions below provide backward compatibility for functions and + * types related to event handling that used to be in Tk but have moved to + * Tcl. + * + *-------------------------------------------------------------- + */ + +#define TK_READABLE TCL_READABLE +#define TK_WRITABLE TCL_WRITABLE +#define TK_EXCEPTION TCL_EXCEPTION + +#define TK_DONT_WAIT TCL_DONT_WAIT +#define TK_X_EVENTS TCL_WINDOW_EVENTS +#define TK_WINDOW_EVENTS TCL_WINDOW_EVENTS +#define TK_FILE_EVENTS TCL_FILE_EVENTS +#define TK_TIMER_EVENTS TCL_TIMER_EVENTS +#define TK_IDLE_EVENTS TCL_IDLE_EVENTS +#define TK_ALL_EVENTS TCL_ALL_EVENTS + +#define Tk_IdleProc Tcl_IdleProc +#define Tk_FileProc Tcl_FileProc +#define Tk_TimerProc Tcl_TimerProc +#define Tk_TimerToken Tcl_TimerToken + +#define Tk_BackgroundError Tcl_BackgroundError +#define Tk_CancelIdleCall Tcl_CancelIdleCall +#define Tk_CreateFileHandler Tcl_CreateFileHandler +#define Tk_CreateTimerHandler Tcl_CreateTimerHandler +#define Tk_DeleteFileHandler Tcl_DeleteFileHandler +#define Tk_DeleteTimerHandler Tcl_DeleteTimerHandler +#define Tk_DoOneEvent Tcl_DoOneEvent +#define Tk_DoWhenIdle Tcl_DoWhenIdle +#define Tk_Sleep Tcl_Sleep + +/* Additional stuff that has moved to Tcl: */ + +#define Tk_EventuallyFree Tcl_EventuallyFree +#define Tk_FreeProc Tcl_FreeProc +#define Tk_Preserve Tcl_Preserve +#define Tk_Release Tcl_Release + +/* Removed Tk_Main, use macro instead */ +#define Tk_Main(argc, argv, proc) \ + Tk_MainEx(argc, argv, proc, Tcl_CreateInterp()) + +const char * Tk_InitStubs _ANSI_ARGS_((Tcl_Interp *interp, + const char *version, int exact)); +EXTERN const char * Tk_PkgInitStubsCheck _ANSI_ARGS_((Tcl_Interp *interp, + const char *version, int exact)); + +#ifndef USE_TK_STUBS + +#define Tk_InitStubs(interp, version, exact) \ + Tk_PkgInitStubsCheck(interp, version, exact) + +#endif + +#define Tk_InitImageArgs(interp, argc, argv) /**/ + + +/* + *-------------------------------------------------------------- + * + * Additional procedure types defined by Tk. + * + *-------------------------------------------------------------- + */ + +typedef int (Tk_ErrorProc) _ANSI_ARGS_((ClientData clientData, + XErrorEvent *errEventPtr)); +typedef void (Tk_EventProc) _ANSI_ARGS_((ClientData clientData, + XEvent *eventPtr)); +typedef int (Tk_GenericProc) _ANSI_ARGS_((ClientData clientData, + XEvent *eventPtr)); +typedef int (Tk_ClientMessageProc) _ANSI_ARGS_((Tk_Window tkwin, + XEvent *eventPtr)); +typedef int (Tk_GetSelProc) _ANSI_ARGS_((ClientData clientData, + Tcl_Interp *interp, char *portion)); +typedef void (Tk_LostSelProc) _ANSI_ARGS_((ClientData clientData)); +typedef Tk_RestrictAction (Tk_RestrictProc) _ANSI_ARGS_(( + ClientData clientData, XEvent *eventPtr)); +typedef int (Tk_SelectionProc) _ANSI_ARGS_((ClientData clientData, + int offset, char *buffer, int maxBytes)); + +/* + *-------------------------------------------------------------- + * + * Platform independant exported procedures and variables. + * + *-------------------------------------------------------------- + */ + +#include "tkDecls.h" + +/* + * Allow users to say that they don't want to alter their source to add extra + * arguments to Tk_PhotoPutBlock() et al; DO NOT DEFINE THIS WHEN BUILDING TK. + * + * This goes after the inclusion of the stubbed-decls so that the declarations + * of what is actually there can be correct. + */ + +#ifdef USE_COMPOSITELESS_PHOTO_PUT_BLOCK +# ifdef Tk_PhotoPutBlock +# undef Tk_PhotoPutBlock +# endif +# define Tk_PhotoPutBlock Tk_PhotoPutBlock_NoComposite +# ifdef Tk_PhotoPutZoomedBlock +# undef Tk_PhotoPutZoomedBlock +# endif +# define Tk_PhotoPutZoomedBlock Tk_PhotoPutZoomedBlock_NoComposite +# define USE_PANIC_ON_PHOTO_ALLOC_FAILURE +#else /* !USE_COMPOSITELESS_PHOTO_PUT_BLOCK */ +# ifdef USE_PANIC_ON_PHOTO_ALLOC_FAILURE +# ifdef Tk_PhotoPutBlock +# undef Tk_PhotoPutBlock +# endif +# define Tk_PhotoPutBlock Tk_PhotoPutBlock_Panic +# ifdef Tk_PhotoPutZoomedBlock +# undef Tk_PhotoPutZoomedBlock +# endif +# define Tk_PhotoPutZoomedBlock Tk_PhotoPutZoomedBlock_Panic +# endif /* USE_PANIC_ON_PHOTO_ALLOC_FAILURE */ +#endif /* USE_COMPOSITELESS_PHOTO_PUT_BLOCK */ +#ifdef USE_PANIC_ON_PHOTO_ALLOC_FAILURE +# ifdef Tk_PhotoExpand +# undef Tk_PhotoExpand +# endif +# define Tk_PhotoExpand Tk_PhotoExpand_Panic +# ifdef Tk_PhotoSetSize +# undef Tk_PhotoSetSize +# endif +# define Tk_PhotoSetSize Tk_PhotoSetSize_Panic +#endif /* USE_PANIC_ON_PHOTO_ALLOC_FAILURE */ + +/* + * Tcl commands exported by Tk: + */ + +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLIMPORT + +#endif /* RC_INVOKED */ + +/* + * end block for C++ + */ + +#ifdef __cplusplus +} +#endif + +#endif /* _TK */ + +/* + * Local Variables: + * mode: c + * c-basic-offset: 4 + * fill-column: 78 + * End: + */ diff --git a/cobroutines/tkDecls.h b/cobroutines/tkDecls.h new file mode 100644 index 0000000..4071501 --- /dev/null +++ b/cobroutines/tkDecls.h @@ -0,0 +1,3098 @@ +/* + * tkDecls.h -- + * + * Declarations of functions in the platform independent public Tcl API. + * + * Copyright (c) 1998-1999 by Scriptics Corporation. + * + * See the file "license.terms" for information on usage and redistribution + * of this file, and for a DISCLAIMER OF ALL WARRANTIES. + * + * RCS: @(#) $Id: tkDecls.h,v 1.30 2007/05/14 20:58:26 dgp Exp $ + */ + +#ifndef _TKDECLS +#define _TKDECLS + +#ifdef BUILD_tk +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLEXPORT +#endif + +/* + * WARNING: This file is automatically generated by the tools/genStubs.tcl + * script. Any modifications to the function declarations below should be made + * in the generic/tk.decls script. + */ + +/* !BEGIN!: Do not edit below this line. */ + +/* + * Exported function declarations: + */ + +#ifndef Tk_MainLoop_TCL_DECLARED +#define Tk_MainLoop_TCL_DECLARED +/* 0 */ +EXTERN void Tk_MainLoop (void); +#endif +#ifndef Tk_3DBorderColor_TCL_DECLARED +#define Tk_3DBorderColor_TCL_DECLARED +/* 1 */ +EXTERN XColor * Tk_3DBorderColor (Tk_3DBorder border); +#endif +#ifndef Tk_3DBorderGC_TCL_DECLARED +#define Tk_3DBorderGC_TCL_DECLARED +/* 2 */ +EXTERN GC Tk_3DBorderGC (Tk_Window tkwin, Tk_3DBorder border, + int which); +#endif +#ifndef Tk_3DHorizontalBevel_TCL_DECLARED +#define Tk_3DHorizontalBevel_TCL_DECLARED +/* 3 */ +EXTERN void Tk_3DHorizontalBevel (Tk_Window tkwin, + Drawable drawable, Tk_3DBorder border, int x, + int y, int width, int height, int leftIn, + int rightIn, int topBevel, int relief); +#endif +#ifndef Tk_3DVerticalBevel_TCL_DECLARED +#define Tk_3DVerticalBevel_TCL_DECLARED +/* 4 */ +EXTERN void Tk_3DVerticalBevel (Tk_Window tkwin, + Drawable drawable, Tk_3DBorder border, int x, + int y, int width, int height, int leftBevel, + int relief); +#endif +#ifndef Tk_AddOption_TCL_DECLARED +#define Tk_AddOption_TCL_DECLARED +/* 5 */ +EXTERN void Tk_AddOption (Tk_Window tkwin, CONST char * name, + CONST char * value, int priority); +#endif +#ifndef Tk_BindEvent_TCL_DECLARED +#define Tk_BindEvent_TCL_DECLARED +/* 6 */ +EXTERN void Tk_BindEvent (Tk_BindingTable bindingTable, + XEvent * eventPtr, Tk_Window tkwin, + int numObjects, ClientData * objectPtr); +#endif +#ifndef Tk_CanvasDrawableCoords_TCL_DECLARED +#define Tk_CanvasDrawableCoords_TCL_DECLARED +/* 7 */ +EXTERN void Tk_CanvasDrawableCoords (Tk_Canvas canvas, double x, + double y, short * drawableXPtr, + short * drawableYPtr); +#endif +#ifndef Tk_CanvasEventuallyRedraw_TCL_DECLARED +#define Tk_CanvasEventuallyRedraw_TCL_DECLARED +/* 8 */ +EXTERN void Tk_CanvasEventuallyRedraw (Tk_Canvas canvas, int x1, + int y1, int x2, int y2); +#endif +#ifndef Tk_CanvasGetCoord_TCL_DECLARED +#define Tk_CanvasGetCoord_TCL_DECLARED +/* 9 */ +EXTERN int Tk_CanvasGetCoord (Tcl_Interp * interp, + Tk_Canvas canvas, CONST char * str, + double * doublePtr); +#endif +#ifndef Tk_CanvasGetTextInfo_TCL_DECLARED +#define Tk_CanvasGetTextInfo_TCL_DECLARED +/* 10 */ +EXTERN Tk_CanvasTextInfo * Tk_CanvasGetTextInfo (Tk_Canvas canvas); +#endif +#ifndef Tk_CanvasPsBitmap_TCL_DECLARED +#define Tk_CanvasPsBitmap_TCL_DECLARED +/* 11 */ +EXTERN int Tk_CanvasPsBitmap (Tcl_Interp * interp, + Tk_Canvas canvas, Pixmap bitmap, int x, + int y, int width, int height); +#endif +#ifndef Tk_CanvasPsColor_TCL_DECLARED +#define Tk_CanvasPsColor_TCL_DECLARED +/* 12 */ +EXTERN int Tk_CanvasPsColor (Tcl_Interp * interp, + Tk_Canvas canvas, XColor * colorPtr); +#endif +#ifndef Tk_CanvasPsFont_TCL_DECLARED +#define Tk_CanvasPsFont_TCL_DECLARED +/* 13 */ +EXTERN int Tk_CanvasPsFont (Tcl_Interp * interp, + Tk_Canvas canvas, Tk_Font font); +#endif +#ifndef Tk_CanvasPsPath_TCL_DECLARED +#define Tk_CanvasPsPath_TCL_DECLARED +/* 14 */ +EXTERN void Tk_CanvasPsPath (Tcl_Interp * interp, + Tk_Canvas canvas, double * coordPtr, + int numPoints); +#endif +#ifndef Tk_CanvasPsStipple_TCL_DECLARED +#define Tk_CanvasPsStipple_TCL_DECLARED +/* 15 */ +EXTERN int Tk_CanvasPsStipple (Tcl_Interp * interp, + Tk_Canvas canvas, Pixmap bitmap); +#endif +#ifndef Tk_CanvasPsY_TCL_DECLARED +#define Tk_CanvasPsY_TCL_DECLARED +/* 16 */ +EXTERN double Tk_CanvasPsY (Tk_Canvas canvas, double y); +#endif +#ifndef Tk_CanvasSetStippleOrigin_TCL_DECLARED +#define Tk_CanvasSetStippleOrigin_TCL_DECLARED +/* 17 */ +EXTERN void Tk_CanvasSetStippleOrigin (Tk_Canvas canvas, GC gc); +#endif +#ifndef Tk_CanvasTagsParseProc_TCL_DECLARED +#define Tk_CanvasTagsParseProc_TCL_DECLARED +/* 18 */ +EXTERN int Tk_CanvasTagsParseProc (ClientData clientData, + Tcl_Interp * interp, Tk_Window tkwin, + CONST char * value, char * widgRec, + int offset); +#endif +#ifndef Tk_CanvasTagsPrintProc_TCL_DECLARED +#define Tk_CanvasTagsPrintProc_TCL_DECLARED +/* 19 */ +EXTERN char * Tk_CanvasTagsPrintProc (ClientData clientData, + Tk_Window tkwin, char * widgRec, int offset, + Tcl_FreeProc ** freeProcPtr); +#endif +#ifndef Tk_CanvasTkwin_TCL_DECLARED +#define Tk_CanvasTkwin_TCL_DECLARED +/* 20 */ +EXTERN Tk_Window Tk_CanvasTkwin (Tk_Canvas canvas); +#endif +#ifndef Tk_CanvasWindowCoords_TCL_DECLARED +#define Tk_CanvasWindowCoords_TCL_DECLARED +/* 21 */ +EXTERN void Tk_CanvasWindowCoords (Tk_Canvas canvas, double x, + double y, short * screenXPtr, + short * screenYPtr); +#endif +#ifndef Tk_ChangeWindowAttributes_TCL_DECLARED +#define Tk_ChangeWindowAttributes_TCL_DECLARED +/* 22 */ +EXTERN void Tk_ChangeWindowAttributes (Tk_Window tkwin, + unsigned long valueMask, + XSetWindowAttributes * attsPtr); +#endif +#ifndef Tk_CharBbox_TCL_DECLARED +#define Tk_CharBbox_TCL_DECLARED +/* 23 */ +EXTERN int Tk_CharBbox (Tk_TextLayout layout, int index, + int * xPtr, int * yPtr, int * widthPtr, + int * heightPtr); +#endif +#ifndef Tk_ClearSelection_TCL_DECLARED +#define Tk_ClearSelection_TCL_DECLARED +/* 24 */ +EXTERN void Tk_ClearSelection (Tk_Window tkwin, Atom selection); +#endif +#ifndef Tk_ClipboardAppend_TCL_DECLARED +#define Tk_ClipboardAppend_TCL_DECLARED +/* 25 */ +EXTERN int Tk_ClipboardAppend (Tcl_Interp * interp, + Tk_Window tkwin, Atom target, Atom format, + char* buffer); +#endif +#ifndef Tk_ClipboardClear_TCL_DECLARED +#define Tk_ClipboardClear_TCL_DECLARED +/* 26 */ +EXTERN int Tk_ClipboardClear (Tcl_Interp * interp, + Tk_Window tkwin); +#endif +#ifndef Tk_ConfigureInfo_TCL_DECLARED +#define Tk_ConfigureInfo_TCL_DECLARED +/* 27 */ +EXTERN int Tk_ConfigureInfo (Tcl_Interp * interp, + Tk_Window tkwin, Tk_ConfigSpec * specs, + char * widgRec, CONST char * argvName, + int flags); +#endif +#ifndef Tk_ConfigureValue_TCL_DECLARED +#define Tk_ConfigureValue_TCL_DECLARED +/* 28 */ +EXTERN int Tk_ConfigureValue (Tcl_Interp * interp, + Tk_Window tkwin, Tk_ConfigSpec * specs, + char * widgRec, CONST char * argvName, + int flags); +#endif +#ifndef Tk_ConfigureWidget_TCL_DECLARED +#define Tk_ConfigureWidget_TCL_DECLARED +/* 29 */ +EXTERN int Tk_ConfigureWidget (Tcl_Interp * interp, + Tk_Window tkwin, Tk_ConfigSpec * specs, + int argc, CONST84 char ** argv, + char * widgRec, int flags); +#endif +#ifndef Tk_ConfigureWindow_TCL_DECLARED +#define Tk_ConfigureWindow_TCL_DECLARED +/* 30 */ +EXTERN void Tk_ConfigureWindow (Tk_Window tkwin, + unsigned int valueMask, + XWindowChanges * valuePtr); +#endif +#ifndef Tk_ComputeTextLayout_TCL_DECLARED +#define Tk_ComputeTextLayout_TCL_DECLARED +/* 31 */ +EXTERN Tk_TextLayout Tk_ComputeTextLayout (Tk_Font font, CONST char * str, + int numChars, int wrapLength, + Tk_Justify justify, int flags, + int * widthPtr, int * heightPtr); +#endif +#ifndef Tk_CoordsToWindow_TCL_DECLARED +#define Tk_CoordsToWindow_TCL_DECLARED +/* 32 */ +EXTERN Tk_Window Tk_CoordsToWindow (int rootX, int rootY, + Tk_Window tkwin); +#endif +#ifndef Tk_CreateBinding_TCL_DECLARED +#define Tk_CreateBinding_TCL_DECLARED +/* 33 */ +EXTERN unsigned long Tk_CreateBinding (Tcl_Interp * interp, + Tk_BindingTable bindingTable, + ClientData object, CONST char * eventStr, + CONST char * command, int append); +#endif +#ifndef Tk_CreateBindingTable_TCL_DECLARED +#define Tk_CreateBindingTable_TCL_DECLARED +/* 34 */ +EXTERN Tk_BindingTable Tk_CreateBindingTable (Tcl_Interp * interp); +#endif +#ifndef Tk_CreateErrorHandler_TCL_DECLARED +#define Tk_CreateErrorHandler_TCL_DECLARED +/* 35 */ +EXTERN Tk_ErrorHandler Tk_CreateErrorHandler (Display * display, int errNum, + int request, int minorCode, + Tk_ErrorProc * errorProc, + ClientData clientData); +#endif +#ifndef Tk_CreateEventHandler_TCL_DECLARED +#define Tk_CreateEventHandler_TCL_DECLARED +/* 36 */ +EXTERN void Tk_CreateEventHandler (Tk_Window token, + unsigned long mask, Tk_EventProc * proc, + ClientData clientData); +#endif +#ifndef Tk_CreateGenericHandler_TCL_DECLARED +#define Tk_CreateGenericHandler_TCL_DECLARED +/* 37 */ +EXTERN void Tk_CreateGenericHandler (Tk_GenericProc * proc, + ClientData clientData); +#endif +#ifndef Tk_CreateImageType_TCL_DECLARED +#define Tk_CreateImageType_TCL_DECLARED +/* 38 */ +EXTERN void Tk_CreateImageType (Tk_ImageType * typePtr); +#endif +#ifndef Tk_CreateItemType_TCL_DECLARED +#define Tk_CreateItemType_TCL_DECLARED +/* 39 */ +EXTERN void Tk_CreateItemType (Tk_ItemType * typePtr); +#endif +#ifndef Tk_CreatePhotoImageFormat_TCL_DECLARED +#define Tk_CreatePhotoImageFormat_TCL_DECLARED +/* 40 */ +EXTERN void Tk_CreatePhotoImageFormat ( + Tk_PhotoImageFormat * formatPtr); +#endif +#ifndef Tk_CreateSelHandler_TCL_DECLARED +#define Tk_CreateSelHandler_TCL_DECLARED +/* 41 */ +EXTERN void Tk_CreateSelHandler (Tk_Window tkwin, Atom selection, + Atom target, Tk_SelectionProc * proc, + ClientData clientData, Atom format); +#endif +#ifndef Tk_CreateWindow_TCL_DECLARED +#define Tk_CreateWindow_TCL_DECLARED +/* 42 */ +EXTERN Tk_Window Tk_CreateWindow (Tcl_Interp * interp, + Tk_Window parent, CONST char * name, + CONST char * screenName); +#endif +#ifndef Tk_CreateWindowFromPath_TCL_DECLARED +#define Tk_CreateWindowFromPath_TCL_DECLARED +/* 43 */ +EXTERN Tk_Window Tk_CreateWindowFromPath (Tcl_Interp * interp, + Tk_Window tkwin, CONST char * pathName, + CONST char * screenName); +#endif +#ifndef Tk_DefineBitmap_TCL_DECLARED +#define Tk_DefineBitmap_TCL_DECLARED +/* 44 */ +EXTERN int Tk_DefineBitmap (Tcl_Interp * interp, + CONST char * name, CONST char * source, + int width, int height); +#endif +#ifndef Tk_DefineCursor_TCL_DECLARED +#define Tk_DefineCursor_TCL_DECLARED +/* 45 */ +EXTERN void Tk_DefineCursor (Tk_Window window, Tk_Cursor cursor); +#endif +#ifndef Tk_DeleteAllBindings_TCL_DECLARED +#define Tk_DeleteAllBindings_TCL_DECLARED +/* 46 */ +EXTERN void Tk_DeleteAllBindings (Tk_BindingTable bindingTable, + ClientData object); +#endif +#ifndef Tk_DeleteBinding_TCL_DECLARED +#define Tk_DeleteBinding_TCL_DECLARED +/* 47 */ +EXTERN int Tk_DeleteBinding (Tcl_Interp * interp, + Tk_BindingTable bindingTable, + ClientData object, CONST char * eventStr); +#endif +#ifndef Tk_DeleteBindingTable_TCL_DECLARED +#define Tk_DeleteBindingTable_TCL_DECLARED +/* 48 */ +EXTERN void Tk_DeleteBindingTable (Tk_BindingTable bindingTable); +#endif +#ifndef Tk_DeleteErrorHandler_TCL_DECLARED +#define Tk_DeleteErrorHandler_TCL_DECLARED +/* 49 */ +EXTERN void Tk_DeleteErrorHandler (Tk_ErrorHandler handler); +#endif +#ifndef Tk_DeleteEventHandler_TCL_DECLARED +#define Tk_DeleteEventHandler_TCL_DECLARED +/* 50 */ +EXTERN void Tk_DeleteEventHandler (Tk_Window token, + unsigned long mask, Tk_EventProc * proc, + ClientData clientData); +#endif +#ifndef Tk_DeleteGenericHandler_TCL_DECLARED +#define Tk_DeleteGenericHandler_TCL_DECLARED +/* 51 */ +EXTERN void Tk_DeleteGenericHandler (Tk_GenericProc * proc, + ClientData clientData); +#endif +#ifndef Tk_DeleteImage_TCL_DECLARED +#define Tk_DeleteImage_TCL_DECLARED +/* 52 */ +EXTERN void Tk_DeleteImage (Tcl_Interp * interp, + CONST char * name); +#endif +#ifndef Tk_DeleteSelHandler_TCL_DECLARED +#define Tk_DeleteSelHandler_TCL_DECLARED +/* 53 */ +EXTERN void Tk_DeleteSelHandler (Tk_Window tkwin, Atom selection, + Atom target); +#endif +#ifndef Tk_DestroyWindow_TCL_DECLARED +#define Tk_DestroyWindow_TCL_DECLARED +/* 54 */ +EXTERN void Tk_DestroyWindow (Tk_Window tkwin); +#endif +#ifndef Tk_DisplayName_TCL_DECLARED +#define Tk_DisplayName_TCL_DECLARED +/* 55 */ +EXTERN CONST84_RETURN char * Tk_DisplayName (Tk_Window tkwin); +#endif +#ifndef Tk_DistanceToTextLayout_TCL_DECLARED +#define Tk_DistanceToTextLayout_TCL_DECLARED +/* 56 */ +EXTERN int Tk_DistanceToTextLayout (Tk_TextLayout layout, int x, + int y); +#endif +#ifndef Tk_Draw3DPolygon_TCL_DECLARED +#define Tk_Draw3DPolygon_TCL_DECLARED +/* 57 */ +EXTERN void Tk_Draw3DPolygon (Tk_Window tkwin, Drawable drawable, + Tk_3DBorder border, XPoint * pointPtr, + int numPoints, int borderWidth, + int leftRelief); +#endif +#ifndef Tk_Draw3DRectangle_TCL_DECLARED +#define Tk_Draw3DRectangle_TCL_DECLARED +/* 58 */ +EXTERN void Tk_Draw3DRectangle (Tk_Window tkwin, + Drawable drawable, Tk_3DBorder border, int x, + int y, int width, int height, + int borderWidth, int relief); +#endif +#ifndef Tk_DrawChars_TCL_DECLARED +#define Tk_DrawChars_TCL_DECLARED +/* 59 */ +EXTERN void Tk_DrawChars (Display * display, Drawable drawable, + GC gc, Tk_Font tkfont, CONST char * source, + int numBytes, int x, int y); +#endif +#ifndef Tk_DrawFocusHighlight_TCL_DECLARED +#define Tk_DrawFocusHighlight_TCL_DECLARED +/* 60 */ +EXTERN void Tk_DrawFocusHighlight (Tk_Window tkwin, GC gc, + int width, Drawable drawable); +#endif +#ifndef Tk_DrawTextLayout_TCL_DECLARED +#define Tk_DrawTextLayout_TCL_DECLARED +/* 61 */ +EXTERN void Tk_DrawTextLayout (Display * display, + Drawable drawable, GC gc, + Tk_TextLayout layout, int x, int y, + int firstChar, int lastChar); +#endif +#ifndef Tk_Fill3DPolygon_TCL_DECLARED +#define Tk_Fill3DPolygon_TCL_DECLARED +/* 62 */ +EXTERN void Tk_Fill3DPolygon (Tk_Window tkwin, Drawable drawable, + Tk_3DBorder border, XPoint * pointPtr, + int numPoints, int borderWidth, + int leftRelief); +#endif +#ifndef Tk_Fill3DRectangle_TCL_DECLARED +#define Tk_Fill3DRectangle_TCL_DECLARED +/* 63 */ +EXTERN void Tk_Fill3DRectangle (Tk_Window tkwin, + Drawable drawable, Tk_3DBorder border, int x, + int y, int width, int height, + int borderWidth, int relief); +#endif +#ifndef Tk_FindPhoto_TCL_DECLARED +#define Tk_FindPhoto_TCL_DECLARED +/* 64 */ +EXTERN Tk_PhotoHandle Tk_FindPhoto (Tcl_Interp * interp, + CONST char * imageName); +#endif +#ifndef Tk_FontId_TCL_DECLARED +#define Tk_FontId_TCL_DECLARED +/* 65 */ +EXTERN Font Tk_FontId (Tk_Font font); +#endif +#ifndef Tk_Free3DBorder_TCL_DECLARED +#define Tk_Free3DBorder_TCL_DECLARED +/* 66 */ +EXTERN void Tk_Free3DBorder (Tk_3DBorder border); +#endif +#ifndef Tk_FreeBitmap_TCL_DECLARED +#define Tk_FreeBitmap_TCL_DECLARED +/* 67 */ +EXTERN void Tk_FreeBitmap (Display * display, Pixmap bitmap); +#endif +#ifndef Tk_FreeColor_TCL_DECLARED +#define Tk_FreeColor_TCL_DECLARED +/* 68 */ +EXTERN void Tk_FreeColor (XColor * colorPtr); +#endif +#ifndef Tk_FreeColormap_TCL_DECLARED +#define Tk_FreeColormap_TCL_DECLARED +/* 69 */ +EXTERN void Tk_FreeColormap (Display * display, + Colormap colormap); +#endif +#ifndef Tk_FreeCursor_TCL_DECLARED +#define Tk_FreeCursor_TCL_DECLARED +/* 70 */ +EXTERN void Tk_FreeCursor (Display * display, Tk_Cursor cursor); +#endif +#ifndef Tk_FreeFont_TCL_DECLARED +#define Tk_FreeFont_TCL_DECLARED +/* 71 */ +EXTERN void Tk_FreeFont (Tk_Font f); +#endif +#ifndef Tk_FreeGC_TCL_DECLARED +#define Tk_FreeGC_TCL_DECLARED +/* 72 */ +EXTERN void Tk_FreeGC (Display * display, GC gc); +#endif +#ifndef Tk_FreeImage_TCL_DECLARED +#define Tk_FreeImage_TCL_DECLARED +/* 73 */ +EXTERN void Tk_FreeImage (Tk_Image image); +#endif +#ifndef Tk_FreeOptions_TCL_DECLARED +#define Tk_FreeOptions_TCL_DECLARED +/* 74 */ +EXTERN void Tk_FreeOptions (Tk_ConfigSpec * specs, + char * widgRec, Display * display, + int needFlags); +#endif +#ifndef Tk_FreePixmap_TCL_DECLARED +#define Tk_FreePixmap_TCL_DECLARED +/* 75 */ +EXTERN void Tk_FreePixmap (Display * display, Pixmap pixmap); +#endif +#ifndef Tk_FreeTextLayout_TCL_DECLARED +#define Tk_FreeTextLayout_TCL_DECLARED +/* 76 */ +EXTERN void Tk_FreeTextLayout (Tk_TextLayout textLayout); +#endif +#ifndef Tk_FreeXId_TCL_DECLARED +#define Tk_FreeXId_TCL_DECLARED +/* 77 */ +EXTERN void Tk_FreeXId (Display * display, XID xid); +#endif +#ifndef Tk_GCForColor_TCL_DECLARED +#define Tk_GCForColor_TCL_DECLARED +/* 78 */ +EXTERN GC Tk_GCForColor (XColor * colorPtr, Drawable drawable); +#endif +#ifndef Tk_GeometryRequest_TCL_DECLARED +#define Tk_GeometryRequest_TCL_DECLARED +/* 79 */ +EXTERN void Tk_GeometryRequest (Tk_Window tkwin, int reqWidth, + int reqHeight); +#endif +#ifndef Tk_Get3DBorder_TCL_DECLARED +#define Tk_Get3DBorder_TCL_DECLARED +/* 80 */ +EXTERN Tk_3DBorder Tk_Get3DBorder (Tcl_Interp * interp, Tk_Window tkwin, + Tk_Uid colorName); +#endif +#ifndef Tk_GetAllBindings_TCL_DECLARED +#define Tk_GetAllBindings_TCL_DECLARED +/* 81 */ +EXTERN void Tk_GetAllBindings (Tcl_Interp * interp, + Tk_BindingTable bindingTable, + ClientData object); +#endif +#ifndef Tk_GetAnchor_TCL_DECLARED +#define Tk_GetAnchor_TCL_DECLARED +/* 82 */ +EXTERN int Tk_GetAnchor (Tcl_Interp * interp, CONST char * str, + Tk_Anchor * anchorPtr); +#endif +#ifndef Tk_GetAtomName_TCL_DECLARED +#define Tk_GetAtomName_TCL_DECLARED +/* 83 */ +EXTERN CONST84_RETURN char * Tk_GetAtomName (Tk_Window tkwin, Atom atom); +#endif +#ifndef Tk_GetBinding_TCL_DECLARED +#define Tk_GetBinding_TCL_DECLARED +/* 84 */ +EXTERN CONST84_RETURN char * Tk_GetBinding (Tcl_Interp * interp, + Tk_BindingTable bindingTable, + ClientData object, CONST char * eventStr); +#endif +#ifndef Tk_GetBitmap_TCL_DECLARED +#define Tk_GetBitmap_TCL_DECLARED +/* 85 */ +EXTERN Pixmap Tk_GetBitmap (Tcl_Interp * interp, Tk_Window tkwin, + CONST char * str); +#endif +#ifndef Tk_GetBitmapFromData_TCL_DECLARED +#define Tk_GetBitmapFromData_TCL_DECLARED +/* 86 */ +EXTERN Pixmap Tk_GetBitmapFromData (Tcl_Interp * interp, + Tk_Window tkwin, CONST char * source, + int width, int height); +#endif +#ifndef Tk_GetCapStyle_TCL_DECLARED +#define Tk_GetCapStyle_TCL_DECLARED +/* 87 */ +EXTERN int Tk_GetCapStyle (Tcl_Interp * interp, + CONST char * str, int * capPtr); +#endif +#ifndef Tk_GetColor_TCL_DECLARED +#define Tk_GetColor_TCL_DECLARED +/* 88 */ +EXTERN XColor * Tk_GetColor (Tcl_Interp * interp, Tk_Window tkwin, + Tk_Uid name); +#endif +#ifndef Tk_GetColorByValue_TCL_DECLARED +#define Tk_GetColorByValue_TCL_DECLARED +/* 89 */ +EXTERN XColor * Tk_GetColorByValue (Tk_Window tkwin, + XColor * colorPtr); +#endif +#ifndef Tk_GetColormap_TCL_DECLARED +#define Tk_GetColormap_TCL_DECLARED +/* 90 */ +EXTERN Colormap Tk_GetColormap (Tcl_Interp * interp, Tk_Window tkwin, + CONST char * str); +#endif +#ifndef Tk_GetCursor_TCL_DECLARED +#define Tk_GetCursor_TCL_DECLARED +/* 91 */ +EXTERN Tk_Cursor Tk_GetCursor (Tcl_Interp * interp, Tk_Window tkwin, + Tk_Uid str); +#endif +#ifndef Tk_GetCursorFromData_TCL_DECLARED +#define Tk_GetCursorFromData_TCL_DECLARED +/* 92 */ +EXTERN Tk_Cursor Tk_GetCursorFromData (Tcl_Interp * interp, + Tk_Window tkwin, CONST char * source, + CONST char * mask, int width, int height, + int xHot, int yHot, Tk_Uid fg, Tk_Uid bg); +#endif +#ifndef Tk_GetFont_TCL_DECLARED +#define Tk_GetFont_TCL_DECLARED +/* 93 */ +EXTERN Tk_Font Tk_GetFont (Tcl_Interp * interp, Tk_Window tkwin, + CONST char * str); +#endif +#ifndef Tk_GetFontFromObj_TCL_DECLARED +#define Tk_GetFontFromObj_TCL_DECLARED +/* 94 */ +EXTERN Tk_Font Tk_GetFontFromObj (Tk_Window tkwin, Tcl_Obj * objPtr); +#endif +#ifndef Tk_GetFontMetrics_TCL_DECLARED +#define Tk_GetFontMetrics_TCL_DECLARED +/* 95 */ +EXTERN void Tk_GetFontMetrics (Tk_Font font, + Tk_FontMetrics * fmPtr); +#endif +#ifndef Tk_GetGC_TCL_DECLARED +#define Tk_GetGC_TCL_DECLARED +/* 96 */ +EXTERN GC Tk_GetGC (Tk_Window tkwin, unsigned long valueMask, + XGCValues * valuePtr); +#endif +#ifndef Tk_GetImage_TCL_DECLARED +#define Tk_GetImage_TCL_DECLARED +/* 97 */ +EXTERN Tk_Image Tk_GetImage (Tcl_Interp * interp, Tk_Window tkwin, + CONST char * name, + Tk_ImageChangedProc * changeProc, + ClientData clientData); +#endif +#ifndef Tk_GetImageMasterData_TCL_DECLARED +#define Tk_GetImageMasterData_TCL_DECLARED +/* 98 */ +EXTERN ClientData Tk_GetImageMasterData (Tcl_Interp * interp, + CONST char * name, + Tk_ImageType ** typePtrPtr); +#endif +#ifndef Tk_GetItemTypes_TCL_DECLARED +#define Tk_GetItemTypes_TCL_DECLARED +/* 99 */ +EXTERN Tk_ItemType * Tk_GetItemTypes (void); +#endif +#ifndef Tk_GetJoinStyle_TCL_DECLARED +#define Tk_GetJoinStyle_TCL_DECLARED +/* 100 */ +EXTERN int Tk_GetJoinStyle (Tcl_Interp * interp, + CONST char * str, int * joinPtr); +#endif +#ifndef Tk_GetJustify_TCL_DECLARED +#define Tk_GetJustify_TCL_DECLARED +/* 101 */ +EXTERN int Tk_GetJustify (Tcl_Interp * interp, CONST char * str, + Tk_Justify * justifyPtr); +#endif +#ifndef Tk_GetNumMainWindows_TCL_DECLARED +#define Tk_GetNumMainWindows_TCL_DECLARED +/* 102 */ +EXTERN int Tk_GetNumMainWindows (void); +#endif +#ifndef Tk_GetOption_TCL_DECLARED +#define Tk_GetOption_TCL_DECLARED +/* 103 */ +EXTERN Tk_Uid Tk_GetOption (Tk_Window tkwin, CONST char * name, + CONST char * className); +#endif +#ifndef Tk_GetPixels_TCL_DECLARED +#define Tk_GetPixels_TCL_DECLARED +/* 104 */ +EXTERN int Tk_GetPixels (Tcl_Interp * interp, Tk_Window tkwin, + CONST char * str, int * intPtr); +#endif +#ifndef Tk_GetPixmap_TCL_DECLARED +#define Tk_GetPixmap_TCL_DECLARED +/* 105 */ +EXTERN Pixmap Tk_GetPixmap (Display * display, Drawable d, + int width, int height, int depth); +#endif +#ifndef Tk_GetRelief_TCL_DECLARED +#define Tk_GetRelief_TCL_DECLARED +/* 106 */ +EXTERN int Tk_GetRelief (Tcl_Interp * interp, CONST char * name, + int * reliefPtr); +#endif +#ifndef Tk_GetRootCoords_TCL_DECLARED +#define Tk_GetRootCoords_TCL_DECLARED +/* 107 */ +EXTERN void Tk_GetRootCoords (Tk_Window tkwin, int * xPtr, + int * yPtr); +#endif +#ifndef Tk_GetScrollInfo_TCL_DECLARED +#define Tk_GetScrollInfo_TCL_DECLARED +/* 108 */ +EXTERN int Tk_GetScrollInfo (Tcl_Interp * interp, int argc, + CONST84 char ** argv, double * dblPtr, + int * intPtr); +#endif +#ifndef Tk_GetScreenMM_TCL_DECLARED +#define Tk_GetScreenMM_TCL_DECLARED +/* 109 */ +EXTERN int Tk_GetScreenMM (Tcl_Interp * interp, Tk_Window tkwin, + CONST char * str, double * doublePtr); +#endif +#ifndef Tk_GetSelection_TCL_DECLARED +#define Tk_GetSelection_TCL_DECLARED +/* 110 */ +EXTERN int Tk_GetSelection (Tcl_Interp * interp, + Tk_Window tkwin, Atom selection, Atom target, + Tk_GetSelProc * proc, ClientData clientData); +#endif +#ifndef Tk_GetUid_TCL_DECLARED +#define Tk_GetUid_TCL_DECLARED +/* 111 */ +EXTERN Tk_Uid Tk_GetUid (CONST char * str); +#endif +#ifndef Tk_GetVisual_TCL_DECLARED +#define Tk_GetVisual_TCL_DECLARED +/* 112 */ +EXTERN Visual * Tk_GetVisual (Tcl_Interp * interp, Tk_Window tkwin, + CONST char * str, int * depthPtr, + Colormap * colormapPtr); +#endif +#ifndef Tk_GetVRootGeometry_TCL_DECLARED +#define Tk_GetVRootGeometry_TCL_DECLARED +/* 113 */ +EXTERN void Tk_GetVRootGeometry (Tk_Window tkwin, int * xPtr, + int * yPtr, int * widthPtr, int * heightPtr); +#endif +#ifndef Tk_Grab_TCL_DECLARED +#define Tk_Grab_TCL_DECLARED +/* 114 */ +EXTERN int Tk_Grab (Tcl_Interp * interp, Tk_Window tkwin, + int grabGlobal); +#endif +#ifndef Tk_HandleEvent_TCL_DECLARED +#define Tk_HandleEvent_TCL_DECLARED +/* 115 */ +EXTERN void Tk_HandleEvent (XEvent * eventPtr); +#endif +#ifndef Tk_IdToWindow_TCL_DECLARED +#define Tk_IdToWindow_TCL_DECLARED +/* 116 */ +EXTERN Tk_Window Tk_IdToWindow (Display * display, Window window); +#endif +#ifndef Tk_ImageChanged_TCL_DECLARED +#define Tk_ImageChanged_TCL_DECLARED +/* 117 */ +EXTERN void Tk_ImageChanged (Tk_ImageMaster master, int x, int y, + int width, int height, int imageWidth, + int imageHeight); +#endif +#ifndef Tk_Init_TCL_DECLARED +#define Tk_Init_TCL_DECLARED +/* 118 */ +EXTERN int Tk_Init (Tcl_Interp * interp); +#endif +#ifndef Tk_InternAtom_TCL_DECLARED +#define Tk_InternAtom_TCL_DECLARED +/* 119 */ +EXTERN Atom Tk_InternAtom (Tk_Window tkwin, CONST char * name); +#endif +#ifndef Tk_IntersectTextLayout_TCL_DECLARED +#define Tk_IntersectTextLayout_TCL_DECLARED +/* 120 */ +EXTERN int Tk_IntersectTextLayout (Tk_TextLayout layout, int x, + int y, int width, int height); +#endif +#ifndef Tk_MaintainGeometry_TCL_DECLARED +#define Tk_MaintainGeometry_TCL_DECLARED +/* 121 */ +EXTERN void Tk_MaintainGeometry (Tk_Window slave, + Tk_Window master, int x, int y, int width, + int height); +#endif +#ifndef Tk_MainWindow_TCL_DECLARED +#define Tk_MainWindow_TCL_DECLARED +/* 122 */ +EXTERN Tk_Window Tk_MainWindow (Tcl_Interp * interp); +#endif +#ifndef Tk_MakeWindowExist_TCL_DECLARED +#define Tk_MakeWindowExist_TCL_DECLARED +/* 123 */ +EXTERN void Tk_MakeWindowExist (Tk_Window tkwin); +#endif +#ifndef Tk_ManageGeometry_TCL_DECLARED +#define Tk_ManageGeometry_TCL_DECLARED +/* 124 */ +EXTERN void Tk_ManageGeometry (Tk_Window tkwin, + CONST Tk_GeomMgr * mgrPtr, + ClientData clientData); +#endif +#ifndef Tk_MapWindow_TCL_DECLARED +#define Tk_MapWindow_TCL_DECLARED +/* 125 */ +EXTERN void Tk_MapWindow (Tk_Window tkwin); +#endif +#ifndef Tk_MeasureChars_TCL_DECLARED +#define Tk_MeasureChars_TCL_DECLARED +/* 126 */ +EXTERN int Tk_MeasureChars (Tk_Font tkfont, CONST char * source, + int numBytes, int maxPixels, int flags, + int * lengthPtr); +#endif +#ifndef Tk_MoveResizeWindow_TCL_DECLARED +#define Tk_MoveResizeWindow_TCL_DECLARED +/* 127 */ +EXTERN void Tk_MoveResizeWindow (Tk_Window tkwin, int x, int y, + int width, int height); +#endif +#ifndef Tk_MoveWindow_TCL_DECLARED +#define Tk_MoveWindow_TCL_DECLARED +/* 128 */ +EXTERN void Tk_MoveWindow (Tk_Window tkwin, int x, int y); +#endif +#ifndef Tk_MoveToplevelWindow_TCL_DECLARED +#define Tk_MoveToplevelWindow_TCL_DECLARED +/* 129 */ +EXTERN void Tk_MoveToplevelWindow (Tk_Window tkwin, int x, int y); +#endif +#ifndef Tk_NameOf3DBorder_TCL_DECLARED +#define Tk_NameOf3DBorder_TCL_DECLARED +/* 130 */ +EXTERN CONST84_RETURN char * Tk_NameOf3DBorder (Tk_3DBorder border); +#endif +#ifndef Tk_NameOfAnchor_TCL_DECLARED +#define Tk_NameOfAnchor_TCL_DECLARED +/* 131 */ +EXTERN CONST84_RETURN char * Tk_NameOfAnchor (Tk_Anchor anchor); +#endif +#ifndef Tk_NameOfBitmap_TCL_DECLARED +#define Tk_NameOfBitmap_TCL_DECLARED +/* 132 */ +EXTERN CONST84_RETURN char * Tk_NameOfBitmap (Display * display, + Pixmap bitmap); +#endif +#ifndef Tk_NameOfCapStyle_TCL_DECLARED +#define Tk_NameOfCapStyle_TCL_DECLARED +/* 133 */ +EXTERN CONST84_RETURN char * Tk_NameOfCapStyle (int cap); +#endif +#ifndef Tk_NameOfColor_TCL_DECLARED +#define Tk_NameOfColor_TCL_DECLARED +/* 134 */ +EXTERN CONST84_RETURN char * Tk_NameOfColor (XColor * colorPtr); +#endif +#ifndef Tk_NameOfCursor_TCL_DECLARED +#define Tk_NameOfCursor_TCL_DECLARED +/* 135 */ +EXTERN CONST84_RETURN char * Tk_NameOfCursor (Display * display, + Tk_Cursor cursor); +#endif +#ifndef Tk_NameOfFont_TCL_DECLARED +#define Tk_NameOfFont_TCL_DECLARED +/* 136 */ +EXTERN CONST84_RETURN char * Tk_NameOfFont (Tk_Font font); +#endif +#ifndef Tk_NameOfImage_TCL_DECLARED +#define Tk_NameOfImage_TCL_DECLARED +/* 137 */ +EXTERN CONST84_RETURN char * Tk_NameOfImage (Tk_ImageMaster imageMaster); +#endif +#ifndef Tk_NameOfJoinStyle_TCL_DECLARED +#define Tk_NameOfJoinStyle_TCL_DECLARED +/* 138 */ +EXTERN CONST84_RETURN char * Tk_NameOfJoinStyle (int join); +#endif +#ifndef Tk_NameOfJustify_TCL_DECLARED +#define Tk_NameOfJustify_TCL_DECLARED +/* 139 */ +EXTERN CONST84_RETURN char * Tk_NameOfJustify (Tk_Justify justify); +#endif +#ifndef Tk_NameOfRelief_TCL_DECLARED +#define Tk_NameOfRelief_TCL_DECLARED +/* 140 */ +EXTERN CONST84_RETURN char * Tk_NameOfRelief (int relief); +#endif +#ifndef Tk_NameToWindow_TCL_DECLARED +#define Tk_NameToWindow_TCL_DECLARED +/* 141 */ +EXTERN Tk_Window Tk_NameToWindow (Tcl_Interp * interp, + CONST char * pathName, Tk_Window tkwin); +#endif +#ifndef Tk_OwnSelection_TCL_DECLARED +#define Tk_OwnSelection_TCL_DECLARED +/* 142 */ +EXTERN void Tk_OwnSelection (Tk_Window tkwin, Atom selection, + Tk_LostSelProc * proc, ClientData clientData); +#endif +#ifndef Tk_ParseArgv_TCL_DECLARED +#define Tk_ParseArgv_TCL_DECLARED +/* 143 */ +EXTERN int Tk_ParseArgv (Tcl_Interp * interp, Tk_Window tkwin, + int * argcPtr, CONST84 char ** argv, + Tk_ArgvInfo * argTable, int flags); +#endif +#ifndef Tk_PhotoPutBlock_NoComposite_TCL_DECLARED +#define Tk_PhotoPutBlock_NoComposite_TCL_DECLARED +/* 144 */ +EXTERN void Tk_PhotoPutBlock_NoComposite (Tk_PhotoHandle handle, + Tk_PhotoImageBlock * blockPtr, int x, int y, + int width, int height); +#endif +#ifndef Tk_PhotoPutZoomedBlock_NoComposite_TCL_DECLARED +#define Tk_PhotoPutZoomedBlock_NoComposite_TCL_DECLARED +/* 145 */ +EXTERN void Tk_PhotoPutZoomedBlock_NoComposite ( + Tk_PhotoHandle handle, + Tk_PhotoImageBlock * blockPtr, int x, int y, + int width, int height, int zoomX, int zoomY, + int subsampleX, int subsampleY); +#endif +#ifndef Tk_PhotoGetImage_TCL_DECLARED +#define Tk_PhotoGetImage_TCL_DECLARED +/* 146 */ +EXTERN int Tk_PhotoGetImage (Tk_PhotoHandle handle, + Tk_PhotoImageBlock * blockPtr); +#endif +#ifndef Tk_PhotoBlank_TCL_DECLARED +#define Tk_PhotoBlank_TCL_DECLARED +/* 147 */ +EXTERN void Tk_PhotoBlank (Tk_PhotoHandle handle); +#endif +#ifndef Tk_PhotoExpand_Panic_TCL_DECLARED +#define Tk_PhotoExpand_Panic_TCL_DECLARED +/* 148 */ +EXTERN void Tk_PhotoExpand_Panic (Tk_PhotoHandle handle, + int width, int height); +#endif +#ifndef Tk_PhotoGetSize_TCL_DECLARED +#define Tk_PhotoGetSize_TCL_DECLARED +/* 149 */ +EXTERN void Tk_PhotoGetSize (Tk_PhotoHandle handle, + int * widthPtr, int * heightPtr); +#endif +#ifndef Tk_PhotoSetSize_Panic_TCL_DECLARED +#define Tk_PhotoSetSize_Panic_TCL_DECLARED +/* 150 */ +EXTERN void Tk_PhotoSetSize_Panic (Tk_PhotoHandle handle, + int width, int height); +#endif +#ifndef Tk_PointToChar_TCL_DECLARED +#define Tk_PointToChar_TCL_DECLARED +/* 151 */ +EXTERN int Tk_PointToChar (Tk_TextLayout layout, int x, int y); +#endif +#ifndef Tk_PostscriptFontName_TCL_DECLARED +#define Tk_PostscriptFontName_TCL_DECLARED +/* 152 */ +EXTERN int Tk_PostscriptFontName (Tk_Font tkfont, + Tcl_DString * dsPtr); +#endif +#ifndef Tk_PreserveColormap_TCL_DECLARED +#define Tk_PreserveColormap_TCL_DECLARED +/* 153 */ +EXTERN void Tk_PreserveColormap (Display * display, + Colormap colormap); +#endif +#ifndef Tk_QueueWindowEvent_TCL_DECLARED +#define Tk_QueueWindowEvent_TCL_DECLARED +/* 154 */ +EXTERN void Tk_QueueWindowEvent (XEvent * eventPtr, + Tcl_QueuePosition position); +#endif +#ifndef Tk_RedrawImage_TCL_DECLARED +#define Tk_RedrawImage_TCL_DECLARED +/* 155 */ +EXTERN void Tk_RedrawImage (Tk_Image image, int imageX, + int imageY, int width, int height, + Drawable drawable, int drawableX, + int drawableY); +#endif +#ifndef Tk_ResizeWindow_TCL_DECLARED +#define Tk_ResizeWindow_TCL_DECLARED +/* 156 */ +EXTERN void Tk_ResizeWindow (Tk_Window tkwin, int width, + int height); +#endif +#ifndef Tk_RestackWindow_TCL_DECLARED +#define Tk_RestackWindow_TCL_DECLARED +/* 157 */ +EXTERN int Tk_RestackWindow (Tk_Window tkwin, int aboveBelow, + Tk_Window other); +#endif +#ifndef Tk_RestrictEvents_TCL_DECLARED +#define Tk_RestrictEvents_TCL_DECLARED +/* 158 */ +EXTERN Tk_RestrictProc * Tk_RestrictEvents (Tk_RestrictProc * proc, + ClientData arg, ClientData * prevArgPtr); +#endif +#ifndef Tk_SafeInit_TCL_DECLARED +#define Tk_SafeInit_TCL_DECLARED +/* 159 */ +EXTERN int Tk_SafeInit (Tcl_Interp * interp); +#endif +#ifndef Tk_SetAppName_TCL_DECLARED +#define Tk_SetAppName_TCL_DECLARED +/* 160 */ +EXTERN CONST char * Tk_SetAppName (Tk_Window tkwin, CONST char * name); +#endif +#ifndef Tk_SetBackgroundFromBorder_TCL_DECLARED +#define Tk_SetBackgroundFromBorder_TCL_DECLARED +/* 161 */ +EXTERN void Tk_SetBackgroundFromBorder (Tk_Window tkwin, + Tk_3DBorder border); +#endif +#ifndef Tk_SetClass_TCL_DECLARED +#define Tk_SetClass_TCL_DECLARED +/* 162 */ +EXTERN void Tk_SetClass (Tk_Window tkwin, CONST char * className); +#endif +#ifndef Tk_SetGrid_TCL_DECLARED +#define Tk_SetGrid_TCL_DECLARED +/* 163 */ +EXTERN void Tk_SetGrid (Tk_Window tkwin, int reqWidth, + int reqHeight, int gridWidth, int gridHeight); +#endif +#ifndef Tk_SetInternalBorder_TCL_DECLARED +#define Tk_SetInternalBorder_TCL_DECLARED +/* 164 */ +EXTERN void Tk_SetInternalBorder (Tk_Window tkwin, int width); +#endif +#ifndef Tk_SetWindowBackground_TCL_DECLARED +#define Tk_SetWindowBackground_TCL_DECLARED +/* 165 */ +EXTERN void Tk_SetWindowBackground (Tk_Window tkwin, + unsigned long pixel); +#endif +#ifndef Tk_SetWindowBackgroundPixmap_TCL_DECLARED +#define Tk_SetWindowBackgroundPixmap_TCL_DECLARED +/* 166 */ +EXTERN void Tk_SetWindowBackgroundPixmap (Tk_Window tkwin, + Pixmap pixmap); +#endif +#ifndef Tk_SetWindowBorder_TCL_DECLARED +#define Tk_SetWindowBorder_TCL_DECLARED +/* 167 */ +EXTERN void Tk_SetWindowBorder (Tk_Window tkwin, + unsigned long pixel); +#endif +#ifndef Tk_SetWindowBorderWidth_TCL_DECLARED +#define Tk_SetWindowBorderWidth_TCL_DECLARED +/* 168 */ +EXTERN void Tk_SetWindowBorderWidth (Tk_Window tkwin, int width); +#endif +#ifndef Tk_SetWindowBorderPixmap_TCL_DECLARED +#define Tk_SetWindowBorderPixmap_TCL_DECLARED +/* 169 */ +EXTERN void Tk_SetWindowBorderPixmap (Tk_Window tkwin, + Pixmap pixmap); +#endif +#ifndef Tk_SetWindowColormap_TCL_DECLARED +#define Tk_SetWindowColormap_TCL_DECLARED +/* 170 */ +EXTERN void Tk_SetWindowColormap (Tk_Window tkwin, + Colormap colormap); +#endif +#ifndef Tk_SetWindowVisual_TCL_DECLARED +#define Tk_SetWindowVisual_TCL_DECLARED +/* 171 */ +EXTERN int Tk_SetWindowVisual (Tk_Window tkwin, Visual * visual, + int depth, Colormap colormap); +#endif +#ifndef Tk_SizeOfBitmap_TCL_DECLARED +#define Tk_SizeOfBitmap_TCL_DECLARED +/* 172 */ +EXTERN void Tk_SizeOfBitmap (Display * display, Pixmap bitmap, + int * widthPtr, int * heightPtr); +#endif +#ifndef Tk_SizeOfImage_TCL_DECLARED +#define Tk_SizeOfImage_TCL_DECLARED +/* 173 */ +EXTERN void Tk_SizeOfImage (Tk_Image image, int * widthPtr, + int * heightPtr); +#endif +#ifndef Tk_StrictMotif_TCL_DECLARED +#define Tk_StrictMotif_TCL_DECLARED +/* 174 */ +EXTERN int Tk_StrictMotif (Tk_Window tkwin); +#endif +#ifndef Tk_TextLayoutToPostscript_TCL_DECLARED +#define Tk_TextLayoutToPostscript_TCL_DECLARED +/* 175 */ +EXTERN void Tk_TextLayoutToPostscript (Tcl_Interp * interp, + Tk_TextLayout layout); +#endif +#ifndef Tk_TextWidth_TCL_DECLARED +#define Tk_TextWidth_TCL_DECLARED +/* 176 */ +EXTERN int Tk_TextWidth (Tk_Font font, CONST char * str, + int numBytes); +#endif +#ifndef Tk_UndefineCursor_TCL_DECLARED +#define Tk_UndefineCursor_TCL_DECLARED +/* 177 */ +EXTERN void Tk_UndefineCursor (Tk_Window window); +#endif +#ifndef Tk_UnderlineChars_TCL_DECLARED +#define Tk_UnderlineChars_TCL_DECLARED +/* 178 */ +EXTERN void Tk_UnderlineChars (Display * display, + Drawable drawable, GC gc, Tk_Font tkfont, + CONST char * source, int x, int y, + int firstByte, int lastByte); +#endif +#ifndef Tk_UnderlineTextLayout_TCL_DECLARED +#define Tk_UnderlineTextLayout_TCL_DECLARED +/* 179 */ +EXTERN void Tk_UnderlineTextLayout (Display * display, + Drawable drawable, GC gc, + Tk_TextLayout layout, int x, int y, + int underline); +#endif +#ifndef Tk_Ungrab_TCL_DECLARED +#define Tk_Ungrab_TCL_DECLARED +/* 180 */ +EXTERN void Tk_Ungrab (Tk_Window tkwin); +#endif +#ifndef Tk_UnmaintainGeometry_TCL_DECLARED +#define Tk_UnmaintainGeometry_TCL_DECLARED +/* 181 */ +EXTERN void Tk_UnmaintainGeometry (Tk_Window slave, + Tk_Window master); +#endif +#ifndef Tk_UnmapWindow_TCL_DECLARED +#define Tk_UnmapWindow_TCL_DECLARED +/* 182 */ +EXTERN void Tk_UnmapWindow (Tk_Window tkwin); +#endif +#ifndef Tk_UnsetGrid_TCL_DECLARED +#define Tk_UnsetGrid_TCL_DECLARED +/* 183 */ +EXTERN void Tk_UnsetGrid (Tk_Window tkwin); +#endif +#ifndef Tk_UpdatePointer_TCL_DECLARED +#define Tk_UpdatePointer_TCL_DECLARED +/* 184 */ +EXTERN void Tk_UpdatePointer (Tk_Window tkwin, int x, int y, + int state); +#endif +#ifndef Tk_AllocBitmapFromObj_TCL_DECLARED +#define Tk_AllocBitmapFromObj_TCL_DECLARED +/* 185 */ +EXTERN Pixmap Tk_AllocBitmapFromObj (Tcl_Interp * interp, + Tk_Window tkwin, Tcl_Obj * objPtr); +#endif +#ifndef Tk_Alloc3DBorderFromObj_TCL_DECLARED +#define Tk_Alloc3DBorderFromObj_TCL_DECLARED +/* 186 */ +EXTERN Tk_3DBorder Tk_Alloc3DBorderFromObj (Tcl_Interp * interp, + Tk_Window tkwin, Tcl_Obj * objPtr); +#endif +#ifndef Tk_AllocColorFromObj_TCL_DECLARED +#define Tk_AllocColorFromObj_TCL_DECLARED +/* 187 */ +EXTERN XColor * Tk_AllocColorFromObj (Tcl_Interp * interp, + Tk_Window tkwin, Tcl_Obj * objPtr); +#endif +#ifndef Tk_AllocCursorFromObj_TCL_DECLARED +#define Tk_AllocCursorFromObj_TCL_DECLARED +/* 188 */ +EXTERN Tk_Cursor Tk_AllocCursorFromObj (Tcl_Interp * interp, + Tk_Window tkwin, Tcl_Obj * objPtr); +#endif +#ifndef Tk_AllocFontFromObj_TCL_DECLARED +#define Tk_AllocFontFromObj_TCL_DECLARED +/* 189 */ +EXTERN Tk_Font Tk_AllocFontFromObj (Tcl_Interp * interp, + Tk_Window tkwin, Tcl_Obj * objPtr); +#endif +#ifndef Tk_CreateOptionTable_TCL_DECLARED +#define Tk_CreateOptionTable_TCL_DECLARED +/* 190 */ +EXTERN Tk_OptionTable Tk_CreateOptionTable (Tcl_Interp * interp, + CONST Tk_OptionSpec * templatePtr); +#endif +#ifndef Tk_DeleteOptionTable_TCL_DECLARED +#define Tk_DeleteOptionTable_TCL_DECLARED +/* 191 */ +EXTERN void Tk_DeleteOptionTable (Tk_OptionTable optionTable); +#endif +#ifndef Tk_Free3DBorderFromObj_TCL_DECLARED +#define Tk_Free3DBorderFromObj_TCL_DECLARED +/* 192 */ +EXTERN void Tk_Free3DBorderFromObj (Tk_Window tkwin, + Tcl_Obj * objPtr); +#endif +#ifndef Tk_FreeBitmapFromObj_TCL_DECLARED +#define Tk_FreeBitmapFromObj_TCL_DECLARED +/* 193 */ +EXTERN void Tk_FreeBitmapFromObj (Tk_Window tkwin, + Tcl_Obj * objPtr); +#endif +#ifndef Tk_FreeColorFromObj_TCL_DECLARED +#define Tk_FreeColorFromObj_TCL_DECLARED +/* 194 */ +EXTERN void Tk_FreeColorFromObj (Tk_Window tkwin, + Tcl_Obj * objPtr); +#endif +#ifndef Tk_FreeConfigOptions_TCL_DECLARED +#define Tk_FreeConfigOptions_TCL_DECLARED +/* 195 */ +EXTERN void Tk_FreeConfigOptions (char * recordPtr, + Tk_OptionTable optionToken, Tk_Window tkwin); +#endif +#ifndef Tk_FreeSavedOptions_TCL_DECLARED +#define Tk_FreeSavedOptions_TCL_DECLARED +/* 196 */ +EXTERN void Tk_FreeSavedOptions (Tk_SavedOptions * savePtr); +#endif +#ifndef Tk_FreeCursorFromObj_TCL_DECLARED +#define Tk_FreeCursorFromObj_TCL_DECLARED +/* 197 */ +EXTERN void Tk_FreeCursorFromObj (Tk_Window tkwin, + Tcl_Obj * objPtr); +#endif +#ifndef Tk_FreeFontFromObj_TCL_DECLARED +#define Tk_FreeFontFromObj_TCL_DECLARED +/* 198 */ +EXTERN void Tk_FreeFontFromObj (Tk_Window tkwin, + Tcl_Obj * objPtr); +#endif +#ifndef Tk_Get3DBorderFromObj_TCL_DECLARED +#define Tk_Get3DBorderFromObj_TCL_DECLARED +/* 199 */ +EXTERN Tk_3DBorder Tk_Get3DBorderFromObj (Tk_Window tkwin, + Tcl_Obj * objPtr); +#endif +#ifndef Tk_GetAnchorFromObj_TCL_DECLARED +#define Tk_GetAnchorFromObj_TCL_DECLARED +/* 200 */ +EXTERN int Tk_GetAnchorFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, Tk_Anchor * anchorPtr); +#endif +#ifndef Tk_GetBitmapFromObj_TCL_DECLARED +#define Tk_GetBitmapFromObj_TCL_DECLARED +/* 201 */ +EXTERN Pixmap Tk_GetBitmapFromObj (Tk_Window tkwin, + Tcl_Obj * objPtr); +#endif +#ifndef Tk_GetColorFromObj_TCL_DECLARED +#define Tk_GetColorFromObj_TCL_DECLARED +/* 202 */ +EXTERN XColor * Tk_GetColorFromObj (Tk_Window tkwin, + Tcl_Obj * objPtr); +#endif +#ifndef Tk_GetCursorFromObj_TCL_DECLARED +#define Tk_GetCursorFromObj_TCL_DECLARED +/* 203 */ +EXTERN Tk_Cursor Tk_GetCursorFromObj (Tk_Window tkwin, + Tcl_Obj * objPtr); +#endif +#ifndef Tk_GetOptionInfo_TCL_DECLARED +#define Tk_GetOptionInfo_TCL_DECLARED +/* 204 */ +EXTERN Tcl_Obj * Tk_GetOptionInfo (Tcl_Interp * interp, + char * recordPtr, Tk_OptionTable optionTable, + Tcl_Obj * namePtr, Tk_Window tkwin); +#endif +#ifndef Tk_GetOptionValue_TCL_DECLARED +#define Tk_GetOptionValue_TCL_DECLARED +/* 205 */ +EXTERN Tcl_Obj * Tk_GetOptionValue (Tcl_Interp * interp, + char * recordPtr, Tk_OptionTable optionTable, + Tcl_Obj * namePtr, Tk_Window tkwin); +#endif +#ifndef Tk_GetJustifyFromObj_TCL_DECLARED +#define Tk_GetJustifyFromObj_TCL_DECLARED +/* 206 */ +EXTERN int Tk_GetJustifyFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, Tk_Justify * justifyPtr); +#endif +#ifndef Tk_GetMMFromObj_TCL_DECLARED +#define Tk_GetMMFromObj_TCL_DECLARED +/* 207 */ +EXTERN int Tk_GetMMFromObj (Tcl_Interp * interp, + Tk_Window tkwin, Tcl_Obj * objPtr, + double * doublePtr); +#endif +#ifndef Tk_GetPixelsFromObj_TCL_DECLARED +#define Tk_GetPixelsFromObj_TCL_DECLARED +/* 208 */ +EXTERN int Tk_GetPixelsFromObj (Tcl_Interp * interp, + Tk_Window tkwin, Tcl_Obj * objPtr, + int * intPtr); +#endif +#ifndef Tk_GetReliefFromObj_TCL_DECLARED +#define Tk_GetReliefFromObj_TCL_DECLARED +/* 209 */ +EXTERN int Tk_GetReliefFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, int * resultPtr); +#endif +#ifndef Tk_GetScrollInfoObj_TCL_DECLARED +#define Tk_GetScrollInfoObj_TCL_DECLARED +/* 210 */ +EXTERN int Tk_GetScrollInfoObj (Tcl_Interp * interp, int objc, + Tcl_Obj *CONST objv[], double * dblPtr, + int * intPtr); +#endif +#ifndef Tk_InitOptions_TCL_DECLARED +#define Tk_InitOptions_TCL_DECLARED +/* 211 */ +EXTERN int Tk_InitOptions (Tcl_Interp * interp, + char * recordPtr, Tk_OptionTable optionToken, + Tk_Window tkwin); +#endif +#ifndef Tk_MainEx_TCL_DECLARED +#define Tk_MainEx_TCL_DECLARED +/* 212 */ +EXTERN void Tk_MainEx (int argc, char ** argv, + Tcl_AppInitProc * appInitProc, + Tcl_Interp * interp); +#endif +#ifndef Tk_RestoreSavedOptions_TCL_DECLARED +#define Tk_RestoreSavedOptions_TCL_DECLARED +/* 213 */ +EXTERN void Tk_RestoreSavedOptions (Tk_SavedOptions * savePtr); +#endif +#ifndef Tk_SetOptions_TCL_DECLARED +#define Tk_SetOptions_TCL_DECLARED +/* 214 */ +EXTERN int Tk_SetOptions (Tcl_Interp * interp, char * recordPtr, + Tk_OptionTable optionTable, int objc, + Tcl_Obj *CONST objv[], Tk_Window tkwin, + Tk_SavedOptions * savePtr, int * maskPtr); +#endif +#ifndef Tk_InitConsoleChannels_TCL_DECLARED +#define Tk_InitConsoleChannels_TCL_DECLARED +/* 215 */ +EXTERN void Tk_InitConsoleChannels (Tcl_Interp * interp); +#endif +#ifndef Tk_CreateConsoleWindow_TCL_DECLARED +#define Tk_CreateConsoleWindow_TCL_DECLARED +/* 216 */ +EXTERN int Tk_CreateConsoleWindow (Tcl_Interp * interp); +#endif +#ifndef Tk_CreateSmoothMethod_TCL_DECLARED +#define Tk_CreateSmoothMethod_TCL_DECLARED +/* 217 */ +EXTERN void Tk_CreateSmoothMethod (Tcl_Interp * interp, + Tk_SmoothMethod * method); +#endif +/* Slot 218 is reserved */ +/* Slot 219 is reserved */ +#ifndef Tk_GetDash_TCL_DECLARED +#define Tk_GetDash_TCL_DECLARED +/* 220 */ +EXTERN int Tk_GetDash (Tcl_Interp * interp, CONST char * value, + Tk_Dash * dash); +#endif +#ifndef Tk_CreateOutline_TCL_DECLARED +#define Tk_CreateOutline_TCL_DECLARED +/* 221 */ +EXTERN void Tk_CreateOutline (Tk_Outline * outline); +#endif +#ifndef Tk_DeleteOutline_TCL_DECLARED +#define Tk_DeleteOutline_TCL_DECLARED +/* 222 */ +EXTERN void Tk_DeleteOutline (Display * display, + Tk_Outline * outline); +#endif +#ifndef Tk_ConfigOutlineGC_TCL_DECLARED +#define Tk_ConfigOutlineGC_TCL_DECLARED +/* 223 */ +EXTERN int Tk_ConfigOutlineGC (XGCValues * gcValues, + Tk_Canvas canvas, Tk_Item * item, + Tk_Outline * outline); +#endif +#ifndef Tk_ChangeOutlineGC_TCL_DECLARED +#define Tk_ChangeOutlineGC_TCL_DECLARED +/* 224 */ +EXTERN int Tk_ChangeOutlineGC (Tk_Canvas canvas, Tk_Item * item, + Tk_Outline * outline); +#endif +#ifndef Tk_ResetOutlineGC_TCL_DECLARED +#define Tk_ResetOutlineGC_TCL_DECLARED +/* 225 */ +EXTERN int Tk_ResetOutlineGC (Tk_Canvas canvas, Tk_Item * item, + Tk_Outline * outline); +#endif +#ifndef Tk_CanvasPsOutline_TCL_DECLARED +#define Tk_CanvasPsOutline_TCL_DECLARED +/* 226 */ +EXTERN int Tk_CanvasPsOutline (Tk_Canvas canvas, Tk_Item * item, + Tk_Outline * outline); +#endif +#ifndef Tk_SetTSOrigin_TCL_DECLARED +#define Tk_SetTSOrigin_TCL_DECLARED +/* 227 */ +EXTERN void Tk_SetTSOrigin (Tk_Window tkwin, GC gc, int x, int y); +#endif +#ifndef Tk_CanvasGetCoordFromObj_TCL_DECLARED +#define Tk_CanvasGetCoordFromObj_TCL_DECLARED +/* 228 */ +EXTERN int Tk_CanvasGetCoordFromObj (Tcl_Interp * interp, + Tk_Canvas canvas, Tcl_Obj * obj, + double * doublePtr); +#endif +#ifndef Tk_CanvasSetOffset_TCL_DECLARED +#define Tk_CanvasSetOffset_TCL_DECLARED +/* 229 */ +EXTERN void Tk_CanvasSetOffset (Tk_Canvas canvas, GC gc, + Tk_TSOffset * offset); +#endif +#ifndef Tk_DitherPhoto_TCL_DECLARED +#define Tk_DitherPhoto_TCL_DECLARED +/* 230 */ +EXTERN void Tk_DitherPhoto (Tk_PhotoHandle handle, int x, int y, + int width, int height); +#endif +#ifndef Tk_PostscriptBitmap_TCL_DECLARED +#define Tk_PostscriptBitmap_TCL_DECLARED +/* 231 */ +EXTERN int Tk_PostscriptBitmap (Tcl_Interp * interp, + Tk_Window tkwin, Tk_PostscriptInfo psInfo, + Pixmap bitmap, int startX, int startY, + int width, int height); +#endif +#ifndef Tk_PostscriptColor_TCL_DECLARED +#define Tk_PostscriptColor_TCL_DECLARED +/* 232 */ +EXTERN int Tk_PostscriptColor (Tcl_Interp * interp, + Tk_PostscriptInfo psInfo, XColor * colorPtr); +#endif +#ifndef Tk_PostscriptFont_TCL_DECLARED +#define Tk_PostscriptFont_TCL_DECLARED +/* 233 */ +EXTERN int Tk_PostscriptFont (Tcl_Interp * interp, + Tk_PostscriptInfo psInfo, Tk_Font font); +#endif +#ifndef Tk_PostscriptImage_TCL_DECLARED +#define Tk_PostscriptImage_TCL_DECLARED +/* 234 */ +EXTERN int Tk_PostscriptImage (Tk_Image image, + Tcl_Interp * interp, Tk_Window tkwin, + Tk_PostscriptInfo psinfo, int x, int y, + int width, int height, int prepass); +#endif +#ifndef Tk_PostscriptPath_TCL_DECLARED +#define Tk_PostscriptPath_TCL_DECLARED +/* 235 */ +EXTERN void Tk_PostscriptPath (Tcl_Interp * interp, + Tk_PostscriptInfo psInfo, double * coordPtr, + int numPoints); +#endif +#ifndef Tk_PostscriptStipple_TCL_DECLARED +#define Tk_PostscriptStipple_TCL_DECLARED +/* 236 */ +EXTERN int Tk_PostscriptStipple (Tcl_Interp * interp, + Tk_Window tkwin, Tk_PostscriptInfo psInfo, + Pixmap bitmap); +#endif +#ifndef Tk_PostscriptY_TCL_DECLARED +#define Tk_PostscriptY_TCL_DECLARED +/* 237 */ +EXTERN double Tk_PostscriptY (double y, Tk_PostscriptInfo psInfo); +#endif +#ifndef Tk_PostscriptPhoto_TCL_DECLARED +#define Tk_PostscriptPhoto_TCL_DECLARED +/* 238 */ +EXTERN int Tk_PostscriptPhoto (Tcl_Interp * interp, + Tk_PhotoImageBlock * blockPtr, + Tk_PostscriptInfo psInfo, int width, + int height); +#endif +#ifndef Tk_CreateClientMessageHandler_TCL_DECLARED +#define Tk_CreateClientMessageHandler_TCL_DECLARED +/* 239 */ +EXTERN void Tk_CreateClientMessageHandler ( + Tk_ClientMessageProc * proc); +#endif +#ifndef Tk_DeleteClientMessageHandler_TCL_DECLARED +#define Tk_DeleteClientMessageHandler_TCL_DECLARED +/* 240 */ +EXTERN void Tk_DeleteClientMessageHandler ( + Tk_ClientMessageProc * proc); +#endif +#ifndef Tk_CreateAnonymousWindow_TCL_DECLARED +#define Tk_CreateAnonymousWindow_TCL_DECLARED +/* 241 */ +EXTERN Tk_Window Tk_CreateAnonymousWindow (Tcl_Interp * interp, + Tk_Window parent, CONST char * screenName); +#endif +#ifndef Tk_SetClassProcs_TCL_DECLARED +#define Tk_SetClassProcs_TCL_DECLARED +/* 242 */ +EXTERN void Tk_SetClassProcs (Tk_Window tkwin, + Tk_ClassProcs * procs, + ClientData instanceData); +#endif +#ifndef Tk_SetInternalBorderEx_TCL_DECLARED +#define Tk_SetInternalBorderEx_TCL_DECLARED +/* 243 */ +EXTERN void Tk_SetInternalBorderEx (Tk_Window tkwin, int left, + int right, int top, int bottom); +#endif +#ifndef Tk_SetMinimumRequestSize_TCL_DECLARED +#define Tk_SetMinimumRequestSize_TCL_DECLARED +/* 244 */ +EXTERN void Tk_SetMinimumRequestSize (Tk_Window tkwin, + int minWidth, int minHeight); +#endif +#ifndef Tk_SetCaretPos_TCL_DECLARED +#define Tk_SetCaretPos_TCL_DECLARED +/* 245 */ +EXTERN void Tk_SetCaretPos (Tk_Window tkwin, int x, int y, + int height); +#endif +#ifndef Tk_PhotoPutBlock_Panic_TCL_DECLARED +#define Tk_PhotoPutBlock_Panic_TCL_DECLARED +/* 246 */ +EXTERN void Tk_PhotoPutBlock_Panic (Tk_PhotoHandle handle, + Tk_PhotoImageBlock * blockPtr, int x, int y, + int width, int height, int compRule); +#endif +#ifndef Tk_PhotoPutZoomedBlock_Panic_TCL_DECLARED +#define Tk_PhotoPutZoomedBlock_Panic_TCL_DECLARED +/* 247 */ +EXTERN void Tk_PhotoPutZoomedBlock_Panic (Tk_PhotoHandle handle, + Tk_PhotoImageBlock * blockPtr, int x, int y, + int width, int height, int zoomX, int zoomY, + int subsampleX, int subsampleY, int compRule); +#endif +#ifndef Tk_CollapseMotionEvents_TCL_DECLARED +#define Tk_CollapseMotionEvents_TCL_DECLARED +/* 248 */ +EXTERN int Tk_CollapseMotionEvents (Display * display, + int collapse); +#endif +#ifndef Tk_RegisterStyleEngine_TCL_DECLARED +#define Tk_RegisterStyleEngine_TCL_DECLARED +/* 249 */ +EXTERN Tk_StyleEngine Tk_RegisterStyleEngine (CONST char * name, + Tk_StyleEngine parent); +#endif +#ifndef Tk_GetStyleEngine_TCL_DECLARED +#define Tk_GetStyleEngine_TCL_DECLARED +/* 250 */ +EXTERN Tk_StyleEngine Tk_GetStyleEngine (CONST char * name); +#endif +#ifndef Tk_RegisterStyledElement_TCL_DECLARED +#define Tk_RegisterStyledElement_TCL_DECLARED +/* 251 */ +EXTERN int Tk_RegisterStyledElement (Tk_StyleEngine engine, + Tk_ElementSpec * templatePtr); +#endif +#ifndef Tk_GetElementId_TCL_DECLARED +#define Tk_GetElementId_TCL_DECLARED +/* 252 */ +EXTERN int Tk_GetElementId (CONST char * name); +#endif +#ifndef Tk_CreateStyle_TCL_DECLARED +#define Tk_CreateStyle_TCL_DECLARED +/* 253 */ +EXTERN Tk_Style Tk_CreateStyle (CONST char * name, + Tk_StyleEngine engine, ClientData clientData); +#endif +#ifndef Tk_GetStyle_TCL_DECLARED +#define Tk_GetStyle_TCL_DECLARED +/* 254 */ +EXTERN Tk_Style Tk_GetStyle (Tcl_Interp * interp, CONST char * name); +#endif +#ifndef Tk_FreeStyle_TCL_DECLARED +#define Tk_FreeStyle_TCL_DECLARED +/* 255 */ +EXTERN void Tk_FreeStyle (Tk_Style style); +#endif +#ifndef Tk_NameOfStyle_TCL_DECLARED +#define Tk_NameOfStyle_TCL_DECLARED +/* 256 */ +EXTERN CONST char * Tk_NameOfStyle (Tk_Style style); +#endif +#ifndef Tk_AllocStyleFromObj_TCL_DECLARED +#define Tk_AllocStyleFromObj_TCL_DECLARED +/* 257 */ +EXTERN Tk_Style Tk_AllocStyleFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr); +#endif +#ifndef Tk_GetStyleFromObj_TCL_DECLARED +#define Tk_GetStyleFromObj_TCL_DECLARED +/* 258 */ +EXTERN Tk_Style Tk_GetStyleFromObj (Tcl_Obj * objPtr); +#endif +#ifndef Tk_FreeStyleFromObj_TCL_DECLARED +#define Tk_FreeStyleFromObj_TCL_DECLARED +/* 259 */ +EXTERN void Tk_FreeStyleFromObj (Tcl_Obj * objPtr); +#endif +#ifndef Tk_GetStyledElement_TCL_DECLARED +#define Tk_GetStyledElement_TCL_DECLARED +/* 260 */ +EXTERN Tk_StyledElement Tk_GetStyledElement (Tk_Style style, int elementId, + Tk_OptionTable optionTable); +#endif +#ifndef Tk_GetElementSize_TCL_DECLARED +#define Tk_GetElementSize_TCL_DECLARED +/* 261 */ +EXTERN void Tk_GetElementSize (Tk_Style style, + Tk_StyledElement element, char * recordPtr, + Tk_Window tkwin, int width, int height, + int inner, int * widthPtr, int * heightPtr); +#endif +#ifndef Tk_GetElementBox_TCL_DECLARED +#define Tk_GetElementBox_TCL_DECLARED +/* 262 */ +EXTERN void Tk_GetElementBox (Tk_Style style, + Tk_StyledElement element, char * recordPtr, + Tk_Window tkwin, int x, int y, int width, + int height, int inner, int * xPtr, + int * yPtr, int * widthPtr, int * heightPtr); +#endif +#ifndef Tk_GetElementBorderWidth_TCL_DECLARED +#define Tk_GetElementBorderWidth_TCL_DECLARED +/* 263 */ +EXTERN int Tk_GetElementBorderWidth (Tk_Style style, + Tk_StyledElement element, char * recordPtr, + Tk_Window tkwin); +#endif +#ifndef Tk_DrawElement_TCL_DECLARED +#define Tk_DrawElement_TCL_DECLARED +/* 264 */ +EXTERN void Tk_DrawElement (Tk_Style style, + Tk_StyledElement element, char * recordPtr, + Tk_Window tkwin, Drawable d, int x, int y, + int width, int height, int state); +#endif +#ifndef Tk_PhotoExpand_TCL_DECLARED +#define Tk_PhotoExpand_TCL_DECLARED +/* 265 */ +EXTERN int Tk_PhotoExpand (Tcl_Interp * interp, + Tk_PhotoHandle handle, int width, int height); +#endif +#ifndef Tk_PhotoPutBlock_TCL_DECLARED +#define Tk_PhotoPutBlock_TCL_DECLARED +/* 266 */ +EXTERN int Tk_PhotoPutBlock (Tcl_Interp * interp, + Tk_PhotoHandle handle, + Tk_PhotoImageBlock * blockPtr, int x, int y, + int width, int height, int compRule); +#endif +#ifndef Tk_PhotoPutZoomedBlock_TCL_DECLARED +#define Tk_PhotoPutZoomedBlock_TCL_DECLARED +/* 267 */ +EXTERN int Tk_PhotoPutZoomedBlock (Tcl_Interp * interp, + Tk_PhotoHandle handle, + Tk_PhotoImageBlock * blockPtr, int x, int y, + int width, int height, int zoomX, int zoomY, + int subsampleX, int subsampleY, int compRule); +#endif +#ifndef Tk_PhotoSetSize_TCL_DECLARED +#define Tk_PhotoSetSize_TCL_DECLARED +/* 268 */ +EXTERN int Tk_PhotoSetSize (Tcl_Interp * interp, + Tk_PhotoHandle handle, int width, int height); +#endif +#ifndef Tk_GetUserInactiveTime_TCL_DECLARED +#define Tk_GetUserInactiveTime_TCL_DECLARED +/* 269 */ +EXTERN long Tk_GetUserInactiveTime (Display * dpy); +#endif +#ifndef Tk_ResetUserInactiveTime_TCL_DECLARED +#define Tk_ResetUserInactiveTime_TCL_DECLARED +/* 270 */ +EXTERN void Tk_ResetUserInactiveTime (Display * dpy); +#endif +#ifndef Tk_Interp_TCL_DECLARED +#define Tk_Interp_TCL_DECLARED +/* 271 */ +EXTERN Tcl_Interp * Tk_Interp (Tk_Window tkwin); +#endif +#ifndef Tk_CreateOldImageType_TCL_DECLARED +#define Tk_CreateOldImageType_TCL_DECLARED +/* 272 */ +EXTERN void Tk_CreateOldImageType (Tk_ImageType * typePtr); +#endif +#ifndef Tk_CreateOldPhotoImageFormat_TCL_DECLARED +#define Tk_CreateOldPhotoImageFormat_TCL_DECLARED +/* 273 */ +EXTERN void Tk_CreateOldPhotoImageFormat ( + Tk_PhotoImageFormat * formatPtr); +#endif + +typedef struct TkStubHooks { + struct TkPlatStubs *tkPlatStubs; + struct TkIntStubs *tkIntStubs; + struct TkIntPlatStubs *tkIntPlatStubs; + struct TkIntXlibStubs *tkIntXlibStubs; +} TkStubHooks; + +typedef struct TkStubs { + int magic; + struct TkStubHooks *hooks; + + void (*tk_MainLoop) (void); /* 0 */ + XColor * (*tk_3DBorderColor) (Tk_3DBorder border); /* 1 */ + GC (*tk_3DBorderGC) (Tk_Window tkwin, Tk_3DBorder border, int which); /* 2 */ + void (*tk_3DHorizontalBevel) (Tk_Window tkwin, Drawable drawable, Tk_3DBorder border, int x, int y, int width, int height, int leftIn, int rightIn, int topBevel, int relief); /* 3 */ + void (*tk_3DVerticalBevel) (Tk_Window tkwin, Drawable drawable, Tk_3DBorder border, int x, int y, int width, int height, int leftBevel, int relief); /* 4 */ + void (*tk_AddOption) (Tk_Window tkwin, CONST char * name, CONST char * value, int priority); /* 5 */ + void (*tk_BindEvent) (Tk_BindingTable bindingTable, XEvent * eventPtr, Tk_Window tkwin, int numObjects, ClientData * objectPtr); /* 6 */ + void (*tk_CanvasDrawableCoords) (Tk_Canvas canvas, double x, double y, short * drawableXPtr, short * drawableYPtr); /* 7 */ + void (*tk_CanvasEventuallyRedraw) (Tk_Canvas canvas, int x1, int y1, int x2, int y2); /* 8 */ + int (*tk_CanvasGetCoord) (Tcl_Interp * interp, Tk_Canvas canvas, CONST char * str, double * doublePtr); /* 9 */ + Tk_CanvasTextInfo * (*tk_CanvasGetTextInfo) (Tk_Canvas canvas); /* 10 */ + int (*tk_CanvasPsBitmap) (Tcl_Interp * interp, Tk_Canvas canvas, Pixmap bitmap, int x, int y, int width, int height); /* 11 */ + int (*tk_CanvasPsColor) (Tcl_Interp * interp, Tk_Canvas canvas, XColor * colorPtr); /* 12 */ + int (*tk_CanvasPsFont) (Tcl_Interp * interp, Tk_Canvas canvas, Tk_Font font); /* 13 */ + void (*tk_CanvasPsPath) (Tcl_Interp * interp, Tk_Canvas canvas, double * coordPtr, int numPoints); /* 14 */ + int (*tk_CanvasPsStipple) (Tcl_Interp * interp, Tk_Canvas canvas, Pixmap bitmap); /* 15 */ + double (*tk_CanvasPsY) (Tk_Canvas canvas, double y); /* 16 */ + void (*tk_CanvasSetStippleOrigin) (Tk_Canvas canvas, GC gc); /* 17 */ + int (*tk_CanvasTagsParseProc) (ClientData clientData, Tcl_Interp * interp, Tk_Window tkwin, CONST char * value, char * widgRec, int offset); /* 18 */ + char * (*tk_CanvasTagsPrintProc) (ClientData clientData, Tk_Window tkwin, char * widgRec, int offset, Tcl_FreeProc ** freeProcPtr); /* 19 */ + Tk_Window (*tk_CanvasTkwin) (Tk_Canvas canvas); /* 20 */ + void (*tk_CanvasWindowCoords) (Tk_Canvas canvas, double x, double y, short * screenXPtr, short * screenYPtr); /* 21 */ + void (*tk_ChangeWindowAttributes) (Tk_Window tkwin, unsigned long valueMask, XSetWindowAttributes * attsPtr); /* 22 */ + int (*tk_CharBbox) (Tk_TextLayout layout, int index, int * xPtr, int * yPtr, int * widthPtr, int * heightPtr); /* 23 */ + void (*tk_ClearSelection) (Tk_Window tkwin, Atom selection); /* 24 */ + int (*tk_ClipboardAppend) (Tcl_Interp * interp, Tk_Window tkwin, Atom target, Atom format, char* buffer); /* 25 */ + int (*tk_ClipboardClear) (Tcl_Interp * interp, Tk_Window tkwin); /* 26 */ + int (*tk_ConfigureInfo) (Tcl_Interp * interp, Tk_Window tkwin, Tk_ConfigSpec * specs, char * widgRec, CONST char * argvName, int flags); /* 27 */ + int (*tk_ConfigureValue) (Tcl_Interp * interp, Tk_Window tkwin, Tk_ConfigSpec * specs, char * widgRec, CONST char * argvName, int flags); /* 28 */ + int (*tk_ConfigureWidget) (Tcl_Interp * interp, Tk_Window tkwin, Tk_ConfigSpec * specs, int argc, CONST84 char ** argv, char * widgRec, int flags); /* 29 */ + void (*tk_ConfigureWindow) (Tk_Window tkwin, unsigned int valueMask, XWindowChanges * valuePtr); /* 30 */ + Tk_TextLayout (*tk_ComputeTextLayout) (Tk_Font font, CONST char * str, int numChars, int wrapLength, Tk_Justify justify, int flags, int * widthPtr, int * heightPtr); /* 31 */ + Tk_Window (*tk_CoordsToWindow) (int rootX, int rootY, Tk_Window tkwin); /* 32 */ + unsigned long (*tk_CreateBinding) (Tcl_Interp * interp, Tk_BindingTable bindingTable, ClientData object, CONST char * eventStr, CONST char * command, int append); /* 33 */ + Tk_BindingTable (*tk_CreateBindingTable) (Tcl_Interp * interp); /* 34 */ + Tk_ErrorHandler (*tk_CreateErrorHandler) (Display * display, int errNum, int request, int minorCode, Tk_ErrorProc * errorProc, ClientData clientData); /* 35 */ + void (*tk_CreateEventHandler) (Tk_Window token, unsigned long mask, Tk_EventProc * proc, ClientData clientData); /* 36 */ + void (*tk_CreateGenericHandler) (Tk_GenericProc * proc, ClientData clientData); /* 37 */ + void (*tk_CreateImageType) (Tk_ImageType * typePtr); /* 38 */ + void (*tk_CreateItemType) (Tk_ItemType * typePtr); /* 39 */ + void (*tk_CreatePhotoImageFormat) (Tk_PhotoImageFormat * formatPtr); /* 40 */ + void (*tk_CreateSelHandler) (Tk_Window tkwin, Atom selection, Atom target, Tk_SelectionProc * proc, ClientData clientData, Atom format); /* 41 */ + Tk_Window (*tk_CreateWindow) (Tcl_Interp * interp, Tk_Window parent, CONST char * name, CONST char * screenName); /* 42 */ + Tk_Window (*tk_CreateWindowFromPath) (Tcl_Interp * interp, Tk_Window tkwin, CONST char * pathName, CONST char * screenName); /* 43 */ + int (*tk_DefineBitmap) (Tcl_Interp * interp, CONST char * name, CONST char * source, int width, int height); /* 44 */ + void (*tk_DefineCursor) (Tk_Window window, Tk_Cursor cursor); /* 45 */ + void (*tk_DeleteAllBindings) (Tk_BindingTable bindingTable, ClientData object); /* 46 */ + int (*tk_DeleteBinding) (Tcl_Interp * interp, Tk_BindingTable bindingTable, ClientData object, CONST char * eventStr); /* 47 */ + void (*tk_DeleteBindingTable) (Tk_BindingTable bindingTable); /* 48 */ + void (*tk_DeleteErrorHandler) (Tk_ErrorHandler handler); /* 49 */ + void (*tk_DeleteEventHandler) (Tk_Window token, unsigned long mask, Tk_EventProc * proc, ClientData clientData); /* 50 */ + void (*tk_DeleteGenericHandler) (Tk_GenericProc * proc, ClientData clientData); /* 51 */ + void (*tk_DeleteImage) (Tcl_Interp * interp, CONST char * name); /* 52 */ + void (*tk_DeleteSelHandler) (Tk_Window tkwin, Atom selection, Atom target); /* 53 */ + void (*tk_DestroyWindow) (Tk_Window tkwin); /* 54 */ + CONST84_RETURN char * (*tk_DisplayName) (Tk_Window tkwin); /* 55 */ + int (*tk_DistanceToTextLayout) (Tk_TextLayout layout, int x, int y); /* 56 */ + void (*tk_Draw3DPolygon) (Tk_Window tkwin, Drawable drawable, Tk_3DBorder border, XPoint * pointPtr, int numPoints, int borderWidth, int leftRelief); /* 57 */ + void (*tk_Draw3DRectangle) (Tk_Window tkwin, Drawable drawable, Tk_3DBorder border, int x, int y, int width, int height, int borderWidth, int relief); /* 58 */ + void (*tk_DrawChars) (Display * display, Drawable drawable, GC gc, Tk_Font tkfont, CONST char * source, int numBytes, int x, int y); /* 59 */ + void (*tk_DrawFocusHighlight) (Tk_Window tkwin, GC gc, int width, Drawable drawable); /* 60 */ + void (*tk_DrawTextLayout) (Display * display, Drawable drawable, GC gc, Tk_TextLayout layout, int x, int y, int firstChar, int lastChar); /* 61 */ + void (*tk_Fill3DPolygon) (Tk_Window tkwin, Drawable drawable, Tk_3DBorder border, XPoint * pointPtr, int numPoints, int borderWidth, int leftRelief); /* 62 */ + void (*tk_Fill3DRectangle) (Tk_Window tkwin, Drawable drawable, Tk_3DBorder border, int x, int y, int width, int height, int borderWidth, int relief); /* 63 */ + Tk_PhotoHandle (*tk_FindPhoto) (Tcl_Interp * interp, CONST char * imageName); /* 64 */ + Font (*tk_FontId) (Tk_Font font); /* 65 */ + void (*tk_Free3DBorder) (Tk_3DBorder border); /* 66 */ + void (*tk_FreeBitmap) (Display * display, Pixmap bitmap); /* 67 */ + void (*tk_FreeColor) (XColor * colorPtr); /* 68 */ + void (*tk_FreeColormap) (Display * display, Colormap colormap); /* 69 */ + void (*tk_FreeCursor) (Display * display, Tk_Cursor cursor); /* 70 */ + void (*tk_FreeFont) (Tk_Font f); /* 71 */ + void (*tk_FreeGC) (Display * display, GC gc); /* 72 */ + void (*tk_FreeImage) (Tk_Image image); /* 73 */ + void (*tk_FreeOptions) (Tk_ConfigSpec * specs, char * widgRec, Display * display, int needFlags); /* 74 */ + void (*tk_FreePixmap) (Display * display, Pixmap pixmap); /* 75 */ + void (*tk_FreeTextLayout) (Tk_TextLayout textLayout); /* 76 */ + void (*tk_FreeXId) (Display * display, XID xid); /* 77 */ + GC (*tk_GCForColor) (XColor * colorPtr, Drawable drawable); /* 78 */ + void (*tk_GeometryRequest) (Tk_Window tkwin, int reqWidth, int reqHeight); /* 79 */ + Tk_3DBorder (*tk_Get3DBorder) (Tcl_Interp * interp, Tk_Window tkwin, Tk_Uid colorName); /* 80 */ + void (*tk_GetAllBindings) (Tcl_Interp * interp, Tk_BindingTable bindingTable, ClientData object); /* 81 */ + int (*tk_GetAnchor) (Tcl_Interp * interp, CONST char * str, Tk_Anchor * anchorPtr); /* 82 */ + CONST84_RETURN char * (*tk_GetAtomName) (Tk_Window tkwin, Atom atom); /* 83 */ + CONST84_RETURN char * (*tk_GetBinding) (Tcl_Interp * interp, Tk_BindingTable bindingTable, ClientData object, CONST char * eventStr); /* 84 */ + Pixmap (*tk_GetBitmap) (Tcl_Interp * interp, Tk_Window tkwin, CONST char * str); /* 85 */ + Pixmap (*tk_GetBitmapFromData) (Tcl_Interp * interp, Tk_Window tkwin, CONST char * source, int width, int height); /* 86 */ + int (*tk_GetCapStyle) (Tcl_Interp * interp, CONST char * str, int * capPtr); /* 87 */ + XColor * (*tk_GetColor) (Tcl_Interp * interp, Tk_Window tkwin, Tk_Uid name); /* 88 */ + XColor * (*tk_GetColorByValue) (Tk_Window tkwin, XColor * colorPtr); /* 89 */ + Colormap (*tk_GetColormap) (Tcl_Interp * interp, Tk_Window tkwin, CONST char * str); /* 90 */ + Tk_Cursor (*tk_GetCursor) (Tcl_Interp * interp, Tk_Window tkwin, Tk_Uid str); /* 91 */ + Tk_Cursor (*tk_GetCursorFromData) (Tcl_Interp * interp, Tk_Window tkwin, CONST char * source, CONST char * mask, int width, int height, int xHot, int yHot, Tk_Uid fg, Tk_Uid bg); /* 92 */ + Tk_Font (*tk_GetFont) (Tcl_Interp * interp, Tk_Window tkwin, CONST char * str); /* 93 */ + Tk_Font (*tk_GetFontFromObj) (Tk_Window tkwin, Tcl_Obj * objPtr); /* 94 */ + void (*tk_GetFontMetrics) (Tk_Font font, Tk_FontMetrics * fmPtr); /* 95 */ + GC (*tk_GetGC) (Tk_Window tkwin, unsigned long valueMask, XGCValues * valuePtr); /* 96 */ + Tk_Image (*tk_GetImage) (Tcl_Interp * interp, Tk_Window tkwin, CONST char * name, Tk_ImageChangedProc * changeProc, ClientData clientData); /* 97 */ + ClientData (*tk_GetImageMasterData) (Tcl_Interp * interp, CONST char * name, Tk_ImageType ** typePtrPtr); /* 98 */ + Tk_ItemType * (*tk_GetItemTypes) (void); /* 99 */ + int (*tk_GetJoinStyle) (Tcl_Interp * interp, CONST char * str, int * joinPtr); /* 100 */ + int (*tk_GetJustify) (Tcl_Interp * interp, CONST char * str, Tk_Justify * justifyPtr); /* 101 */ + int (*tk_GetNumMainWindows) (void); /* 102 */ + Tk_Uid (*tk_GetOption) (Tk_Window tkwin, CONST char * name, CONST char * className); /* 103 */ + int (*tk_GetPixels) (Tcl_Interp * interp, Tk_Window tkwin, CONST char * str, int * intPtr); /* 104 */ + Pixmap (*tk_GetPixmap) (Display * display, Drawable d, int width, int height, int depth); /* 105 */ + int (*tk_GetRelief) (Tcl_Interp * interp, CONST char * name, int * reliefPtr); /* 106 */ + void (*tk_GetRootCoords) (Tk_Window tkwin, int * xPtr, int * yPtr); /* 107 */ + int (*tk_GetScrollInfo) (Tcl_Interp * interp, int argc, CONST84 char ** argv, double * dblPtr, int * intPtr); /* 108 */ + int (*tk_GetScreenMM) (Tcl_Interp * interp, Tk_Window tkwin, CONST char * str, double * doublePtr); /* 109 */ + int (*tk_GetSelection) (Tcl_Interp * interp, Tk_Window tkwin, Atom selection, Atom target, Tk_GetSelProc * proc, ClientData clientData); /* 110 */ + Tk_Uid (*tk_GetUid) (CONST char * str); /* 111 */ + Visual * (*tk_GetVisual) (Tcl_Interp * interp, Tk_Window tkwin, CONST char * str, int * depthPtr, Colormap * colormapPtr); /* 112 */ + void (*tk_GetVRootGeometry) (Tk_Window tkwin, int * xPtr, int * yPtr, int * widthPtr, int * heightPtr); /* 113 */ + int (*tk_Grab) (Tcl_Interp * interp, Tk_Window tkwin, int grabGlobal); /* 114 */ + void (*tk_HandleEvent) (XEvent * eventPtr); /* 115 */ + Tk_Window (*tk_IdToWindow) (Display * display, Window window); /* 116 */ + void (*tk_ImageChanged) (Tk_ImageMaster master, int x, int y, int width, int height, int imageWidth, int imageHeight); /* 117 */ + int (*tk_Init) (Tcl_Interp * interp); /* 118 */ + Atom (*tk_InternAtom) (Tk_Window tkwin, CONST char * name); /* 119 */ + int (*tk_IntersectTextLayout) (Tk_TextLayout layout, int x, int y, int width, int height); /* 120 */ + void (*tk_MaintainGeometry) (Tk_Window slave, Tk_Window master, int x, int y, int width, int height); /* 121 */ + Tk_Window (*tk_MainWindow) (Tcl_Interp * interp); /* 122 */ + void (*tk_MakeWindowExist) (Tk_Window tkwin); /* 123 */ + void (*tk_ManageGeometry) (Tk_Window tkwin, CONST Tk_GeomMgr * mgrPtr, ClientData clientData); /* 124 */ + void (*tk_MapWindow) (Tk_Window tkwin); /* 125 */ + int (*tk_MeasureChars) (Tk_Font tkfont, CONST char * source, int numBytes, int maxPixels, int flags, int * lengthPtr); /* 126 */ + void (*tk_MoveResizeWindow) (Tk_Window tkwin, int x, int y, int width, int height); /* 127 */ + void (*tk_MoveWindow) (Tk_Window tkwin, int x, int y); /* 128 */ + void (*tk_MoveToplevelWindow) (Tk_Window tkwin, int x, int y); /* 129 */ + CONST84_RETURN char * (*tk_NameOf3DBorder) (Tk_3DBorder border); /* 130 */ + CONST84_RETURN char * (*tk_NameOfAnchor) (Tk_Anchor anchor); /* 131 */ + CONST84_RETURN char * (*tk_NameOfBitmap) (Display * display, Pixmap bitmap); /* 132 */ + CONST84_RETURN char * (*tk_NameOfCapStyle) (int cap); /* 133 */ + CONST84_RETURN char * (*tk_NameOfColor) (XColor * colorPtr); /* 134 */ + CONST84_RETURN char * (*tk_NameOfCursor) (Display * display, Tk_Cursor cursor); /* 135 */ + CONST84_RETURN char * (*tk_NameOfFont) (Tk_Font font); /* 136 */ + CONST84_RETURN char * (*tk_NameOfImage) (Tk_ImageMaster imageMaster); /* 137 */ + CONST84_RETURN char * (*tk_NameOfJoinStyle) (int join); /* 138 */ + CONST84_RETURN char * (*tk_NameOfJustify) (Tk_Justify justify); /* 139 */ + CONST84_RETURN char * (*tk_NameOfRelief) (int relief); /* 140 */ + Tk_Window (*tk_NameToWindow) (Tcl_Interp * interp, CONST char * pathName, Tk_Window tkwin); /* 141 */ + void (*tk_OwnSelection) (Tk_Window tkwin, Atom selection, Tk_LostSelProc * proc, ClientData clientData); /* 142 */ + int (*tk_ParseArgv) (Tcl_Interp * interp, Tk_Window tkwin, int * argcPtr, CONST84 char ** argv, Tk_ArgvInfo * argTable, int flags); /* 143 */ + void (*tk_PhotoPutBlock_NoComposite) (Tk_PhotoHandle handle, Tk_PhotoImageBlock * blockPtr, int x, int y, int width, int height); /* 144 */ + void (*tk_PhotoPutZoomedBlock_NoComposite) (Tk_PhotoHandle handle, Tk_PhotoImageBlock * blockPtr, int x, int y, int width, int height, int zoomX, int zoomY, int subsampleX, int subsampleY); /* 145 */ + int (*tk_PhotoGetImage) (Tk_PhotoHandle handle, Tk_PhotoImageBlock * blockPtr); /* 146 */ + void (*tk_PhotoBlank) (Tk_PhotoHandle handle); /* 147 */ + void (*tk_PhotoExpand_Panic) (Tk_PhotoHandle handle, int width, int height); /* 148 */ + void (*tk_PhotoGetSize) (Tk_PhotoHandle handle, int * widthPtr, int * heightPtr); /* 149 */ + void (*tk_PhotoSetSize_Panic) (Tk_PhotoHandle handle, int width, int height); /* 150 */ + int (*tk_PointToChar) (Tk_TextLayout layout, int x, int y); /* 151 */ + int (*tk_PostscriptFontName) (Tk_Font tkfont, Tcl_DString * dsPtr); /* 152 */ + void (*tk_PreserveColormap) (Display * display, Colormap colormap); /* 153 */ + void (*tk_QueueWindowEvent) (XEvent * eventPtr, Tcl_QueuePosition position); /* 154 */ + void (*tk_RedrawImage) (Tk_Image image, int imageX, int imageY, int width, int height, Drawable drawable, int drawableX, int drawableY); /* 155 */ + void (*tk_ResizeWindow) (Tk_Window tkwin, int width, int height); /* 156 */ + int (*tk_RestackWindow) (Tk_Window tkwin, int aboveBelow, Tk_Window other); /* 157 */ + Tk_RestrictProc * (*tk_RestrictEvents) (Tk_RestrictProc * proc, ClientData arg, ClientData * prevArgPtr); /* 158 */ + int (*tk_SafeInit) (Tcl_Interp * interp); /* 159 */ + CONST char * (*tk_SetAppName) (Tk_Window tkwin, CONST char * name); /* 160 */ + void (*tk_SetBackgroundFromBorder) (Tk_Window tkwin, Tk_3DBorder border); /* 161 */ + void (*tk_SetClass) (Tk_Window tkwin, CONST char * className); /* 162 */ + void (*tk_SetGrid) (Tk_Window tkwin, int reqWidth, int reqHeight, int gridWidth, int gridHeight); /* 163 */ + void (*tk_SetInternalBorder) (Tk_Window tkwin, int width); /* 164 */ + void (*tk_SetWindowBackground) (Tk_Window tkwin, unsigned long pixel); /* 165 */ + void (*tk_SetWindowBackgroundPixmap) (Tk_Window tkwin, Pixmap pixmap); /* 166 */ + void (*tk_SetWindowBorder) (Tk_Window tkwin, unsigned long pixel); /* 167 */ + void (*tk_SetWindowBorderWidth) (Tk_Window tkwin, int width); /* 168 */ + void (*tk_SetWindowBorderPixmap) (Tk_Window tkwin, Pixmap pixmap); /* 169 */ + void (*tk_SetWindowColormap) (Tk_Window tkwin, Colormap colormap); /* 170 */ + int (*tk_SetWindowVisual) (Tk_Window tkwin, Visual * visual, int depth, Colormap colormap); /* 171 */ + void (*tk_SizeOfBitmap) (Display * display, Pixmap bitmap, int * widthPtr, int * heightPtr); /* 172 */ + void (*tk_SizeOfImage) (Tk_Image image, int * widthPtr, int * heightPtr); /* 173 */ + int (*tk_StrictMotif) (Tk_Window tkwin); /* 174 */ + void (*tk_TextLayoutToPostscript) (Tcl_Interp * interp, Tk_TextLayout layout); /* 175 */ + int (*tk_TextWidth) (Tk_Font font, CONST char * str, int numBytes); /* 176 */ + void (*tk_UndefineCursor) (Tk_Window window); /* 177 */ + void (*tk_UnderlineChars) (Display * display, Drawable drawable, GC gc, Tk_Font tkfont, CONST char * source, int x, int y, int firstByte, int lastByte); /* 178 */ + void (*tk_UnderlineTextLayout) (Display * display, Drawable drawable, GC gc, Tk_TextLayout layout, int x, int y, int underline); /* 179 */ + void (*tk_Ungrab) (Tk_Window tkwin); /* 180 */ + void (*tk_UnmaintainGeometry) (Tk_Window slave, Tk_Window master); /* 181 */ + void (*tk_UnmapWindow) (Tk_Window tkwin); /* 182 */ + void (*tk_UnsetGrid) (Tk_Window tkwin); /* 183 */ + void (*tk_UpdatePointer) (Tk_Window tkwin, int x, int y, int state); /* 184 */ + Pixmap (*tk_AllocBitmapFromObj) (Tcl_Interp * interp, Tk_Window tkwin, Tcl_Obj * objPtr); /* 185 */ + Tk_3DBorder (*tk_Alloc3DBorderFromObj) (Tcl_Interp * interp, Tk_Window tkwin, Tcl_Obj * objPtr); /* 186 */ + XColor * (*tk_AllocColorFromObj) (Tcl_Interp * interp, Tk_Window tkwin, Tcl_Obj * objPtr); /* 187 */ + Tk_Cursor (*tk_AllocCursorFromObj) (Tcl_Interp * interp, Tk_Window tkwin, Tcl_Obj * objPtr); /* 188 */ + Tk_Font (*tk_AllocFontFromObj) (Tcl_Interp * interp, Tk_Window tkwin, Tcl_Obj * objPtr); /* 189 */ + Tk_OptionTable (*tk_CreateOptionTable) (Tcl_Interp * interp, CONST Tk_OptionSpec * templatePtr); /* 190 */ + void (*tk_DeleteOptionTable) (Tk_OptionTable optionTable); /* 191 */ + void (*tk_Free3DBorderFromObj) (Tk_Window tkwin, Tcl_Obj * objPtr); /* 192 */ + void (*tk_FreeBitmapFromObj) (Tk_Window tkwin, Tcl_Obj * objPtr); /* 193 */ + void (*tk_FreeColorFromObj) (Tk_Window tkwin, Tcl_Obj * objPtr); /* 194 */ + void (*tk_FreeConfigOptions) (char * recordPtr, Tk_OptionTable optionToken, Tk_Window tkwin); /* 195 */ + void (*tk_FreeSavedOptions) (Tk_SavedOptions * savePtr); /* 196 */ + void (*tk_FreeCursorFromObj) (Tk_Window tkwin, Tcl_Obj * objPtr); /* 197 */ + void (*tk_FreeFontFromObj) (Tk_Window tkwin, Tcl_Obj * objPtr); /* 198 */ + Tk_3DBorder (*tk_Get3DBorderFromObj) (Tk_Window tkwin, Tcl_Obj * objPtr); /* 199 */ + int (*tk_GetAnchorFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tk_Anchor * anchorPtr); /* 200 */ + Pixmap (*tk_GetBitmapFromObj) (Tk_Window tkwin, Tcl_Obj * objPtr); /* 201 */ + XColor * (*tk_GetColorFromObj) (Tk_Window tkwin, Tcl_Obj * objPtr); /* 202 */ + Tk_Cursor (*tk_GetCursorFromObj) (Tk_Window tkwin, Tcl_Obj * objPtr); /* 203 */ + Tcl_Obj * (*tk_GetOptionInfo) (Tcl_Interp * interp, char * recordPtr, Tk_OptionTable optionTable, Tcl_Obj * namePtr, Tk_Window tkwin); /* 204 */ + Tcl_Obj * (*tk_GetOptionValue) (Tcl_Interp * interp, char * recordPtr, Tk_OptionTable optionTable, Tcl_Obj * namePtr, Tk_Window tkwin); /* 205 */ + int (*tk_GetJustifyFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tk_Justify * justifyPtr); /* 206 */ + int (*tk_GetMMFromObj) (Tcl_Interp * interp, Tk_Window tkwin, Tcl_Obj * objPtr, double * doublePtr); /* 207 */ + int (*tk_GetPixelsFromObj) (Tcl_Interp * interp, Tk_Window tkwin, Tcl_Obj * objPtr, int * intPtr); /* 208 */ + int (*tk_GetReliefFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int * resultPtr); /* 209 */ + int (*tk_GetScrollInfoObj) (Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], double * dblPtr, int * intPtr); /* 210 */ + int (*tk_InitOptions) (Tcl_Interp * interp, char * recordPtr, Tk_OptionTable optionToken, Tk_Window tkwin); /* 211 */ + void (*tk_MainEx) (int argc, char ** argv, Tcl_AppInitProc * appInitProc, Tcl_Interp * interp); /* 212 */ + void (*tk_RestoreSavedOptions) (Tk_SavedOptions * savePtr); /* 213 */ + int (*tk_SetOptions) (Tcl_Interp * interp, char * recordPtr, Tk_OptionTable optionTable, int objc, Tcl_Obj *CONST objv[], Tk_Window tkwin, Tk_SavedOptions * savePtr, int * maskPtr); /* 214 */ + void (*tk_InitConsoleChannels) (Tcl_Interp * interp); /* 215 */ + int (*tk_CreateConsoleWindow) (Tcl_Interp * interp); /* 216 */ + void (*tk_CreateSmoothMethod) (Tcl_Interp * interp, Tk_SmoothMethod * method); /* 217 */ + void *reserved218; + void *reserved219; + int (*tk_GetDash) (Tcl_Interp * interp, CONST char * value, Tk_Dash * dash); /* 220 */ + void (*tk_CreateOutline) (Tk_Outline * outline); /* 221 */ + void (*tk_DeleteOutline) (Display * display, Tk_Outline * outline); /* 222 */ + int (*tk_ConfigOutlineGC) (XGCValues * gcValues, Tk_Canvas canvas, Tk_Item * item, Tk_Outline * outline); /* 223 */ + int (*tk_ChangeOutlineGC) (Tk_Canvas canvas, Tk_Item * item, Tk_Outline * outline); /* 224 */ + int (*tk_ResetOutlineGC) (Tk_Canvas canvas, Tk_Item * item, Tk_Outline * outline); /* 225 */ + int (*tk_CanvasPsOutline) (Tk_Canvas canvas, Tk_Item * item, Tk_Outline * outline); /* 226 */ + void (*tk_SetTSOrigin) (Tk_Window tkwin, GC gc, int x, int y); /* 227 */ + int (*tk_CanvasGetCoordFromObj) (Tcl_Interp * interp, Tk_Canvas canvas, Tcl_Obj * obj, double * doublePtr); /* 228 */ + void (*tk_CanvasSetOffset) (Tk_Canvas canvas, GC gc, Tk_TSOffset * offset); /* 229 */ + void (*tk_DitherPhoto) (Tk_PhotoHandle handle, int x, int y, int width, int height); /* 230 */ + int (*tk_PostscriptBitmap) (Tcl_Interp * interp, Tk_Window tkwin, Tk_PostscriptInfo psInfo, Pixmap bitmap, int startX, int startY, int width, int height); /* 231 */ + int (*tk_PostscriptColor) (Tcl_Interp * interp, Tk_PostscriptInfo psInfo, XColor * colorPtr); /* 232 */ + int (*tk_PostscriptFont) (Tcl_Interp * interp, Tk_PostscriptInfo psInfo, Tk_Font font); /* 233 */ + int (*tk_PostscriptImage) (Tk_Image image, Tcl_Interp * interp, Tk_Window tkwin, Tk_PostscriptInfo psinfo, int x, int y, int width, int height, int prepass); /* 234 */ + void (*tk_PostscriptPath) (Tcl_Interp * interp, Tk_PostscriptInfo psInfo, double * coordPtr, int numPoints); /* 235 */ + int (*tk_PostscriptStipple) (Tcl_Interp * interp, Tk_Window tkwin, Tk_PostscriptInfo psInfo, Pixmap bitmap); /* 236 */ + double (*tk_PostscriptY) (double y, Tk_PostscriptInfo psInfo); /* 237 */ + int (*tk_PostscriptPhoto) (Tcl_Interp * interp, Tk_PhotoImageBlock * blockPtr, Tk_PostscriptInfo psInfo, int width, int height); /* 238 */ + void (*tk_CreateClientMessageHandler) (Tk_ClientMessageProc * proc); /* 239 */ + void (*tk_DeleteClientMessageHandler) (Tk_ClientMessageProc * proc); /* 240 */ + Tk_Window (*tk_CreateAnonymousWindow) (Tcl_Interp * interp, Tk_Window parent, CONST char * screenName); /* 241 */ + void (*tk_SetClassProcs) (Tk_Window tkwin, Tk_ClassProcs * procs, ClientData instanceData); /* 242 */ + void (*tk_SetInternalBorderEx) (Tk_Window tkwin, int left, int right, int top, int bottom); /* 243 */ + void (*tk_SetMinimumRequestSize) (Tk_Window tkwin, int minWidth, int minHeight); /* 244 */ + void (*tk_SetCaretPos) (Tk_Window tkwin, int x, int y, int height); /* 245 */ + void (*tk_PhotoPutBlock_Panic) (Tk_PhotoHandle handle, Tk_PhotoImageBlock * blockPtr, int x, int y, int width, int height, int compRule); /* 246 */ + void (*tk_PhotoPutZoomedBlock_Panic) (Tk_PhotoHandle handle, Tk_PhotoImageBlock * blockPtr, int x, int y, int width, int height, int zoomX, int zoomY, int subsampleX, int subsampleY, int compRule); /* 247 */ + int (*tk_CollapseMotionEvents) (Display * display, int collapse); /* 248 */ + Tk_StyleEngine (*tk_RegisterStyleEngine) (CONST char * name, Tk_StyleEngine parent); /* 249 */ + Tk_StyleEngine (*tk_GetStyleEngine) (CONST char * name); /* 250 */ + int (*tk_RegisterStyledElement) (Tk_StyleEngine engine, Tk_ElementSpec * templatePtr); /* 251 */ + int (*tk_GetElementId) (CONST char * name); /* 252 */ + Tk_Style (*tk_CreateStyle) (CONST char * name, Tk_StyleEngine engine, ClientData clientData); /* 253 */ + Tk_Style (*tk_GetStyle) (Tcl_Interp * interp, CONST char * name); /* 254 */ + void (*tk_FreeStyle) (Tk_Style style); /* 255 */ + CONST char * (*tk_NameOfStyle) (Tk_Style style); /* 256 */ + Tk_Style (*tk_AllocStyleFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 257 */ + Tk_Style (*tk_GetStyleFromObj) (Tcl_Obj * objPtr); /* 258 */ + void (*tk_FreeStyleFromObj) (Tcl_Obj * objPtr); /* 259 */ + Tk_StyledElement (*tk_GetStyledElement) (Tk_Style style, int elementId, Tk_OptionTable optionTable); /* 260 */ + void (*tk_GetElementSize) (Tk_Style style, Tk_StyledElement element, char * recordPtr, Tk_Window tkwin, int width, int height, int inner, int * widthPtr, int * heightPtr); /* 261 */ + void (*tk_GetElementBox) (Tk_Style style, Tk_StyledElement element, char * recordPtr, Tk_Window tkwin, int x, int y, int width, int height, int inner, int * xPtr, int * yPtr, int * widthPtr, int * heightPtr); /* 262 */ + int (*tk_GetElementBorderWidth) (Tk_Style style, Tk_StyledElement element, char * recordPtr, Tk_Window tkwin); /* 263 */ + void (*tk_DrawElement) (Tk_Style style, Tk_StyledElement element, char * recordPtr, Tk_Window tkwin, Drawable d, int x, int y, int width, int height, int state); /* 264 */ + int (*tk_PhotoExpand) (Tcl_Interp * interp, Tk_PhotoHandle handle, int width, int height); /* 265 */ + int (*tk_PhotoPutBlock) (Tcl_Interp * interp, Tk_PhotoHandle handle, Tk_PhotoImageBlock * blockPtr, int x, int y, int width, int height, int compRule); /* 266 */ + int (*tk_PhotoPutZoomedBlock) (Tcl_Interp * interp, Tk_PhotoHandle handle, Tk_PhotoImageBlock * blockPtr, int x, int y, int width, int height, int zoomX, int zoomY, int subsampleX, int subsampleY, int compRule); /* 267 */ + int (*tk_PhotoSetSize) (Tcl_Interp * interp, Tk_PhotoHandle handle, int width, int height); /* 268 */ + long (*tk_GetUserInactiveTime) (Display * dpy); /* 269 */ + void (*tk_ResetUserInactiveTime) (Display * dpy); /* 270 */ + Tcl_Interp * (*tk_Interp) (Tk_Window tkwin); /* 271 */ + void (*tk_CreateOldImageType) (Tk_ImageType * typePtr); /* 272 */ + void (*tk_CreateOldPhotoImageFormat) (Tk_PhotoImageFormat * formatPtr); /* 273 */ +} TkStubs; + +#ifdef __cplusplus +extern "C" { +#endif +extern TkStubs *tkStubsPtr; +#ifdef __cplusplus +} +#endif + +#if defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS) + +/* + * Inline function declarations: + */ + +#ifndef Tk_MainLoop +#define Tk_MainLoop \ + (tkStubsPtr->tk_MainLoop) /* 0 */ +#endif +#ifndef Tk_3DBorderColor +#define Tk_3DBorderColor \ + (tkStubsPtr->tk_3DBorderColor) /* 1 */ +#endif +#ifndef Tk_3DBorderGC +#define Tk_3DBorderGC \ + (tkStubsPtr->tk_3DBorderGC) /* 2 */ +#endif +#ifndef Tk_3DHorizontalBevel +#define Tk_3DHorizontalBevel \ + (tkStubsPtr->tk_3DHorizontalBevel) /* 3 */ +#endif +#ifndef Tk_3DVerticalBevel +#define Tk_3DVerticalBevel \ + (tkStubsPtr->tk_3DVerticalBevel) /* 4 */ +#endif +#ifndef Tk_AddOption +#define Tk_AddOption \ + (tkStubsPtr->tk_AddOption) /* 5 */ +#endif +#ifndef Tk_BindEvent +#define Tk_BindEvent \ + (tkStubsPtr->tk_BindEvent) /* 6 */ +#endif +#ifndef Tk_CanvasDrawableCoords +#define Tk_CanvasDrawableCoords \ + (tkStubsPtr->tk_CanvasDrawableCoords) /* 7 */ +#endif +#ifndef Tk_CanvasEventuallyRedraw +#define Tk_CanvasEventuallyRedraw \ + (tkStubsPtr->tk_CanvasEventuallyRedraw) /* 8 */ +#endif +#ifndef Tk_CanvasGetCoord +#define Tk_CanvasGetCoord \ + (tkStubsPtr->tk_CanvasGetCoord) /* 9 */ +#endif +#ifndef Tk_CanvasGetTextInfo +#define Tk_CanvasGetTextInfo \ + (tkStubsPtr->tk_CanvasGetTextInfo) /* 10 */ +#endif +#ifndef Tk_CanvasPsBitmap +#define Tk_CanvasPsBitmap \ + (tkStubsPtr->tk_CanvasPsBitmap) /* 11 */ +#endif +#ifndef Tk_CanvasPsColor +#define Tk_CanvasPsColor \ + (tkStubsPtr->tk_CanvasPsColor) /* 12 */ +#endif +#ifndef Tk_CanvasPsFont +#define Tk_CanvasPsFont \ + (tkStubsPtr->tk_CanvasPsFont) /* 13 */ +#endif +#ifndef Tk_CanvasPsPath +#define Tk_CanvasPsPath \ + (tkStubsPtr->tk_CanvasPsPath) /* 14 */ +#endif +#ifndef Tk_CanvasPsStipple +#define Tk_CanvasPsStipple \ + (tkStubsPtr->tk_CanvasPsStipple) /* 15 */ +#endif +#ifndef Tk_CanvasPsY +#define Tk_CanvasPsY \ + (tkStubsPtr->tk_CanvasPsY) /* 16 */ +#endif +#ifndef Tk_CanvasSetStippleOrigin +#define Tk_CanvasSetStippleOrigin \ + (tkStubsPtr->tk_CanvasSetStippleOrigin) /* 17 */ +#endif +#ifndef Tk_CanvasTagsParseProc +#define Tk_CanvasTagsParseProc \ + (tkStubsPtr->tk_CanvasTagsParseProc) /* 18 */ +#endif +#ifndef Tk_CanvasTagsPrintProc +#define Tk_CanvasTagsPrintProc \ + (tkStubsPtr->tk_CanvasTagsPrintProc) /* 19 */ +#endif +#ifndef Tk_CanvasTkwin +#define Tk_CanvasTkwin \ + (tkStubsPtr->tk_CanvasTkwin) /* 20 */ +#endif +#ifndef Tk_CanvasWindowCoords +#define Tk_CanvasWindowCoords \ + (tkStubsPtr->tk_CanvasWindowCoords) /* 21 */ +#endif +#ifndef Tk_ChangeWindowAttributes +#define Tk_ChangeWindowAttributes \ + (tkStubsPtr->tk_ChangeWindowAttributes) /* 22 */ +#endif +#ifndef Tk_CharBbox +#define Tk_CharBbox \ + (tkStubsPtr->tk_CharBbox) /* 23 */ +#endif +#ifndef Tk_ClearSelection +#define Tk_ClearSelection \ + (tkStubsPtr->tk_ClearSelection) /* 24 */ +#endif +#ifndef Tk_ClipboardAppend +#define Tk_ClipboardAppend \ + (tkStubsPtr->tk_ClipboardAppend) /* 25 */ +#endif +#ifndef Tk_ClipboardClear +#define Tk_ClipboardClear \ + (tkStubsPtr->tk_ClipboardClear) /* 26 */ +#endif +#ifndef Tk_ConfigureInfo +#define Tk_ConfigureInfo \ + (tkStubsPtr->tk_ConfigureInfo) /* 27 */ +#endif +#ifndef Tk_ConfigureValue +#define Tk_ConfigureValue \ + (tkStubsPtr->tk_ConfigureValue) /* 28 */ +#endif +#ifndef Tk_ConfigureWidget +#define Tk_ConfigureWidget \ + (tkStubsPtr->tk_ConfigureWidget) /* 29 */ +#endif +#ifndef Tk_ConfigureWindow +#define Tk_ConfigureWindow \ + (tkStubsPtr->tk_ConfigureWindow) /* 30 */ +#endif +#ifndef Tk_ComputeTextLayout +#define Tk_ComputeTextLayout \ + (tkStubsPtr->tk_ComputeTextLayout) /* 31 */ +#endif +#ifndef Tk_CoordsToWindow +#define Tk_CoordsToWindow \ + (tkStubsPtr->tk_CoordsToWindow) /* 32 */ +#endif +#ifndef Tk_CreateBinding +#define Tk_CreateBinding \ + (tkStubsPtr->tk_CreateBinding) /* 33 */ +#endif +#ifndef Tk_CreateBindingTable +#define Tk_CreateBindingTable \ + (tkStubsPtr->tk_CreateBindingTable) /* 34 */ +#endif +#ifndef Tk_CreateErrorHandler +#define Tk_CreateErrorHandler \ + (tkStubsPtr->tk_CreateErrorHandler) /* 35 */ +#endif +#ifndef Tk_CreateEventHandler +#define Tk_CreateEventHandler \ + (tkStubsPtr->tk_CreateEventHandler) /* 36 */ +#endif +#ifndef Tk_CreateGenericHandler +#define Tk_CreateGenericHandler \ + (tkStubsPtr->tk_CreateGenericHandler) /* 37 */ +#endif +#ifndef Tk_CreateImageType +#define Tk_CreateImageType \ + (tkStubsPtr->tk_CreateImageType) /* 38 */ +#endif +#ifndef Tk_CreateItemType +#define Tk_CreateItemType \ + (tkStubsPtr->tk_CreateItemType) /* 39 */ +#endif +#ifndef Tk_CreatePhotoImageFormat +#define Tk_CreatePhotoImageFormat \ + (tkStubsPtr->tk_CreatePhotoImageFormat) /* 40 */ +#endif +#ifndef Tk_CreateSelHandler +#define Tk_CreateSelHandler \ + (tkStubsPtr->tk_CreateSelHandler) /* 41 */ +#endif +#ifndef Tk_CreateWindow +#define Tk_CreateWindow \ + (tkStubsPtr->tk_CreateWindow) /* 42 */ +#endif +#ifndef Tk_CreateWindowFromPath +#define Tk_CreateWindowFromPath \ + (tkStubsPtr->tk_CreateWindowFromPath) /* 43 */ +#endif +#ifndef Tk_DefineBitmap +#define Tk_DefineBitmap \ + (tkStubsPtr->tk_DefineBitmap) /* 44 */ +#endif +#ifndef Tk_DefineCursor +#define Tk_DefineCursor \ + (tkStubsPtr->tk_DefineCursor) /* 45 */ +#endif +#ifndef Tk_DeleteAllBindings +#define Tk_DeleteAllBindings \ + (tkStubsPtr->tk_DeleteAllBindings) /* 46 */ +#endif +#ifndef Tk_DeleteBinding +#define Tk_DeleteBinding \ + (tkStubsPtr->tk_DeleteBinding) /* 47 */ +#endif +#ifndef Tk_DeleteBindingTable +#define Tk_DeleteBindingTable \ + (tkStubsPtr->tk_DeleteBindingTable) /* 48 */ +#endif +#ifndef Tk_DeleteErrorHandler +#define Tk_DeleteErrorHandler \ + (tkStubsPtr->tk_DeleteErrorHandler) /* 49 */ +#endif +#ifndef Tk_DeleteEventHandler +#define Tk_DeleteEventHandler \ + (tkStubsPtr->tk_DeleteEventHandler) /* 50 */ +#endif +#ifndef Tk_DeleteGenericHandler +#define Tk_DeleteGenericHandler \ + (tkStubsPtr->tk_DeleteGenericHandler) /* 51 */ +#endif +#ifndef Tk_DeleteImage +#define Tk_DeleteImage \ + (tkStubsPtr->tk_DeleteImage) /* 52 */ +#endif +#ifndef Tk_DeleteSelHandler +#define Tk_DeleteSelHandler \ + (tkStubsPtr->tk_DeleteSelHandler) /* 53 */ +#endif +#ifndef Tk_DestroyWindow +#define Tk_DestroyWindow \ + (tkStubsPtr->tk_DestroyWindow) /* 54 */ +#endif +#ifndef Tk_DisplayName +#define Tk_DisplayName \ + (tkStubsPtr->tk_DisplayName) /* 55 */ +#endif +#ifndef Tk_DistanceToTextLayout +#define Tk_DistanceToTextLayout \ + (tkStubsPtr->tk_DistanceToTextLayout) /* 56 */ +#endif +#ifndef Tk_Draw3DPolygon +#define Tk_Draw3DPolygon \ + (tkStubsPtr->tk_Draw3DPolygon) /* 57 */ +#endif +#ifndef Tk_Draw3DRectangle +#define Tk_Draw3DRectangle \ + (tkStubsPtr->tk_Draw3DRectangle) /* 58 */ +#endif +#ifndef Tk_DrawChars +#define Tk_DrawChars \ + (tkStubsPtr->tk_DrawChars) /* 59 */ +#endif +#ifndef Tk_DrawFocusHighlight +#define Tk_DrawFocusHighlight \ + (tkStubsPtr->tk_DrawFocusHighlight) /* 60 */ +#endif +#ifndef Tk_DrawTextLayout +#define Tk_DrawTextLayout \ + (tkStubsPtr->tk_DrawTextLayout) /* 61 */ +#endif +#ifndef Tk_Fill3DPolygon +#define Tk_Fill3DPolygon \ + (tkStubsPtr->tk_Fill3DPolygon) /* 62 */ +#endif +#ifndef Tk_Fill3DRectangle +#define Tk_Fill3DRectangle \ + (tkStubsPtr->tk_Fill3DRectangle) /* 63 */ +#endif +#ifndef Tk_FindPhoto +#define Tk_FindPhoto \ + (tkStubsPtr->tk_FindPhoto) /* 64 */ +#endif +#ifndef Tk_FontId +#define Tk_FontId \ + (tkStubsPtr->tk_FontId) /* 65 */ +#endif +#ifndef Tk_Free3DBorder +#define Tk_Free3DBorder \ + (tkStubsPtr->tk_Free3DBorder) /* 66 */ +#endif +#ifndef Tk_FreeBitmap +#define Tk_FreeBitmap \ + (tkStubsPtr->tk_FreeBitmap) /* 67 */ +#endif +#ifndef Tk_FreeColor +#define Tk_FreeColor \ + (tkStubsPtr->tk_FreeColor) /* 68 */ +#endif +#ifndef Tk_FreeColormap +#define Tk_FreeColormap \ + (tkStubsPtr->tk_FreeColormap) /* 69 */ +#endif +#ifndef Tk_FreeCursor +#define Tk_FreeCursor \ + (tkStubsPtr->tk_FreeCursor) /* 70 */ +#endif +#ifndef Tk_FreeFont +#define Tk_FreeFont \ + (tkStubsPtr->tk_FreeFont) /* 71 */ +#endif +#ifndef Tk_FreeGC +#define Tk_FreeGC \ + (tkStubsPtr->tk_FreeGC) /* 72 */ +#endif +#ifndef Tk_FreeImage +#define Tk_FreeImage \ + (tkStubsPtr->tk_FreeImage) /* 73 */ +#endif +#ifndef Tk_FreeOptions +#define Tk_FreeOptions \ + (tkStubsPtr->tk_FreeOptions) /* 74 */ +#endif +#ifndef Tk_FreePixmap +#define Tk_FreePixmap \ + (tkStubsPtr->tk_FreePixmap) /* 75 */ +#endif +#ifndef Tk_FreeTextLayout +#define Tk_FreeTextLayout \ + (tkStubsPtr->tk_FreeTextLayout) /* 76 */ +#endif +#ifndef Tk_FreeXId +#define Tk_FreeXId \ + (tkStubsPtr->tk_FreeXId) /* 77 */ +#endif +#ifndef Tk_GCForColor +#define Tk_GCForColor \ + (tkStubsPtr->tk_GCForColor) /* 78 */ +#endif +#ifndef Tk_GeometryRequest +#define Tk_GeometryRequest \ + (tkStubsPtr->tk_GeometryRequest) /* 79 */ +#endif +#ifndef Tk_Get3DBorder +#define Tk_Get3DBorder \ + (tkStubsPtr->tk_Get3DBorder) /* 80 */ +#endif +#ifndef Tk_GetAllBindings +#define Tk_GetAllBindings \ + (tkStubsPtr->tk_GetAllBindings) /* 81 */ +#endif +#ifndef Tk_GetAnchor +#define Tk_GetAnchor \ + (tkStubsPtr->tk_GetAnchor) /* 82 */ +#endif +#ifndef Tk_GetAtomName +#define Tk_GetAtomName \ + (tkStubsPtr->tk_GetAtomName) /* 83 */ +#endif +#ifndef Tk_GetBinding +#define Tk_GetBinding \ + (tkStubsPtr->tk_GetBinding) /* 84 */ +#endif +#ifndef Tk_GetBitmap +#define Tk_GetBitmap \ + (tkStubsPtr->tk_GetBitmap) /* 85 */ +#endif +#ifndef Tk_GetBitmapFromData +#define Tk_GetBitmapFromData \ + (tkStubsPtr->tk_GetBitmapFromData) /* 86 */ +#endif +#ifndef Tk_GetCapStyle +#define Tk_GetCapStyle \ + (tkStubsPtr->tk_GetCapStyle) /* 87 */ +#endif +#ifndef Tk_GetColor +#define Tk_GetColor \ + (tkStubsPtr->tk_GetColor) /* 88 */ +#endif +#ifndef Tk_GetColorByValue +#define Tk_GetColorByValue \ + (tkStubsPtr->tk_GetColorByValue) /* 89 */ +#endif +#ifndef Tk_GetColormap +#define Tk_GetColormap \ + (tkStubsPtr->tk_GetColormap) /* 90 */ +#endif +#ifndef Tk_GetCursor +#define Tk_GetCursor \ + (tkStubsPtr->tk_GetCursor) /* 91 */ +#endif +#ifndef Tk_GetCursorFromData +#define Tk_GetCursorFromData \ + (tkStubsPtr->tk_GetCursorFromData) /* 92 */ +#endif +#ifndef Tk_GetFont +#define Tk_GetFont \ + (tkStubsPtr->tk_GetFont) /* 93 */ +#endif +#ifndef Tk_GetFontFromObj +#define Tk_GetFontFromObj \ + (tkStubsPtr->tk_GetFontFromObj) /* 94 */ +#endif +#ifndef Tk_GetFontMetrics +#define Tk_GetFontMetrics \ + (tkStubsPtr->tk_GetFontMetrics) /* 95 */ +#endif +#ifndef Tk_GetGC +#define Tk_GetGC \ + (tkStubsPtr->tk_GetGC) /* 96 */ +#endif +#ifndef Tk_GetImage +#define Tk_GetImage \ + (tkStubsPtr->tk_GetImage) /* 97 */ +#endif +#ifndef Tk_GetImageMasterData +#define Tk_GetImageMasterData \ + (tkStubsPtr->tk_GetImageMasterData) /* 98 */ +#endif +#ifndef Tk_GetItemTypes +#define Tk_GetItemTypes \ + (tkStubsPtr->tk_GetItemTypes) /* 99 */ +#endif +#ifndef Tk_GetJoinStyle +#define Tk_GetJoinStyle \ + (tkStubsPtr->tk_GetJoinStyle) /* 100 */ +#endif +#ifndef Tk_GetJustify +#define Tk_GetJustify \ + (tkStubsPtr->tk_GetJustify) /* 101 */ +#endif +#ifndef Tk_GetNumMainWindows +#define Tk_GetNumMainWindows \ + (tkStubsPtr->tk_GetNumMainWindows) /* 102 */ +#endif +#ifndef Tk_GetOption +#define Tk_GetOption \ + (tkStubsPtr->tk_GetOption) /* 103 */ +#endif +#ifndef Tk_GetPixels +#define Tk_GetPixels \ + (tkStubsPtr->tk_GetPixels) /* 104 */ +#endif +#ifndef Tk_GetPixmap +#define Tk_GetPixmap \ + (tkStubsPtr->tk_GetPixmap) /* 105 */ +#endif +#ifndef Tk_GetRelief +#define Tk_GetRelief \ + (tkStubsPtr->tk_GetRelief) /* 106 */ +#endif +#ifndef Tk_GetRootCoords +#define Tk_GetRootCoords \ + (tkStubsPtr->tk_GetRootCoords) /* 107 */ +#endif +#ifndef Tk_GetScrollInfo +#define Tk_GetScrollInfo \ + (tkStubsPtr->tk_GetScrollInfo) /* 108 */ +#endif +#ifndef Tk_GetScreenMM +#define Tk_GetScreenMM \ + (tkStubsPtr->tk_GetScreenMM) /* 109 */ +#endif +#ifndef Tk_GetSelection +#define Tk_GetSelection \ + (tkStubsPtr->tk_GetSelection) /* 110 */ +#endif +#ifndef Tk_GetUid +#define Tk_GetUid \ + (tkStubsPtr->tk_GetUid) /* 111 */ +#endif +#ifndef Tk_GetVisual +#define Tk_GetVisual \ + (tkStubsPtr->tk_GetVisual) /* 112 */ +#endif +#ifndef Tk_GetVRootGeometry +#define Tk_GetVRootGeometry \ + (tkStubsPtr->tk_GetVRootGeometry) /* 113 */ +#endif +#ifndef Tk_Grab +#define Tk_Grab \ + (tkStubsPtr->tk_Grab) /* 114 */ +#endif +#ifndef Tk_HandleEvent +#define Tk_HandleEvent \ + (tkStubsPtr->tk_HandleEvent) /* 115 */ +#endif +#ifndef Tk_IdToWindow +#define Tk_IdToWindow \ + (tkStubsPtr->tk_IdToWindow) /* 116 */ +#endif +#ifndef Tk_ImageChanged +#define Tk_ImageChanged \ + (tkStubsPtr->tk_ImageChanged) /* 117 */ +#endif +#ifndef Tk_Init +#define Tk_Init \ + (tkStubsPtr->tk_Init) /* 118 */ +#endif +#ifndef Tk_InternAtom +#define Tk_InternAtom \ + (tkStubsPtr->tk_InternAtom) /* 119 */ +#endif +#ifndef Tk_IntersectTextLayout +#define Tk_IntersectTextLayout \ + (tkStubsPtr->tk_IntersectTextLayout) /* 120 */ +#endif +#ifndef Tk_MaintainGeometry +#define Tk_MaintainGeometry \ + (tkStubsPtr->tk_MaintainGeometry) /* 121 */ +#endif +#ifndef Tk_MainWindow +#define Tk_MainWindow \ + (tkStubsPtr->tk_MainWindow) /* 122 */ +#endif +#ifndef Tk_MakeWindowExist +#define Tk_MakeWindowExist \ + (tkStubsPtr->tk_MakeWindowExist) /* 123 */ +#endif +#ifndef Tk_ManageGeometry +#define Tk_ManageGeometry \ + (tkStubsPtr->tk_ManageGeometry) /* 124 */ +#endif +#ifndef Tk_MapWindow +#define Tk_MapWindow \ + (tkStubsPtr->tk_MapWindow) /* 125 */ +#endif +#ifndef Tk_MeasureChars +#define Tk_MeasureChars \ + (tkStubsPtr->tk_MeasureChars) /* 126 */ +#endif +#ifndef Tk_MoveResizeWindow +#define Tk_MoveResizeWindow \ + (tkStubsPtr->tk_MoveResizeWindow) /* 127 */ +#endif +#ifndef Tk_MoveWindow +#define Tk_MoveWindow \ + (tkStubsPtr->tk_MoveWindow) /* 128 */ +#endif +#ifndef Tk_MoveToplevelWindow +#define Tk_MoveToplevelWindow \ + (tkStubsPtr->tk_MoveToplevelWindow) /* 129 */ +#endif +#ifndef Tk_NameOf3DBorder +#define Tk_NameOf3DBorder \ + (tkStubsPtr->tk_NameOf3DBorder) /* 130 */ +#endif +#ifndef Tk_NameOfAnchor +#define Tk_NameOfAnchor \ + (tkStubsPtr->tk_NameOfAnchor) /* 131 */ +#endif +#ifndef Tk_NameOfBitmap +#define Tk_NameOfBitmap \ + (tkStubsPtr->tk_NameOfBitmap) /* 132 */ +#endif +#ifndef Tk_NameOfCapStyle +#define Tk_NameOfCapStyle \ + (tkStubsPtr->tk_NameOfCapStyle) /* 133 */ +#endif +#ifndef Tk_NameOfColor +#define Tk_NameOfColor \ + (tkStubsPtr->tk_NameOfColor) /* 134 */ +#endif +#ifndef Tk_NameOfCursor +#define Tk_NameOfCursor \ + (tkStubsPtr->tk_NameOfCursor) /* 135 */ +#endif +#ifndef Tk_NameOfFont +#define Tk_NameOfFont \ + (tkStubsPtr->tk_NameOfFont) /* 136 */ +#endif +#ifndef Tk_NameOfImage +#define Tk_NameOfImage \ + (tkStubsPtr->tk_NameOfImage) /* 137 */ +#endif +#ifndef Tk_NameOfJoinStyle +#define Tk_NameOfJoinStyle \ + (tkStubsPtr->tk_NameOfJoinStyle) /* 138 */ +#endif +#ifndef Tk_NameOfJustify +#define Tk_NameOfJustify \ + (tkStubsPtr->tk_NameOfJustify) /* 139 */ +#endif +#ifndef Tk_NameOfRelief +#define Tk_NameOfRelief \ + (tkStubsPtr->tk_NameOfRelief) /* 140 */ +#endif +#ifndef Tk_NameToWindow +#define Tk_NameToWindow \ + (tkStubsPtr->tk_NameToWindow) /* 141 */ +#endif +#ifndef Tk_OwnSelection +#define Tk_OwnSelection \ + (tkStubsPtr->tk_OwnSelection) /* 142 */ +#endif +#ifndef Tk_ParseArgv +#define Tk_ParseArgv \ + (tkStubsPtr->tk_ParseArgv) /* 143 */ +#endif +#ifndef Tk_PhotoPutBlock_NoComposite +#define Tk_PhotoPutBlock_NoComposite \ + (tkStubsPtr->tk_PhotoPutBlock_NoComposite) /* 144 */ +#endif +#ifndef Tk_PhotoPutZoomedBlock_NoComposite +#define Tk_PhotoPutZoomedBlock_NoComposite \ + (tkStubsPtr->tk_PhotoPutZoomedBlock_NoComposite) /* 145 */ +#endif +#ifndef Tk_PhotoGetImage +#define Tk_PhotoGetImage \ + (tkStubsPtr->tk_PhotoGetImage) /* 146 */ +#endif +#ifndef Tk_PhotoBlank +#define Tk_PhotoBlank \ + (tkStubsPtr->tk_PhotoBlank) /* 147 */ +#endif +#ifndef Tk_PhotoExpand_Panic +#define Tk_PhotoExpand_Panic \ + (tkStubsPtr->tk_PhotoExpand_Panic) /* 148 */ +#endif +#ifndef Tk_PhotoGetSize +#define Tk_PhotoGetSize \ + (tkStubsPtr->tk_PhotoGetSize) /* 149 */ +#endif +#ifndef Tk_PhotoSetSize_Panic +#define Tk_PhotoSetSize_Panic \ + (tkStubsPtr->tk_PhotoSetSize_Panic) /* 150 */ +#endif +#ifndef Tk_PointToChar +#define Tk_PointToChar \ + (tkStubsPtr->tk_PointToChar) /* 151 */ +#endif +#ifndef Tk_PostscriptFontName +#define Tk_PostscriptFontName \ + (tkStubsPtr->tk_PostscriptFontName) /* 152 */ +#endif +#ifndef Tk_PreserveColormap +#define Tk_PreserveColormap \ + (tkStubsPtr->tk_PreserveColormap) /* 153 */ +#endif +#ifndef Tk_QueueWindowEvent +#define Tk_QueueWindowEvent \ + (tkStubsPtr->tk_QueueWindowEvent) /* 154 */ +#endif +#ifndef Tk_RedrawImage +#define Tk_RedrawImage \ + (tkStubsPtr->tk_RedrawImage) /* 155 */ +#endif +#ifndef Tk_ResizeWindow +#define Tk_ResizeWindow \ + (tkStubsPtr->tk_ResizeWindow) /* 156 */ +#endif +#ifndef Tk_RestackWindow +#define Tk_RestackWindow \ + (tkStubsPtr->tk_RestackWindow) /* 157 */ +#endif +#ifndef Tk_RestrictEvents +#define Tk_RestrictEvents \ + (tkStubsPtr->tk_RestrictEvents) /* 158 */ +#endif +#ifndef Tk_SafeInit +#define Tk_SafeInit \ + (tkStubsPtr->tk_SafeInit) /* 159 */ +#endif +#ifndef Tk_SetAppName +#define Tk_SetAppName \ + (tkStubsPtr->tk_SetAppName) /* 160 */ +#endif +#ifndef Tk_SetBackgroundFromBorder +#define Tk_SetBackgroundFromBorder \ + (tkStubsPtr->tk_SetBackgroundFromBorder) /* 161 */ +#endif +#ifndef Tk_SetClass +#define Tk_SetClass \ + (tkStubsPtr->tk_SetClass) /* 162 */ +#endif +#ifndef Tk_SetGrid +#define Tk_SetGrid \ + (tkStubsPtr->tk_SetGrid) /* 163 */ +#endif +#ifndef Tk_SetInternalBorder +#define Tk_SetInternalBorder \ + (tkStubsPtr->tk_SetInternalBorder) /* 164 */ +#endif +#ifndef Tk_SetWindowBackground +#define Tk_SetWindowBackground \ + (tkStubsPtr->tk_SetWindowBackground) /* 165 */ +#endif +#ifndef Tk_SetWindowBackgroundPixmap +#define Tk_SetWindowBackgroundPixmap \ + (tkStubsPtr->tk_SetWindowBackgroundPixmap) /* 166 */ +#endif +#ifndef Tk_SetWindowBorder +#define Tk_SetWindowBorder \ + (tkStubsPtr->tk_SetWindowBorder) /* 167 */ +#endif +#ifndef Tk_SetWindowBorderWidth +#define Tk_SetWindowBorderWidth \ + (tkStubsPtr->tk_SetWindowBorderWidth) /* 168 */ +#endif +#ifndef Tk_SetWindowBorderPixmap +#define Tk_SetWindowBorderPixmap \ + (tkStubsPtr->tk_SetWindowBorderPixmap) /* 169 */ +#endif +#ifndef Tk_SetWindowColormap +#define Tk_SetWindowColormap \ + (tkStubsPtr->tk_SetWindowColormap) /* 170 */ +#endif +#ifndef Tk_SetWindowVisual +#define Tk_SetWindowVisual \ + (tkStubsPtr->tk_SetWindowVisual) /* 171 */ +#endif +#ifndef Tk_SizeOfBitmap +#define Tk_SizeOfBitmap \ + (tkStubsPtr->tk_SizeOfBitmap) /* 172 */ +#endif +#ifndef Tk_SizeOfImage +#define Tk_SizeOfImage \ + (tkStubsPtr->tk_SizeOfImage) /* 173 */ +#endif +#ifndef Tk_StrictMotif +#define Tk_StrictMotif \ + (tkStubsPtr->tk_StrictMotif) /* 174 */ +#endif +#ifndef Tk_TextLayoutToPostscript +#define Tk_TextLayoutToPostscript \ + (tkStubsPtr->tk_TextLayoutToPostscript) /* 175 */ +#endif +#ifndef Tk_TextWidth +#define Tk_TextWidth \ + (tkStubsPtr->tk_TextWidth) /* 176 */ +#endif +#ifndef Tk_UndefineCursor +#define Tk_UndefineCursor \ + (tkStubsPtr->tk_UndefineCursor) /* 177 */ +#endif +#ifndef Tk_UnderlineChars +#define Tk_UnderlineChars \ + (tkStubsPtr->tk_UnderlineChars) /* 178 */ +#endif +#ifndef Tk_UnderlineTextLayout +#define Tk_UnderlineTextLayout \ + (tkStubsPtr->tk_UnderlineTextLayout) /* 179 */ +#endif +#ifndef Tk_Ungrab +#define Tk_Ungrab \ + (tkStubsPtr->tk_Ungrab) /* 180 */ +#endif +#ifndef Tk_UnmaintainGeometry +#define Tk_UnmaintainGeometry \ + (tkStubsPtr->tk_UnmaintainGeometry) /* 181 */ +#endif +#ifndef Tk_UnmapWindow +#define Tk_UnmapWindow \ + (tkStubsPtr->tk_UnmapWindow) /* 182 */ +#endif +#ifndef Tk_UnsetGrid +#define Tk_UnsetGrid \ + (tkStubsPtr->tk_UnsetGrid) /* 183 */ +#endif +#ifndef Tk_UpdatePointer +#define Tk_UpdatePointer \ + (tkStubsPtr->tk_UpdatePointer) /* 184 */ +#endif +#ifndef Tk_AllocBitmapFromObj +#define Tk_AllocBitmapFromObj \ + (tkStubsPtr->tk_AllocBitmapFromObj) /* 185 */ +#endif +#ifndef Tk_Alloc3DBorderFromObj +#define Tk_Alloc3DBorderFromObj \ + (tkStubsPtr->tk_Alloc3DBorderFromObj) /* 186 */ +#endif +#ifndef Tk_AllocColorFromObj +#define Tk_AllocColorFromObj \ + (tkStubsPtr->tk_AllocColorFromObj) /* 187 */ +#endif +#ifndef Tk_AllocCursorFromObj +#define Tk_AllocCursorFromObj \ + (tkStubsPtr->tk_AllocCursorFromObj) /* 188 */ +#endif +#ifndef Tk_AllocFontFromObj +#define Tk_AllocFontFromObj \ + (tkStubsPtr->tk_AllocFontFromObj) /* 189 */ +#endif +#ifndef Tk_CreateOptionTable +#define Tk_CreateOptionTable \ + (tkStubsPtr->tk_CreateOptionTable) /* 190 */ +#endif +#ifndef Tk_DeleteOptionTable +#define Tk_DeleteOptionTable \ + (tkStubsPtr->tk_DeleteOptionTable) /* 191 */ +#endif +#ifndef Tk_Free3DBorderFromObj +#define Tk_Free3DBorderFromObj \ + (tkStubsPtr->tk_Free3DBorderFromObj) /* 192 */ +#endif +#ifndef Tk_FreeBitmapFromObj +#define Tk_FreeBitmapFromObj \ + (tkStubsPtr->tk_FreeBitmapFromObj) /* 193 */ +#endif +#ifndef Tk_FreeColorFromObj +#define Tk_FreeColorFromObj \ + (tkStubsPtr->tk_FreeColorFromObj) /* 194 */ +#endif +#ifndef Tk_FreeConfigOptions +#define Tk_FreeConfigOptions \ + (tkStubsPtr->tk_FreeConfigOptions) /* 195 */ +#endif +#ifndef Tk_FreeSavedOptions +#define Tk_FreeSavedOptions \ + (tkStubsPtr->tk_FreeSavedOptions) /* 196 */ +#endif +#ifndef Tk_FreeCursorFromObj +#define Tk_FreeCursorFromObj \ + (tkStubsPtr->tk_FreeCursorFromObj) /* 197 */ +#endif +#ifndef Tk_FreeFontFromObj +#define Tk_FreeFontFromObj \ + (tkStubsPtr->tk_FreeFontFromObj) /* 198 */ +#endif +#ifndef Tk_Get3DBorderFromObj +#define Tk_Get3DBorderFromObj \ + (tkStubsPtr->tk_Get3DBorderFromObj) /* 199 */ +#endif +#ifndef Tk_GetAnchorFromObj +#define Tk_GetAnchorFromObj \ + (tkStubsPtr->tk_GetAnchorFromObj) /* 200 */ +#endif +#ifndef Tk_GetBitmapFromObj +#define Tk_GetBitmapFromObj \ + (tkStubsPtr->tk_GetBitmapFromObj) /* 201 */ +#endif +#ifndef Tk_GetColorFromObj +#define Tk_GetColorFromObj \ + (tkStubsPtr->tk_GetColorFromObj) /* 202 */ +#endif +#ifndef Tk_GetCursorFromObj +#define Tk_GetCursorFromObj \ + (tkStubsPtr->tk_GetCursorFromObj) /* 203 */ +#endif +#ifndef Tk_GetOptionInfo +#define Tk_GetOptionInfo \ + (tkStubsPtr->tk_GetOptionInfo) /* 204 */ +#endif +#ifndef Tk_GetOptionValue +#define Tk_GetOptionValue \ + (tkStubsPtr->tk_GetOptionValue) /* 205 */ +#endif +#ifndef Tk_GetJustifyFromObj +#define Tk_GetJustifyFromObj \ + (tkStubsPtr->tk_GetJustifyFromObj) /* 206 */ +#endif +#ifndef Tk_GetMMFromObj +#define Tk_GetMMFromObj \ + (tkStubsPtr->tk_GetMMFromObj) /* 207 */ +#endif +#ifndef Tk_GetPixelsFromObj +#define Tk_GetPixelsFromObj \ + (tkStubsPtr->tk_GetPixelsFromObj) /* 208 */ +#endif +#ifndef Tk_GetReliefFromObj +#define Tk_GetReliefFromObj \ + (tkStubsPtr->tk_GetReliefFromObj) /* 209 */ +#endif +#ifndef Tk_GetScrollInfoObj +#define Tk_GetScrollInfoObj \ + (tkStubsPtr->tk_GetScrollInfoObj) /* 210 */ +#endif +#ifndef Tk_InitOptions +#define Tk_InitOptions \ + (tkStubsPtr->tk_InitOptions) /* 211 */ +#endif +#ifndef Tk_MainEx +#define Tk_MainEx \ + (tkStubsPtr->tk_MainEx) /* 212 */ +#endif +#ifndef Tk_RestoreSavedOptions +#define Tk_RestoreSavedOptions \ + (tkStubsPtr->tk_RestoreSavedOptions) /* 213 */ +#endif +#ifndef Tk_SetOptions +#define Tk_SetOptions \ + (tkStubsPtr->tk_SetOptions) /* 214 */ +#endif +#ifndef Tk_InitConsoleChannels +#define Tk_InitConsoleChannels \ + (tkStubsPtr->tk_InitConsoleChannels) /* 215 */ +#endif +#ifndef Tk_CreateConsoleWindow +#define Tk_CreateConsoleWindow \ + (tkStubsPtr->tk_CreateConsoleWindow) /* 216 */ +#endif +#ifndef Tk_CreateSmoothMethod +#define Tk_CreateSmoothMethod \ + (tkStubsPtr->tk_CreateSmoothMethod) /* 217 */ +#endif +/* Slot 218 is reserved */ +/* Slot 219 is reserved */ +#ifndef Tk_GetDash +#define Tk_GetDash \ + (tkStubsPtr->tk_GetDash) /* 220 */ +#endif +#ifndef Tk_CreateOutline +#define Tk_CreateOutline \ + (tkStubsPtr->tk_CreateOutline) /* 221 */ +#endif +#ifndef Tk_DeleteOutline +#define Tk_DeleteOutline \ + (tkStubsPtr->tk_DeleteOutline) /* 222 */ +#endif +#ifndef Tk_ConfigOutlineGC +#define Tk_ConfigOutlineGC \ + (tkStubsPtr->tk_ConfigOutlineGC) /* 223 */ +#endif +#ifndef Tk_ChangeOutlineGC +#define Tk_ChangeOutlineGC \ + (tkStubsPtr->tk_ChangeOutlineGC) /* 224 */ +#endif +#ifndef Tk_ResetOutlineGC +#define Tk_ResetOutlineGC \ + (tkStubsPtr->tk_ResetOutlineGC) /* 225 */ +#endif +#ifndef Tk_CanvasPsOutline +#define Tk_CanvasPsOutline \ + (tkStubsPtr->tk_CanvasPsOutline) /* 226 */ +#endif +#ifndef Tk_SetTSOrigin +#define Tk_SetTSOrigin \ + (tkStubsPtr->tk_SetTSOrigin) /* 227 */ +#endif +#ifndef Tk_CanvasGetCoordFromObj +#define Tk_CanvasGetCoordFromObj \ + (tkStubsPtr->tk_CanvasGetCoordFromObj) /* 228 */ +#endif +#ifndef Tk_CanvasSetOffset +#define Tk_CanvasSetOffset \ + (tkStubsPtr->tk_CanvasSetOffset) /* 229 */ +#endif +#ifndef Tk_DitherPhoto +#define Tk_DitherPhoto \ + (tkStubsPtr->tk_DitherPhoto) /* 230 */ +#endif +#ifndef Tk_PostscriptBitmap +#define Tk_PostscriptBitmap \ + (tkStubsPtr->tk_PostscriptBitmap) /* 231 */ +#endif +#ifndef Tk_PostscriptColor +#define Tk_PostscriptColor \ + (tkStubsPtr->tk_PostscriptColor) /* 232 */ +#endif +#ifndef Tk_PostscriptFont +#define Tk_PostscriptFont \ + (tkStubsPtr->tk_PostscriptFont) /* 233 */ +#endif +#ifndef Tk_PostscriptImage +#define Tk_PostscriptImage \ + (tkStubsPtr->tk_PostscriptImage) /* 234 */ +#endif +#ifndef Tk_PostscriptPath +#define Tk_PostscriptPath \ + (tkStubsPtr->tk_PostscriptPath) /* 235 */ +#endif +#ifndef Tk_PostscriptStipple +#define Tk_PostscriptStipple \ + (tkStubsPtr->tk_PostscriptStipple) /* 236 */ +#endif +#ifndef Tk_PostscriptY +#define Tk_PostscriptY \ + (tkStubsPtr->tk_PostscriptY) /* 237 */ +#endif +#ifndef Tk_PostscriptPhoto +#define Tk_PostscriptPhoto \ + (tkStubsPtr->tk_PostscriptPhoto) /* 238 */ +#endif +#ifndef Tk_CreateClientMessageHandler +#define Tk_CreateClientMessageHandler \ + (tkStubsPtr->tk_CreateClientMessageHandler) /* 239 */ +#endif +#ifndef Tk_DeleteClientMessageHandler +#define Tk_DeleteClientMessageHandler \ + (tkStubsPtr->tk_DeleteClientMessageHandler) /* 240 */ +#endif +#ifndef Tk_CreateAnonymousWindow +#define Tk_CreateAnonymousWindow \ + (tkStubsPtr->tk_CreateAnonymousWindow) /* 241 */ +#endif +#ifndef Tk_SetClassProcs +#define Tk_SetClassProcs \ + (tkStubsPtr->tk_SetClassProcs) /* 242 */ +#endif +#ifndef Tk_SetInternalBorderEx +#define Tk_SetInternalBorderEx \ + (tkStubsPtr->tk_SetInternalBorderEx) /* 243 */ +#endif +#ifndef Tk_SetMinimumRequestSize +#define Tk_SetMinimumRequestSize \ + (tkStubsPtr->tk_SetMinimumRequestSize) /* 244 */ +#endif +#ifndef Tk_SetCaretPos +#define Tk_SetCaretPos \ + (tkStubsPtr->tk_SetCaretPos) /* 245 */ +#endif +#ifndef Tk_PhotoPutBlock_Panic +#define Tk_PhotoPutBlock_Panic \ + (tkStubsPtr->tk_PhotoPutBlock_Panic) /* 246 */ +#endif +#ifndef Tk_PhotoPutZoomedBlock_Panic +#define Tk_PhotoPutZoomedBlock_Panic \ + (tkStubsPtr->tk_PhotoPutZoomedBlock_Panic) /* 247 */ +#endif +#ifndef Tk_CollapseMotionEvents +#define Tk_CollapseMotionEvents \ + (tkStubsPtr->tk_CollapseMotionEvents) /* 248 */ +#endif +#ifndef Tk_RegisterStyleEngine +#define Tk_RegisterStyleEngine \ + (tkStubsPtr->tk_RegisterStyleEngine) /* 249 */ +#endif +#ifndef Tk_GetStyleEngine +#define Tk_GetStyleEngine \ + (tkStubsPtr->tk_GetStyleEngine) /* 250 */ +#endif +#ifndef Tk_RegisterStyledElement +#define Tk_RegisterStyledElement \ + (tkStubsPtr->tk_RegisterStyledElement) /* 251 */ +#endif +#ifndef Tk_GetElementId +#define Tk_GetElementId \ + (tkStubsPtr->tk_GetElementId) /* 252 */ +#endif +#ifndef Tk_CreateStyle +#define Tk_CreateStyle \ + (tkStubsPtr->tk_CreateStyle) /* 253 */ +#endif +#ifndef Tk_GetStyle +#define Tk_GetStyle \ + (tkStubsPtr->tk_GetStyle) /* 254 */ +#endif +#ifndef Tk_FreeStyle +#define Tk_FreeStyle \ + (tkStubsPtr->tk_FreeStyle) /* 255 */ +#endif +#ifndef Tk_NameOfStyle +#define Tk_NameOfStyle \ + (tkStubsPtr->tk_NameOfStyle) /* 256 */ +#endif +#ifndef Tk_AllocStyleFromObj +#define Tk_AllocStyleFromObj \ + (tkStubsPtr->tk_AllocStyleFromObj) /* 257 */ +#endif +#ifndef Tk_GetStyleFromObj +#define Tk_GetStyleFromObj \ + (tkStubsPtr->tk_GetStyleFromObj) /* 258 */ +#endif +#ifndef Tk_FreeStyleFromObj +#define Tk_FreeStyleFromObj \ + (tkStubsPtr->tk_FreeStyleFromObj) /* 259 */ +#endif +#ifndef Tk_GetStyledElement +#define Tk_GetStyledElement \ + (tkStubsPtr->tk_GetStyledElement) /* 260 */ +#endif +#ifndef Tk_GetElementSize +#define Tk_GetElementSize \ + (tkStubsPtr->tk_GetElementSize) /* 261 */ +#endif +#ifndef Tk_GetElementBox +#define Tk_GetElementBox \ + (tkStubsPtr->tk_GetElementBox) /* 262 */ +#endif +#ifndef Tk_GetElementBorderWidth +#define Tk_GetElementBorderWidth \ + (tkStubsPtr->tk_GetElementBorderWidth) /* 263 */ +#endif +#ifndef Tk_DrawElement +#define Tk_DrawElement \ + (tkStubsPtr->tk_DrawElement) /* 264 */ +#endif +#ifndef Tk_PhotoExpand +#define Tk_PhotoExpand \ + (tkStubsPtr->tk_PhotoExpand) /* 265 */ +#endif +#ifndef Tk_PhotoPutBlock +#define Tk_PhotoPutBlock \ + (tkStubsPtr->tk_PhotoPutBlock) /* 266 */ +#endif +#ifndef Tk_PhotoPutZoomedBlock +#define Tk_PhotoPutZoomedBlock \ + (tkStubsPtr->tk_PhotoPutZoomedBlock) /* 267 */ +#endif +#ifndef Tk_PhotoSetSize +#define Tk_PhotoSetSize \ + (tkStubsPtr->tk_PhotoSetSize) /* 268 */ +#endif +#ifndef Tk_GetUserInactiveTime +#define Tk_GetUserInactiveTime \ + (tkStubsPtr->tk_GetUserInactiveTime) /* 269 */ +#endif +#ifndef Tk_ResetUserInactiveTime +#define Tk_ResetUserInactiveTime \ + (tkStubsPtr->tk_ResetUserInactiveTime) /* 270 */ +#endif +#ifndef Tk_Interp +#define Tk_Interp \ + (tkStubsPtr->tk_Interp) /* 271 */ +#endif +#ifndef Tk_CreateOldImageType +#define Tk_CreateOldImageType \ + (tkStubsPtr->tk_CreateOldImageType) /* 272 */ +#endif +#ifndef Tk_CreateOldPhotoImageFormat +#define Tk_CreateOldPhotoImageFormat \ + (tkStubsPtr->tk_CreateOldPhotoImageFormat) /* 273 */ +#endif + +#endif /* defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS) */ + +/* !END!: Do not edit above this line. */ + +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLIMPORT + +#endif /* _TKDECLS */ + diff --git a/cobroutines/tkIntXlibDecls.h b/cobroutines/tkIntXlibDecls.h new file mode 100644 index 0000000..aadd545 --- /dev/null +++ b/cobroutines/tkIntXlibDecls.h @@ -0,0 +1,2241 @@ +/* + * tkIntXlibDecls.h -- + * + * This file contains the declarations for all platform dependent + * unsupported functions that are exported by the Tk library. These + * interfaces are not guaranteed to remain the same between + * versions. Use at your own risk. + * + * Copyright (c) 1998-1999 by Scriptics Corporation. + * All rights reserved. + * + * RCS: @(#) $Id: tkIntXlibDecls.h,v 1.23 2007/12/13 15:24:15 dgp Exp $ + */ + +#ifndef _TKINTXLIBDECLS +#define _TKINTXLIBDECLS + +#include "X11/Xutil.h" + +#ifdef BUILD_tk +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLEXPORT +#endif + +/* + * WARNING: This file is automatically generated by the tools/genStubs.tcl + * script. Any modifications to the function declarations below should be made + * in the generic/tkInt.decls script. + */ + +/* !BEGIN!: Do not edit below this line. */ + +/* + * Exported function declarations: + */ + +#ifdef __WIN32__ /* WIN */ +#ifndef XSetDashes_TCL_DECLARED +#define XSetDashes_TCL_DECLARED +/* 0 */ +EXTERN void XSetDashes (Display * display, GC gc, + int dash_offset, _Xconst char * dash_list, + int n); +#endif +#ifndef XGetModifierMapping_TCL_DECLARED +#define XGetModifierMapping_TCL_DECLARED +/* 1 */ +EXTERN XModifierKeymap * XGetModifierMapping (Display * d); +#endif +#ifndef XCreateImage_TCL_DECLARED +#define XCreateImage_TCL_DECLARED +/* 2 */ +EXTERN XImage * XCreateImage (Display * d, Visual * v, + unsigned int ui1, int i1, int i2, char * cp, + unsigned int ui2, unsigned int ui3, int i3, + int i4); +#endif +#ifndef XGetImage_TCL_DECLARED +#define XGetImage_TCL_DECLARED +/* 3 */ +EXTERN XImage * XGetImage (Display * d, Drawable dr, int i1, int i2, + unsigned int ui1, unsigned int ui2, + unsigned long ul, int i3); +#endif +#ifndef XGetAtomName_TCL_DECLARED +#define XGetAtomName_TCL_DECLARED +/* 4 */ +EXTERN char * XGetAtomName (Display * d, Atom a); +#endif +#ifndef XKeysymToString_TCL_DECLARED +#define XKeysymToString_TCL_DECLARED +/* 5 */ +EXTERN char * XKeysymToString (KeySym k); +#endif +#ifndef XCreateColormap_TCL_DECLARED +#define XCreateColormap_TCL_DECLARED +/* 6 */ +EXTERN Colormap XCreateColormap (Display * d, Window w, Visual * v, + int i); +#endif +#ifndef XCreatePixmapCursor_TCL_DECLARED +#define XCreatePixmapCursor_TCL_DECLARED +/* 7 */ +EXTERN Cursor XCreatePixmapCursor (Display * d, Pixmap p1, + Pixmap p2, XColor * x1, XColor * x2, + unsigned int ui1, unsigned int ui2); +#endif +#ifndef XCreateGlyphCursor_TCL_DECLARED +#define XCreateGlyphCursor_TCL_DECLARED +/* 8 */ +EXTERN Cursor XCreateGlyphCursor (Display * d, Font f1, Font f2, + unsigned int ui1, unsigned int ui2, + XColor * x1, XColor * x2); +#endif +#ifndef XGContextFromGC_TCL_DECLARED +#define XGContextFromGC_TCL_DECLARED +/* 9 */ +EXTERN GContext XGContextFromGC (GC g); +#endif +#ifndef XListHosts_TCL_DECLARED +#define XListHosts_TCL_DECLARED +/* 10 */ +EXTERN XHostAddress * XListHosts (Display * d, int * i, Bool * b); +#endif +#ifndef XKeycodeToKeysym_TCL_DECLARED +#define XKeycodeToKeysym_TCL_DECLARED +/* 11 */ +EXTERN KeySym XKeycodeToKeysym (Display * d, unsigned int k, int i); +#endif +#ifndef XStringToKeysym_TCL_DECLARED +#define XStringToKeysym_TCL_DECLARED +/* 12 */ +EXTERN KeySym XStringToKeysym (_Xconst char * c); +#endif +#ifndef XRootWindow_TCL_DECLARED +#define XRootWindow_TCL_DECLARED +/* 13 */ +EXTERN Window XRootWindow (Display * d, int i); +#endif +#ifndef XSetErrorHandler_TCL_DECLARED +#define XSetErrorHandler_TCL_DECLARED +/* 14 */ +EXTERN XErrorHandler XSetErrorHandler (XErrorHandler x); +#endif +#ifndef XIconifyWindow_TCL_DECLARED +#define XIconifyWindow_TCL_DECLARED +/* 15 */ +EXTERN Status XIconifyWindow (Display * d, Window w, int i); +#endif +#ifndef XWithdrawWindow_TCL_DECLARED +#define XWithdrawWindow_TCL_DECLARED +/* 16 */ +EXTERN Status XWithdrawWindow (Display * d, Window w, int i); +#endif +#ifndef XGetWMColormapWindows_TCL_DECLARED +#define XGetWMColormapWindows_TCL_DECLARED +/* 17 */ +EXTERN Status XGetWMColormapWindows (Display * d, Window w, + Window ** wpp, int * ip); +#endif +#ifndef XAllocColor_TCL_DECLARED +#define XAllocColor_TCL_DECLARED +/* 18 */ +EXTERN Status XAllocColor (Display * d, Colormap c, XColor * xp); +#endif +#ifndef XBell_TCL_DECLARED +#define XBell_TCL_DECLARED +/* 19 */ +EXTERN void XBell (Display * d, int i); +#endif +#ifndef XChangeProperty_TCL_DECLARED +#define XChangeProperty_TCL_DECLARED +/* 20 */ +EXTERN void XChangeProperty (Display * d, Window w, Atom a1, + Atom a2, int i1, int i2, + _Xconst unsigned char * c, int i3); +#endif +#ifndef XChangeWindowAttributes_TCL_DECLARED +#define XChangeWindowAttributes_TCL_DECLARED +/* 21 */ +EXTERN void XChangeWindowAttributes (Display * d, Window w, + unsigned long ul, XSetWindowAttributes * x); +#endif +#ifndef XClearWindow_TCL_DECLARED +#define XClearWindow_TCL_DECLARED +/* 22 */ +EXTERN void XClearWindow (Display * d, Window w); +#endif +#ifndef XConfigureWindow_TCL_DECLARED +#define XConfigureWindow_TCL_DECLARED +/* 23 */ +EXTERN void XConfigureWindow (Display * d, Window w, + unsigned int i, XWindowChanges * x); +#endif +#ifndef XCopyArea_TCL_DECLARED +#define XCopyArea_TCL_DECLARED +/* 24 */ +EXTERN void XCopyArea (Display * d, Drawable dr1, Drawable dr2, + GC g, int i1, int i2, unsigned int ui1, + unsigned int ui2, int i3, int i4); +#endif +#ifndef XCopyPlane_TCL_DECLARED +#define XCopyPlane_TCL_DECLARED +/* 25 */ +EXTERN void XCopyPlane (Display * d, Drawable dr1, Drawable dr2, + GC g, int i1, int i2, unsigned int ui1, + unsigned int ui2, int i3, int i4, + unsigned long ul); +#endif +#ifndef XCreateBitmapFromData_TCL_DECLARED +#define XCreateBitmapFromData_TCL_DECLARED +/* 26 */ +EXTERN Pixmap XCreateBitmapFromData (Display * display, Drawable d, + _Xconst char * data, unsigned int width, + unsigned int height); +#endif +#ifndef XDefineCursor_TCL_DECLARED +#define XDefineCursor_TCL_DECLARED +/* 27 */ +EXTERN void XDefineCursor (Display * d, Window w, Cursor c); +#endif +#ifndef XDeleteProperty_TCL_DECLARED +#define XDeleteProperty_TCL_DECLARED +/* 28 */ +EXTERN void XDeleteProperty (Display * d, Window w, Atom a); +#endif +#ifndef XDestroyWindow_TCL_DECLARED +#define XDestroyWindow_TCL_DECLARED +/* 29 */ +EXTERN void XDestroyWindow (Display * d, Window w); +#endif +#ifndef XDrawArc_TCL_DECLARED +#define XDrawArc_TCL_DECLARED +/* 30 */ +EXTERN void XDrawArc (Display * d, Drawable dr, GC g, int i1, + int i2, unsigned int ui1, unsigned int ui2, + int i3, int i4); +#endif +#ifndef XDrawLines_TCL_DECLARED +#define XDrawLines_TCL_DECLARED +/* 31 */ +EXTERN void XDrawLines (Display * d, Drawable dr, GC g, + XPoint * x, int i1, int i2); +#endif +#ifndef XDrawRectangle_TCL_DECLARED +#define XDrawRectangle_TCL_DECLARED +/* 32 */ +EXTERN void XDrawRectangle (Display * d, Drawable dr, GC g, + int i1, int i2, unsigned int ui1, + unsigned int ui2); +#endif +#ifndef XFillArc_TCL_DECLARED +#define XFillArc_TCL_DECLARED +/* 33 */ +EXTERN void XFillArc (Display * d, Drawable dr, GC g, int i1, + int i2, unsigned int ui1, unsigned int ui2, + int i3, int i4); +#endif +#ifndef XFillPolygon_TCL_DECLARED +#define XFillPolygon_TCL_DECLARED +/* 34 */ +EXTERN void XFillPolygon (Display * d, Drawable dr, GC g, + XPoint * x, int i1, int i2, int i3); +#endif +#ifndef XFillRectangles_TCL_DECLARED +#define XFillRectangles_TCL_DECLARED +/* 35 */ +EXTERN void XFillRectangles (Display * d, Drawable dr, GC g, + XRectangle * x, int i); +#endif +#ifndef XForceScreenSaver_TCL_DECLARED +#define XForceScreenSaver_TCL_DECLARED +/* 36 */ +EXTERN void XForceScreenSaver (Display * d, int i); +#endif +#ifndef XFreeColormap_TCL_DECLARED +#define XFreeColormap_TCL_DECLARED +/* 37 */ +EXTERN void XFreeColormap (Display * d, Colormap c); +#endif +#ifndef XFreeColors_TCL_DECLARED +#define XFreeColors_TCL_DECLARED +/* 38 */ +EXTERN void XFreeColors (Display * d, Colormap c, + unsigned long * ulp, int i, unsigned long ul); +#endif +#ifndef XFreeCursor_TCL_DECLARED +#define XFreeCursor_TCL_DECLARED +/* 39 */ +EXTERN void XFreeCursor (Display * d, Cursor c); +#endif +#ifndef XFreeModifiermap_TCL_DECLARED +#define XFreeModifiermap_TCL_DECLARED +/* 40 */ +EXTERN void XFreeModifiermap (XModifierKeymap * x); +#endif +#ifndef XGetGeometry_TCL_DECLARED +#define XGetGeometry_TCL_DECLARED +/* 41 */ +EXTERN Status XGetGeometry (Display * d, Drawable dr, Window * w, + int * i1, int * i2, unsigned int * ui1, + unsigned int * ui2, unsigned int * ui3, + unsigned int * ui4); +#endif +#ifndef XGetInputFocus_TCL_DECLARED +#define XGetInputFocus_TCL_DECLARED +/* 42 */ +EXTERN void XGetInputFocus (Display * d, Window * w, int * i); +#endif +#ifndef XGetWindowProperty_TCL_DECLARED +#define XGetWindowProperty_TCL_DECLARED +/* 43 */ +EXTERN int XGetWindowProperty (Display * d, Window w, Atom a1, + long l1, long l2, Bool b, Atom a2, Atom * ap, + int * ip, unsigned long * ulp1, + unsigned long * ulp2, unsigned char ** cpp); +#endif +#ifndef XGetWindowAttributes_TCL_DECLARED +#define XGetWindowAttributes_TCL_DECLARED +/* 44 */ +EXTERN Status XGetWindowAttributes (Display * d, Window w, + XWindowAttributes * x); +#endif +#ifndef XGrabKeyboard_TCL_DECLARED +#define XGrabKeyboard_TCL_DECLARED +/* 45 */ +EXTERN int XGrabKeyboard (Display * d, Window w, Bool b, int i1, + int i2, Time t); +#endif +#ifndef XGrabPointer_TCL_DECLARED +#define XGrabPointer_TCL_DECLARED +/* 46 */ +EXTERN int XGrabPointer (Display * d, Window w1, Bool b, + unsigned int ui, int i1, int i2, Window w2, + Cursor c, Time t); +#endif +#ifndef XKeysymToKeycode_TCL_DECLARED +#define XKeysymToKeycode_TCL_DECLARED +/* 47 */ +EXTERN KeyCode XKeysymToKeycode (Display * d, KeySym k); +#endif +#ifndef XLookupColor_TCL_DECLARED +#define XLookupColor_TCL_DECLARED +/* 48 */ +EXTERN Status XLookupColor (Display * d, Colormap c1, + _Xconst char * c2, XColor * x1, XColor * x2); +#endif +#ifndef XMapWindow_TCL_DECLARED +#define XMapWindow_TCL_DECLARED +/* 49 */ +EXTERN void XMapWindow (Display * d, Window w); +#endif +#ifndef XMoveResizeWindow_TCL_DECLARED +#define XMoveResizeWindow_TCL_DECLARED +/* 50 */ +EXTERN void XMoveResizeWindow (Display * d, Window w, int i1, + int i2, unsigned int ui1, unsigned int ui2); +#endif +#ifndef XMoveWindow_TCL_DECLARED +#define XMoveWindow_TCL_DECLARED +/* 51 */ +EXTERN void XMoveWindow (Display * d, Window w, int i1, int i2); +#endif +#ifndef XNextEvent_TCL_DECLARED +#define XNextEvent_TCL_DECLARED +/* 52 */ +EXTERN void XNextEvent (Display * d, XEvent * x); +#endif +#ifndef XPutBackEvent_TCL_DECLARED +#define XPutBackEvent_TCL_DECLARED +/* 53 */ +EXTERN void XPutBackEvent (Display * d, XEvent * x); +#endif +#ifndef XQueryColors_TCL_DECLARED +#define XQueryColors_TCL_DECLARED +/* 54 */ +EXTERN void XQueryColors (Display * d, Colormap c, XColor * x, + int i); +#endif +#ifndef XQueryPointer_TCL_DECLARED +#define XQueryPointer_TCL_DECLARED +/* 55 */ +EXTERN Bool XQueryPointer (Display * d, Window w1, Window * w2, + Window * w3, int * i1, int * i2, int * i3, + int * i4, unsigned int * ui); +#endif +#ifndef XQueryTree_TCL_DECLARED +#define XQueryTree_TCL_DECLARED +/* 56 */ +EXTERN Status XQueryTree (Display * d, Window w1, Window * w2, + Window * w3, Window ** w4, unsigned int * ui); +#endif +#ifndef XRaiseWindow_TCL_DECLARED +#define XRaiseWindow_TCL_DECLARED +/* 57 */ +EXTERN void XRaiseWindow (Display * d, Window w); +#endif +#ifndef XRefreshKeyboardMapping_TCL_DECLARED +#define XRefreshKeyboardMapping_TCL_DECLARED +/* 58 */ +EXTERN void XRefreshKeyboardMapping (XMappingEvent * x); +#endif +#ifndef XResizeWindow_TCL_DECLARED +#define XResizeWindow_TCL_DECLARED +/* 59 */ +EXTERN void XResizeWindow (Display * d, Window w, + unsigned int ui1, unsigned int ui2); +#endif +#ifndef XSelectInput_TCL_DECLARED +#define XSelectInput_TCL_DECLARED +/* 60 */ +EXTERN void XSelectInput (Display * d, Window w, long l); +#endif +#ifndef XSendEvent_TCL_DECLARED +#define XSendEvent_TCL_DECLARED +/* 61 */ +EXTERN Status XSendEvent (Display * d, Window w, Bool b, long l, + XEvent * x); +#endif +#ifndef XSetCommand_TCL_DECLARED +#define XSetCommand_TCL_DECLARED +/* 62 */ +EXTERN void XSetCommand (Display * d, Window w, CONST char ** c, + int i); +#endif +#ifndef XSetIconName_TCL_DECLARED +#define XSetIconName_TCL_DECLARED +/* 63 */ +EXTERN void XSetIconName (Display * d, Window w, + _Xconst char * c); +#endif +#ifndef XSetInputFocus_TCL_DECLARED +#define XSetInputFocus_TCL_DECLARED +/* 64 */ +EXTERN void XSetInputFocus (Display * d, Window w, int i, Time t); +#endif +#ifndef XSetSelectionOwner_TCL_DECLARED +#define XSetSelectionOwner_TCL_DECLARED +/* 65 */ +EXTERN void XSetSelectionOwner (Display * d, Atom a, Window w, + Time t); +#endif +#ifndef XSetWindowBackground_TCL_DECLARED +#define XSetWindowBackground_TCL_DECLARED +/* 66 */ +EXTERN void XSetWindowBackground (Display * d, Window w, + unsigned long ul); +#endif +#ifndef XSetWindowBackgroundPixmap_TCL_DECLARED +#define XSetWindowBackgroundPixmap_TCL_DECLARED +/* 67 */ +EXTERN void XSetWindowBackgroundPixmap (Display * d, Window w, + Pixmap p); +#endif +#ifndef XSetWindowBorder_TCL_DECLARED +#define XSetWindowBorder_TCL_DECLARED +/* 68 */ +EXTERN void XSetWindowBorder (Display * d, Window w, + unsigned long ul); +#endif +#ifndef XSetWindowBorderPixmap_TCL_DECLARED +#define XSetWindowBorderPixmap_TCL_DECLARED +/* 69 */ +EXTERN void XSetWindowBorderPixmap (Display * d, Window w, + Pixmap p); +#endif +#ifndef XSetWindowBorderWidth_TCL_DECLARED +#define XSetWindowBorderWidth_TCL_DECLARED +/* 70 */ +EXTERN void XSetWindowBorderWidth (Display * d, Window w, + unsigned int ui); +#endif +#ifndef XSetWindowColormap_TCL_DECLARED +#define XSetWindowColormap_TCL_DECLARED +/* 71 */ +EXTERN void XSetWindowColormap (Display * d, Window w, + Colormap c); +#endif +#ifndef XTranslateCoordinates_TCL_DECLARED +#define XTranslateCoordinates_TCL_DECLARED +/* 72 */ +EXTERN Bool XTranslateCoordinates (Display * d, Window w1, + Window w2, int i1, int i2, int * i3, + int * i4, Window * w3); +#endif +#ifndef XUngrabKeyboard_TCL_DECLARED +#define XUngrabKeyboard_TCL_DECLARED +/* 73 */ +EXTERN void XUngrabKeyboard (Display * d, Time t); +#endif +#ifndef XUngrabPointer_TCL_DECLARED +#define XUngrabPointer_TCL_DECLARED +/* 74 */ +EXTERN void XUngrabPointer (Display * d, Time t); +#endif +#ifndef XUnmapWindow_TCL_DECLARED +#define XUnmapWindow_TCL_DECLARED +/* 75 */ +EXTERN void XUnmapWindow (Display * d, Window w); +#endif +#ifndef XWindowEvent_TCL_DECLARED +#define XWindowEvent_TCL_DECLARED +/* 76 */ +EXTERN void XWindowEvent (Display * d, Window w, long l, + XEvent * x); +#endif +#ifndef XDestroyIC_TCL_DECLARED +#define XDestroyIC_TCL_DECLARED +/* 77 */ +EXTERN void XDestroyIC (XIC x); +#endif +#ifndef XFilterEvent_TCL_DECLARED +#define XFilterEvent_TCL_DECLARED +/* 78 */ +EXTERN Bool XFilterEvent (XEvent * x, Window w); +#endif +#ifndef XmbLookupString_TCL_DECLARED +#define XmbLookupString_TCL_DECLARED +/* 79 */ +EXTERN int XmbLookupString (XIC xi, XKeyPressedEvent * xk, + char * c, int i, KeySym * k, Status * s); +#endif +#ifndef TkPutImage_TCL_DECLARED +#define TkPutImage_TCL_DECLARED +/* 80 */ +EXTERN void TkPutImage (unsigned long * colors, int ncolors, + Display * display, Drawable d, GC gc, + XImage * image, int src_x, int src_y, + int dest_x, int dest_y, unsigned int width, + unsigned int height); +#endif +/* Slot 81 is reserved */ +#ifndef XParseColor_TCL_DECLARED +#define XParseColor_TCL_DECLARED +/* 82 */ +EXTERN Status XParseColor (Display * display, Colormap map, + _Xconst char * spec, XColor * colorPtr); +#endif +#ifndef XCreateGC_TCL_DECLARED +#define XCreateGC_TCL_DECLARED +/* 83 */ +EXTERN GC XCreateGC (Display * display, Drawable d, + unsigned long valuemask, XGCValues * values); +#endif +#ifndef XFreeGC_TCL_DECLARED +#define XFreeGC_TCL_DECLARED +/* 84 */ +EXTERN void XFreeGC (Display * display, GC gc); +#endif +#ifndef XInternAtom_TCL_DECLARED +#define XInternAtom_TCL_DECLARED +/* 85 */ +EXTERN Atom XInternAtom (Display * display, + _Xconst char * atom_name, + Bool only_if_exists); +#endif +#ifndef XSetBackground_TCL_DECLARED +#define XSetBackground_TCL_DECLARED +/* 86 */ +EXTERN void XSetBackground (Display * display, GC gc, + unsigned long foreground); +#endif +#ifndef XSetForeground_TCL_DECLARED +#define XSetForeground_TCL_DECLARED +/* 87 */ +EXTERN void XSetForeground (Display * display, GC gc, + unsigned long foreground); +#endif +#ifndef XSetClipMask_TCL_DECLARED +#define XSetClipMask_TCL_DECLARED +/* 88 */ +EXTERN void XSetClipMask (Display * display, GC gc, + Pixmap pixmap); +#endif +#ifndef XSetClipOrigin_TCL_DECLARED +#define XSetClipOrigin_TCL_DECLARED +/* 89 */ +EXTERN void XSetClipOrigin (Display * display, GC gc, + int clip_x_origin, int clip_y_origin); +#endif +#ifndef XSetTSOrigin_TCL_DECLARED +#define XSetTSOrigin_TCL_DECLARED +/* 90 */ +EXTERN void XSetTSOrigin (Display * display, GC gc, + int ts_x_origin, int ts_y_origin); +#endif +#ifndef XChangeGC_TCL_DECLARED +#define XChangeGC_TCL_DECLARED +/* 91 */ +EXTERN void XChangeGC (Display * d, GC gc, unsigned long mask, + XGCValues * values); +#endif +#ifndef XSetFont_TCL_DECLARED +#define XSetFont_TCL_DECLARED +/* 92 */ +EXTERN void XSetFont (Display * display, GC gc, Font font); +#endif +#ifndef XSetArcMode_TCL_DECLARED +#define XSetArcMode_TCL_DECLARED +/* 93 */ +EXTERN void XSetArcMode (Display * display, GC gc, int arc_mode); +#endif +#ifndef XSetStipple_TCL_DECLARED +#define XSetStipple_TCL_DECLARED +/* 94 */ +EXTERN void XSetStipple (Display * display, GC gc, + Pixmap stipple); +#endif +#ifndef XSetFillRule_TCL_DECLARED +#define XSetFillRule_TCL_DECLARED +/* 95 */ +EXTERN void XSetFillRule (Display * display, GC gc, + int fill_rule); +#endif +#ifndef XSetFillStyle_TCL_DECLARED +#define XSetFillStyle_TCL_DECLARED +/* 96 */ +EXTERN void XSetFillStyle (Display * display, GC gc, + int fill_style); +#endif +#ifndef XSetFunction_TCL_DECLARED +#define XSetFunction_TCL_DECLARED +/* 97 */ +EXTERN void XSetFunction (Display * display, GC gc, int function); +#endif +#ifndef XSetLineAttributes_TCL_DECLARED +#define XSetLineAttributes_TCL_DECLARED +/* 98 */ +EXTERN void XSetLineAttributes (Display * display, GC gc, + unsigned int line_width, int line_style, + int cap_style, int join_style); +#endif +#ifndef _XInitImageFuncPtrs_TCL_DECLARED +#define _XInitImageFuncPtrs_TCL_DECLARED +/* 99 */ +EXTERN int _XInitImageFuncPtrs (XImage * image); +#endif +#ifndef XCreateIC_TCL_DECLARED +#define XCreateIC_TCL_DECLARED +/* 100 */ +EXTERN XIC XCreateIC (void); +#endif +#ifndef XGetVisualInfo_TCL_DECLARED +#define XGetVisualInfo_TCL_DECLARED +/* 101 */ +EXTERN XVisualInfo * XGetVisualInfo (Display * display, long vinfo_mask, + XVisualInfo * vinfo_template, + int * nitems_return); +#endif +#ifndef XSetWMClientMachine_TCL_DECLARED +#define XSetWMClientMachine_TCL_DECLARED +/* 102 */ +EXTERN void XSetWMClientMachine (Display * display, Window w, + XTextProperty * text_prop); +#endif +#ifndef XStringListToTextProperty_TCL_DECLARED +#define XStringListToTextProperty_TCL_DECLARED +/* 103 */ +EXTERN Status XStringListToTextProperty (char ** list, int count, + XTextProperty * text_prop_return); +#endif +#ifndef XDrawLine_TCL_DECLARED +#define XDrawLine_TCL_DECLARED +/* 104 */ +EXTERN void XDrawLine (Display * d, Drawable dr, GC g, int x1, + int y1, int x2, int y2); +#endif +#ifndef XWarpPointer_TCL_DECLARED +#define XWarpPointer_TCL_DECLARED +/* 105 */ +EXTERN void XWarpPointer (Display * d, Window s, Window dw, + int sx, int sy, unsigned int sw, + unsigned int sh, int dx, int dy); +#endif +#ifndef XFillRectangle_TCL_DECLARED +#define XFillRectangle_TCL_DECLARED +/* 106 */ +EXTERN void XFillRectangle (Display * display, Drawable d, GC gc, + int x, int y, unsigned int width, + unsigned int height); +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TK /* AQUA */ +#ifndef XSetDashes_TCL_DECLARED +#define XSetDashes_TCL_DECLARED +/* 0 */ +EXTERN void XSetDashes (Display * display, GC gc, + int dash_offset, _Xconst char * dash_list, + int n); +#endif +#ifndef XGetModifierMapping_TCL_DECLARED +#define XGetModifierMapping_TCL_DECLARED +/* 1 */ +EXTERN XModifierKeymap * XGetModifierMapping (Display * d); +#endif +#ifndef XCreateImage_TCL_DECLARED +#define XCreateImage_TCL_DECLARED +/* 2 */ +EXTERN XImage * XCreateImage (Display * d, Visual * v, + unsigned int ui1, int i1, int i2, char * cp, + unsigned int ui2, unsigned int ui3, int i3, + int i4); +#endif +#ifndef XGetImage_TCL_DECLARED +#define XGetImage_TCL_DECLARED +/* 3 */ +EXTERN XImage * XGetImage (Display * d, Drawable dr, int i1, int i2, + unsigned int ui1, unsigned int ui2, + unsigned long ul, int i3); +#endif +#ifndef XGetAtomName_TCL_DECLARED +#define XGetAtomName_TCL_DECLARED +/* 4 */ +EXTERN char * XGetAtomName (Display * d, Atom a); +#endif +#ifndef XKeysymToString_TCL_DECLARED +#define XKeysymToString_TCL_DECLARED +/* 5 */ +EXTERN char * XKeysymToString (KeySym k); +#endif +#ifndef XCreateColormap_TCL_DECLARED +#define XCreateColormap_TCL_DECLARED +/* 6 */ +EXTERN Colormap XCreateColormap (Display * d, Window w, Visual * v, + int i); +#endif +#ifndef XGContextFromGC_TCL_DECLARED +#define XGContextFromGC_TCL_DECLARED +/* 7 */ +EXTERN GContext XGContextFromGC (GC g); +#endif +#ifndef XKeycodeToKeysym_TCL_DECLARED +#define XKeycodeToKeysym_TCL_DECLARED +/* 8 */ +EXTERN KeySym XKeycodeToKeysym (Display * d, KeyCode k, int i); +#endif +#ifndef XStringToKeysym_TCL_DECLARED +#define XStringToKeysym_TCL_DECLARED +/* 9 */ +EXTERN KeySym XStringToKeysym (_Xconst char * c); +#endif +#ifndef XRootWindow_TCL_DECLARED +#define XRootWindow_TCL_DECLARED +/* 10 */ +EXTERN Window XRootWindow (Display * d, int i); +#endif +#ifndef XSetErrorHandler_TCL_DECLARED +#define XSetErrorHandler_TCL_DECLARED +/* 11 */ +EXTERN XErrorHandler XSetErrorHandler (XErrorHandler x); +#endif +#ifndef XAllocColor_TCL_DECLARED +#define XAllocColor_TCL_DECLARED +/* 12 */ +EXTERN Status XAllocColor (Display * d, Colormap c, XColor * xp); +#endif +#ifndef XBell_TCL_DECLARED +#define XBell_TCL_DECLARED +/* 13 */ +EXTERN void XBell (Display * d, int i); +#endif +#ifndef XChangeProperty_TCL_DECLARED +#define XChangeProperty_TCL_DECLARED +/* 14 */ +EXTERN void XChangeProperty (Display * d, Window w, Atom a1, + Atom a2, int i1, int i2, + _Xconst unsigned char * c, int i3); +#endif +#ifndef XChangeWindowAttributes_TCL_DECLARED +#define XChangeWindowAttributes_TCL_DECLARED +/* 15 */ +EXTERN void XChangeWindowAttributes (Display * d, Window w, + unsigned long ul, XSetWindowAttributes * x); +#endif +#ifndef XConfigureWindow_TCL_DECLARED +#define XConfigureWindow_TCL_DECLARED +/* 16 */ +EXTERN void XConfigureWindow (Display * d, Window w, + unsigned int i, XWindowChanges * x); +#endif +#ifndef XCopyArea_TCL_DECLARED +#define XCopyArea_TCL_DECLARED +/* 17 */ +EXTERN void XCopyArea (Display * d, Drawable dr1, Drawable dr2, + GC g, int i1, int i2, unsigned int ui1, + unsigned int ui2, int i3, int i4); +#endif +#ifndef XCopyPlane_TCL_DECLARED +#define XCopyPlane_TCL_DECLARED +/* 18 */ +EXTERN void XCopyPlane (Display * d, Drawable dr1, Drawable dr2, + GC g, int i1, int i2, unsigned int ui1, + unsigned int ui2, int i3, int i4, + unsigned long ul); +#endif +#ifndef XCreateBitmapFromData_TCL_DECLARED +#define XCreateBitmapFromData_TCL_DECLARED +/* 19 */ +EXTERN Pixmap XCreateBitmapFromData (Display * display, Drawable d, + _Xconst char * data, unsigned int width, + unsigned int height); +#endif +#ifndef XDefineCursor_TCL_DECLARED +#define XDefineCursor_TCL_DECLARED +/* 20 */ +EXTERN void XDefineCursor (Display * d, Window w, Cursor c); +#endif +#ifndef XDestroyWindow_TCL_DECLARED +#define XDestroyWindow_TCL_DECLARED +/* 21 */ +EXTERN void XDestroyWindow (Display * d, Window w); +#endif +#ifndef XDrawArc_TCL_DECLARED +#define XDrawArc_TCL_DECLARED +/* 22 */ +EXTERN void XDrawArc (Display * d, Drawable dr, GC g, int i1, + int i2, unsigned int ui1, unsigned int ui2, + int i3, int i4); +#endif +#ifndef XDrawLines_TCL_DECLARED +#define XDrawLines_TCL_DECLARED +/* 23 */ +EXTERN void XDrawLines (Display * d, Drawable dr, GC g, + XPoint * x, int i1, int i2); +#endif +#ifndef XDrawRectangle_TCL_DECLARED +#define XDrawRectangle_TCL_DECLARED +/* 24 */ +EXTERN void XDrawRectangle (Display * d, Drawable dr, GC g, + int i1, int i2, unsigned int ui1, + unsigned int ui2); +#endif +#ifndef XFillArc_TCL_DECLARED +#define XFillArc_TCL_DECLARED +/* 25 */ +EXTERN void XFillArc (Display * d, Drawable dr, GC g, int i1, + int i2, unsigned int ui1, unsigned int ui2, + int i3, int i4); +#endif +#ifndef XFillPolygon_TCL_DECLARED +#define XFillPolygon_TCL_DECLARED +/* 26 */ +EXTERN void XFillPolygon (Display * d, Drawable dr, GC g, + XPoint * x, int i1, int i2, int i3); +#endif +#ifndef XFillRectangles_TCL_DECLARED +#define XFillRectangles_TCL_DECLARED +/* 27 */ +EXTERN void XFillRectangles (Display * d, Drawable dr, GC g, + XRectangle * x, int i); +#endif +#ifndef XFreeColormap_TCL_DECLARED +#define XFreeColormap_TCL_DECLARED +/* 28 */ +EXTERN void XFreeColormap (Display * d, Colormap c); +#endif +#ifndef XFreeColors_TCL_DECLARED +#define XFreeColors_TCL_DECLARED +/* 29 */ +EXTERN void XFreeColors (Display * d, Colormap c, + unsigned long * ulp, int i, unsigned long ul); +#endif +#ifndef XFreeModifiermap_TCL_DECLARED +#define XFreeModifiermap_TCL_DECLARED +/* 30 */ +EXTERN void XFreeModifiermap (XModifierKeymap * x); +#endif +#ifndef XGetGeometry_TCL_DECLARED +#define XGetGeometry_TCL_DECLARED +/* 31 */ +EXTERN Status XGetGeometry (Display * d, Drawable dr, Window * w, + int * i1, int * i2, unsigned int * ui1, + unsigned int * ui2, unsigned int * ui3, + unsigned int * ui4); +#endif +#ifndef XGetWindowProperty_TCL_DECLARED +#define XGetWindowProperty_TCL_DECLARED +/* 32 */ +EXTERN int XGetWindowProperty (Display * d, Window w, Atom a1, + long l1, long l2, Bool b, Atom a2, Atom * ap, + int * ip, unsigned long * ulp1, + unsigned long * ulp2, unsigned char ** cpp); +#endif +#ifndef XGrabKeyboard_TCL_DECLARED +#define XGrabKeyboard_TCL_DECLARED +/* 33 */ +EXTERN int XGrabKeyboard (Display * d, Window w, Bool b, int i1, + int i2, Time t); +#endif +#ifndef XGrabPointer_TCL_DECLARED +#define XGrabPointer_TCL_DECLARED +/* 34 */ +EXTERN int XGrabPointer (Display * d, Window w1, Bool b, + unsigned int ui, int i1, int i2, Window w2, + Cursor c, Time t); +#endif +#ifndef XKeysymToKeycode_TCL_DECLARED +#define XKeysymToKeycode_TCL_DECLARED +/* 35 */ +EXTERN KeyCode XKeysymToKeycode (Display * d, KeySym k); +#endif +#ifndef XMapWindow_TCL_DECLARED +#define XMapWindow_TCL_DECLARED +/* 36 */ +EXTERN void XMapWindow (Display * d, Window w); +#endif +#ifndef XMoveResizeWindow_TCL_DECLARED +#define XMoveResizeWindow_TCL_DECLARED +/* 37 */ +EXTERN void XMoveResizeWindow (Display * d, Window w, int i1, + int i2, unsigned int ui1, unsigned int ui2); +#endif +#ifndef XMoveWindow_TCL_DECLARED +#define XMoveWindow_TCL_DECLARED +/* 38 */ +EXTERN void XMoveWindow (Display * d, Window w, int i1, int i2); +#endif +#ifndef XQueryPointer_TCL_DECLARED +#define XQueryPointer_TCL_DECLARED +/* 39 */ +EXTERN Bool XQueryPointer (Display * d, Window w1, Window * w2, + Window * w3, int * i1, int * i2, int * i3, + int * i4, unsigned int * ui); +#endif +#ifndef XRaiseWindow_TCL_DECLARED +#define XRaiseWindow_TCL_DECLARED +/* 40 */ +EXTERN void XRaiseWindow (Display * d, Window w); +#endif +#ifndef XRefreshKeyboardMapping_TCL_DECLARED +#define XRefreshKeyboardMapping_TCL_DECLARED +/* 41 */ +EXTERN void XRefreshKeyboardMapping (XMappingEvent * x); +#endif +#ifndef XResizeWindow_TCL_DECLARED +#define XResizeWindow_TCL_DECLARED +/* 42 */ +EXTERN void XResizeWindow (Display * d, Window w, + unsigned int ui1, unsigned int ui2); +#endif +#ifndef XSelectInput_TCL_DECLARED +#define XSelectInput_TCL_DECLARED +/* 43 */ +EXTERN void XSelectInput (Display * d, Window w, long l); +#endif +#ifndef XSendEvent_TCL_DECLARED +#define XSendEvent_TCL_DECLARED +/* 44 */ +EXTERN Status XSendEvent (Display * d, Window w, Bool b, long l, + XEvent * x); +#endif +#ifndef XSetIconName_TCL_DECLARED +#define XSetIconName_TCL_DECLARED +/* 45 */ +EXTERN void XSetIconName (Display * d, Window w, + _Xconst char * c); +#endif +#ifndef XSetInputFocus_TCL_DECLARED +#define XSetInputFocus_TCL_DECLARED +/* 46 */ +EXTERN void XSetInputFocus (Display * d, Window w, int i, Time t); +#endif +#ifndef XSetSelectionOwner_TCL_DECLARED +#define XSetSelectionOwner_TCL_DECLARED +/* 47 */ +EXTERN void XSetSelectionOwner (Display * d, Atom a, Window w, + Time t); +#endif +#ifndef XSetWindowBackground_TCL_DECLARED +#define XSetWindowBackground_TCL_DECLARED +/* 48 */ +EXTERN void XSetWindowBackground (Display * d, Window w, + unsigned long ul); +#endif +#ifndef XSetWindowBackgroundPixmap_TCL_DECLARED +#define XSetWindowBackgroundPixmap_TCL_DECLARED +/* 49 */ +EXTERN void XSetWindowBackgroundPixmap (Display * d, Window w, + Pixmap p); +#endif +#ifndef XSetWindowBorder_TCL_DECLARED +#define XSetWindowBorder_TCL_DECLARED +/* 50 */ +EXTERN void XSetWindowBorder (Display * d, Window w, + unsigned long ul); +#endif +#ifndef XSetWindowBorderPixmap_TCL_DECLARED +#define XSetWindowBorderPixmap_TCL_DECLARED +/* 51 */ +EXTERN void XSetWindowBorderPixmap (Display * d, Window w, + Pixmap p); +#endif +#ifndef XSetWindowBorderWidth_TCL_DECLARED +#define XSetWindowBorderWidth_TCL_DECLARED +/* 52 */ +EXTERN void XSetWindowBorderWidth (Display * d, Window w, + unsigned int ui); +#endif +#ifndef XSetWindowColormap_TCL_DECLARED +#define XSetWindowColormap_TCL_DECLARED +/* 53 */ +EXTERN void XSetWindowColormap (Display * d, Window w, + Colormap c); +#endif +#ifndef XUngrabKeyboard_TCL_DECLARED +#define XUngrabKeyboard_TCL_DECLARED +/* 54 */ +EXTERN void XUngrabKeyboard (Display * d, Time t); +#endif +#ifndef XUngrabPointer_TCL_DECLARED +#define XUngrabPointer_TCL_DECLARED +/* 55 */ +EXTERN void XUngrabPointer (Display * d, Time t); +#endif +#ifndef XUnmapWindow_TCL_DECLARED +#define XUnmapWindow_TCL_DECLARED +/* 56 */ +EXTERN void XUnmapWindow (Display * d, Window w); +#endif +#ifndef TkPutImage_TCL_DECLARED +#define TkPutImage_TCL_DECLARED +/* 57 */ +EXTERN void TkPutImage (unsigned long * colors, int ncolors, + Display * display, Drawable d, GC gc, + XImage * image, int src_x, int src_y, + int dest_x, int dest_y, unsigned int width, + unsigned int height); +#endif +#ifndef XParseColor_TCL_DECLARED +#define XParseColor_TCL_DECLARED +/* 58 */ +EXTERN Status XParseColor (Display * display, Colormap map, + _Xconst char * spec, XColor * colorPtr); +#endif +#ifndef XCreateGC_TCL_DECLARED +#define XCreateGC_TCL_DECLARED +/* 59 */ +EXTERN GC XCreateGC (Display * display, Drawable d, + unsigned long valuemask, XGCValues * values); +#endif +#ifndef XFreeGC_TCL_DECLARED +#define XFreeGC_TCL_DECLARED +/* 60 */ +EXTERN void XFreeGC (Display * display, GC gc); +#endif +#ifndef XInternAtom_TCL_DECLARED +#define XInternAtom_TCL_DECLARED +/* 61 */ +EXTERN Atom XInternAtom (Display * display, + _Xconst char * atom_name, + Bool only_if_exists); +#endif +#ifndef XSetBackground_TCL_DECLARED +#define XSetBackground_TCL_DECLARED +/* 62 */ +EXTERN void XSetBackground (Display * display, GC gc, + unsigned long foreground); +#endif +#ifndef XSetForeground_TCL_DECLARED +#define XSetForeground_TCL_DECLARED +/* 63 */ +EXTERN void XSetForeground (Display * display, GC gc, + unsigned long foreground); +#endif +#ifndef XSetClipMask_TCL_DECLARED +#define XSetClipMask_TCL_DECLARED +/* 64 */ +EXTERN void XSetClipMask (Display * display, GC gc, + Pixmap pixmap); +#endif +#ifndef XSetClipOrigin_TCL_DECLARED +#define XSetClipOrigin_TCL_DECLARED +/* 65 */ +EXTERN void XSetClipOrigin (Display * display, GC gc, + int clip_x_origin, int clip_y_origin); +#endif +#ifndef XSetTSOrigin_TCL_DECLARED +#define XSetTSOrigin_TCL_DECLARED +/* 66 */ +EXTERN void XSetTSOrigin (Display * display, GC gc, + int ts_x_origin, int ts_y_origin); +#endif +#ifndef XChangeGC_TCL_DECLARED +#define XChangeGC_TCL_DECLARED +/* 67 */ +EXTERN void XChangeGC (Display * d, GC gc, unsigned long mask, + XGCValues * values); +#endif +#ifndef XSetFont_TCL_DECLARED +#define XSetFont_TCL_DECLARED +/* 68 */ +EXTERN void XSetFont (Display * display, GC gc, Font font); +#endif +#ifndef XSetArcMode_TCL_DECLARED +#define XSetArcMode_TCL_DECLARED +/* 69 */ +EXTERN void XSetArcMode (Display * display, GC gc, int arc_mode); +#endif +#ifndef XSetStipple_TCL_DECLARED +#define XSetStipple_TCL_DECLARED +/* 70 */ +EXTERN void XSetStipple (Display * display, GC gc, + Pixmap stipple); +#endif +#ifndef XSetFillRule_TCL_DECLARED +#define XSetFillRule_TCL_DECLARED +/* 71 */ +EXTERN void XSetFillRule (Display * display, GC gc, + int fill_rule); +#endif +#ifndef XSetFillStyle_TCL_DECLARED +#define XSetFillStyle_TCL_DECLARED +/* 72 */ +EXTERN void XSetFillStyle (Display * display, GC gc, + int fill_style); +#endif +#ifndef XSetFunction_TCL_DECLARED +#define XSetFunction_TCL_DECLARED +/* 73 */ +EXTERN void XSetFunction (Display * display, GC gc, int function); +#endif +#ifndef XSetLineAttributes_TCL_DECLARED +#define XSetLineAttributes_TCL_DECLARED +/* 74 */ +EXTERN void XSetLineAttributes (Display * display, GC gc, + unsigned int line_width, int line_style, + int cap_style, int join_style); +#endif +#ifndef _XInitImageFuncPtrs_TCL_DECLARED +#define _XInitImageFuncPtrs_TCL_DECLARED +/* 75 */ +EXTERN int _XInitImageFuncPtrs (XImage * image); +#endif +#ifndef XCreateIC_TCL_DECLARED +#define XCreateIC_TCL_DECLARED +/* 76 */ +EXTERN XIC XCreateIC (void); +#endif +#ifndef XGetVisualInfo_TCL_DECLARED +#define XGetVisualInfo_TCL_DECLARED +/* 77 */ +EXTERN XVisualInfo * XGetVisualInfo (Display * display, long vinfo_mask, + XVisualInfo * vinfo_template, + int * nitems_return); +#endif +#ifndef XSetWMClientMachine_TCL_DECLARED +#define XSetWMClientMachine_TCL_DECLARED +/* 78 */ +EXTERN void XSetWMClientMachine (Display * display, Window w, + XTextProperty * text_prop); +#endif +#ifndef XStringListToTextProperty_TCL_DECLARED +#define XStringListToTextProperty_TCL_DECLARED +/* 79 */ +EXTERN Status XStringListToTextProperty (char ** list, int count, + XTextProperty * text_prop_return); +#endif +#ifndef XDrawSegments_TCL_DECLARED +#define XDrawSegments_TCL_DECLARED +/* 80 */ +EXTERN void XDrawSegments (Display * display, Drawable d, GC gc, + XSegment * segments, int nsegments); +#endif +#ifndef XForceScreenSaver_TCL_DECLARED +#define XForceScreenSaver_TCL_DECLARED +/* 81 */ +EXTERN void XForceScreenSaver (Display * display, int mode); +#endif +#ifndef XDrawLine_TCL_DECLARED +#define XDrawLine_TCL_DECLARED +/* 82 */ +EXTERN void XDrawLine (Display * d, Drawable dr, GC g, int x1, + int y1, int x2, int y2); +#endif +#ifndef XFillRectangle_TCL_DECLARED +#define XFillRectangle_TCL_DECLARED +/* 83 */ +EXTERN void XFillRectangle (Display * display, Drawable d, GC gc, + int x, int y, unsigned int width, + unsigned int height); +#endif +#ifndef XClearWindow_TCL_DECLARED +#define XClearWindow_TCL_DECLARED +/* 84 */ +EXTERN void XClearWindow (Display * d, Window w); +#endif +#ifndef XDrawPoint_TCL_DECLARED +#define XDrawPoint_TCL_DECLARED +/* 85 */ +EXTERN void XDrawPoint (Display * display, Drawable d, GC gc, + int x, int y); +#endif +#ifndef XDrawPoints_TCL_DECLARED +#define XDrawPoints_TCL_DECLARED +/* 86 */ +EXTERN void XDrawPoints (Display * display, Drawable d, GC gc, + XPoint * points, int npoints, int mode); +#endif +#ifndef XWarpPointer_TCL_DECLARED +#define XWarpPointer_TCL_DECLARED +/* 87 */ +EXTERN void XWarpPointer (Display * display, Window src_w, + Window dest_w, int src_x, int src_y, + unsigned int src_width, + unsigned int src_height, int dest_x, + int dest_y); +#endif +#ifndef XQueryColor_TCL_DECLARED +#define XQueryColor_TCL_DECLARED +/* 88 */ +EXTERN void XQueryColor (Display * display, Colormap colormap, + XColor * def_in_out); +#endif +#ifndef XQueryColors_TCL_DECLARED +#define XQueryColors_TCL_DECLARED +/* 89 */ +EXTERN void XQueryColors (Display * display, Colormap colormap, + XColor * defs_in_out, int ncolors); +#endif +#ifndef XQueryTree_TCL_DECLARED +#define XQueryTree_TCL_DECLARED +/* 90 */ +EXTERN Status XQueryTree (Display * d, Window w1, Window * w2, + Window * w3, Window ** w4, unsigned int * ui); +#endif +#ifndef XSync_TCL_DECLARED +#define XSync_TCL_DECLARED +/* 91 */ +EXTERN int XSync (Display * display, Bool flag); +#endif +#endif /* AQUA */ + +typedef struct TkIntXlibStubs { + int magic; + struct TkIntXlibStubHooks *hooks; + +#ifdef __WIN32__ /* WIN */ + void (*xSetDashes) (Display * display, GC gc, int dash_offset, _Xconst char * dash_list, int n); /* 0 */ + XModifierKeymap * (*xGetModifierMapping) (Display * d); /* 1 */ + XImage * (*xCreateImage) (Display * d, Visual * v, unsigned int ui1, int i1, int i2, char * cp, unsigned int ui2, unsigned int ui3, int i3, int i4); /* 2 */ + XImage * (*xGetImage) (Display * d, Drawable dr, int i1, int i2, unsigned int ui1, unsigned int ui2, unsigned long ul, int i3); /* 3 */ + char * (*xGetAtomName) (Display * d, Atom a); /* 4 */ + char * (*xKeysymToString) (KeySym k); /* 5 */ + Colormap (*xCreateColormap) (Display * d, Window w, Visual * v, int i); /* 6 */ + Cursor (*xCreatePixmapCursor) (Display * d, Pixmap p1, Pixmap p2, XColor * x1, XColor * x2, unsigned int ui1, unsigned int ui2); /* 7 */ + Cursor (*xCreateGlyphCursor) (Display * d, Font f1, Font f2, unsigned int ui1, unsigned int ui2, XColor * x1, XColor * x2); /* 8 */ + GContext (*xGContextFromGC) (GC g); /* 9 */ + XHostAddress * (*xListHosts) (Display * d, int * i, Bool * b); /* 10 */ + KeySym (*xKeycodeToKeysym) (Display * d, unsigned int k, int i); /* 11 */ + KeySym (*xStringToKeysym) (_Xconst char * c); /* 12 */ + Window (*xRootWindow) (Display * d, int i); /* 13 */ + XErrorHandler (*xSetErrorHandler) (XErrorHandler x); /* 14 */ + Status (*xIconifyWindow) (Display * d, Window w, int i); /* 15 */ + Status (*xWithdrawWindow) (Display * d, Window w, int i); /* 16 */ + Status (*xGetWMColormapWindows) (Display * d, Window w, Window ** wpp, int * ip); /* 17 */ + Status (*xAllocColor) (Display * d, Colormap c, XColor * xp); /* 18 */ + void (*xBell) (Display * d, int i); /* 19 */ + void (*xChangeProperty) (Display * d, Window w, Atom a1, Atom a2, int i1, int i2, _Xconst unsigned char * c, int i3); /* 20 */ + void (*xChangeWindowAttributes) (Display * d, Window w, unsigned long ul, XSetWindowAttributes * x); /* 21 */ + void (*xClearWindow) (Display * d, Window w); /* 22 */ + void (*xConfigureWindow) (Display * d, Window w, unsigned int i, XWindowChanges * x); /* 23 */ + void (*xCopyArea) (Display * d, Drawable dr1, Drawable dr2, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4); /* 24 */ + void (*xCopyPlane) (Display * d, Drawable dr1, Drawable dr2, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4, unsigned long ul); /* 25 */ + Pixmap (*xCreateBitmapFromData) (Display * display, Drawable d, _Xconst char * data, unsigned int width, unsigned int height); /* 26 */ + void (*xDefineCursor) (Display * d, Window w, Cursor c); /* 27 */ + void (*xDeleteProperty) (Display * d, Window w, Atom a); /* 28 */ + void (*xDestroyWindow) (Display * d, Window w); /* 29 */ + void (*xDrawArc) (Display * d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4); /* 30 */ + void (*xDrawLines) (Display * d, Drawable dr, GC g, XPoint * x, int i1, int i2); /* 31 */ + void (*xDrawRectangle) (Display * d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2); /* 32 */ + void (*xFillArc) (Display * d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4); /* 33 */ + void (*xFillPolygon) (Display * d, Drawable dr, GC g, XPoint * x, int i1, int i2, int i3); /* 34 */ + void (*xFillRectangles) (Display * d, Drawable dr, GC g, XRectangle * x, int i); /* 35 */ + void (*xForceScreenSaver) (Display * d, int i); /* 36 */ + void (*xFreeColormap) (Display * d, Colormap c); /* 37 */ + void (*xFreeColors) (Display * d, Colormap c, unsigned long * ulp, int i, unsigned long ul); /* 38 */ + void (*xFreeCursor) (Display * d, Cursor c); /* 39 */ + void (*xFreeModifiermap) (XModifierKeymap * x); /* 40 */ + Status (*xGetGeometry) (Display * d, Drawable dr, Window * w, int * i1, int * i2, unsigned int * ui1, unsigned int * ui2, unsigned int * ui3, unsigned int * ui4); /* 41 */ + void (*xGetInputFocus) (Display * d, Window * w, int * i); /* 42 */ + int (*xGetWindowProperty) (Display * d, Window w, Atom a1, long l1, long l2, Bool b, Atom a2, Atom * ap, int * ip, unsigned long * ulp1, unsigned long * ulp2, unsigned char ** cpp); /* 43 */ + Status (*xGetWindowAttributes) (Display * d, Window w, XWindowAttributes * x); /* 44 */ + int (*xGrabKeyboard) (Display * d, Window w, Bool b, int i1, int i2, Time t); /* 45 */ + int (*xGrabPointer) (Display * d, Window w1, Bool b, unsigned int ui, int i1, int i2, Window w2, Cursor c, Time t); /* 46 */ + KeyCode (*xKeysymToKeycode) (Display * d, KeySym k); /* 47 */ + Status (*xLookupColor) (Display * d, Colormap c1, _Xconst char * c2, XColor * x1, XColor * x2); /* 48 */ + void (*xMapWindow) (Display * d, Window w); /* 49 */ + void (*xMoveResizeWindow) (Display * d, Window w, int i1, int i2, unsigned int ui1, unsigned int ui2); /* 50 */ + void (*xMoveWindow) (Display * d, Window w, int i1, int i2); /* 51 */ + void (*xNextEvent) (Display * d, XEvent * x); /* 52 */ + void (*xPutBackEvent) (Display * d, XEvent * x); /* 53 */ + void (*xQueryColors) (Display * d, Colormap c, XColor * x, int i); /* 54 */ + Bool (*xQueryPointer) (Display * d, Window w1, Window * w2, Window * w3, int * i1, int * i2, int * i3, int * i4, unsigned int * ui); /* 55 */ + Status (*xQueryTree) (Display * d, Window w1, Window * w2, Window * w3, Window ** w4, unsigned int * ui); /* 56 */ + void (*xRaiseWindow) (Display * d, Window w); /* 57 */ + void (*xRefreshKeyboardMapping) (XMappingEvent * x); /* 58 */ + void (*xResizeWindow) (Display * d, Window w, unsigned int ui1, unsigned int ui2); /* 59 */ + void (*xSelectInput) (Display * d, Window w, long l); /* 60 */ + Status (*xSendEvent) (Display * d, Window w, Bool b, long l, XEvent * x); /* 61 */ + void (*xSetCommand) (Display * d, Window w, CONST char ** c, int i); /* 62 */ + void (*xSetIconName) (Display * d, Window w, _Xconst char * c); /* 63 */ + void (*xSetInputFocus) (Display * d, Window w, int i, Time t); /* 64 */ + void (*xSetSelectionOwner) (Display * d, Atom a, Window w, Time t); /* 65 */ + void (*xSetWindowBackground) (Display * d, Window w, unsigned long ul); /* 66 */ + void (*xSetWindowBackgroundPixmap) (Display * d, Window w, Pixmap p); /* 67 */ + void (*xSetWindowBorder) (Display * d, Window w, unsigned long ul); /* 68 */ + void (*xSetWindowBorderPixmap) (Display * d, Window w, Pixmap p); /* 69 */ + void (*xSetWindowBorderWidth) (Display * d, Window w, unsigned int ui); /* 70 */ + void (*xSetWindowColormap) (Display * d, Window w, Colormap c); /* 71 */ + Bool (*xTranslateCoordinates) (Display * d, Window w1, Window w2, int i1, int i2, int * i3, int * i4, Window * w3); /* 72 */ + void (*xUngrabKeyboard) (Display * d, Time t); /* 73 */ + void (*xUngrabPointer) (Display * d, Time t); /* 74 */ + void (*xUnmapWindow) (Display * d, Window w); /* 75 */ + void (*xWindowEvent) (Display * d, Window w, long l, XEvent * x); /* 76 */ + void (*xDestroyIC) (XIC x); /* 77 */ + Bool (*xFilterEvent) (XEvent * x, Window w); /* 78 */ + int (*xmbLookupString) (XIC xi, XKeyPressedEvent * xk, char * c, int i, KeySym * k, Status * s); /* 79 */ + void (*tkPutImage) (unsigned long * colors, int ncolors, Display * display, Drawable d, GC gc, XImage * image, int src_x, int src_y, int dest_x, int dest_y, unsigned int width, unsigned int height); /* 80 */ + void *reserved81; + Status (*xParseColor) (Display * display, Colormap map, _Xconst char * spec, XColor * colorPtr); /* 82 */ + GC (*xCreateGC) (Display * display, Drawable d, unsigned long valuemask, XGCValues * values); /* 83 */ + void (*xFreeGC) (Display * display, GC gc); /* 84 */ + Atom (*xInternAtom) (Display * display, _Xconst char * atom_name, Bool only_if_exists); /* 85 */ + void (*xSetBackground) (Display * display, GC gc, unsigned long foreground); /* 86 */ + void (*xSetForeground) (Display * display, GC gc, unsigned long foreground); /* 87 */ + void (*xSetClipMask) (Display * display, GC gc, Pixmap pixmap); /* 88 */ + void (*xSetClipOrigin) (Display * display, GC gc, int clip_x_origin, int clip_y_origin); /* 89 */ + void (*xSetTSOrigin) (Display * display, GC gc, int ts_x_origin, int ts_y_origin); /* 90 */ + void (*xChangeGC) (Display * d, GC gc, unsigned long mask, XGCValues * values); /* 91 */ + void (*xSetFont) (Display * display, GC gc, Font font); /* 92 */ + void (*xSetArcMode) (Display * display, GC gc, int arc_mode); /* 93 */ + void (*xSetStipple) (Display * display, GC gc, Pixmap stipple); /* 94 */ + void (*xSetFillRule) (Display * display, GC gc, int fill_rule); /* 95 */ + void (*xSetFillStyle) (Display * display, GC gc, int fill_style); /* 96 */ + void (*xSetFunction) (Display * display, GC gc, int function); /* 97 */ + void (*xSetLineAttributes) (Display * display, GC gc, unsigned int line_width, int line_style, int cap_style, int join_style); /* 98 */ + int (*_XInitImageFuncPtrs) (XImage * image); /* 99 */ + XIC (*xCreateIC) (void); /* 100 */ + XVisualInfo * (*xGetVisualInfo) (Display * display, long vinfo_mask, XVisualInfo * vinfo_template, int * nitems_return); /* 101 */ + void (*xSetWMClientMachine) (Display * display, Window w, XTextProperty * text_prop); /* 102 */ + Status (*xStringListToTextProperty) (char ** list, int count, XTextProperty * text_prop_return); /* 103 */ + void (*xDrawLine) (Display * d, Drawable dr, GC g, int x1, int y1, int x2, int y2); /* 104 */ + void (*xWarpPointer) (Display * d, Window s, Window dw, int sx, int sy, unsigned int sw, unsigned int sh, int dx, int dy); /* 105 */ + void (*xFillRectangle) (Display * display, Drawable d, GC gc, int x, int y, unsigned int width, unsigned int height); /* 106 */ +#endif /* WIN */ +#ifdef MAC_OSX_TK /* AQUA */ + void (*xSetDashes) (Display * display, GC gc, int dash_offset, _Xconst char * dash_list, int n); /* 0 */ + XModifierKeymap * (*xGetModifierMapping) (Display * d); /* 1 */ + XImage * (*xCreateImage) (Display * d, Visual * v, unsigned int ui1, int i1, int i2, char * cp, unsigned int ui2, unsigned int ui3, int i3, int i4); /* 2 */ + XImage * (*xGetImage) (Display * d, Drawable dr, int i1, int i2, unsigned int ui1, unsigned int ui2, unsigned long ul, int i3); /* 3 */ + char * (*xGetAtomName) (Display * d, Atom a); /* 4 */ + char * (*xKeysymToString) (KeySym k); /* 5 */ + Colormap (*xCreateColormap) (Display * d, Window w, Visual * v, int i); /* 6 */ + GContext (*xGContextFromGC) (GC g); /* 7 */ + KeySym (*xKeycodeToKeysym) (Display * d, KeyCode k, int i); /* 8 */ + KeySym (*xStringToKeysym) (_Xconst char * c); /* 9 */ + Window (*xRootWindow) (Display * d, int i); /* 10 */ + XErrorHandler (*xSetErrorHandler) (XErrorHandler x); /* 11 */ + Status (*xAllocColor) (Display * d, Colormap c, XColor * xp); /* 12 */ + void (*xBell) (Display * d, int i); /* 13 */ + void (*xChangeProperty) (Display * d, Window w, Atom a1, Atom a2, int i1, int i2, _Xconst unsigned char * c, int i3); /* 14 */ + void (*xChangeWindowAttributes) (Display * d, Window w, unsigned long ul, XSetWindowAttributes * x); /* 15 */ + void (*xConfigureWindow) (Display * d, Window w, unsigned int i, XWindowChanges * x); /* 16 */ + void (*xCopyArea) (Display * d, Drawable dr1, Drawable dr2, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4); /* 17 */ + void (*xCopyPlane) (Display * d, Drawable dr1, Drawable dr2, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4, unsigned long ul); /* 18 */ + Pixmap (*xCreateBitmapFromData) (Display * display, Drawable d, _Xconst char * data, unsigned int width, unsigned int height); /* 19 */ + void (*xDefineCursor) (Display * d, Window w, Cursor c); /* 20 */ + void (*xDestroyWindow) (Display * d, Window w); /* 21 */ + void (*xDrawArc) (Display * d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4); /* 22 */ + void (*xDrawLines) (Display * d, Drawable dr, GC g, XPoint * x, int i1, int i2); /* 23 */ + void (*xDrawRectangle) (Display * d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2); /* 24 */ + void (*xFillArc) (Display * d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4); /* 25 */ + void (*xFillPolygon) (Display * d, Drawable dr, GC g, XPoint * x, int i1, int i2, int i3); /* 26 */ + void (*xFillRectangles) (Display * d, Drawable dr, GC g, XRectangle * x, int i); /* 27 */ + void (*xFreeColormap) (Display * d, Colormap c); /* 28 */ + void (*xFreeColors) (Display * d, Colormap c, unsigned long * ulp, int i, unsigned long ul); /* 29 */ + void (*xFreeModifiermap) (XModifierKeymap * x); /* 30 */ + Status (*xGetGeometry) (Display * d, Drawable dr, Window * w, int * i1, int * i2, unsigned int * ui1, unsigned int * ui2, unsigned int * ui3, unsigned int * ui4); /* 31 */ + int (*xGetWindowProperty) (Display * d, Window w, Atom a1, long l1, long l2, Bool b, Atom a2, Atom * ap, int * ip, unsigned long * ulp1, unsigned long * ulp2, unsigned char ** cpp); /* 32 */ + int (*xGrabKeyboard) (Display * d, Window w, Bool b, int i1, int i2, Time t); /* 33 */ + int (*xGrabPointer) (Display * d, Window w1, Bool b, unsigned int ui, int i1, int i2, Window w2, Cursor c, Time t); /* 34 */ + KeyCode (*xKeysymToKeycode) (Display * d, KeySym k); /* 35 */ + void (*xMapWindow) (Display * d, Window w); /* 36 */ + void (*xMoveResizeWindow) (Display * d, Window w, int i1, int i2, unsigned int ui1, unsigned int ui2); /* 37 */ + void (*xMoveWindow) (Display * d, Window w, int i1, int i2); /* 38 */ + Bool (*xQueryPointer) (Display * d, Window w1, Window * w2, Window * w3, int * i1, int * i2, int * i3, int * i4, unsigned int * ui); /* 39 */ + void (*xRaiseWindow) (Display * d, Window w); /* 40 */ + void (*xRefreshKeyboardMapping) (XMappingEvent * x); /* 41 */ + void (*xResizeWindow) (Display * d, Window w, unsigned int ui1, unsigned int ui2); /* 42 */ + void (*xSelectInput) (Display * d, Window w, long l); /* 43 */ + Status (*xSendEvent) (Display * d, Window w, Bool b, long l, XEvent * x); /* 44 */ + void (*xSetIconName) (Display * d, Window w, _Xconst char * c); /* 45 */ + void (*xSetInputFocus) (Display * d, Window w, int i, Time t); /* 46 */ + void (*xSetSelectionOwner) (Display * d, Atom a, Window w, Time t); /* 47 */ + void (*xSetWindowBackground) (Display * d, Window w, unsigned long ul); /* 48 */ + void (*xSetWindowBackgroundPixmap) (Display * d, Window w, Pixmap p); /* 49 */ + void (*xSetWindowBorder) (Display * d, Window w, unsigned long ul); /* 50 */ + void (*xSetWindowBorderPixmap) (Display * d, Window w, Pixmap p); /* 51 */ + void (*xSetWindowBorderWidth) (Display * d, Window w, unsigned int ui); /* 52 */ + void (*xSetWindowColormap) (Display * d, Window w, Colormap c); /* 53 */ + void (*xUngrabKeyboard) (Display * d, Time t); /* 54 */ + void (*xUngrabPointer) (Display * d, Time t); /* 55 */ + void (*xUnmapWindow) (Display * d, Window w); /* 56 */ + void (*tkPutImage) (unsigned long * colors, int ncolors, Display * display, Drawable d, GC gc, XImage * image, int src_x, int src_y, int dest_x, int dest_y, unsigned int width, unsigned int height); /* 57 */ + Status (*xParseColor) (Display * display, Colormap map, _Xconst char * spec, XColor * colorPtr); /* 58 */ + GC (*xCreateGC) (Display * display, Drawable d, unsigned long valuemask, XGCValues * values); /* 59 */ + void (*xFreeGC) (Display * display, GC gc); /* 60 */ + Atom (*xInternAtom) (Display * display, _Xconst char * atom_name, Bool only_if_exists); /* 61 */ + void (*xSetBackground) (Display * display, GC gc, unsigned long foreground); /* 62 */ + void (*xSetForeground) (Display * display, GC gc, unsigned long foreground); /* 63 */ + void (*xSetClipMask) (Display * display, GC gc, Pixmap pixmap); /* 64 */ + void (*xSetClipOrigin) (Display * display, GC gc, int clip_x_origin, int clip_y_origin); /* 65 */ + void (*xSetTSOrigin) (Display * display, GC gc, int ts_x_origin, int ts_y_origin); /* 66 */ + void (*xChangeGC) (Display * d, GC gc, unsigned long mask, XGCValues * values); /* 67 */ + void (*xSetFont) (Display * display, GC gc, Font font); /* 68 */ + void (*xSetArcMode) (Display * display, GC gc, int arc_mode); /* 69 */ + void (*xSetStipple) (Display * display, GC gc, Pixmap stipple); /* 70 */ + void (*xSetFillRule) (Display * display, GC gc, int fill_rule); /* 71 */ + void (*xSetFillStyle) (Display * display, GC gc, int fill_style); /* 72 */ + void (*xSetFunction) (Display * display, GC gc, int function); /* 73 */ + void (*xSetLineAttributes) (Display * display, GC gc, unsigned int line_width, int line_style, int cap_style, int join_style); /* 74 */ + int (*_XInitImageFuncPtrs) (XImage * image); /* 75 */ + XIC (*xCreateIC) (void); /* 76 */ + XVisualInfo * (*xGetVisualInfo) (Display * display, long vinfo_mask, XVisualInfo * vinfo_template, int * nitems_return); /* 77 */ + void (*xSetWMClientMachine) (Display * display, Window w, XTextProperty * text_prop); /* 78 */ + Status (*xStringListToTextProperty) (char ** list, int count, XTextProperty * text_prop_return); /* 79 */ + void (*xDrawSegments) (Display * display, Drawable d, GC gc, XSegment * segments, int nsegments); /* 80 */ + void (*xForceScreenSaver) (Display * display, int mode); /* 81 */ + void (*xDrawLine) (Display * d, Drawable dr, GC g, int x1, int y1, int x2, int y2); /* 82 */ + void (*xFillRectangle) (Display * display, Drawable d, GC gc, int x, int y, unsigned int width, unsigned int height); /* 83 */ + void (*xClearWindow) (Display * d, Window w); /* 84 */ + void (*xDrawPoint) (Display * display, Drawable d, GC gc, int x, int y); /* 85 */ + void (*xDrawPoints) (Display * display, Drawable d, GC gc, XPoint * points, int npoints, int mode); /* 86 */ + void (*xWarpPointer) (Display * display, Window src_w, Window dest_w, int src_x, int src_y, unsigned int src_width, unsigned int src_height, int dest_x, int dest_y); /* 87 */ + void (*xQueryColor) (Display * display, Colormap colormap, XColor * def_in_out); /* 88 */ + void (*xQueryColors) (Display * display, Colormap colormap, XColor * defs_in_out, int ncolors); /* 89 */ + Status (*xQueryTree) (Display * d, Window w1, Window * w2, Window * w3, Window ** w4, unsigned int * ui); /* 90 */ + int (*xSync) (Display * display, Bool flag); /* 91 */ +#endif /* AQUA */ +} TkIntXlibStubs; + +#ifdef __cplusplus +extern "C" { +#endif +extern TkIntXlibStubs *tkIntXlibStubsPtr; +#ifdef __cplusplus +} +#endif + +#if defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS) + +/* + * Inline function declarations: + */ + +#ifdef __WIN32__ /* WIN */ +#ifndef XSetDashes +#define XSetDashes \ + (tkIntXlibStubsPtr->xSetDashes) /* 0 */ +#endif +#ifndef XGetModifierMapping +#define XGetModifierMapping \ + (tkIntXlibStubsPtr->xGetModifierMapping) /* 1 */ +#endif +#ifndef XCreateImage +#define XCreateImage \ + (tkIntXlibStubsPtr->xCreateImage) /* 2 */ +#endif +#ifndef XGetImage +#define XGetImage \ + (tkIntXlibStubsPtr->xGetImage) /* 3 */ +#endif +#ifndef XGetAtomName +#define XGetAtomName \ + (tkIntXlibStubsPtr->xGetAtomName) /* 4 */ +#endif +#ifndef XKeysymToString +#define XKeysymToString \ + (tkIntXlibStubsPtr->xKeysymToString) /* 5 */ +#endif +#ifndef XCreateColormap +#define XCreateColormap \ + (tkIntXlibStubsPtr->xCreateColormap) /* 6 */ +#endif +#ifndef XCreatePixmapCursor +#define XCreatePixmapCursor \ + (tkIntXlibStubsPtr->xCreatePixmapCursor) /* 7 */ +#endif +#ifndef XCreateGlyphCursor +#define XCreateGlyphCursor \ + (tkIntXlibStubsPtr->xCreateGlyphCursor) /* 8 */ +#endif +#ifndef XGContextFromGC +#define XGContextFromGC \ + (tkIntXlibStubsPtr->xGContextFromGC) /* 9 */ +#endif +#ifndef XListHosts +#define XListHosts \ + (tkIntXlibStubsPtr->xListHosts) /* 10 */ +#endif +#ifndef XKeycodeToKeysym +#define XKeycodeToKeysym \ + (tkIntXlibStubsPtr->xKeycodeToKeysym) /* 11 */ +#endif +#ifndef XStringToKeysym +#define XStringToKeysym \ + (tkIntXlibStubsPtr->xStringToKeysym) /* 12 */ +#endif +#ifndef XRootWindow +#define XRootWindow \ + (tkIntXlibStubsPtr->xRootWindow) /* 13 */ +#endif +#ifndef XSetErrorHandler +#define XSetErrorHandler \ + (tkIntXlibStubsPtr->xSetErrorHandler) /* 14 */ +#endif +#ifndef XIconifyWindow +#define XIconifyWindow \ + (tkIntXlibStubsPtr->xIconifyWindow) /* 15 */ +#endif +#ifndef XWithdrawWindow +#define XWithdrawWindow \ + (tkIntXlibStubsPtr->xWithdrawWindow) /* 16 */ +#endif +#ifndef XGetWMColormapWindows +#define XGetWMColormapWindows \ + (tkIntXlibStubsPtr->xGetWMColormapWindows) /* 17 */ +#endif +#ifndef XAllocColor +#define XAllocColor \ + (tkIntXlibStubsPtr->xAllocColor) /* 18 */ +#endif +#ifndef XBell +#define XBell \ + (tkIntXlibStubsPtr->xBell) /* 19 */ +#endif +#ifndef XChangeProperty +#define XChangeProperty \ + (tkIntXlibStubsPtr->xChangeProperty) /* 20 */ +#endif +#ifndef XChangeWindowAttributes +#define XChangeWindowAttributes \ + (tkIntXlibStubsPtr->xChangeWindowAttributes) /* 21 */ +#endif +#ifndef XClearWindow +#define XClearWindow \ + (tkIntXlibStubsPtr->xClearWindow) /* 22 */ +#endif +#ifndef XConfigureWindow +#define XConfigureWindow \ + (tkIntXlibStubsPtr->xConfigureWindow) /* 23 */ +#endif +#ifndef XCopyArea +#define XCopyArea \ + (tkIntXlibStubsPtr->xCopyArea) /* 24 */ +#endif +#ifndef XCopyPlane +#define XCopyPlane \ + (tkIntXlibStubsPtr->xCopyPlane) /* 25 */ +#endif +#ifndef XCreateBitmapFromData +#define XCreateBitmapFromData \ + (tkIntXlibStubsPtr->xCreateBitmapFromData) /* 26 */ +#endif +#ifndef XDefineCursor +#define XDefineCursor \ + (tkIntXlibStubsPtr->xDefineCursor) /* 27 */ +#endif +#ifndef XDeleteProperty +#define XDeleteProperty \ + (tkIntXlibStubsPtr->xDeleteProperty) /* 28 */ +#endif +#ifndef XDestroyWindow +#define XDestroyWindow \ + (tkIntXlibStubsPtr->xDestroyWindow) /* 29 */ +#endif +#ifndef XDrawArc +#define XDrawArc \ + (tkIntXlibStubsPtr->xDrawArc) /* 30 */ +#endif +#ifndef XDrawLines +#define XDrawLines \ + (tkIntXlibStubsPtr->xDrawLines) /* 31 */ +#endif +#ifndef XDrawRectangle +#define XDrawRectangle \ + (tkIntXlibStubsPtr->xDrawRectangle) /* 32 */ +#endif +#ifndef XFillArc +#define XFillArc \ + (tkIntXlibStubsPtr->xFillArc) /* 33 */ +#endif +#ifndef XFillPolygon +#define XFillPolygon \ + (tkIntXlibStubsPtr->xFillPolygon) /* 34 */ +#endif +#ifndef XFillRectangles +#define XFillRectangles \ + (tkIntXlibStubsPtr->xFillRectangles) /* 35 */ +#endif +#ifndef XForceScreenSaver +#define XForceScreenSaver \ + (tkIntXlibStubsPtr->xForceScreenSaver) /* 36 */ +#endif +#ifndef XFreeColormap +#define XFreeColormap \ + (tkIntXlibStubsPtr->xFreeColormap) /* 37 */ +#endif +#ifndef XFreeColors +#define XFreeColors \ + (tkIntXlibStubsPtr->xFreeColors) /* 38 */ +#endif +#ifndef XFreeCursor +#define XFreeCursor \ + (tkIntXlibStubsPtr->xFreeCursor) /* 39 */ +#endif +#ifndef XFreeModifiermap +#define XFreeModifiermap \ + (tkIntXlibStubsPtr->xFreeModifiermap) /* 40 */ +#endif +#ifndef XGetGeometry +#define XGetGeometry \ + (tkIntXlibStubsPtr->xGetGeometry) /* 41 */ +#endif +#ifndef XGetInputFocus +#define XGetInputFocus \ + (tkIntXlibStubsPtr->xGetInputFocus) /* 42 */ +#endif +#ifndef XGetWindowProperty +#define XGetWindowProperty \ + (tkIntXlibStubsPtr->xGetWindowProperty) /* 43 */ +#endif +#ifndef XGetWindowAttributes +#define XGetWindowAttributes \ + (tkIntXlibStubsPtr->xGetWindowAttributes) /* 44 */ +#endif +#ifndef XGrabKeyboard +#define XGrabKeyboard \ + (tkIntXlibStubsPtr->xGrabKeyboard) /* 45 */ +#endif +#ifndef XGrabPointer +#define XGrabPointer \ + (tkIntXlibStubsPtr->xGrabPointer) /* 46 */ +#endif +#ifndef XKeysymToKeycode +#define XKeysymToKeycode \ + (tkIntXlibStubsPtr->xKeysymToKeycode) /* 47 */ +#endif +#ifndef XLookupColor +#define XLookupColor \ + (tkIntXlibStubsPtr->xLookupColor) /* 48 */ +#endif +#ifndef XMapWindow +#define XMapWindow \ + (tkIntXlibStubsPtr->xMapWindow) /* 49 */ +#endif +#ifndef XMoveResizeWindow +#define XMoveResizeWindow \ + (tkIntXlibStubsPtr->xMoveResizeWindow) /* 50 */ +#endif +#ifndef XMoveWindow +#define XMoveWindow \ + (tkIntXlibStubsPtr->xMoveWindow) /* 51 */ +#endif +#ifndef XNextEvent +#define XNextEvent \ + (tkIntXlibStubsPtr->xNextEvent) /* 52 */ +#endif +#ifndef XPutBackEvent +#define XPutBackEvent \ + (tkIntXlibStubsPtr->xPutBackEvent) /* 53 */ +#endif +#ifndef XQueryColors +#define XQueryColors \ + (tkIntXlibStubsPtr->xQueryColors) /* 54 */ +#endif +#ifndef XQueryPointer +#define XQueryPointer \ + (tkIntXlibStubsPtr->xQueryPointer) /* 55 */ +#endif +#ifndef XQueryTree +#define XQueryTree \ + (tkIntXlibStubsPtr->xQueryTree) /* 56 */ +#endif +#ifndef XRaiseWindow +#define XRaiseWindow \ + (tkIntXlibStubsPtr->xRaiseWindow) /* 57 */ +#endif +#ifndef XRefreshKeyboardMapping +#define XRefreshKeyboardMapping \ + (tkIntXlibStubsPtr->xRefreshKeyboardMapping) /* 58 */ +#endif +#ifndef XResizeWindow +#define XResizeWindow \ + (tkIntXlibStubsPtr->xResizeWindow) /* 59 */ +#endif +#ifndef XSelectInput +#define XSelectInput \ + (tkIntXlibStubsPtr->xSelectInput) /* 60 */ +#endif +#ifndef XSendEvent +#define XSendEvent \ + (tkIntXlibStubsPtr->xSendEvent) /* 61 */ +#endif +#ifndef XSetCommand +#define XSetCommand \ + (tkIntXlibStubsPtr->xSetCommand) /* 62 */ +#endif +#ifndef XSetIconName +#define XSetIconName \ + (tkIntXlibStubsPtr->xSetIconName) /* 63 */ +#endif +#ifndef XSetInputFocus +#define XSetInputFocus \ + (tkIntXlibStubsPtr->xSetInputFocus) /* 64 */ +#endif +#ifndef XSetSelectionOwner +#define XSetSelectionOwner \ + (tkIntXlibStubsPtr->xSetSelectionOwner) /* 65 */ +#endif +#ifndef XSetWindowBackground +#define XSetWindowBackground \ + (tkIntXlibStubsPtr->xSetWindowBackground) /* 66 */ +#endif +#ifndef XSetWindowBackgroundPixmap +#define XSetWindowBackgroundPixmap \ + (tkIntXlibStubsPtr->xSetWindowBackgroundPixmap) /* 67 */ +#endif +#ifndef XSetWindowBorder +#define XSetWindowBorder \ + (tkIntXlibStubsPtr->xSetWindowBorder) /* 68 */ +#endif +#ifndef XSetWindowBorderPixmap +#define XSetWindowBorderPixmap \ + (tkIntXlibStubsPtr->xSetWindowBorderPixmap) /* 69 */ +#endif +#ifndef XSetWindowBorderWidth +#define XSetWindowBorderWidth \ + (tkIntXlibStubsPtr->xSetWindowBorderWidth) /* 70 */ +#endif +#ifndef XSetWindowColormap +#define XSetWindowColormap \ + (tkIntXlibStubsPtr->xSetWindowColormap) /* 71 */ +#endif +#ifndef XTranslateCoordinates +#define XTranslateCoordinates \ + (tkIntXlibStubsPtr->xTranslateCoordinates) /* 72 */ +#endif +#ifndef XUngrabKeyboard +#define XUngrabKeyboard \ + (tkIntXlibStubsPtr->xUngrabKeyboard) /* 73 */ +#endif +#ifndef XUngrabPointer +#define XUngrabPointer \ + (tkIntXlibStubsPtr->xUngrabPointer) /* 74 */ +#endif +#ifndef XUnmapWindow +#define XUnmapWindow \ + (tkIntXlibStubsPtr->xUnmapWindow) /* 75 */ +#endif +#ifndef XWindowEvent +#define XWindowEvent \ + (tkIntXlibStubsPtr->xWindowEvent) /* 76 */ +#endif +#ifndef XDestroyIC +#define XDestroyIC \ + (tkIntXlibStubsPtr->xDestroyIC) /* 77 */ +#endif +#ifndef XFilterEvent +#define XFilterEvent \ + (tkIntXlibStubsPtr->xFilterEvent) /* 78 */ +#endif +#ifndef XmbLookupString +#define XmbLookupString \ + (tkIntXlibStubsPtr->xmbLookupString) /* 79 */ +#endif +#ifndef TkPutImage +#define TkPutImage \ + (tkIntXlibStubsPtr->tkPutImage) /* 80 */ +#endif +/* Slot 81 is reserved */ +#ifndef XParseColor +#define XParseColor \ + (tkIntXlibStubsPtr->xParseColor) /* 82 */ +#endif +#ifndef XCreateGC +#define XCreateGC \ + (tkIntXlibStubsPtr->xCreateGC) /* 83 */ +#endif +#ifndef XFreeGC +#define XFreeGC \ + (tkIntXlibStubsPtr->xFreeGC) /* 84 */ +#endif +#ifndef XInternAtom +#define XInternAtom \ + (tkIntXlibStubsPtr->xInternAtom) /* 85 */ +#endif +#ifndef XSetBackground +#define XSetBackground \ + (tkIntXlibStubsPtr->xSetBackground) /* 86 */ +#endif +#ifndef XSetForeground +#define XSetForeground \ + (tkIntXlibStubsPtr->xSetForeground) /* 87 */ +#endif +#ifndef XSetClipMask +#define XSetClipMask \ + (tkIntXlibStubsPtr->xSetClipMask) /* 88 */ +#endif +#ifndef XSetClipOrigin +#define XSetClipOrigin \ + (tkIntXlibStubsPtr->xSetClipOrigin) /* 89 */ +#endif +#ifndef XSetTSOrigin +#define XSetTSOrigin \ + (tkIntXlibStubsPtr->xSetTSOrigin) /* 90 */ +#endif +#ifndef XChangeGC +#define XChangeGC \ + (tkIntXlibStubsPtr->xChangeGC) /* 91 */ +#endif +#ifndef XSetFont +#define XSetFont \ + (tkIntXlibStubsPtr->xSetFont) /* 92 */ +#endif +#ifndef XSetArcMode +#define XSetArcMode \ + (tkIntXlibStubsPtr->xSetArcMode) /* 93 */ +#endif +#ifndef XSetStipple +#define XSetStipple \ + (tkIntXlibStubsPtr->xSetStipple) /* 94 */ +#endif +#ifndef XSetFillRule +#define XSetFillRule \ + (tkIntXlibStubsPtr->xSetFillRule) /* 95 */ +#endif +#ifndef XSetFillStyle +#define XSetFillStyle \ + (tkIntXlibStubsPtr->xSetFillStyle) /* 96 */ +#endif +#ifndef XSetFunction +#define XSetFunction \ + (tkIntXlibStubsPtr->xSetFunction) /* 97 */ +#endif +#ifndef XSetLineAttributes +#define XSetLineAttributes \ + (tkIntXlibStubsPtr->xSetLineAttributes) /* 98 */ +#endif +#ifndef _XInitImageFuncPtrs +#define _XInitImageFuncPtrs \ + (tkIntXlibStubsPtr->_XInitImageFuncPtrs) /* 99 */ +#endif +#ifndef XCreateIC +#define XCreateIC \ + (tkIntXlibStubsPtr->xCreateIC) /* 100 */ +#endif +#ifndef XGetVisualInfo +#define XGetVisualInfo \ + (tkIntXlibStubsPtr->xGetVisualInfo) /* 101 */ +#endif +#ifndef XSetWMClientMachine +#define XSetWMClientMachine \ + (tkIntXlibStubsPtr->xSetWMClientMachine) /* 102 */ +#endif +#ifndef XStringListToTextProperty +#define XStringListToTextProperty \ + (tkIntXlibStubsPtr->xStringListToTextProperty) /* 103 */ +#endif +#ifndef XDrawLine +#define XDrawLine \ + (tkIntXlibStubsPtr->xDrawLine) /* 104 */ +#endif +#ifndef XWarpPointer +#define XWarpPointer \ + (tkIntXlibStubsPtr->xWarpPointer) /* 105 */ +#endif +#ifndef XFillRectangle +#define XFillRectangle \ + (tkIntXlibStubsPtr->xFillRectangle) /* 106 */ +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TK /* AQUA */ +#ifndef XSetDashes +#define XSetDashes \ + (tkIntXlibStubsPtr->xSetDashes) /* 0 */ +#endif +#ifndef XGetModifierMapping +#define XGetModifierMapping \ + (tkIntXlibStubsPtr->xGetModifierMapping) /* 1 */ +#endif +#ifndef XCreateImage +#define XCreateImage \ + (tkIntXlibStubsPtr->xCreateImage) /* 2 */ +#endif +#ifndef XGetImage +#define XGetImage \ + (tkIntXlibStubsPtr->xGetImage) /* 3 */ +#endif +#ifndef XGetAtomName +#define XGetAtomName \ + (tkIntXlibStubsPtr->xGetAtomName) /* 4 */ +#endif +#ifndef XKeysymToString +#define XKeysymToString \ + (tkIntXlibStubsPtr->xKeysymToString) /* 5 */ +#endif +#ifndef XCreateColormap +#define XCreateColormap \ + (tkIntXlibStubsPtr->xCreateColormap) /* 6 */ +#endif +#ifndef XGContextFromGC +#define XGContextFromGC \ + (tkIntXlibStubsPtr->xGContextFromGC) /* 7 */ +#endif +#ifndef XKeycodeToKeysym +#define XKeycodeToKeysym \ + (tkIntXlibStubsPtr->xKeycodeToKeysym) /* 8 */ +#endif +#ifndef XStringToKeysym +#define XStringToKeysym \ + (tkIntXlibStubsPtr->xStringToKeysym) /* 9 */ +#endif +#ifndef XRootWindow +#define XRootWindow \ + (tkIntXlibStubsPtr->xRootWindow) /* 10 */ +#endif +#ifndef XSetErrorHandler +#define XSetErrorHandler \ + (tkIntXlibStubsPtr->xSetErrorHandler) /* 11 */ +#endif +#ifndef XAllocColor +#define XAllocColor \ + (tkIntXlibStubsPtr->xAllocColor) /* 12 */ +#endif +#ifndef XBell +#define XBell \ + (tkIntXlibStubsPtr->xBell) /* 13 */ +#endif +#ifndef XChangeProperty +#define XChangeProperty \ + (tkIntXlibStubsPtr->xChangeProperty) /* 14 */ +#endif +#ifndef XChangeWindowAttributes +#define XChangeWindowAttributes \ + (tkIntXlibStubsPtr->xChangeWindowAttributes) /* 15 */ +#endif +#ifndef XConfigureWindow +#define XConfigureWindow \ + (tkIntXlibStubsPtr->xConfigureWindow) /* 16 */ +#endif +#ifndef XCopyArea +#define XCopyArea \ + (tkIntXlibStubsPtr->xCopyArea) /* 17 */ +#endif +#ifndef XCopyPlane +#define XCopyPlane \ + (tkIntXlibStubsPtr->xCopyPlane) /* 18 */ +#endif +#ifndef XCreateBitmapFromData +#define XCreateBitmapFromData \ + (tkIntXlibStubsPtr->xCreateBitmapFromData) /* 19 */ +#endif +#ifndef XDefineCursor +#define XDefineCursor \ + (tkIntXlibStubsPtr->xDefineCursor) /* 20 */ +#endif +#ifndef XDestroyWindow +#define XDestroyWindow \ + (tkIntXlibStubsPtr->xDestroyWindow) /* 21 */ +#endif +#ifndef XDrawArc +#define XDrawArc \ + (tkIntXlibStubsPtr->xDrawArc) /* 22 */ +#endif +#ifndef XDrawLines +#define XDrawLines \ + (tkIntXlibStubsPtr->xDrawLines) /* 23 */ +#endif +#ifndef XDrawRectangle +#define XDrawRectangle \ + (tkIntXlibStubsPtr->xDrawRectangle) /* 24 */ +#endif +#ifndef XFillArc +#define XFillArc \ + (tkIntXlibStubsPtr->xFillArc) /* 25 */ +#endif +#ifndef XFillPolygon +#define XFillPolygon \ + (tkIntXlibStubsPtr->xFillPolygon) /* 26 */ +#endif +#ifndef XFillRectangles +#define XFillRectangles \ + (tkIntXlibStubsPtr->xFillRectangles) /* 27 */ +#endif +#ifndef XFreeColormap +#define XFreeColormap \ + (tkIntXlibStubsPtr->xFreeColormap) /* 28 */ +#endif +#ifndef XFreeColors +#define XFreeColors \ + (tkIntXlibStubsPtr->xFreeColors) /* 29 */ +#endif +#ifndef XFreeModifiermap +#define XFreeModifiermap \ + (tkIntXlibStubsPtr->xFreeModifiermap) /* 30 */ +#endif +#ifndef XGetGeometry +#define XGetGeometry \ + (tkIntXlibStubsPtr->xGetGeometry) /* 31 */ +#endif +#ifndef XGetWindowProperty +#define XGetWindowProperty \ + (tkIntXlibStubsPtr->xGetWindowProperty) /* 32 */ +#endif +#ifndef XGrabKeyboard +#define XGrabKeyboard \ + (tkIntXlibStubsPtr->xGrabKeyboard) /* 33 */ +#endif +#ifndef XGrabPointer +#define XGrabPointer \ + (tkIntXlibStubsPtr->xGrabPointer) /* 34 */ +#endif +#ifndef XKeysymToKeycode +#define XKeysymToKeycode \ + (tkIntXlibStubsPtr->xKeysymToKeycode) /* 35 */ +#endif +#ifndef XMapWindow +#define XMapWindow \ + (tkIntXlibStubsPtr->xMapWindow) /* 36 */ +#endif +#ifndef XMoveResizeWindow +#define XMoveResizeWindow \ + (tkIntXlibStubsPtr->xMoveResizeWindow) /* 37 */ +#endif +#ifndef XMoveWindow +#define XMoveWindow \ + (tkIntXlibStubsPtr->xMoveWindow) /* 38 */ +#endif +#ifndef XQueryPointer +#define XQueryPointer \ + (tkIntXlibStubsPtr->xQueryPointer) /* 39 */ +#endif +#ifndef XRaiseWindow +#define XRaiseWindow \ + (tkIntXlibStubsPtr->xRaiseWindow) /* 40 */ +#endif +#ifndef XRefreshKeyboardMapping +#define XRefreshKeyboardMapping \ + (tkIntXlibStubsPtr->xRefreshKeyboardMapping) /* 41 */ +#endif +#ifndef XResizeWindow +#define XResizeWindow \ + (tkIntXlibStubsPtr->xResizeWindow) /* 42 */ +#endif +#ifndef XSelectInput +#define XSelectInput \ + (tkIntXlibStubsPtr->xSelectInput) /* 43 */ +#endif +#ifndef XSendEvent +#define XSendEvent \ + (tkIntXlibStubsPtr->xSendEvent) /* 44 */ +#endif +#ifndef XSetIconName +#define XSetIconName \ + (tkIntXlibStubsPtr->xSetIconName) /* 45 */ +#endif +#ifndef XSetInputFocus +#define XSetInputFocus \ + (tkIntXlibStubsPtr->xSetInputFocus) /* 46 */ +#endif +#ifndef XSetSelectionOwner +#define XSetSelectionOwner \ + (tkIntXlibStubsPtr->xSetSelectionOwner) /* 47 */ +#endif +#ifndef XSetWindowBackground +#define XSetWindowBackground \ + (tkIntXlibStubsPtr->xSetWindowBackground) /* 48 */ +#endif +#ifndef XSetWindowBackgroundPixmap +#define XSetWindowBackgroundPixmap \ + (tkIntXlibStubsPtr->xSetWindowBackgroundPixmap) /* 49 */ +#endif +#ifndef XSetWindowBorder +#define XSetWindowBorder \ + (tkIntXlibStubsPtr->xSetWindowBorder) /* 50 */ +#endif +#ifndef XSetWindowBorderPixmap +#define XSetWindowBorderPixmap \ + (tkIntXlibStubsPtr->xSetWindowBorderPixmap) /* 51 */ +#endif +#ifndef XSetWindowBorderWidth +#define XSetWindowBorderWidth \ + (tkIntXlibStubsPtr->xSetWindowBorderWidth) /* 52 */ +#endif +#ifndef XSetWindowColormap +#define XSetWindowColormap \ + (tkIntXlibStubsPtr->xSetWindowColormap) /* 53 */ +#endif +#ifndef XUngrabKeyboard +#define XUngrabKeyboard \ + (tkIntXlibStubsPtr->xUngrabKeyboard) /* 54 */ +#endif +#ifndef XUngrabPointer +#define XUngrabPointer \ + (tkIntXlibStubsPtr->xUngrabPointer) /* 55 */ +#endif +#ifndef XUnmapWindow +#define XUnmapWindow \ + (tkIntXlibStubsPtr->xUnmapWindow) /* 56 */ +#endif +#ifndef TkPutImage +#define TkPutImage \ + (tkIntXlibStubsPtr->tkPutImage) /* 57 */ +#endif +#ifndef XParseColor +#define XParseColor \ + (tkIntXlibStubsPtr->xParseColor) /* 58 */ +#endif +#ifndef XCreateGC +#define XCreateGC \ + (tkIntXlibStubsPtr->xCreateGC) /* 59 */ +#endif +#ifndef XFreeGC +#define XFreeGC \ + (tkIntXlibStubsPtr->xFreeGC) /* 60 */ +#endif +#ifndef XInternAtom +#define XInternAtom \ + (tkIntXlibStubsPtr->xInternAtom) /* 61 */ +#endif +#ifndef XSetBackground +#define XSetBackground \ + (tkIntXlibStubsPtr->xSetBackground) /* 62 */ +#endif +#ifndef XSetForeground +#define XSetForeground \ + (tkIntXlibStubsPtr->xSetForeground) /* 63 */ +#endif +#ifndef XSetClipMask +#define XSetClipMask \ + (tkIntXlibStubsPtr->xSetClipMask) /* 64 */ +#endif +#ifndef XSetClipOrigin +#define XSetClipOrigin \ + (tkIntXlibStubsPtr->xSetClipOrigin) /* 65 */ +#endif +#ifndef XSetTSOrigin +#define XSetTSOrigin \ + (tkIntXlibStubsPtr->xSetTSOrigin) /* 66 */ +#endif +#ifndef XChangeGC +#define XChangeGC \ + (tkIntXlibStubsPtr->xChangeGC) /* 67 */ +#endif +#ifndef XSetFont +#define XSetFont \ + (tkIntXlibStubsPtr->xSetFont) /* 68 */ +#endif +#ifndef XSetArcMode +#define XSetArcMode \ + (tkIntXlibStubsPtr->xSetArcMode) /* 69 */ +#endif +#ifndef XSetStipple +#define XSetStipple \ + (tkIntXlibStubsPtr->xSetStipple) /* 70 */ +#endif +#ifndef XSetFillRule +#define XSetFillRule \ + (tkIntXlibStubsPtr->xSetFillRule) /* 71 */ +#endif +#ifndef XSetFillStyle +#define XSetFillStyle \ + (tkIntXlibStubsPtr->xSetFillStyle) /* 72 */ +#endif +#ifndef XSetFunction +#define XSetFunction \ + (tkIntXlibStubsPtr->xSetFunction) /* 73 */ +#endif +#ifndef XSetLineAttributes +#define XSetLineAttributes \ + (tkIntXlibStubsPtr->xSetLineAttributes) /* 74 */ +#endif +#ifndef _XInitImageFuncPtrs +#define _XInitImageFuncPtrs \ + (tkIntXlibStubsPtr->_XInitImageFuncPtrs) /* 75 */ +#endif +#ifndef XCreateIC +#define XCreateIC \ + (tkIntXlibStubsPtr->xCreateIC) /* 76 */ +#endif +#ifndef XGetVisualInfo +#define XGetVisualInfo \ + (tkIntXlibStubsPtr->xGetVisualInfo) /* 77 */ +#endif +#ifndef XSetWMClientMachine +#define XSetWMClientMachine \ + (tkIntXlibStubsPtr->xSetWMClientMachine) /* 78 */ +#endif +#ifndef XStringListToTextProperty +#define XStringListToTextProperty \ + (tkIntXlibStubsPtr->xStringListToTextProperty) /* 79 */ +#endif +#ifndef XDrawSegments +#define XDrawSegments \ + (tkIntXlibStubsPtr->xDrawSegments) /* 80 */ +#endif +#ifndef XForceScreenSaver +#define XForceScreenSaver \ + (tkIntXlibStubsPtr->xForceScreenSaver) /* 81 */ +#endif +#ifndef XDrawLine +#define XDrawLine \ + (tkIntXlibStubsPtr->xDrawLine) /* 82 */ +#endif +#ifndef XFillRectangle +#define XFillRectangle \ + (tkIntXlibStubsPtr->xFillRectangle) /* 83 */ +#endif +#ifndef XClearWindow +#define XClearWindow \ + (tkIntXlibStubsPtr->xClearWindow) /* 84 */ +#endif +#ifndef XDrawPoint +#define XDrawPoint \ + (tkIntXlibStubsPtr->xDrawPoint) /* 85 */ +#endif +#ifndef XDrawPoints +#define XDrawPoints \ + (tkIntXlibStubsPtr->xDrawPoints) /* 86 */ +#endif +#ifndef XWarpPointer +#define XWarpPointer \ + (tkIntXlibStubsPtr->xWarpPointer) /* 87 */ +#endif +#ifndef XQueryColor +#define XQueryColor \ + (tkIntXlibStubsPtr->xQueryColor) /* 88 */ +#endif +#ifndef XQueryColors +#define XQueryColors \ + (tkIntXlibStubsPtr->xQueryColors) /* 89 */ +#endif +#ifndef XQueryTree +#define XQueryTree \ + (tkIntXlibStubsPtr->xQueryTree) /* 90 */ +#endif +#ifndef XSync +#define XSync \ + (tkIntXlibStubsPtr->xSync) /* 91 */ +#endif +#endif /* AQUA */ + +#endif /* defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS) */ + +/* !END!: Do not edit above this line. */ + +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLIMPORT + +#endif /* _TKINTXLIBDECLS */ diff --git a/cobrun/Makefile b/cobrun/Makefile new file mode 100644 index 0000000..89834b6 --- /dev/null +++ b/cobrun/Makefile @@ -0,0 +1,69 @@ +# +# Makefile (MinGW) for htcobrun +# + +prefix=C:/TinyCOBOL +exec_prefix=${prefix} + +INSTALL=install.exe +INSTALL_DATA=${INSTALL} + +INSTBIN=${prefix} +#INSTBIN=${prefix}/bin +INSTRC=${prefix}/share/htcobol + +tc_library=../lib/libhtcobol.a + +RM=rm -f + +CCX=gcc + +INCLUDES=-I../lib -I.. +LIBS=-L/usr/local/lib -L../lib -lhtcobol +LIBS1=-L/usr/local/lib -L../lib -ldb -lpdcurses +LIBS2=-L/usr/local/lib -L../lib -lhtcobol -ldb +#LIBS2=-L/usr/local/lib -L../lib -lhtcobol -ldb -lpdcurses +CCXFLAGS=${INCLUDES} +LDFLAGS= + +SRC1 = htcobrun.c +SRC2 = htcobrun.c + +OBJ1 = $(SRC1:.c=.o) +OBJ2 = $(SRC2:.c=.o) + +PROG1 = htcobrun2 +PROG2 = htcobrun +PROG3 = htcobrun.sh + +# +# Rules for compiling C sources +# +.SUFFIX: .c .o .lo +.c.o: + $(CCX) $(CCXFLAGS) -c $< + + +all: ${PROG2} +#all: ${PROG1} ${PROG2} + +# This will not compile and link on Win32 for some reason +${PROG1}: + ${CCX} ${SRC1} -Wl,-export-dynamic -o ${PROG1} \ + ${INCLUDES} -Wl,-whole-archive ${tc_library} \ + -Wl,-no-whole-archive $(LIBS1) + +${PROG2}: ${OBJ2} + $(CCX) -o $@ ${OBJ2} $(LDFLAGS) $(LIBS2) + +clean: + @${RM} ${OBJ1} ${OBJ2} ${PROG1}.exe ${PROG2}.exe \ + *.exe *.def *.o *.lis *.i *.s core + +#install: $(PROG1) $(PROG2) +install: $(PROG2) +# strip $(PROG1) +# ${INSTALL} -m 755 $(PROG1) $(INSTBIN)/$(PROG1) + strip $(PROG2).exe + ${INSTALL} $(PROG2).exe $(INSTBIN)/$(PROG2).exe +# ${INSTALL} -m 755 $(PROG3) $(INSTBIN)/$(PROG3) diff --git a/cobrun/Makefile.in b/cobrun/Makefile.in new file mode 100644 index 0000000..c7d027b --- /dev/null +++ b/cobrun/Makefile.in @@ -0,0 +1,70 @@ +# +# Makefile for htcobrun +# + +SHELL=/bin/sh + +prefix=@prefix@ +exec_prefix=@exec_prefix@ + +INSTALL=@INSTALL@ +INSTALL_DATA=@INSTALL_DATA@ + +INSTBIN=@cobbin_default@ +INSTRC=@cobdir_default@ + +tc_library=../lib/libhtcobol.a + +RM=rm -f + +CCX=@CC@ + +INCLUDES=-I../lib -I../ +LIBS= +LIBS1=-lncurses -ldb -lm -ldl +LIBS2=-L../lib -lhtcobol -lncurses -ldb -lm -ldl +LDFLAGS= +CCXFLAGS=${INCLUDES} + + +SRC1 = htcobrun.c +SRC2 = htcobrun.c + +OBJ1 = $(SRC1:.c=.o) +OBJ2 = $(SRC2:.c=.o) + +PROG1 = htcobrun +PROG2 = htcobrun2 +PROG3 = htcobrun.sh + +# +# Rules for compiling .c sources +# +.SUFFIX: .c .o +.c.o: + $(CCX) $(CCXFLAGS) -c $< + + +#all: ${PROG1} ${PROG2} +all: ${PROG1} + +# Static library version +${PROG1}: + ${CCX} ${SRC1} -Wl,-export-dynamic -o ${PROG1} \ + ${INCLUDES} -Wl,-whole-archive ${tc_library} \ + -Wl,-no-whole-archive $(LIBS1) + +# Shared library version +${PROG2}: ${OBJ2} + $(CCX) -o $@ ${OBJ2} $(LDFLAGS1) $(LIBS2) + +clean: + @${RM} ${OBJ1} ${OBJ2} ${PROG1} ${PROG2} *.o *.s core + +#install: $(PROG1) $(PROG2) +install: $(PROG1) + strip $(PROG1) + ${INSTALL} -m 755 $(PROG1) $(INSTBIN)/$(PROG1) +# strip $(PROG2) +# ${INSTALL} -m 755 $(PROG2) $(INSTBIN)/$(PROG2) +# ${INSTALL} -m 755 $(PROG3) $(INSTBIN)/$(PROG3) diff --git a/cobrun/Makefile.mingw b/cobrun/Makefile.mingw new file mode 100644 index 0000000..d5a3283 --- /dev/null +++ b/cobrun/Makefile.mingw @@ -0,0 +1,69 @@ +# +# Makefile (MinGW) for htcobrun +# + +prefix=@install_dir@ +exec_prefix=${prefix} + +INSTALL=install.exe +INSTALL_DATA=${INSTALL} + +INSTBIN=${prefix} +#INSTBIN=${prefix}/bin +INSTRC=${prefix}/share/htcobol + +tc_library=../lib/libhtcobol.a + +RM=rm -f + +CCX=gcc + +INCLUDES=-I../lib -I.. +LIBS=-L/usr/local/lib -L../lib -lhtcobol +LIBS1=-L/usr/local/lib -L../lib -ldb -lpdcurses +LIBS2=-L/usr/local/lib -L../lib -lhtcobol -ldb +#LIBS2=-L/usr/local/lib -L../lib -lhtcobol -ldb -lpdcurses +CCXFLAGS=${INCLUDES} +LDFLAGS= + +SRC1 = htcobrun.c +SRC2 = htcobrun.c + +OBJ1 = $(SRC1:.c=.o) +OBJ2 = $(SRC2:.c=.o) + +PROG1 = htcobrun2 +PROG2 = htcobrun +PROG3 = htcobrun.sh + +# +# Rules for compiling C sources +# +.SUFFIX: .c .o .lo +.c.o: + $(CCX) $(CCXFLAGS) -c $< + + +all: ${PROG2} +#all: ${PROG1} ${PROG2} + +# This will not compile and link on Win32 for some reason +${PROG1}: + ${CCX} ${SRC1} -Wl,-export-dynamic -o ${PROG1} \ + ${INCLUDES} -Wl,-whole-archive ${tc_library} \ + -Wl,-no-whole-archive $(LIBS1) + +${PROG2}: ${OBJ2} + $(CCX) -o $@ ${OBJ2} $(LDFLAGS) $(LIBS2) + +clean: + @${RM} ${OBJ1} ${OBJ2} ${PROG1}.exe ${PROG2}.exe \ + *.exe *.def *.o *.lis *.i *.s core + +#install: $(PROG1) $(PROG2) +install: $(PROG2) +# strip $(PROG1) +# ${INSTALL} -m 755 $(PROG1) $(INSTBIN)/$(PROG1) + strip $(PROG2).exe + ${INSTALL} $(PROG2).exe $(INSTBIN)/$(PROG2).exe +# ${INSTALL} -m 755 $(PROG3) $(INSTBIN)/$(PROG3) diff --git a/cobrun/Makefile.mingw.in b/cobrun/Makefile.mingw.in new file mode 100644 index 0000000..d75814d --- /dev/null +++ b/cobrun/Makefile.mingw.in @@ -0,0 +1,73 @@ +# +# Makefile for htcobrun +# + +prefix=@prefix@ +exec_prefix=${prefix} + +INSTALL=@INSTALL@ +INSTALL_DATA=@INSTALL_DATA@ + +INSTBIN=@cobbin_default@ +INSTRC=@cobdir_default@ + +tc_library=..\lib\libhtcobol.a + +RM=@RM@ + +EXEEXT=@exeext@ + +CCX=@CC@ + +INCLUDES=@INCLUDES@ +LIBS=@LIBS@ @htg_ld_args_htcobol@ @htg_ld_args_db@ @htg_ld_args_curses@ +LIBS1=@LIBS@ @htg_ld_args_db@ @htg_ld_args_curses@ +LIBS2=@LIBS@ @htg_ld_args_htcobol@ +LDFLAGS= +CCXFLAGS=${INCLUDES} + + +SRC1 = htcobrun.c + +OBJ1 = $(SRC1:.c=.o) + +PROG1 = htcobrun1$(EXEEXT) +PROG2 = htcobrun$(EXEEXT) + + +# +# Rules for compiling .c sources +# +.SUFFIX: .c .o +.c.o: + $(CCX) $(CCXFLAGS) -c $< + + +all: ${PROG2} +#all: ${PROG1} ${PROG2} + +# This program does not properly initialize the RTL on Win32 +# Does not display the COMMAND-LINE +${PROG1}: ${OBJ1} ${tc_library} + ${CCX} ${OBJ1} -Wl,-export-dynamic -o ${PROG1} \ + ${INCLUDES} -Wl,-whole-archive ${tc_library} \ + -Wl,-no-whole-archive $(LIBS1) + +${PROG2}: ${OBJ1} + $(CCX) -o $@ ${OBJ1} $(LDFLAGS) $(LIBS2) + +clean: + @${RM} ${OBJ1} ${PROG1}.exe ${PROG2}.exe \ + *.exe *.def *.o *.lis *.i *.s core + +install: install-prog + +install-prog: $(PROG2) + strip $(PROG2) + ${INSTALL} $(PROG2) $(INSTBIN)\$(PROG2) + +uninstall: uninstall-prog + +uninstall-prog: + ${RM} $(INSTBIN)\$(PROG2) + diff --git a/cobrun/Readme.txt b/cobrun/Readme.txt new file mode 100644 index 0000000..09aec2b --- /dev/null +++ b/cobrun/Readme.txt @@ -0,0 +1,152 @@ +Abstract: + +Program (htcobrun) to enable TC COBOL (sub)programs, or modules, +compiled with TC as shared libraries (DLL's), to be dynamically loaded +and run. + +The shared library files, which can contain one or more modules, are generally +stored in a directory. + +The TC run-time will use the 'TCOB_LD_LIBRARY_PATH' and 'LD_LIBRARY_PATH' +environment variables, to locate the requested (sub)program or module name. + +Note that the (sub)programs, or module name, is the 'PROGRAM-ID' name, not +the actual shared library file name. +The actual file (shared library) may contain one or more modules. + + +Why use 'htcobrun': + +The 'htcobrun' program can be compiled to fully include the full run-time +(static) library (Not available on MinGW version). +This approach yields substantial runtime performance improvements. + +The COBOL (sub)programs can be built as shared libraries, which may contain +one or more modules, and are loaded and run dynamically. + +Problems in using this approach: +Currently, there is no support for passing 'LINKAGE SECTION' parameters to +sub-programs. + +>---------------------------------------------------------------------------< + +How to build the program: +make +Modify the 'htcobrun.sh' as required. +make install (su required) + +>---------------------------------------------------------------------------< + +How to run an application: + +You can use the 'htcobrun' program directly or use the sample +shell script 'htcobrun.sh' provided. + +To use the 'htcobrun' program directly, first set the modules location(s). + +Example: +$LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH +$TCOB_LD_LIBRARY_PATH=. +$export TCOB_LD_LIBRARY_PATH LD_LIBRARY_PATH +$htcobrun dyntest + +To use the sample shell script 'htcobrun.sh', edit the script and set +the modules location(s). + +Example: +$edit tcobrun.sh +... +LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH +TCOB_LD_LIBRARY_PATH=. +export TCOB_LD_LIBRARY_PATH LD_LIBRARY_PATH +... +$htcobrun.sh dyntest + +>---------------------------------------------------------------------------< + +Notes: + +The current version of TC will substitute a 'main' entry point, for the +name of the COBOL program, if it does not detect a 'USING' clause in +the 'PROCEDURE DIVISION'. + +Also the 'ACCEPT identifier FROM COMMAND-LINE' statement, will not work when +when COBOL programs are compiled as modules. + +These problems will be corrected in the future + +The MinGW version can only be compiled and run using the TC run-time as a +DLL (not static). + +>---------------------------------------------------------------------------< + +Original OpenCOBOL mailing-list posting: + +Subject: [open-cobol-list] Open Cobol Optimization +Date: Sun, 16 Nov 2003 17:16:22 +0100 + +Keisuke asked me to post this info - so here it is. +Note - Applies to Linux + +In an effort to get the same performance as MF, I noticed +that we are heavily bouncing in and out of the shared libs. +So I came up with this. "cobcrun" is a driver prog used to +call the Cobol prog. +(This is equivalent to MF's "cobrun" and ACU's "runcbl"). +It pulls in the complete static versions of libcob and libgmp. + +The difference in runtime performance is astounding ! + +This also has a useful side effect in that all Cobol progs +can be compiled as modules. +(And therefore we do not need to work out which are main progs + and which are sub-progs for the compile) +(Note in cobcrun, that I move out argv0, otherwise we would + have to do some fancy checking for the command line accept) +(Note this is a quick and dirty, must do more checking) + +In addition, with GCC > 3, you can tweak a bit more by passing +CFLAGS="-march=pentium3 -minline-all-stringops" (for P3 - arch=pentium4 for P4) +into the Open Cobol configure and also into the program compiles. + +Here's cobcrun.c : +#include +extern void *cob_resolve (const char *name); +extern void cob_call_error (void); +int +main (int argc, char **argv) +{ + int ret; + int (*func)(); + char *argn[64]; + + if ( argc <= 1 ) { + fprintf(stderr, "No parameters specified\n"); + return 1; + } + for ( ret = 1; ret < argc; ret++ ) { + argn[ret - 1] = argv[ret]; + } + cob_init (argc - 1, argn); + func = cob_resolve (argn[0]); + if (func == NULL) { + cob_call_error (); + } else { + ret = func (); + } + return ret; +} + +And here's the compile/link for it : +gcc -rdynamic -Wl,-export-dynamic -O2 -o cobcrun \ +cobcrun.c -Wl,-whole-archive /usr/local/lib/libcob.a \ +/usr/lib/libgmp.a -Wl,-no-whole-archive -lltdl -ldb -lncurses -lm + +Keisuke has indicated that something like this will be included in the next +release. + +Comments welcome. + +Regards + +Roger While diff --git a/cobrun/htcobrun b/cobrun/htcobrun new file mode 100644 index 0000000..b9e125f Binary files /dev/null and b/cobrun/htcobrun differ diff --git a/cobrun/htcobrun.c b/cobrun/htcobrun.c new file mode 100644 index 0000000..c738ea5 --- /dev/null +++ b/cobrun/htcobrun.c @@ -0,0 +1,65 @@ +// +// Copyright (C) 2004-2005 David Essex, Rildo Pragana. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this software; see the file COPYING. If not, write to +// the Free Software Foundation, Inc., 59 Temple Place, Suite 330, +// Boston, MA 02111-1307 USA +// +// HTCOBRUN is a program to load and run TinyCOBOL modules (shared-libraries) +// +// This source is derived from a posting on the OpenCOBOL mailing-list by Roger While. +// + +#include +#include "htcoblib.h" + + +int main (int argc, char **argv) +{ + int r; + int (*func)(); + char modname[255], *argn[64]; + struct fld_desc fds; + + if (argc < 2) { + fprintf(stderr, "ERROR: Module parameter not specified\n"); + r = 1; + } + else { + if (argc > 65) { + fprintf(stderr, "ERROR: Number of parameter specified is %d, max is 64\n"); + r = 2; + } + else { + for (r = 1; r < argc; r++) { + argn[r - 1] = argv[r]; + } + tcob_init(argc - 1, argn); + strcpy(modname, argv[1]); + fds.len = strlen(argv[1]); + func = tcob_resolve_subr(&fds, modname, 0); + if (func == NULL) { + fprintf(stderr, "ERROR: Failed to resolve module \'%s\'\n", modname); + r = 3; + } + else { + r = func(); + // If it returns then a 'STOP RUN" was not executed, + // and the run-time elements need to be cleaned. + tcob_stop_run(); + } + } + } + return r; +} diff --git a/cobrun/htcobrun.exe b/cobrun/htcobrun.exe new file mode 100644 index 0000000..0ba82ee Binary files /dev/null and b/cobrun/htcobrun.exe differ diff --git a/cobrun/htcobrun.o b/cobrun/htcobrun.o new file mode 100644 index 0000000..b211c33 Binary files /dev/null and b/cobrun/htcobrun.o differ diff --git a/cobrun/htcobrun.sh b/cobrun/htcobrun.sh new file mode 100644 index 0000000..d7005c8 --- /dev/null +++ b/cobrun/htcobrun.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# +# Shell script to load and run TC (sub)programs or modules +# cmd: htcobrun.sh module [ arg1 ... argN ] +# David Essex April 2005 +# +prg=../htcobrun +#prg=../htcobrun2 +# +# Add the shared library paths to search +# for the (sub)programs or modules +# +LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH +TCOB_LD_LIBRARY_PATH=. +export TCOB_LD_LIBRARY_PATH LD_LIBRARY_PATH +# +$prg $@ +# diff --git a/cobrun/tcrunhelp.h b/cobrun/tcrunhelp.h new file mode 100644 index 0000000..7747a77 --- /dev/null +++ b/cobrun/tcrunhelp.h @@ -0,0 +1,38 @@ +// +// Copyright (C) 2004-2005 David Essex, Rildo Pragana. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this software; see the file COPYING. If not, write to +// the Free Software Foundation, Inc., 59 Temple Place, Suite 330, +// Boston, MA 02111-1307 USA +// + + +#ifndef _TCOBRUNHELP_H +#define _TCOBRUNHELP_H + +//#ifdef TCOBPP_LANGUAGE_en +//#ifdef TCOBPP_LANGUAGE_fr +//#ifdef TCOBPP_LANGUAGE_it +//#ifdef TCOBPP_LANGUAGE_pt_BR +//#endif + +/* Usage list */ +/* Usage: %s [options] cobol-module [command-line-parms]\n" */ +static char usage_list0[] = { "[options] cobol-module [command-line-parms]\n" }; +static char usage_list1[] = { "where [options] are:\n\ + -h Help (display this listing)\n\ + -V Display version and exit\n\ +" }; + +#endif diff --git a/cobrun/tcrunversion.h.in b/cobrun/tcrunversion.h.in new file mode 100644 index 0000000..788c622 --- /dev/null +++ b/cobrun/tcrunversion.h.in @@ -0,0 +1,13 @@ +#ifndef _TCOBRUN_VERSION_H +#define _TCOBRUN_VERSION_H + +#define TCOBRUN_MAJOR_VERSION "@TCOBRUN_MAJOR_VERSION@" +#define TCOBRUN_MINOR_VERSION "@TCOBRUN_MINOR_VERSION@" +#define TCOBRUN_PATCH_LEVEL "@TCOBRUN_PATCH_LEVEL@" +#define TCOBRUN_VERSION "@TCOBRUN_VERSION@" +#define TCOBRUN_RELEASE_DATE "@TCOBRUN_RELEASE_DATE@" + +#define TCOBRUN_PGM_VERSION "alpha @TCOBRUN_VERSION@ (@host_os@ @TCOBRUN_RELEASE_DATE@)" + + +#endif diff --git a/cobrun/tcrunversion.txt b/cobrun/tcrunversion.txt new file mode 100644 index 0000000..dccb711 --- /dev/null +++ b/cobrun/tcrunversion.txt @@ -0,0 +1,4 @@ +TCOBRUN_MAJOR_VERSION=0 +TCOBRUN_MINOR_VERSION=7 +TCOBRUN_PATCH_LEVEL=1 + diff --git a/cobrun/test.code/Makefile b/cobrun/test.code/Makefile new file mode 100644 index 0000000..8ef137d --- /dev/null +++ b/cobrun/test.code/Makefile @@ -0,0 +1,72 @@ +# +prefix=.. +exec_prefix=${prefix}/share/htcobol +g_includes=-I../lib -I../ +g_libraries=-L../lib +tc_library=../lib + +lib_name1=dyntest +lib_name2=subrots + +CCX=gcc -g +#COB=${exec_prefix}/htcobol +COB=htcobol +RM=rm -f + +COPYBOOKS= -I../copybooks -I. +INCLUDES= ${g_includes} +LIBS= +#LIBS=-lncurses -ldb -lm -ldl +#LIBS=${g_libraries} -lhtcobol -lncurses -ldb -lm -ldl +LDFLAGS= +COBFLAGS=-P -M none ${COPYBOOKS} +CCXFLAGS=${INCLUDES} + +SHARED_LIB1=${lib_name1}.so +SHARED_LIB2=${lib_name2}.so + +SHARED_LIBS=${SHARED_LIB2} ${SHARED_LIB1} + +SRC3 = dyntest.cob +SRC4 = subrots.cob + +OBJ3 = $(SRC3:.cob=.o) +OBJ4 = $(SRC4:.cob=.o) + + +#include ${prefix}/config/C.rules.in +#include ${prefix}/config/COB.rules.in +# +# Rules for compiling .c .s sources +# +.SUFFIX: .c .o +.c.o: + $(CCX) $(CCXFLAGS) -c $< + +# +# Rules for compiling COBOL sources +.SUFFIX: .cob .cbl .o + +%.o: %.cob + $(COB) -c $(COBFLAGS) $< +# $(COB) $(COBFLAGS) $< + + +%.o: %.cbl + $(COB) -c $(COBFLAGS) $< +# $(COB) $(COBFLAGS) $< +# + + +all: ${SHARED_LIB1} ${SHARED_LIB2} + + +${SHARED_LIB1}: ${OBJ3} + gcc -shared -Wl,-soname,${SHARED_LIB1} -o ${SHARED_LIB1} $(OBJ3) $(LIBS) + +${SHARED_LIB2}: ${OBJ4} + gcc -shared -Wl,-soname,${SHARED_LIB2} -o ${SHARED_LIB2} $(OBJ4) $(LIBS) + +clean: + @${RM} ${OBJ3} ${OBJ4} ${SHARED_LIB1} ${SHARED_LIB2} \ + *.o *.lis *.i *.s core diff --git a/cobrun/test.code/Makefile.mingw b/cobrun/test.code/Makefile.mingw new file mode 100644 index 0000000..53f81dc --- /dev/null +++ b/cobrun/test.code/Makefile.mingw @@ -0,0 +1,71 @@ + +prefix=.. +exec_prefix=${prefix}/share/htcobol +g_includes=-I../lib -I../ +g_libraries=-L/usr/local/lib -L../lib +tc_library=../lib + +lib_name1=dyntest +lib_name2=subrots + +CCX=gcc +#COB=${exec_prefix}/htcobol +COB=htcobol +RM=rm -f + +COPYBOOKS= -I../copybooks -I. +INCLUDES= ${g_includes} +LIBS=${g_libraries} -lhtcobol +#LIBS=${g_libraries} -ldb -lpdcurses +#LIBS=${g_libraries} -lhtcobol -ldb -lpdcurses +COBFLAGS=-P -M none ${COPYBOOKS} +CCXFLAGS=${INCLUDES} +LDFLAGS= + +SHARED_LIB1=${lib_name1}.dll +SHARED_LIB2=${lib_name2}.dll + +SHARED_LIBS=${lib_name1}.dll ${lib_name2}.dll + +SRC3 = dyntest.cob +SRC4 = subrots.cob + +OBJ3 = $(SRC3:.cob=.o) +OBJ4 = $(SRC4:.cob=.o) + + +#include ${prefix}/config/C.rules.in +#include ${prefix}/config/COB.rules.in + +# +# Rules for compiling C sources +# +.SUFFIX: .c .o +.c.o: + $(CCX) $(CCXFLAGS) -c $< + +# +# Rules for compiling COBOL sources +# +.SUFFIX: .cob .cbl .o +%.o: %.cob + $(COB) -c $(COBFLAGS) $< + + +%.o: %.cbl + $(COB) -c $(COBFLAGS) $< + + +all: ${SHARED_LIB1} ${SHARED_LIB2} + + +${SHARED_LIB1}: ${OBJ3} + ${CCX} -shared -Wl,--out-implib,${lib_name1}.dll.a,--output-def,${lib_name1}.def -o ${SHARED_LIB1} $(OBJ3) ${LIBS} + +${SHARED_LIB2}: ${OBJ4} + ${CCX} -shared -Wl,--out-implib,${lib_name2}.dll.a,--output-def,${lib_name2}.def -o ${SHARED_LIB2} $(OBJ4) ${LIBS} + +clean: + @${RM} ${OBJ3} ${OBJ4} ${SHARED_LIB1} ${SHARED_LIB2} \ + *.exe *.def *.o *.lis *.i *.s core + diff --git a/cobrun/test.code/Readme.txt b/cobrun/test.code/Readme.txt new file mode 100644 index 0000000..a2dd331 --- /dev/null +++ b/cobrun/test.code/Readme.txt @@ -0,0 +1,55 @@ +Abstract: + +Sample application on how to build and run (sub)programs or modules, +using the 'htcobrun' program. + +Note: +The (sub)programs or module name is the 'PROGRAM-ID' name, not the actual +file name. +The actual file (shared library) may contain one or more modules. + +>---------------------------------------------------------------------------< + +How to build the sample application: +make + +>---------------------------------------------------------------------------< + +How to run an application: + +You can use the 'htcobrun' program directly or use the sample +shell script 'tcobrun.sh' provided. + +To use the 'htcobrun' program directly, first set the modules location(s). + +Example: +$LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH +$TCOB_LD_LIBRARY_PATH=. +$export TCOB_LD_LIBRARY_PATH LD_LIBRARY_PATH +$htcobrun dyntest + +To use the sample shell script 'tcobrun.sh', edit the script and set +the modules location(s). + +Example: +$edit tcobrun.sh +... +LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH +TCOB_LD_LIBRARY_PATH=. +export TCOB_LD_LIBRARY_PATH LD_LIBRARY_PATH +... +$tcobrun.sh dyntest + +>---------------------------------------------------------------------------< + +Notes: + +The current version of TC will substitute a 'main' entry point, for the +name of the COBOL program, if it does not detect a 'USING' clause in +the 'PROCEDURE DIVISION'. + +Also the 'ACCEPT identifier FROM COMMAND-LINE' statement, will not work when +when COBOL programs are compiled as modules. + +These problems will be corrected in the future + diff --git a/cobrun/test.code/dyntest.cob b/cobrun/test.code/dyntest.cob new file mode 100644 index 0000000..f6157fd --- /dev/null +++ b/cobrun/test.code/dyntest.cob @@ -0,0 +1,90 @@ + IDENTIFICATION DIVISION. + PROGRAM-ID. dyntest. +* + ENVIRONMENT DIVISION. + DATA DIVISION. +* + WORKING-STORAGE SECTION. + 01 VAR-1 PIC X(10) VALUE '*ARGUMENT*'. + 01 VAR-2 PIC X(10) VALUE 'RILDO'. + 01 VAR-3 PIC X(10) VALUE 'Pragana'. + 01 VAR-4 PIC X(10) VALUE 'Recife'. + 01 SUBR-NAME. + 05 SUBR-PREFIX PIC X(4) VALUE "subr". + 05 SUBR-NUMBER PIC 9(2) VALUE zeros. + + LINKAGE SECTION. + 01 DUMMY-VAR PIC X(10). + +* PROCEDURE DIVISION USING DUMMY-VAR. + PROCEDURE DIVISION. + +* Win32 Only: Load DLL so that sub-programs can be found +* CALL-LOADLIB "subrots.dll". +** CALL-LOADLIB "dyntest.dll". + + MOVE 1 TO SUBR-NUMBER + CALL SUBR-NAME USING VAR-1. +* call several times to see if it was registered +* (not a benchmark, but it may be interesting to have one) + CALL SUBR-NAME USING VAR-1. + CALL SUBR-NAME USING VAR-1. + CALL SUBR-NAME USING VAR-1. + + ADD 1 TO SUBR-NUMBER +* CALL SUBR-NAME USING VAR-2. +* CALL SUBR-NAME USING VAR-2 + CALL SUBR-NAME + ON EXCEPTION PERFORM C-100 + NOT ON EXCEPTION PERFORM D-100. + + ADD 1 TO SUBR-NUMBER + CALL SUBR-NAME USING VAR-3. + +* the following subr does not exists and should give us an error + ADD 1 TO SUBR-NUMBER + CALL SUBR-NAME USING VAR-4. + + ADD 1 TO SUBR-NUMBER. + CALL SUBR-NAME USING VAR-4 + ON OVERFLOW PERFORM E-100. + + ADD 1 TO SUBR-NUMBER. + CALL SUBR-NAME USING VAR-4 + ON EXCEPTION PERFORM C-100. + + MOVE 22 TO RETURN-CODE. + + STOP RUN. + + C-100. + + DISPLAY "EXCEPTION condition has occured in calling program SUBR-NAME=" SUBR-NAME. + + D-100. + + DISPLAY "EXCEPTION condition has NOT occured in calling program SUBR-NAME=" SUBR-NAME. + + E-100. + + DISPLAY "OVERFLOW condition has occured in calling program SUBR-NAME=" SUBR-NAME. + + END PROGRAM dyntest. + + IDENTIFICATION DIVISION. + PROGRAM-ID. subr03. +* + ENVIRONMENT DIVISION. + DATA DIVISION. +* + WORKING-STORAGE SECTION. + + LINKAGE SECTION. + 01 VAR PIC X(10). + + PROCEDURE DIVISION USING VAR. + DISPLAY "IN subr03, received: " VAR. + DISPLAY "This subroutine (subr03) is inside the main module." + EXIT PROGRAM. + + diff --git a/cobrun/test.code/subrots.cob b/cobrun/test.code/subrots.cob new file mode 100644 index 0000000..4329628 --- /dev/null +++ b/cobrun/test.code/subrots.cob @@ -0,0 +1,38 @@ + IDENTIFICATION DIVISION. + PROGRAM-ID. subr01. +* + ENVIRONMENT DIVISION. + DATA DIVISION. +* + WORKING-STORAGE SECTION. + + LINKAGE SECTION. + 01 VAR PIC X(10). + + PROCEDURE DIVISION USING VAR. + DISPLAY "IN subr01, received: " VAR. + EXIT PROGRAM. + END PROGRAM subr01. + + IDENTIFICATION DIVISION. + PROGRAM-ID. subr02. +* + ENVIRONMENT DIVISION. + DATA DIVISION. +* + WORKING-STORAGE SECTION. + 01 CMDLINE-PARMS PIC X(50). + +* LINKAGE SECTION. +* 01 VAR PIC X(10). + +* PROCEDURE DIVISION USING VAR. + PROCEDURE DIVISION. +* DISPLAY "IN subr02, received: " VAR. + DISPLAY "IN subr02". + ACCEPT CMDLINE-PARMS FROM COMMAND-LINE. + DISPLAY "IN subr02, COMMAND-LINE=" CMDLINE-PARMS. + MOVE 2 TO RETURN-CODE. + EXIT PROGRAM. + END PROGRAM subr02. + diff --git a/cobrun/test.code/tcobrun.sh b/cobrun/test.code/tcobrun.sh new file mode 100644 index 0000000..860c23e --- /dev/null +++ b/cobrun/test.code/tcobrun.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# +# Shell script to run htcobrun modules (programs) +# cmd: tcobrun.sh module [ arg1 ... argN ] +# David Essex April 2005 +# +prg=../htcobrun +#prg=../htcobrun2 +# +# Export shared library paths +LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH +TCOB_LD_LIBRARY_PATH=. +export TCOB_LD_LIBRARY_PATH LD_LIBRARY_PATH +# +#echo "$prg $@" +#$prg dyntest +$prg $@ +# +echo "return code=$?" +# diff --git a/compila-tiny b/compila-tiny new file mode 100644 index 0000000..c07c11d --- /dev/null +++ b/compila-tiny @@ -0,0 +1,14 @@ +./configure --with-lang=pt_BR --enable-mfcomp +cd lib +echo ':g/screen.c/s///g :wq! '|vi Makefile > /dev/null +cd .. +make +make install +cd lib +cp Makefile.shared Makefile +make shared-libs +cp libhtcobol* /usr/local/lib +cd /usr/local/share/htcobol +echo ':g/SHLIB_NAME_DEFAULT: lib$.so/s//SHLIB_NAME_DEFAULT: $.so/g :wq! '|vi htcobolrc > /dev/null +mv htrtconf htrtconf.txt +echo "Compilado, instalado, configurado e funcionando..." diff --git a/compiler/Makefile b/compiler/Makefile new file mode 100644 index 0000000..ebcfbb0 --- /dev/null +++ b/compiler/Makefile @@ -0,0 +1,116 @@ +# Generated automatically from Makefile.in by configure. +# +# Makefile.in for the Tiny COBOL compiler +# +SHELL=/bin/sh + + + +prefix=/usr/local +exec_prefix=${prefix} + +RM= rm -f +MKDIR=mkdir -p + +#INSTALL=/usr/bin/install -c +#INSTALL_DATA=${INSTALL} -m 644 +INSTALL=install.exe +INSTALL_DATA=${INSTALL} + +#YACC=yacc193 +YACC=bison +LEX=flex +CCX=gcc + +EXEEXT=.exe + +#INSTBIN=/usr/local/bin +#INSTRC=/usr/local/share/htcobol +INSTBIN=C:/TinyCOBOL +INSTRC=C:/TinyCOBOL +RCFILE=htcobolrc + +# +# Debuging features are set in htconfig.h +# -DDEBUG_COMPILER -DDEBUG_SCANNER +# +INCLUDES=-I/usr/local/include -I../lib -I.. +CCXFLAGS=${INCLUDES} -Wall +CCXFLAGS1=${INCLUDES} +#LIBS=-L/usr/local/lib -lgetopts -lm +LIBS=-L/usr/local/lib -lm -lpdcurses +LDFLAGS= +MAKEDEPEND=@MAKEDEPEND@ + +# +# Rules for compiling .c .y .l sources +# +.SUFFIX: .c .o .y .l +.c.o: + $(CCX) $(CCXFLAGS) -c $< + +# +.y.c: + $(YACC) -dv -b htcobol $< +# +.l.c: + $(LEX) -o$@ $< +# + +SRCS = htcobol.y scan.l pp_parser.y pp_scanner.l \ +htcobol.c htcobgen.c htcobemt.c htglobals.c reswords.c + +OBJS = htcobol.tab.o scan.o pp_parser.tab.o pp_scanner.o \ +htcobol.o htcobgen.o htcobemt.o htglobals.o reswords.o + +PROG=htcobol.exe + + +all: $(PROG) +devel: all + +${PROG}: ${OBJS} + $(CCX) -o $@ ${OBJS} $(LDFLAGS) $(LIBS) +# strip $@ + + +scan.c: scan.l + $(LEX) -o$@ $< + +htcobol.tab.c: htcobol.y scan.c + $(YACC) -dv -b htcobol $< + +htcobgen.o: htcoboly.h + +htcobol.o: htcoboly.h + $(CCX) $(CCXFLAGS) -c htcobol.c + +scan.o: scan.c + $(CCX) $(CCXFLAGS1) -c scan.c + +htcobol.tab.o: htcobol.tab.c + $(CCX) $(CCXFLAGS1) -c htcobol.tab.c + +# +pp_scanner.c: pp_scanner.l + $(LEX) -o$@ -Ppp_yy $< + +pp_parser.tab.c: pp_parser.y pp_scanner.c + $(YACC) -dv -b pp_parser -p pp_yy $< + +pp_parser.tab.o: pp_parser.tab.c + $(CCX) $(CCXFLAGS1) -c pp_parser.tab.c + +pp_scanner.o: pp_scanner.c + $(CCX) $(CCXFLAGS1) -c pp_scanner.c + +clean: + @$(RM) $(PROG) $(OBJS) \ + scan.c htcobol.tab.c htcobol.tab.h htcobol.output \ + pp_parser.tab.c pp_parser.tab.h pp_scanner.c pp_parser.output + +install: $(PROG) + $(MKDIR) $(INSTRC) + strip $(PROG) + ${INSTALL} $(PROG) $(INSTBIN)/$(PROG) + ${INSTALL_DATA} $(RCFILE) $(INSTRC)/$(RCFILE) diff --git a/compiler/Makefile.in b/compiler/Makefile.in new file mode 100644 index 0000000..b5e9116 --- /dev/null +++ b/compiler/Makefile.in @@ -0,0 +1,110 @@ +# +# Makefile.in for the Tiny COBOL compiler +# +SHELL=/bin/sh + +@SET_MAKE@ + +prefix=@prefix@ +exec_prefix=@exec_prefix@ + +RM= rm -f +MKDIR=mkdir -p + +INSTALL=@INSTALL@ +INSTALL_DATA=@INSTALL_DATA@ + +YACC=@YACC@ +LEX=@LEX@ +CCX=@CC@ + +EXEEXT=@exeext@ + +INSTBIN=@cobbin_default@ +INSTRC=@cobdir_default@ +RCFILE=@optfile_default@ + +# +# Debuging features are set in htconfig.h +# -DDEBUG_COMPILER -DDEBUG_SCANNER +# +INCLUDES=@INCLUDES@ +CCXFLAGS=${INCLUDES} @CCXFLAGS@ -Wall -Wno-long-long +#CCXFLAGS1=${INCLUDES} @CCXFLAGS@ +CCXFLAGS1=${INCLUDES} +LIBS=@LIBS@ +LDFLAGS=@LDFLAGS@ +MAKEDEPEND=@MAKEDEPEND@ + +# +# Rules for compiling .c .y .l sources +# +.SUFFIX: .c .o .y .l +.c.o: + $(CCX) $(CCXFLAGS) -c $< + +# +.y.c: + $(YACC) -dv -b htcobol $< +# +.l.c: + $(LEX) -o$@ $< +# + +SRCS = htcobol.y scan.l pp_parser.y pp_scanner.l \ +htcobol.c htcobgen.c htcobemt.c htglobals.c reswords.c + +OBJS = htcobol.tab.o scan.o pp_parser.tab.o pp_scanner.o \ +htcobol.o htcobgen.o htcobemt.o htglobals.o reswords.o + +PROG=htcobol@exeext@ + + +all: $(PROG) +devel: all + +${PROG}: ${OBJS} + $(CCX) -g -o $@ ${OBJS} $(LDFLAGS) $(LIBS) +# strip $@ + + +scan.c: scan.l + $(LEX) -o$@ $< + +htcobol.tab.c: htcobol.y scan.c + $(YACC) -dv -b htcobol $< + +htcobgen.o: htcoboly.h + +htcobol.o: htcoboly.h + $(CCX) $(CCXFLAGS) -c htcobol.c + +scan.o: scan.c + $(CCX) $(CCXFLAGS1) -c scan.c + +htcobol.tab.o: htcobol.tab.c + $(CCX) $(CCXFLAGS1) -c htcobol.tab.c + +# +pp_scanner.c: pp_scanner.l + $(LEX) -o$@ -Ppp_yy $< + +pp_parser.tab.c: pp_parser.y pp_scanner.c + $(YACC) -dv -b pp_parser -p pp_yy $< + +pp_parser.tab.o: pp_parser.tab.c + $(CCX) $(CCXFLAGS1) -c pp_parser.tab.c + +pp_scanner.o: pp_scanner.c + $(CCX) $(CCXFLAGS1) -c pp_scanner.c + +clean: + @$(RM) $(PROG) $(OBJS) \ + scan.c htcobol.tab.c htcobol.tab.h htcobol.output \ + pp_parser.tab.c pp_parser.tab.h pp_scanner.c pp_parser.output + +install: $(PROG) + strip $(PROG) + ${INSTALL} -m 755 $(PROG) $(INSTBIN)/$(PROG) + $(MKDIR) $(INSTRC) + ${INSTALL_DATA} $(RCFILE) $(INSTRC)/$(RCFILE) diff --git a/compiler/Makefile.mingw b/compiler/Makefile.mingw new file mode 100644 index 0000000..d2ffe1a --- /dev/null +++ b/compiler/Makefile.mingw @@ -0,0 +1,116 @@ +# Generated automatically from Makefile.in by configure. +# +# Makefile.in for the Tiny COBOL compiler +# +SHELL=/bin/sh + + + +prefix=/usr/local +exec_prefix=${prefix} + +RM= rm -f +MKDIR=mkdir -p + +#INSTALL=/usr/bin/install -c +#INSTALL_DATA=${INSTALL} -m 644 +INSTALL=install.exe +INSTALL_DATA=${INSTALL} + +#YACC=yacc193 +YACC=bison +LEX=flex +CCX=gcc + +EXEEXT=.exe + +#INSTBIN=/usr/local/bin +#INSTRC=/usr/local/share/htcobol +INSTBIN=@install_dir@ +INSTRC=@install_dir@ +RCFILE=htcobolrc + +# +# Debuging features are set in htconfig.h +# -DDEBUG_COMPILER -DDEBUG_SCANNER +# +INCLUDES=-I/usr/local/include -I../lib -I.. +CCXFLAGS=${INCLUDES} -Wall +CCXFLAGS1=${INCLUDES} +#LIBS=-L/usr/local/lib -lgetopts -lm +LIBS=-L/usr/local/lib -lm -lcurses +LDFLAGS= +MAKEDEPEND=@MAKEDEPEND@ + +# +# Rules for compiling .c .y .l sources +# +.SUFFIX: .c .o .y .l +.c.o: + $(CCX) $(CCXFLAGS) -c $< + +# +.y.c: + $(YACC) -dv -b htcobol $< +# +.l.c: + $(LEX) -o$@ $< +# + +SRCS = htcobol.y scan.l pp_parser.y pp_scanner.l \ +htcobol.c htcobgen.c htcobemt.c htglobals.c reswords.c + +OBJS = htcobol.tab.o scan.o pp_parser.tab.o pp_scanner.o \ +htcobol.o htcobgen.o htcobemt.o htglobals.o reswords.o + +PROG=htcobol.exe + + +all: $(PROG) +devel: all + +${PROG}: ${OBJS} + $(CCX) -o $@ ${OBJS} $(LDFLAGS) $(LIBS) +# strip $@ + + +scan.c: scan.l + $(LEX) -o$@ $< + +htcobol.tab.c: htcobol.y scan.c + $(YACC) -dv -b htcobol $< + +htcobgen.o: htcoboly.h + +htcobol.o: htcoboly.h + $(CCX) $(CCXFLAGS) -c htcobol.c + +scan.o: scan.c + $(CCX) $(CCXFLAGS1) -c scan.c + +htcobol.tab.o: htcobol.tab.c + $(CCX) $(CCXFLAGS1) -c htcobol.tab.c + +# +pp_scanner.c: pp_scanner.l + $(LEX) -o$@ -Ppp_yy $< + +pp_parser.tab.c: pp_parser.y pp_scanner.c + $(YACC) -dv -b pp_parser -p pp_yy $< + +pp_parser.tab.o: pp_parser.tab.c + $(CCX) $(CCXFLAGS1) -c pp_parser.tab.c + +pp_scanner.o: pp_scanner.c + $(CCX) $(CCXFLAGS1) -c pp_scanner.c + +clean: + @$(RM) $(PROG) $(OBJS) \ + scan.c htcobol.tab.c htcobol.tab.h htcobol.output \ + pp_parser.tab.c pp_parser.tab.h pp_scanner.c pp_parser.output + +install: $(PROG) + $(MKDIR) $(INSTRC) + strip $(PROG) + ${INSTALL} $(PROG) $(INSTBIN)/$(PROG) + ${INSTALL_DATA} $(RCFILE) $(INSTRC)/$(RCFILE) diff --git a/compiler/htcobemt.c b/compiler/htcobemt.c new file mode 100644 index 0000000..15b339e --- /dev/null +++ b/compiler/htcobemt.c @@ -0,0 +1,4721 @@ +/* + * Copyright (C) 2005, David Essex, Rildo Pragana. + * Copyright (C) 2003, Rildo Pragana, Bernard Giroud. + * Copyright (C) 2002, Rildo Pragana, Jim Noeth, Bernard Giroud. + * Copyright (C) 2001, 2000, 1999, Rildo Pragana, Jim Noeth, + * David Essex, Glen Colbert. + * Copyright (C) 1993, 1991 Rildo Pragana. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA + */ + +/* + * Assembler Code Generator for Cobol Compiler + * + * + * Ideally this module should only contain functions which + * are assembler dependent. + */ + +#include "htconfig.h" +#include "htversion.h" +#include "htcoboly.h" +#include "htcoblib.h" +#include "htglobals.h" +#include "mwindows.h" + +#define decimal_char() (decimal_comma ? ',' : '.') +extern int pgm_segment; +extern int screen_io_enable; +extern int decimal_comma; +extern char currency_symbol; +char sch_convert_buf[512]; + +extern struct sym *screen_status_field; /* variable of crt status */ +extern struct sym *cursor_field; /* variable of cursor */ +extern struct lit *program_name_literal; /* literal thar holds the program name */ + +extern int stabs_on_sw; + +extern struct lextab literal; +extern int yydebug; +extern struct sym *curr_file; + +extern struct sym *curr_paragr, *curr_section; +extern struct sym *curr_field; +extern short curr_call_mode; +extern short curr_call_convention; +extern unsigned stack_offset; /* offset for variables on the stack */ +/*#define SAVED_EBX_OFFSET 4*//* relative to %ebp */ +extern unsigned stack_plus; +extern unsigned global_offset; /* offset for global variables (DATA) */ +/*unsigned file_offset=0;*/ +extern unsigned literal_offset; +#undef SEC_WORKING +#define SEC_WORKING SEC_DATA +#define SEC_RETURN_CODE SEC_DATA +extern unsigned data_offset; +/*#define data_offset global_offset*/ +extern unsigned linkage_offset; +extern unsigned using_offset; +/* tmpvar_offset: for storage of temporary variables, + with space reclaimed after the current instruction*/ +extern unsigned tmpvar_offset; +extern unsigned tmpvar_max; + +extern unsigned last_lineno; +extern short at_procedure; +extern short refmod_slots; +static char name_buf[MAXNAMEBUF]; + +extern int has_linkage; +extern int module_flag; +extern int nested_flag; + +extern int main_flag; /* Does it have an main entry point */ +extern int main_entry_flag; /* Main entry point detected */ +extern char main_entry_buf[]; /* main entry point name */ + +extern struct lit *spe_lit_ZE; +extern struct lit *spe_lit_SP; +extern struct lit *spe_lit_LV; +extern struct lit *spe_lit_HV; +extern struct lit *spe_lit_QU; + +extern struct list *expr_list; +extern struct list *files_list; +extern struct list *disp_list; +extern struct parm_list *parameter_list; +extern struct list *fields_list; +extern struct list *last_field; +extern struct index_to_table_list *index2table; +extern struct named_sect *named_sect_list; +extern struct list *switches_list; +extern struct list *vars_list; +extern short next_available_sec_no; +extern short default_sec_no; +extern short curr_sec_no; + +extern struct parm_list *chaining_list; /* chaining variables */ + +extern int screen_label; +extern int para_label; +extern int block_label; +extern int line_label; +extern int paragr_num; +extern int loc_label; +extern unsigned char picture[100]; /* for max 50 signs and counts */ +extern int picix, piccnt, decimals, sign, v_flag, n_flag, digits, pscale; +extern int filler_num; +extern int active[37]; +extern int at_linkage; +extern int stackframe_cnt; +extern int inner_stack_size; +extern char program_id[120]; +extern char *pgm_label; +extern int initial_flag; +extern struct list *report_list; +static int need_desc_length_cleanup = 0; +extern int stabs_started; + +extern struct sym *vartab[HASHLEN]; +extern struct sym *labtab[HASHLEN]; +extern struct lit *littab[HASHLEN]; + +/* convert control characters to don't corrupt the assembly output */ +char * +sch_convert(char *s) +{ + int n = 0; + char *d = sch_convert_buf; + while (*s && n++ < 45) + { + if (*s >= ' ' && *s < '\x7f') + { + *d++ = *s++; + } + else + { + *d++ = (*s++ & 0x0f) + ' '; + } + } + if (n >= 45) + { + sprintf(sch_convert_buf + 40, "..."); + } + else + { + *d = 0; + } + return sch_convert_buf; +} + +/* + ** Code Generating Routines + */ +static char *sec_name(short sec_no) +{ + struct named_sect *nsp; + + for (nsp = named_sect_list; nsp != NULL;) + { + if (nsp->sec_no == sec_no) + return nsp->os_name; + nsp = nsp->next; + } + return (char *) nsp; +} + +static char memref_buf[20]; +char *memref(struct sym *sy) +{ + if (sy->sec_no < SEC_FIRST_NAMED) + { + switch (sy->sec_no) + { + case SEC_CONST: + sprintf(memref_buf, "$c_base%d+%d", pgm_segment, sy->location); + break; + case SEC_DATA: + sprintf(memref_buf, "$w_base%d+%d", pgm_segment, sy->location); + break; + case SEC_STACK: + case SEC_ARGS: + sprintf(memref_buf, "-%d(%%ebp)", sy->location); + break; + case SEC_TEMPS: + sprintf(memref_buf, "-%u(%%esp)", sy->location); + break; + default: + /* Make sure we have an error at assembly stage */ + sprintf(memref_buf, "$ww_base%d+%d #sec:%d", pgm_segment, + sy->location, sy->sec_no); + yyerror("undefined variable %s", sy->name); + } + } + else + { + sprintf(memref_buf, "$%s+%d", sec_name(sy->sec_no), sy->location); + } + return memref_buf; +} + +char *memrefat(struct sym *sy) +{ + switch (sy->sec_no) + { + case SEC_CONST: + sprintf(memref_buf, "c_base%d+%d", pgm_segment, sy->location); + break; + case SEC_DATA: + sprintf(memref_buf, "w_base%d+%d", pgm_segment, sy->location); + break; + case SEC_STACK: + case SEC_ARGS: + sprintf(memref_buf, "-%d(%%ebp)", sy->location); + case SEC_TEMPS: + sprintf(memref_buf, "-%u(%%esp)", sy->location); + break; + default: + /* Make sure we have an error at assembly stage */ + sprintf(memref_buf, "ww_base%d+%d #sec:%d", pgm_segment, sy->location, + sy->sec_no); + } + return memref_buf; +} + +char *memrefd(struct sym *sy) +{ + sprintf(memref_buf, "$c_base%d+%d", pgm_segment, sy->descriptor); + return memref_buf; +} + +void emit_lit(char *s, int len) +{ + int bcnt = 0; + while (len) + { + if (!(bcnt++ % 8)) + { + if (bcnt > 1) + putc('\n',o_src); + fprintf(o_src, "\t.byte\t%d", *s++); + } + else + { + fprintf(o_src, ",%d", *s++); + } + len--; + } +} + +void emit_lit_fill(int c, int len) +{ + int bcnt = 0; + while (len) + { + if (!(bcnt++ % 8)) + { + if (bcnt > 1) + putc('\n',o_src); + fprintf(o_src, "\t.byte\t%d", c); + } + else + { + fprintf(o_src, ",%d", c); + } + len--; + } +} + +void gen_init_value(struct lit *sy, int var_len) +{ + int bcnt = 0; + int len, start_len; + char *s; + char pad; + + if (sy->nick) + { + s = sy->nick; + len = 1; + pad = sy->nick[0]; + } + else + { + s = sy->name; + /*len=strlen(s);*/ + len = sy->len; + pad = ' '; + } + if (len > var_len) + len = var_len; + start_len = len; + while (len) + { + if (!(bcnt++ % 8)) + { + if (bcnt > 1) + putc('\n',o_src); + fprintf(o_src, "\t.byte\t%d", *s++); + } + else + { + fprintf(o_src, ",%d", *s++); + } + len--; + } + putc('\n',o_src); + if (start_len < var_len) + { + len = var_len - start_len; + bcnt = 0; + while (len) + { + if (!(bcnt++ % 8)) + { + if (bcnt > 1) + putc('\n',o_src); + fprintf(o_src, "\t.byte\t%d", pad); + } + else + { + fprintf(o_src, ",%d", pad); + } + len--; + } + putc('\n',o_src); + } +} + +void stabs_line() +{ + static char *last_source_filename = NULL; + static unsigned int last_source_lineno = 0; + int new_file = TRUE; /* Is this line on a new file ? */ + + if (!stabs_on_sw) + return; + + if (last_source_filename) + { /* if equals new_file = 0 */ + new_file = strcmp(last_source_filename, source_filename); + } + + if ((!new_file) && (source_lineno == last_source_lineno)) + return; + + if (new_file) + fprintf(o_src, ".stabs\t\"%s\",132,0,0,.LS%d\n", source_filename, + line_label); + + fprintf(o_src, ".stabn\t68,0,%d,.LS%d-Ltext_%s\n", source_lineno, + line_label, pgm_label); + fprintf(o_src, ".LS%d:\n", line_label++); + + if (new_file) + { + free(last_source_filename); + last_source_filename = strdup(source_filename); + } + last_source_lineno = source_lineno; +} + +void stabs_block(int end) +{ + /* I just can't get this working. Let's forget it for some time. */ + if (!end) + { + fprintf(o_src, ".stabs\t\".LSB%d:F(0,1)\",36,0,1,.LSB%d\n", + block_label, block_label); + fprintf(o_src, ".LSB%d:\n", block_label); + } + else + { + fprintf(o_src, ".LSE%d:\n", block_label); + fprintf(o_src, ".stabs\t\"\",100,0,0,.LSE%d-.LSB%d\n", block_label, + block_label); + } +} + +int gen_main_rtn(void) +{ + int r = 0; + +#if !defined(__WINDOWS__) + char main_pgm_label[] = "main"; +#else + char main_pgm_label[] = "_main"; +#endif + + /* + Specify the main entry point action + auto (1) - Use the first encountered 'STOP RUN' statement, + and if found, generate a program entry point. + first(2) - Use the first encountered 'PROGRAM-ID' statement, + and if found, generate a program entry point. + none (0) - Do not generate any program entry point. + (3) - Specific program entry point defined using + the '-e' CMD line option. + */ + + if ((main_flag == 3) && (main_entry_flag == FALSE)) + { + yyerror("Main-program entry point '%s' not found in program sequence", + main_entry_buf); + } + if (main_entry_flag == TRUE) + { +#if !defined(__WINDOWS__) + strcpy(program_id, main_entry_buf); +#else + sprintf(program_id,"%s", main_entry_buf); /* walter */ +#endif + /* + if (stabs_on_sw) { + + fprintf(o_src,".stabs\t\"%s\",100,0,0,Ltext_%s\n", + input_filename, pgm_label); + // fprintf(o_src,".stabs\t\"%s:F1\",36,0,0,%s\n",pgm_label,pgm_label); + fprintf(o_src,".stabs\t\"%s:F1\",36,0,0,%s\n",main_pgm_label,main_pgm_label); + fprintf(o_src,".stabs\t\"display:t2=r2;0;255;\",128,0,0,0\n"); + fprintf(o_src,".stabs\t\"comp:t3=r3;-2147483648;2147483647;\",128,0,0,0\n"); + fprintf(o_src,".stabs\t\"comp3:t4=r3;0;255;\",128,0,0,0\n"); + fprintf(o_src,".stabs\t\"compw:t5=r5;-32768;32767;\",128,0,0,0\n"); + fprintf(o_src,".stabs\t\"compb:t6=r6;-128;127;\",128,0,0,0\n"); + + fprintf(o_src, + ".stabs\t\"compll:t7=r(0,1);0;01777777777777777777777\",128,0,0,0\n"); + } + fprintf(o_src,".text\n"); + + if (stabs_on_sw) { + fprintf(o_src,".stabs\t\":t1\",128,0,0,0\n"); + } + */ + fprintf(o_src, "\t.align 4\n"); + +#if !defined(__WINDOWS__) + fprintf(o_src, ".globl %s\n\t.type\t%s,@function\n", main_pgm_label, + main_pgm_label); +#else + fprintf(o_src,".globl %s\n",pgm_label); + fprintf(o_src,"\t.def\t%s;\t.scl\t2;\t.type\t32;\t.endef\n",main_pgm_label); +#endif + fprintf(o_src, "%s:\n", main_pgm_label); + if (stabs_on_sw) + { + fprintf(o_src, ".stabs\t\":t1\",128,0,0,0\n"); + } + fprintf(o_src, "\tpushl\t%%ebp\n\tmovl\t%%esp, %%ebp\n"); + fprintf(o_src, "\tsubl\t$4,%%esp\n\tmovl\t$0,-4(%%ebp)\n"); + fprintf(o_src, "\tmovl\t12(%%ebp),%%eax\n\tpushl\t%%eax\n"); + fprintf(o_src, "\tmovl\t8(%%ebp),%%eax\n\tpushl\t%%eax\n"); + asm_call("tcob_init"); + fprintf(o_src, "\taddl\t$8,%%esp\n"); + asm_call(program_id); + fprintf(o_src, "\tmovl\t%%eax,%%eax\n\tmovl\t%%eax,-4(%%ebp)\n"); + asm_call("tcob_stop_run"); + fprintf(o_src, "\tmovl\t-4(%%ebp),%%edx\n\tmovl\t%%edx,%%eax\n"); + + fprintf(o_src, "\tleave\n\tret\n"); + + /********** generate .Lfe statement ************/ + fprintf(o_src, ".Lfe1:\n"); +#if !defined(__WINDOWS__) + fprintf(o_src, "\t.size\t%s,.Lfe1-%s\n", main_pgm_label, main_pgm_label); +#endif + + } + + fprintf(o_src, "\n\t.ident\t\"%s: %s\"\n", HTG_PGM_NAME, TCOB_PGM_VERSION); + + return r; + +} + +int pgm_header(char *id) +{ + int r = 0; + char *sp = id; + + /* + check for valid characters in PROGRAM-ID name + */ + if (!(isalpha(*sp) || (*sp == '_'))) + { + r++; + yyerror("Invalid character '%c' in PROGRAM-ID name", *sp); + } + else + { + sp++; + while (*sp != '\0') + { + if (!(isalnum(*sp) || (*sp == '$') || (*sp == '.') || (*sp == '_'))) + { + r++; + yyerror("Invalid character '%c' in PROGRAM-ID name", *sp); + } + sp++; + } + } + +#if !defined(__WINDOWS__) + strcpy(program_id, id); +#else + sprintf(program_id,"%s",id); /* walter */ +#endif + + /* + Specify the main entry point action + auto (1) - Use the first encountered 'STOP RUN' statement, + and if found, generate a program entry point. + first(2) - Use the first encountered 'PROGRAM-ID' statement, + and if found, generate a program entry point. + none (0) - Do not generate any program entry point. + (3) - Specific program entry point defined using the '-e' CMD line option. + */ + + if ((main_flag == 3) && (main_entry_flag == FALSE)) + { + if (strcmp(main_entry_buf, id) == 0) + main_entry_flag = TRUE; + } + + return r; +} + +void data_trail(void) +{ + /* fprintf(o_src,"_DATA ends\n\n");*/ + if (refmod_slots > 0) + fprintf(o_src, "rf_base%d:\t.space\t%d\n", pgm_segment, refmod_slots + * 8); +} + +/* using values : 0 = normal, 1 = using , 2 = chaining */ +void proc_header(int using) +{ + struct sym *sy, *sy1; + int i; + int stabs_type = '3'; + + /* chg_underline(program_id); */ + if ((using == 1)/*|| ((using == 0 ) && (has_linkage))*/) + { /* Is a routine */ + if (!has_linkage) + { + hterror(105, TCOB_SEVERITY_ERROR, + "Using parameters should be on linkage section"); + } + module_flag = TRUE; + } + if (module_flag || nested_flag) + { + pgm_label = program_id; + } + /* if ((using == 2 ) && (has_linkage)) { + hterror(106,TCOB_SEVERITY_ERROR,"A main program cannot have linkage section"); + } */ + + /*clear_symtab();*/ + if (!pgm_segment) + { + fprintf(o_src, "\t.file\t\"%s\"\n", input_filename); + fprintf(o_src, "\t.version\t\"01.01\"\ntinycobol_compiled.:\n"); + /* fprintf(o_src,"\t.version\t\"%s\"\ntiny_cobol_compiled.:\n", PGM_VERSION); */ + /* fprintf(o_src,"\t.version\t\"01.01\"\ntiny_cobol_compiled.:\n"); */ + } + + /* + // if (!pgm_segment) + // gen_main_rtn(); + */ + + fprintf(o_src, ".text\n"); + fprintf(o_src, "Ltext_%s:\n", pgm_label); + + /* insert stabs here */ + if (stabs_on_sw) + { + fprintf(o_src, ".stabs\t\"%s\",100,0,0,%s\n", input_filename, pgm_label); + fprintf(o_src, ".stabs\t\"%s:F1\",36,0,0,%s\n", pgm_label, pgm_label); + + /* fprintf(o_src,".stabs\t\"%s:F1\",36,0,0,%s\n", + main_pgm_label,main_pgm_label);*/ + fprintf(o_src, ".stabs\t\"display:t2=r2;0;255;\",128,0,0,0\n"); + fprintf(o_src, + ".stabs\t\"comp:t3=r3;-2147483648;2147483647;\",128,0,0,0\n"); + fprintf(o_src, ".stabs\t\"comp3:t4=r3;0;255;\",128,0,0,0\n"); + fprintf(o_src, ".stabs\t\"compw:t5=r5;-32768;32767;\",128,0,0,0\n"); + fprintf(o_src, ".stabs\t\"compb:t6=r6;-128;127;\",128,0,0,0\n"); + /* compll (comp with 8 bytes size) is wrong. Use a dump instead */ + fprintf(o_src, + ".stabs\t\"compll:t7=r(0,1);0;01777777777777777777777\",128,0,0,0\n"); + + } + + /* + if (!pgm_segment) { + if (stabs_on_sw) { + fprintf(o_src,".stabs\t\":t1\",128,0,0,0\n"); + } + fprintf(o_src,"\t.align 16\n"); + } + */ + fprintf(o_src, "\t.align 16\n"); + +#if !defined(__WINDOWS__) + fprintf(o_src, ".globl %s\n\t.type\t%s,@function\n", pgm_label, pgm_label); + fprintf(o_src, "%s:\n", pgm_label); +#else + fprintf(o_src,".globl %s\n",pgm_label); + fprintf(o_src,"\t.def\t_%s;\t.scl\t2;\t.type\t32;\t.endef\n",pgm_label); /* walter */ + fprintf(o_src,"_%s:\n",pgm_label); +#endif + if (stabs_on_sw) + { + fprintf(o_src, ".stabs\t\":t1\",128,0,0,0\n"); + } + fprintf(o_src, "\tpushl\t%%ebp\n\tmovl\t%%esp, %%ebp\n"); + if (stack_offset & 1) + stack_offset++; + + /* + Extra 16 bytes holds search all temporary data + EOT switch, min, max boundaries and saved ebx. + Note: extra 4 bytes is to remove memory corruption problem + found in test20c.cob, probably due to boundary alignment problem. + */ + stack_offset = stack_offset + START_STACK_ADJUST; + /* add space for linkage section variables that are + not arguments of the calling program */ + /*if (using)*/ + stack_offset += adjust_linkage_vars(START_STACK_ADJUST); + + fprintf(o_src, "\tsubl\t$%u, %%esp\n", stack_offset); + /* fprintf(o_src,"\tmovl\t%%ebx, -%d(%%ebp)\n",SAVED_EBX_OFFSET); */ + fprintf(o_src, "\tmovl\t%%ebx, -%d(%%ebp)\n", stack_offset - 16); + + fprintf(o_src, ".Linit_%s:\n", pgm_label); + + /* Begin enter runelement */ + + if (decimal_comma) + { + /* fprintf(o_src,"\txorl\t$1,%%eax\n"); + #if !defined(__WINDOWS__) + fprintf(o_src,"\tmovl\t%%eax,bDecimalComma\n"); + #else + fprintf(o_src,"\tmovl\t%%eax,_bDecimalComma\n"); + #endif */ +#if !defined(__WINDOWS__) + fprintf(o_src, "\tcall\tsetDecimalComma\n"); +#else + fprintf(o_src,"\tcall\t_setDecimalComma\n"); +#endif + } + if (currency_symbol != '$') + { +#if !defined(__WINDOWS__) + fprintf(o_src, "\tmovb\t$%d,cCurrencySymbol\n", currency_symbol); +#else + fprintf(o_src,"\tmovb\t$%d,_cCurrencySymbol\n", currency_symbol); +#endif + } + /* + * If defined SCREEN STATUS, inform the reference in the field on the + * library + */ + if (screen_status_field != NULL) + { + if (!(screen_status_field->defined)) + { + yyerror("SCREEN STATUS field '%s' not defined", + screen_status_field->name); + } + if (screen_status_field->len < 4) + { + yyerror("SCREEN STATUS field '%s' must have a size of 4", + screen_status_field->name); + } + loadloc_to_eax(screen_status_field); +#if !defined(__WINDOWS__) + fprintf(o_src, "\tmovl\t%%eax, screen_status\n"); +#else + fprintf(o_src,"\tmovl\t%%eax,_screen_status\n"); +#endif + } + /* + * If defined CURSOR, inform the reference in the field on the + * library + */ + if (cursor_field != NULL) + { + if (!(cursor_field->defined)) + { + yyerror("CURSOR field '%s' not defined", cursor_field->name); + } + if (cursor_field->len < 6) + { + yyerror("CURSOR field '%s' must have a size of 6", + cursor_field->name); + } + loadloc_to_eax(cursor_field); +#if !defined(__WINDOWS__) + fprintf(o_src, "\tmovl\t%%eax, screen_cursor\n"); +#else + fprintf(o_src,"\tmovl\t%%eax,_screen_cursor\n"); +#endif + } + + if (using == 2) + { /* PROCEDURE DIVISION CHAINING */ + /* get chaining values */ + struct sym *cp; + struct parm_list *list, *tmp; + + push_immed(0); + for (list = chaining_list; list != NULL;) + { + cp = (struct sym *) list->var; + gen_loadvar(cp); + tmp = list; + list = list->next; + free(tmp); + tmp = NULL; + } + asm_call("tcob_chaining"); + chaining_list = NULL; + } + /* + * we save the name of the program as a literal + * for identify the run unit + */ + program_name_literal = install_lit(program_id, strlen(program_id), 0); + save_literal(program_name_literal, DTYPE_DISPLAY); + /* + * Indicate the runtime that we enter a run element + * to save / restore runtime values + */ + gen_enter_runelement(RUN_ELEMENT_ENTER); + + fprintf(o_src, "\tmovl\t$s_base%d+0, %%eax\n", pgm_segment); + if (!initial_flag) + { + fprintf(o_src, "\tcmpl\t$0, 0(%%eax)\n"); + fprintf(o_src, "\tjne\t.Linite_%s\n", pgm_label); + fprintf(o_src, "\tmovl\t$1, 0(%%eax)\n"); + } + + if (HTG_libcob) + RTL_CALL("module_init"); + /********** initialize all VALUES of fields **********/ + + do_init_val(); + + if (switches_list != NULL) + gen_get_switches(); + + /********** dump stabs for local variables **********/ + for (i = 0; i < HASHLEN; i++) + for (sy1 = vartab[i]; sy1 != NULL; sy1 = sy1->next) + for (sy = sy1; sy != NULL; sy = sy->clone) + if (sy->type != 'F' && sy->type != '8' && sy->type != 'K' + && sy->type != 'J') + { + + if (stabs_on_sw && sy->sec_no == SEC_STACK) + { + + if (sy->type == DTYPE_BININT) + { + switch (symlen(sy)) + { + case 1: + stabs_type = '6'; + break; + case 2: + stabs_type = '5'; + break; + case 4: + stabs_type = '3'; + break; + case 8: + stabs_type = '7'; + break; + } + fprintf(o_src, ".stabs\t\"%s:%c\",128,0,0,-%d\n", + sy->name, stabs_type, sy->location); + } + else if (sy->type == DTYPE_PACKED) + fprintf( + o_src, + ".stabs\t\"%s:(1,%d)=ar3;1;%d;4\",128,0,0,-%d\n", + sy->name, sy->len, sy->len, sy->location); + else + fprintf( + o_src, + ".stabs\t\"%s:(1,%d)=ar3;1;%d;2\",128,0,0,-%d\n", + sy->name, sy->len, sy->len, sy->location); + } + } + + fprintf(o_src, ".Linite_%s:\n", pgm_label); + if (stabs_on_sw) + { + fprintf(o_src, ".stabn\t192,0,0,.LS%d-Ltext_%s\n", line_label, + pgm_label); + fprintf(o_src, ".stabn\t224,0,0,.LSend_%s-Ltext_%s\n", pgm_label, + pgm_label); + + } + +#if !defined(__WINDOWS__) + fprintf(o_src, "\tleal\t%s, %%eax\n", pgm_label); +#else + fprintf(o_src,"\tleal\t_%s, %%eax\n",pgm_label); +#endif + fprintf(o_src, "\tpushl\t%%eax\n"); + fprintf(o_src, "\tleal\t.Lend_pgm_%s, %%eax\n", pgm_label); + fprintf(o_src, "\tpushl\t%%eax\n"); + stack_offset += 8; /* length of the 2 pushes above */ + + at_procedure++; + stabs_started++; + stabs_line(); +} + +void dump_descriptor_lit(struct lit *v, int len) +{ + int tmplen = 0; + fprintf(o_src, "\t.long\t%d\n", (v->decimals) ? len - 1 : len); + if (HTG_libcob) + { + fprintf(o_src, "\t.long\tc_base%d+%d\n", pgm_segment, v->location); /* data pointer */ + fprintf(o_src, "\t.long\tc_base%d+%d\n", pgm_segment, v->descriptor + + CFLD_DESC_SIZE0); /* desc pointer */ + fprintf(o_src, "\t.byte\t'%c',%d,%d,%d\n", v->type, v->decimals, 0, + v->all); + fprintf(o_src, "\t.long\tc_base%d+%d\n", pgm_segment, v->descriptor + + CFLD_DESC_SIZE1); /* picture picture */ + } + else + { + fprintf(o_src, "\t.byte\t'%c',%d,%d,%d\n", v->type, v->decimals, 0, + v->all); + +#ifdef DEBUG_COMPILER + fprintf(o_src,"\t.long\tc_base%d+%d\t# c_base%d+%x(hex)\n", + pgm_segment, v->descriptor+FLD_DESC_SIZE1, + pgm_segment,v->descriptor+FLD_DESC_SIZE1); +#else + fprintf(o_src, "\t.long\tc_base%d+%d\n", pgm_segment, v->descriptor + + FLD_DESC_SIZE1); /* pointer to the picture */ +#endif + } + + if (v->decimals) + { + if (v->name[v->len - 1] > '9') /* signed too? */ + fprintf(o_src, "\t.byte\t'S',1,'9',%d,'V',1,'9',%d,0\n", len + - v->decimals - 1, v->decimals); + else + fprintf(o_src, "\t.byte\t'9',%d,'V',1,'9',%d,0\n", len + - v->decimals - 1, v->decimals); + } + else if ((v->type == DTYPE_DISPLAY) && (v->name[v->len - 1] > '9')) + { + /* this is a signed literal, so reflect into its picture too */ + fprintf(o_src, "\t.byte\t'S',1,'9',%d,0\n", len); + } + else + { + tmplen = len; + while (tmplen > 255) + { + fprintf(o_src, "\t.byte\t\'%c\',%d\n", v->type, 255); + tmplen -= 255; + } + fprintf(o_src, "\t.byte\t\'%c\',%d,0\n", v->type, tmplen); + + } +} + +void dump_descriptor_fld(struct sym *sy) +{ + char flag; +#ifdef DEBUG_COMPILER + fprintf(o_src,"# Field: %s, Mem loc: %s, Desc: c_base%d+%d\n", + sy->name,memref(sy),pgm_segment,sy->descriptor ); +#endif + if (sy->redefines != NULL) + sy->location = sy->redefines->location; + fprintf(o_src, "\t.long\t%d\n", sy->len); + + if (HTG_libcob) + { + fprintf(o_src, "\t.long\tw_base%d+%d\n", pgm_segment, sy->location); /* data pointer */ + fprintf(o_src, "\t.long\tc_base%d+%d\n", pgm_segment, sy->descriptor + + CFLD_DESC_SIZE0); /* desc pointer */ + flag = sy->flags.just_r ? 2 : 0; + flag |= (sy->flags.separate_sign ? 4 : 0); + flag |= (sy->flags.leading_sign ? 8 : 0); + flag |= (sy->flags.blank ? 16 : 0); + fprintf(o_src, "\t.byte\t'%c',%d,%d,%d\n", sy->type, sy->decimals, 0, + flag); + } + else + { + flag = sy->flags.just_r ? 2 : 0; + flag |= (sy->flags.separate_sign ? 4 : 0); + flag |= (sy->flags.leading_sign ? 8 : 0); + flag |= (sy->flags.blank ? 16 : 0); + fprintf(o_src, "\t.byte\t'%c',%d,%d,%d\n", sy->type, sy->decimals, + sy->pscale, flag); + } + if (sy->type != DTYPE_GROUP) + { +#ifdef DEBUG_COMPILER + fprintf(o_src,"\t.long\tc_base%d+%d\t# c_base%d+%x(hex)\n", + pgm_segment,sy->pic,pgm_segment,sy->pic); +#else + fprintf(o_src, "\t.long\tc_base%d+%d\n", pgm_segment, sy->pic); +#endif + if (sy->stype == 'X') + { /* for COMP-X generate a generic + picture */ + fprintf(o_src, "\t.byte\t'9',%d\n", sym_min_pic(sy)); + } + else + { + unsigned int i; + for (i = 0; i < strlen(sy->picstr); i += 2) + fprintf(o_src, "\t.byte\t\'%c\',%d\n", *(sy->picstr + i), + *((unsigned char *) sy->picstr + i + 1)); + } + fprintf(o_src, "\t.byte\t0\n"); + } +} + +/* using values : 0 = normal, 1 = using , 2 = chaining */ +void proc_trail(int using) +{ + struct lit *v; + struct list *list; + struct sym *sy; + /*char s[9];*/ +#if !defined(__WINDOWS__) + char *pgm_label = "main"; +#else + char *pgm_label = "_main"; +#endif + +#if 0 + if (( using == 1 )/* || ((using == 0 ) && (has_linkage))*/) + { /* Is a routine */ + pgm_label = program_id; + } +#endif + if (module_flag || nested_flag) + { + pgm_label = program_id; + } + fprintf(o_src, ".Lend_pgm_%s:\n", pgm_label); + + /* Screen section io cleanup (curses library). */ + if (screen_io_enable != 0) + { + asm_call("tcob_do_scrio_finish"); + } + + asm_call("tcob_stop_run"); + + /* Program return code is stored in register %eax + * Note: + * The variable RETURN-CODE is a extention to the + * standard, since ANSI COBOL 85 does not support it. + */ + + if ((sy = lookup(SVAR_RETURN_CODE, SYTB_VAR)) == NULL) + { + fprintf(o_src, "\tmovl\t$0, %%eax\n"); + } + else + { + if (sy->sec_no == SEC_STACK) + { + fprintf(o_src, "\tleal\t-%d(%%ebp), %%edx\n", sy->location); + } + else + { + /* fprintf(o_src,"\tmovl\t$w_base+%d, %%edx\n",sy->location); */ + fprintf(o_src, "\tleal\tw_base%d+%d, %%edx\n", pgm_segment, + sy->location); + } + fprintf(o_src, "\tmovl\t(%%edx), %%eax\n"); + } + + fprintf(o_src, "\tjmp\t.LSend_%s\n", pgm_label); + fprintf(o_src, "\t.align 16\n"); + fprintf(o_src, ".LSend_%s:\n", pgm_label); + + fprintf(o_src, "\tpushl\t%%eax\n"); + asm_call("exit"); + fprintf(o_src, "\taddl\t$4,%%esp\n"); + + /* fprintf(o_src,"\tmovl\t-%d(%%ebp), %%ebx\n",SAVED_EBX_OFFSET); */ + /* fprintf(o_src,"\tmovl\t-%d(%%ebp), %%ebx\n",stack_offset -8 - 16); */ + fprintf(o_src, "\tmovl\t-%d(%%ebp), %%ebx\n", stack_offset - 24); + fprintf(o_src, "\tmov\t%%ebp,%%esp\n"); + fprintf(o_src, "\tpopl\t%%ebp\n"); + fprintf(o_src, "\tret\n"); + + /******* screen section field processing *********/ + /* dump_scr_proc(); */ + + /********** generate .Lfe statement ************/ + fprintf(o_src, ".Lfe1_%s:\n", pgm_label); +#if !defined(__WINDOWS__) + fprintf(o_src, "\t.size\t%s,.Lfe1_%s-%s\n", pgm_label, pgm_label, pgm_label); +#endif + + /********** generate data for literals & fields ************/ + fprintf(o_src, ".data\n\t.align 4\n"); + /* generate static working storage */ + dump_working(); + + /* predefined data for special literals */ + fprintf(o_src, "v_base%d:\nc_base%d:\n", pgm_segment, pgm_segment); + /**************** generate data for fields *****************/ + for (list = fields_list; list != NULL; list = list->next) + { + + if (((struct sym *) list->var)->type == 'F') + { /* sort files */ + char sl[21]; /* para inverter a lista */ + char *s; + s = sl; + *s++ = 0; /* final da lista invertida */ + sy = (struct sym *) list->var; +#ifdef DEBUG_COMPILER + fprintf(o_src,"# File: %s, Data loc: v_base+%d, Desc: c_base%d+%d\n", + sy->name,sy->location,pgm_segment,sy->descriptor ); +#endif + sy = (struct sym *) sy->sort_data; + while (sy != NULL) + { + *s++ = (unsigned char) sy->direction; + *s++ = (unsigned char) sy->len; + sy = (struct sym *) (sy->sort_data); + } + s--; + while (*s) + { + fprintf(o_src, "\t.byte\t%u,%u\n", *(s - 1), *s); + s -= 2; + } + fprintf(o_src, "\t.byte\t0\n"); + } /* end sort file */ + else if (((struct sym *) list->var)->litflag) + { /***** it is a literal *****/ + int len; //, tmplen; + v = (struct lit *) list->var; + /*len = v->nick ? 1 : strlen(v->name);*/ + len = v->nick ? 1 : v->len; +#ifdef DEBUG_COMPILER + fprintf(o_src,"# Literal: %s, Data loc: c_base%d+%d, Desc: c_base+%d\n", + sch_convert(v->name),pgm_segment,v->location,v->descriptor ); + +#endif + if (!v->decimals) + { /* print literal string, w/special chars */ + int i; + char *s; + if (v->nick) + { + s = v->nick; + i = 1; + } + else + { + s = v->name; + i = v->len; + } + emit_lit(s, i); + if (i) + { + fprintf(o_src, ",0\n"); + } + else + { /* null string? */ + fprintf(o_src, "\t.byte\t0\n"); + } + } + else + { + char *s; + s = v->name; + fprintf(o_src, "\t.byte\t"); + while (*s && (*s != decimal_char())) + fprintf(o_src, "%d,", *s++); + s++; + while (*s) + fprintf(o_src, "%d,", *s++); + fprintf(o_src, "0\n"); + } + dump_descriptor_lit(v, len); + } /* end literals */ + else /*if ( ((struct sym *)list->var)->type!='D' )*/ + { + /********* it is a normal field ****************/ + sy = (struct sym *) list->var; + dump_descriptor_fld(sy); + } /* end normal field */ + } /* end for */ + + /* generate data for files */ + dump_fdesc(); + /* dump_scr_data(); */ + data_trail(); + /* fprintf(o_src,"\n\t.ident\t\"TinyCOBOL: %s\"\n", PGM_VERSION); */ + /* fprintf(o_src,"\n\t.ident\t\"%s: %s\"\n", HTG_PGM_NAME, TCOB_PGM_VERSION); */ + dump_symbols(); +} /* proc_trail */ + +/* + ** dump all static working storage + */ +void dump_working() +{ + + struct sym *v, *sy; + struct list *list /*,*visited*/; + int fld_len; + int stabs_type = '3'; + short cur_sec_no = SEC_WORKING; + + /* fprintf(o_src,".data\n\t.align 4\n"); */ + /* fprintf(o_src,"w_base:\t.long\t0\n"); */ + fprintf(o_src, "w_base%d:\n", pgm_segment); + for (list = fields_list; list != NULL; list = list->next) + { + v = (struct sym *) list->var; + sy = v; + if (v->litflag) + continue; + if (v->sec_no == SEC_STACK) + continue; + if (v->type == 'F' || v->type == 'R') + continue; + fld_len = set_field_length(v, 1) * v->times; + if (v->sec_no != cur_sec_no && v->sec_no >= SEC_FIRST_NAMED) + { /* switch of sections */ + if (v->sec_no >= SEC_FIRST_NAMED) + { + /* Fix for GCC 3.x + fprintf(o_src,"\t.comm\t%s,%d,4\n",sec_name(v->sec_no), fld_len); + */ + fprintf(o_src, "\t.comm\t%s,%d\n", sec_name(v->sec_no), fld_len); + } + else + { + fprintf(o_src, ".text\n"); + } + cur_sec_no = v->sec_no; + } +#ifdef DEBUG_COMPILER + fprintf(o_src,"# FIELD %s, Data Loc: %d(hex: %x) %c\n", + v->name,v->location,v->location,v->type); +#endif + if (stabs_on_sw) + { + if (sy->type == DTYPE_BININT) + { + switch (symlen(sy)) + { + case 1: + stabs_type = '6'; + break; + case 2: + stabs_type = '5'; + break; + case 4: + stabs_type = '3'; + break; + case 8: + stabs_type = '7'; + break; + } + fprintf(o_src, ".stabs\t\"%s:V%c\",38,0,0,w_base%d+%d\n", + sy->name, stabs_type, pgm_segment, sy->location); + } + else if (sy->type == DTYPE_PACKED) + fprintf( + o_src, + ".stabs\t\"%s:V(1,%d)=ar3;1;%d;4\",38,0,0,w_base%d+%d\n", + /* sy->name,sy->len,sy->len,sy->location); */ + sy->name, sy->len, sy->len, pgm_segment, 0); + else + fprintf( + o_src, + ".stabs\t\"%s:V(1,%d)=ar3;1;%d;2\",38,0,0,w_base%d+%d\n", + sy->name, sy->len, sy->len, pgm_segment, sy->location); + } + + if (v->parent) + continue; + if (v->level == 66) + continue; + if (fld_len) + { /* don't alloc dummy (zero storage) symbols */ + def_field_storage(v, fld_len); + /*fprintf(o_src,"\t.space\t%d\n",fld_len);*/ + } + else + { + if (v->type != DTYPE_ACCEPT_DISPLAY) /* empty fields on screen are allowed + to set line/column or color + or erase line or screen */ + yyerror("Invalid picture in %s,type %c,%d,%d", v->name, + v->type, fld_len, symlen(v)); + } +#if 0 + if (v->son) continue; /* no space reserved for groups */ + if (v->value != NULL) + { + gen_init_value(v->value,fld_len); + } + else + fprintf(o_src,"\t.ds\t%d\n",fld_len); +#endif + } + /* output tmpvar storage */ + if (tmpvar_max > 0) + { + fprintf(o_src, "tv_base%d:\n", pgm_segment); + fprintf(o_src, "\t.space\t%d\n", tmpvar_max); + } +} + +/* + ** Use push_eax and push_ebx to generate code for + ** passing parameters to the runtime functions. + ** Use asm_call to call the runtime and + ** automatically clean the stack. + */ +void push_immed(int i) +{ + stackframe_cnt += 4; + fprintf(o_src, "\tpushl\t$%d\n", i); +} +void push_eax() +{ + stackframe_cnt += 4; + fprintf(o_src, "\tpushl\t%%eax\n"); +} + +void push_edx() +{ + stackframe_cnt += 4; + fprintf(o_src, "\tpushl\t%%edx\n"); +} + +void pop_eax() +{ + stackframe_cnt -= 4; + fprintf(o_src, "\tpopl\t%%eax\n"); +} + +void push_ebx() +{ + stackframe_cnt += 4; + fprintf(o_src, "\tpushl\t%%ebx\n"); +} + +void push_at_ebx(struct sym *sy) +{ +#ifdef DEBUG_COMPILER + fprintf(o_src, "# push_at_ebx:\n"); +#endif + stackframe_cnt += 4; + if (sy->type == DTYPE_BININT) + { + if (symlen(sy) == 8) + { + fprintf(o_src, "\tmovl\t4(%%ebx), %%edx\n"); + fprintf(o_src, "\tmovl\t0(%%ebx), %%eax\n"); + fprintf(o_src, "\tpushl\t%%edx\n"); + stackframe_cnt += 4; + } + else if (symlen(sy) >= 4) + fprintf(o_src, "\tmovl\t0(%%ebx), %%eax\n"); + else + fprintf(o_src, "\tmovs%cl\t0(%%ebx), %%eax\n", varsize_ch(sy)); + } + else + fprintf(o_src, "\tmovl\t0(%%ebx), %%eax\n"); + fprintf(o_src, "\tpushl\t%%eax\n"); +} + +void push_at_eax(struct sym *sy) +{ +#ifdef DEBUG_COMPILER + fprintf(o_src, "# push_at_eax:\n"); +#endif + stackframe_cnt += 4; + if (sy->type == DTYPE_BININT || sy->type == DTYPE_FLOAT) + { + if (symlen(sy) == 8) + { + fprintf(o_src, "\tmovl\t4(%%eax), %%edx\n"); + fprintf(o_src, "\tmovl\t0(%%eax), %%eax\n"); + fprintf(o_src, "\tpushl\t%%edx\n"); + stackframe_cnt += 4; + } + else if (symlen(sy) >= 4) + fprintf(o_src, "\tmovl\t0(%%eax), %%eax\n"); + else + fprintf(o_src, "\tmovs%cl\t0(%%eax), %%eax\n", varsize_ch(sy)); + } + else + fprintf(o_src, "\tmovl\t0(%%eax), %%eax\n"); + fprintf(o_src, "\tpushl\t%%eax\n"); +} + +void load_at_eax(struct sym *sy) +{ +#ifdef DEBUG_COMPILER + fprintf(o_src, "# load_at_eax:\n"); +#endif + if (sy->type == DTYPE_BININT || sy->type == DTYPE_FLOAT) + { + if (symlen(sy) == 8) + { + fprintf(o_src, "\tmovl\t4(%%eax), %%edx\n"); + fprintf(o_src, "\tmovl\t0(%%eax), %%eax\n"); + } + else if (symlen(sy) >= 4) + fprintf(o_src, "\tmovl\t0(%%eax), %%eax\n"); + else + fprintf(o_src, "\tmovs%cl\t0(%%eax), %%eax\n", varsize_ch(sy)); + } + else + fprintf(o_src, "\tmovl\t0(%%eax), %%eax\n"); +} + +void cleanup_rt_stack() +{ + /* generate stack cleanup only if there is something to clean */ + if (stackframe_cnt == 1) + fprintf(o_src, "\tpopl\t%%ecx\n"); + else if (stackframe_cnt) + fprintf(o_src, "\taddl\t$%d, %%esp\n", stackframe_cnt); + stackframe_cnt = 0; + if (need_desc_length_cleanup) + { + /*#if !defined(__WINDOWS__) + fprintf(o_src,"\tcall\tcob_free_desc_list\n"); + #else + fprintf(o_src,"\tcall\t_cob_free_desc_list\n"); + #endif*/ + tmpvar_offset = 0; /* reuse this storage area */ + need_desc_length_cleanup = 0; + } +} + +void asm_call(char *s) +{ +#if !defined(__WINDOWS__) + fprintf(o_src, "\tcall\t%s\n", s); +#else + fprintf(o_src,"\tcall\t_%s\n",s); +#endif + cleanup_rt_stack(); +} + +/* as asm_call but without stack cleaning */ +void asm_call1(char *s) +{ +#if !defined(__WINDOWS__) + fprintf(o_src, "\tcall\t%s\n", s); +#else + fprintf(o_src,"\tcall\t_%s\n",s); +#endif +} + +void emt_cobrtl_call(char *s, char *prefix) +{ +#if !defined(__WINDOWS__) + fprintf(o_src, "\tcall\t%s_%s\n", prefix, s); +#else + fprintf(o_src,"\tcall\t_%s_%s\n",prefix,s); +#endif + cleanup_rt_stack(); +} + +int varsize_ch(struct sym *sy) +{ + switch (symlen(sy)) + { + case 1: + return 'b'; + case 2: + return 'w'; + default: + return 'l'; + } +} +int find_son(struct sym *parent, struct sym *son) +{ + struct sym *tmp; + for (tmp = son; tmp != NULL; tmp = tmp->parent) + { + if (tmp->parent == parent) + return TRUE; + } + return FALSE; +} + +void gen_call_scr_process(struct sym *sy) +{ + + static struct sym *temp_color = NULL; /* temporay fields for */ + static struct sym *temp_background = NULL; /* screen location and */ + static struct sym *temp_foreground = NULL; /* colors, to be sure that */ + static struct sym *temp_line = NULL; /* we call the function */ + static struct sym *temp_column = NULL; /* pushing integers */ + static struct sym *temp_size = NULL; /* */ + + struct sym *temp_parent = NULL; + struct sym *temp_son = NULL; + + if ((sy->scr->line_sign != 0) || ((sy->scr->line == 0) + && (sy->scr->line_var == NULL))) + { + /* when we have a line +/-, we have to */ + /* put the cursor on the correct position */ + if (!temp_line) + temp_line = define_temp_field(DTYPE_BININT, 4); + /* && (temp_parent->scr->line_sign !=0)*/ + for (temp_parent = sy; temp_parent->parent; temp_parent + = temp_parent->parent) /*find the top level*/ + { + if ((temp_parent->scr->line_sign == 0) && ((temp_parent->scr->line + != 0) || (temp_parent->scr->line_var != NULL))) + { + break; + } + } + if (temp_parent->scr->line_sign != 0) + yyerror("structure not suported '%s', invalid line", + temp_parent->name); + + while (temp_parent) + { + + if (temp_parent->scr->line_var) + { + gen_move(temp_parent->scr->line_var, temp_line); + push_immed(temp_parent->scr->line_sign); + value_to_eax(temp_line); + push_eax(); + asm_call("tcob_go_y"); + } + else + { + if (temp_parent->scr->line) + { + push_immed(temp_parent->scr->line_sign); + push_immed(temp_parent->scr->line); + asm_call("tcob_go_y"); + } + } + + if (find_son(temp_parent, sy)) + { + temp_parent = temp_parent->son; + } + else + { + temp_parent = temp_parent->brother; + } + if (temp_parent == sy) + temp_parent = NULL; + } + } + temp_parent = NULL; + temp_son = NULL; + if (sy->scr->column_sign != 0) + { /* when we have a line +/-, we have to */ + /* put the cursor on the correct positiona */ + if (!temp_column) + temp_column = define_temp_field(DTYPE_BININT, 4); + + temp_son = (sy->parent)->son; + + if (temp_son->scr->column_sign != 0) + yyerror("structure not suported '%s', invalid column", + temp_son->name); + + if ((temp_son->scr->column == 0) && (temp_son->scr->column_var == NULL)) + temp_son->scr->column = 1; + + for (; temp_son != sy; temp_son = temp_son->brother) + { + if ((temp_son->scr->column == 0) && (temp_son->scr->column_var + == NULL)) + { + temp_son->scr->column_sign = 1; + temp_son->scr->column = 1; + } + if (temp_son->scr->column) + { + push_immed(temp_son->scr->column_sign); + push_immed(temp_son->scr->column + temp_son->len - 1); + asm_call("tcob_go_x"); + + } + if (temp_son->scr->column_var) + { + gen_move(temp_son->scr->column_var, temp_column); + + value_to_eax(temp_column); + fprintf(o_src, "\taddl\t$%d, %%eax\n", temp_son->len - 1); + push_immed(temp_son->scr->column_sign); + push_eax(); + asm_call("tcob_go_x"); + } + } + + } + + if (sy->scr->color) + { + if (!temp_color) + temp_color = define_temp_field(DTYPE_BININT, 4); + gen_move(sy->scr->color, temp_color); + } + if (sy->scr->background) + { + if (!temp_background) + temp_background = define_temp_field(DTYPE_BININT, 4); + gen_move(sy->scr->background, temp_background); + } + if (sy->scr->foreground) + { + if (!temp_foreground) + temp_foreground = define_temp_field(DTYPE_BININT, 4); + gen_move(sy->scr->foreground, temp_foreground); + } + if (sy->scr->line_var) + { + if (!temp_line) + temp_line = define_temp_field(DTYPE_BININT, 4); + gen_move(sy->scr->line_var, temp_line); + } + if (sy->scr->column_var) + { + if (!temp_column) + temp_column = define_temp_field(DTYPE_BININT, 4); + gen_move(sy->scr->column_var, temp_column); + } + if (sy->scr->size) + { + if (!temp_size) + temp_size = define_temp_field(DTYPE_BININT, 4); + gen_move(sy->scr->size, temp_size); + } + + gen_loadvar(sy->scr->to); /* to field */ + gen_loadvar(sy->scr->from); /* from field */ + gen_loadvar(sy); /* screen field */ + + if (sy->scr->size) + { + value_to_eax(temp_size); /* size */ + push_eax(); + } + else + { + push_immed(-1); + } + + if (sy->scr->background) + { + value_to_eax(temp_background); /* background color */ + push_eax(); + } + else + { + if (sy->scr->color) + { + value_to_eax(temp_color); + fprintf(o_src, "\tand\t$0x000000F0,%%eax\n"); /* bits 4-7 */ + /* color = 16 * fore-color */ + fprintf(o_src, "\tshr\t$4,%%eax\n"); + push_eax(); + } + else + { + push_immed(-1); + } + } + + if (sy->scr->foreground) + { + value_to_eax(temp_foreground); /* foreground color */ + push_eax(); + } + else + { + if (sy->scr->color) + { + value_to_eax(temp_color); + fprintf(o_src, "\tand\t$0x0000000F,%%eax\n"); /* bits 0-3 of color */ + push_eax(); + } + else + push_immed(-1); + } + push_immed(sy->scr->column_sign); /* column sign */ + /* push_immed(0); *//* column sign */ + if (sy->scr->column_var) /* column */ + { + value_to_eax(temp_column); + push_eax(); + } + else + { + push_immed(sy->scr->column); + } + push_immed(sy->scr->line_sign); /* line sign */ + /*push_immed(0);*//* line sign */ + if (sy->scr->line_var) /* line */ + { + value_to_eax(temp_line); + push_eax(); + } + else + { + push_immed(sy->scr->line); + } + + if (sy->scr->color) + { + fprintf(o_src, "\tmov\t$%d,%%ebx\n", sy->scr->attr); + value_to_eax(temp_color); + fprintf(o_src, "\tand\t$0x0000FF00,%%eax\n"); /* bits 8-15 */ + fprintf(o_src, "\tshr\t$8,%%eax\n"); + fprintf(o_src, "\tor\t%%ebx,%%eax\n"); + push_eax(); /* attributes */ + + } + else + { + push_immed(sy->scr->attr); /* attributes */ + } + asm_call("tcob_scr_process"); +} + +struct math_ose * +math_on_size_error0(void) +{ + struct math_ose *v; + v = malloc(sizeof(struct math_ose)); + v->ose = 0; /* type of option */ + v->lbl1 = 0; /* call label name 1 - on_size */ + v->lbl2 = 0; /* call label name 2 - not_on_size */ + v->lbl4 = loc_label++; /* determine bypass label name */ + fprintf(o_src, "\tmovl\t$0,%%eax\n\tpushl\t%%eax\n"); /* reset ose cnt */ + gen_jmplabel(v->lbl4); /* generate bypass jump */ + return v; +} + +struct math_ose * +math_on_size_error1(struct math_ose *v) +{ + v->ose = loc_label++; + fprintf(o_src, ".L%d:\n", (int) v->ose); + return v; +} + +void math_on_size_error2(struct math_ose *v) +{ + fprintf(o_src, "\tjmp\t.L%ldR\n", v->ose); +} + +void math_on_size_error3(struct math_ose *v) +{ + + unsigned long lbl1, lbl2; + + if (v == (struct math_ose *) NULL) + return; + + lbl1 = loc_label++; + + /* Set the error flag */ + fprintf(o_src, "\torl\t%%eax, 0(%%esp)\n"); + return; + + switch (v->ose) + { + case 1: + fprintf(o_src, "\torl\t%%eax, 0(%%esp)\n"); + break; + + case 2: + fprintf(o_src, "\tcmpl\t$0, %%eax\n"); + fprintf(o_src, "\tjne\t.L%ld\n", lbl1); + fprintf(o_src, "\tleal\t.L%ld, %%eax\n", lbl1); + fprintf(o_src, "\tpushl\t%%eax\n"); + gen_jmplabel(v->lbl2); + fprintf(o_src, "\t.align 16\n"); + fprintf(o_src, ".L%ld:\n", lbl1); + break; + + default: + lbl2 = loc_label++; + fprintf(o_src, "\tcmpl\t$0, %%eax\n"); + fprintf(o_src, "\tje\t.L%ld\n", lbl1); + fprintf(o_src, "\tleal\t.L%ld, %%eax\n", lbl2); + fprintf(o_src, "\tpushl\t%%eax\n"); + gen_jmplabel(v->lbl1); + fprintf(o_src, "\t.align 16\n"); + fprintf(o_src, ".L%ld:\n", lbl1); + fprintf(o_src, "\tleal\t.L%ld, %%eax\n", lbl2); + fprintf(o_src, "\tpushl\t%%eax\n"); + gen_jmplabel(v->lbl2); + fprintf(o_src, "\t.align 16\n"); + fprintf(o_src, ".L%ld:\n", lbl2); + break; + } + +} + +struct math_ose * +math_on_size_error4(struct math_ose *v, unsigned long ty) +{ + + /* ose=ty; type of option */ + /* lbl1 call label name 1 - on_size */ + /* lbl2 call label name 2 - not_on_size */ + + switch (ty) + { + case 1: + v->lbl1 = v->ose; + v->ose = ty; + break; + + case 2: + v->lbl2 = v->ose; + v->ose = ty; + break; + + case 3: + v->lbl2 = v->ose; + v->ose = ty; + break; + + default: + break; + } + + return v; +} + +void math_on_size_error5(struct math_ose *v) +{ + unsigned long lbl1, lbl2; + + if (v == (struct math_ose *) NULL) + return; + + lbl1 = loc_label++; + + fprintf(o_src, "\tpopl\t%%eax\n"); + switch (v->ose) + { + case 1: + fprintf(o_src, "\tcmpl\t$0, %%eax\n"); + fprintf(o_src, "\tje\t.L%ld\n", lbl1); + gen_jmplabel(v->lbl1); + fprintf(o_src, "\t.align 16\n"); + fprintf(o_src, ".L%ldR:\n", v->lbl1); + fprintf(o_src, ".L%ld:\n", lbl1); + break; + + case 2: + fprintf(o_src, "\tcmpl\t$0, %%eax\n"); + fprintf(o_src, "\tjne\t.L%ld\n", lbl1); + gen_jmplabel(v->lbl2); + fprintf(o_src, "\t.align 16\n"); + fprintf(o_src, ".L%ldR:\n", v->lbl2); + fprintf(o_src, ".L%ld:\n", lbl1); + break; + + default: + lbl2 = loc_label++; + fprintf(o_src, "\tcmpl\t$0, %%eax\n"); + fprintf(o_src, "\tje\t.L%ld\n", lbl1); + gen_jmplabel(v->lbl1); + fprintf(o_src, "\t.align 16\n"); + fprintf(o_src, ".L%ldR:\n", v->lbl1); + gen_jmplabel(lbl2); + fprintf(o_src, ".L%ld:\n", lbl1); + gen_jmplabel(v->lbl2); + fprintf(o_src, "\t.align 16\n"); + fprintf(o_src, ".L%ldR:\n", v->lbl2); + fprintf(o_src, ".L%ld:\n", lbl2); + break; + } +} + +/******** generic structure allocation and code genertion ***********/ +struct ginfo * +ginfo_container0(void) +{ + struct ginfo *v; + v = malloc(sizeof(struct ginfo)); + v->sel = 0; /* type of option */ + v->lbl1 = 0; /* call label name 1 - true */ + v->lbl2 = 0; /* call label name 2 - not true */ + v->lbl3 = loc_label++; /* End of statement label name */ + v->lbl4 = 0; /* not used */ + v->lbl5 = loc_label++; /* determine test bypass label name */ + gen_jmplabel(v->lbl5); /* generate test bypass jump */ + return v; +} + +struct ginfo * +ginfo_container1(struct ginfo *v) +{ + v->sel = loc_label++; + fprintf(o_src, ".L%d:\n", (int) v->sel); + return v; +} + +void ginfo_container2(struct ginfo *v, unsigned long ty) +{ + + switch (ty) + { + case 1: + v->lbl1 = v->sel; + v->sel = 0; + /*v->lbl3=loc_label++; return 1 label name */ + /* gen_jmplabel(v->lbl3); generate return 1 label jump */ + break; + + case 2: + v->lbl2 = v->sel; + v->sel = 0; + /*v->lbl4=loc_label++; return 2 label name */ + /*gen_jmplabel(v->lbl4); generate return 2 label jump */ + break; + } + gen_jmplabel(v->lbl3); /* generate end label jump */ +} + +struct ginfo * +ginfo_container3(struct ginfo *v, unsigned long ty) +{ + + /* sel=ty; type of option */ + /* lbl1 call label name 1 - true */ + /* lbl2 call label name 2 - not true */ + + switch (ty) + { + case 1: + v->sel = ty; + break; + + case 2: + v->sel = ty; + break; + + case 3: + v->sel = ty; + break; + + default: + break; + } + + fprintf(o_src, "\t.align 16\n"); + fprintf(o_src, ".L%d:\n", (int) v->lbl5); + + return v; +} + +void ginfo_container4(struct ginfo *v) +{ + + switch (v->sel) + { + case 1: +#ifdef DEBUG_COMPILER + fprintf (o_src, "# Test for At End ...\n"); +#endif + fprintf(o_src, "\tcmpl\t$10, %%eax\n"); + fprintf(o_src, "\tje\t.L%ld\n", v->lbl1); + /* gen_jmplabel(v->lbl1); */ + fprintf(o_src, "\t.align 16\n"); + fprintf(o_src, ".L%ld:\n", v->lbl3); + break; + + case 2: +#ifdef DEBUG_COMPILER + fprintf (o_src, "# Test for Not At End ...\n"); +#endif + fprintf(o_src, "\tcmpl\t$10, %%eax\n"); + fprintf(o_src, "\tjne\t.L%ld\n", v->lbl2); + /* gen_jmplabel(v->lbl2); */ + fprintf(o_src, "\t.align 16\n"); + fprintf(o_src, ".L%ld:\n", v->lbl3); + break; + + default: +#ifdef DEBUG_COMPILER + fprintf (o_src, "# Test for At End ... Not At End ...\n"); +#endif + fprintf(o_src, "\tcmpl\t$10, %%eax\n"); + fprintf(o_src, "\tjne\t.L%ld\n", v->lbl2); + gen_jmplabel(v->lbl1); + fprintf(o_src, "\t.align 16\n"); + fprintf(o_src, ".L%ld:\n", v->lbl3); + /* gen_jmplabel(v->lbl2); */ + /* fprintf(o_src,"\t.align 16\n"); */ + /* fprintf(o_src,".L%ld:\n",v->lbl4); */ + break; + } + +} + +void gen_test_invalid_keys(struct invalid_keys *p, struct sym *f, int fs) +{ + + if (p == NULL) + return; + if (p->invalid_key) + { + int lbl = loc_label++; +#ifdef DEBUG_COMPILER + fprintf (o_src, "# Test for INVALID KEY\n"); +#endif + fprintf(o_src, "\tcmp\t$%d, %%eax\n", fs); + fprintf(o_src, "\tjnz\t.L%d\n", lbl); + gen_jmplabel(p->invalid_key->lbl2); + fprintf(o_src, "\t.align 16\n"); + fprintf(o_src, ".L%d:\n", lbl); + } + + if (p->not_invalid_key) + { + int lbl = loc_label++; +#ifdef DEBUG_COMPILER + fprintf (o_src, "# Test for NOT INVALID KEY\n"); +#endif + fprintf(o_src, "\tcmp\t$%d, %%eax\n", fs); + fprintf(o_src, "\tjz\t.L%d\n", lbl); + gen_jmplabel(p->not_invalid_key->lbl2); + fprintf(o_src, "\t.align 16\n"); + fprintf(o_src, ".L%d:\n", lbl); + } + + if (p->invalid_key) + gen_dstlabel(p->invalid_key->lbl3); + if (p->not_invalid_key) + gen_dstlabel(p->not_invalid_key->lbl3); + + gen_perform_decl(f); + + if (p->invalid_key) + free(p->invalid_key); + if (p->not_invalid_key) + free(p->not_invalid_key); + free(p); + p = NULL; +} + +void gen_subscripted(struct vref *subs) +{ + struct vref *ref; + struct sym *sy;//, *var; + int outer_pushed, eax_in_use; + char op; + int stack_save; + + ref = subs->next; /* here start the subscripts */ + /*var =*/ sy = subs->sym; /* here our array */ + op = ref->litflag; + fprintf(o_src, "# gen_subscripted\n"); + outer_pushed = 0; + eax_in_use = 0; + while (ref) + { + if (((struct sym *) (ref->sym))->type == DTYPE_BININT && symlen( + ref->sym) > 4) + yywarn("binary long long subscript truncated to long"); + if (eax_in_use && !outer_pushed) + { + fprintf(o_src, "\tpushl\t%%eax\t# outer_pushed\n"); /* accumulate offsets here */ + outer_pushed++; + } + eax_in_use = 1; + value_to_eax(ref->sym); + if (((struct sym *) (ref->sym))->type == DTYPE_BININT && symlen( + ref->sym) > 4) + { + /* the following code is not strictly necessary: we could use %eax directly + but if a runtime check is needed, it is probably easier to implement + in the routine cob_cnv_ll2int! */ + stack_save = stackframe_cnt; + stackframe_cnt = 0; + push_edx(); + push_eax(); + asm_call("tcob_cnv_ll2i"); + stackframe_cnt = stack_save; + } + fprintf(o_src, "\tpushl\t%%eax\n"); + while (ref->litflag != ',') + { + op = ref->litflag; + ref = ref->next; + value_to_eax(ref->sym); + if (symlen(ref->sym) > 4) + { + yywarn("binary long long subscript truncated to long"); + stack_save = stackframe_cnt; + stackframe_cnt = 0; + push_edx(); + push_eax(); + asm_call("tcob_cnv_ll2i"); + stackframe_cnt = stack_save; + } + if (op == '+') + fprintf(o_src, "\taddl\t%%eax,0(%%esp)\n"); + else + fprintf(o_src, "\tsubl\t%%eax,0(%%esp)\n"); + } + /* find the first parent var that needs subscripting */ + while (sy && !sy->occurs_flg) + sy = sy->parent; + fprintf(o_src, "\tpopl\t%%eax\n"); + fprintf(o_src, "\tdecl\t%%eax\n"); /* subscript start at 1 */ + if (sy->len != 1) + { + fprintf(o_src, "\tmovl\t$%d, %%edx\n", symlen(sy)); + fprintf(o_src, "\timull\t%%edx\n"); + } + if (outer_pushed) + { + fprintf(o_src, "\taddl\t%%eax,0(%%esp)\n"); + } + if (sy) + sy = sy->parent; + ref = ref->next; + } + /*stackframe_cnt += 4;*//* update our stack frame counter */ + if (outer_pushed) + fprintf(o_src, "\tpopl\t%%eax\n"); /* return offset in %eax */ +} + +void gen_temp_storage(int size) +{ + stackframe_cnt += 4; + fprintf(o_src, "\tpushl\t$tv_base%d+%d\n", pgm_segment, tmpvar_offset); + tmpvar_offset += size; + if (tmpvar_offset > tmpvar_max) + { + tmpvar_max = tmpvar_offset; + } +} + +void value_to_eax(struct sym *sy) +{ + long long value; + long value2; + int stack_save; +#ifdef DEBUG_COMPILER + if (sy) fprintf(o_src,"# value_to_eax %s\n",sy->name); +#endif + if (sy == NULL) + { + fprintf(o_src, "\txorl\t%%eax,%%eax\n"); + return; + } + if (sy->litflag) + { + int i, bSign = 0; + char cDigit; + /* if it's an integer, compute it now, not at runtime! */ + value = 0; + /* integer's name is just it's value in ascii */ + for (i = 0; (cDigit = sy->name[i]); i++) + { + if (cDigit == '}') + { + cDigit = 0; + } + else if (cDigit == '{') + { + cDigit = 0; + bSign = 1; + } + else if ((cDigit >= 'A') && (cDigit <= 'I')) + { + cDigit -= 'A' - 1; + } + else if ((cDigit >= 'J') && (cDigit <= 'R')) + { + cDigit -= 'J' - 1; + bSign = 1; + } + else + { + cDigit -= '0'; + } + value = value * 10 + cDigit; + } + if (bSign) + value = -value; + fprintf(o_src, "\tmovl\t$%d,%%eax\n", (int) value); + value2 = value >> 32; + if ((value2 != 0) && (value2 != -1)) + fprintf(o_src, "\tmovl\t$%d,%%edx\n", (int) value2); + } + else if (sy->type == DTYPE_BININT || sy->type == DTYPE_FLOAT) + { + /* load binary (comp) value directly */ + /* %eax doesn't hold greater than 4 bytes binary types + so we use %edx to get the most significant part */ + if (symlen(sy) > 4) + { + fprintf(o_src, "\tleal\t%s, %%eax\n", memrefat(sy)); + fprintf(o_src, "\tmovl\t4(%%eax), %%edx\n"); + fprintf(o_src, "\tmovl\t0(%%eax), %%eax\n"); + } + else + { + if (symlen(sy) >= 4) + { + switch (sy->sec_no) + { + case SEC_CONST: + fprintf(o_src, "\tmovl\tc_base%d+%d, %%eax\n", pgm_segment, + sy->location); + break; + case SEC_DATA: + fprintf(o_src, "\tmovl\tw_base%d+%d, %%eax\n", pgm_segment, + sy->location); + break; + case SEC_STACK: + fprintf(o_src, "\tmovl\t-%d(%%ebp), %%eax\n", sy->location); + break; + break; + } + } + else + { + switch (sy->sec_no) + { + case SEC_CONST: + fprintf(o_src, "\tmovs%cl\tc_base%d+%d, %%eax\n", + varsize_ch(sy), pgm_segment, sy->location); + break; + case SEC_DATA: + fprintf(o_src, "\tmovs%cl\tw_base%d+%d, %%eax\n", + varsize_ch(sy), pgm_segment, sy->location); + break; + case SEC_STACK: + fprintf(o_src, "\tmovs%cl\t-%d(%%ebp), %%eax\n", + varsize_ch(sy), sy->location); + break; + } + } + } + } + else + { + fprintf(o_src, "#val to eax complex $c_base+%u, %%eax\n", + sy->descriptor); + stack_save = stackframe_cnt; + stackframe_cnt = 0; + gen_loadvar(sy); + fprintf(o_src, "#\tmovl\t$c_base+%u, %%eax\n", sy->descriptor); + asm_call("tcob_get_index"); + stackframe_cnt = stack_save; + } +} + +void value_to_eax_at_eax(struct sym *sy) +{ + long long value; + long value2; + int stack_save; +#ifdef DEBUG_COMPILER + if (sy) fprintf(o_src,"# value_to_eax_at_eax %s\n",sy->name); +#endif + if (sy == NULL) + { + fprintf(o_src, "\txorl\t%%eax,%%eax\n"); + return; + } + if (sy->litflag) + { + int i, bSign = 0; + char cDigit; + /* if it's an integer, compute it now, not at runtime! */ + value = 0; + /* integer's name is just it's value in ascii */ + for (i = 0; (cDigit = sy->name[i]); i++) + { + if (cDigit == '}') + { + cDigit = 0; + } + else if (cDigit == '{') + { + cDigit = 0; + bSign = 1; + } + else if ((cDigit >= 'A') && (cDigit <= 'I')) + { + cDigit -= 'A' - 1; + } + else if ((cDigit >= 'J') && (cDigit <= 'R')) + { + cDigit -= 'J' - 1; + bSign = 1; + } + else + { + cDigit -= '0'; + } + value = value * 10 + cDigit; + } + if (bSign) + value = -value; + fprintf(o_src, "\tmovl\t$%d,%%eax\n", (int) value); + value2 = value >> 32; + if ((value2 != 0) && (value2 != -1)) + fprintf(o_src, "\tmovl\t$%d,%%edx\n", (int) value2); + } + else if (sy->type == DTYPE_BININT || sy->type == DTYPE_FLOAT) + { + /* load binary (comp) value directly */ + /* %eax doesn't hold greater than 4 bytes binary types + so we use %edx to get the most significant part */ + if (symlen(sy) > 4) + { + fprintf(o_src, "\tmovl\t4(%%eax), %%edx\n"); + fprintf(o_src, "\tmovl\t0(%%eax), %%eax\n"); + } + else + { + if (symlen(sy) >= 4) + { + switch (sy->sec_no) + { + case SEC_CONST: + fprintf(o_src, "\tmovl\tc_base%d+%d, %%eax\n", pgm_segment, + sy->location); + break; + case SEC_DATA: + fprintf(o_src, "\tmovl\tw_base%d+%d, %%eax\n", pgm_segment, + sy->location); + break; + case SEC_STACK: + fprintf(o_src, "\tmovl\t-%d(%%ebp), %%eax\n", sy->location); + break; + break; + } + } + else + { + switch (sy->sec_no) + { + case SEC_CONST: + fprintf(o_src, "\tmovs%cl\tc_base%d+%d, %%eax\n", + varsize_ch(sy), pgm_segment, sy->location); + break; + case SEC_DATA: + fprintf(o_src, "\tmovs%cl\tw_base%d+%d, %%eax\n", + varsize_ch(sy), pgm_segment, sy->location); + break; + case SEC_STACK: + fprintf(o_src, "\tmovs%cl\t-%d(%%ebp), %%eax\n", + varsize_ch(sy), sy->location); + break; + } + } + } + } + else + { + fprintf(o_src, "#val to eax complex $c_base+%u, %%eax\n", + sy->descriptor); + stack_save = stackframe_cnt; + stackframe_cnt = 0; + /* gen_loadvar(sy); */ + push_eax(); + gen_loaddesc(sy); + asm_call("tcob_get_index"); + stackframe_cnt = stack_save; + } +} + +/* load address for normal (file/working-storage) or linkage variable */ +void load_address(struct sym *var) +{ + unsigned base, locoff; + struct sym *tmp; + if (!var->litflag && var->linkage_flg) + { + tmp = var; + while (tmp->linkage_flg == 1) + tmp = tmp->parent; + if (tmp == 0) + hterror(103, 8, "linkage section broken"); + base = tmp->linkage_flg; + locoff = tmp->location - var->location; + fprintf(o_src, "\tmovl\t%d(%%ebp), %%eax\n", base); + if (locoff) + { + fprintf(o_src, "\taddl\t$%d, %%eax\n", locoff); + } + } + /* else if (!var->litflag) { */ + else if (var->sec_no == SEC_STACK) + { + fprintf(o_src, "\tleal\t%s, %%eax\n", memref(var)); + } + else + { + if (var->sec_no == SEC_DATA) +#if 0 + fprintf(o_src,"\tlea%c\tw_base+%d, %%ebx\n", + The result is expected in %eax not %ebx + fprintf(o_src,"\tlea%c\tw_base+%d, %%eax\n", + varsize_ch(var),var->location); +#endif + fprintf(o_src, "\tleal\tw_base%d+%d, %%eax\n", pgm_segment, + var->location); + else if (var->sec_no == SEC_CONST) +#if 0 + fprintf(o_src,"\tlea%c\tc_base+%d, %%ebx\n", + fprintf(o_src,"\tlea%c\tc_base+%d, %%eax\n", + varsize_ch(var),var->location); +#endif + fprintf(o_src, "\tleal\tc_base%d+%d, %%eax\n", pgm_segment, + var->location); + /* this is not the same! I need an address here, not the value. + fprintf(o_src,"\tmovl\t%s, %%eax\n",memref(var));*/ + } +} + +/* load in cpureg ("eax","ebx"...) location for normal + (file/working-storage) or linkage variable */ +void load_location(struct sym *var, char *cpureg) +{ + unsigned base, locoff; + struct sym *tmp; + if (var == NULL) + { + fprintf(o_src, "\txorl\t%%%s,%%%s\n", cpureg, cpureg); + return; + } + if (!var->litflag && var->linkage_flg) + { + tmp = var; + while (tmp->linkage_flg == 1) + tmp = tmp->parent; + if (tmp == 0) + hterror(103, 8, "linkage section broken"); + base = tmp->linkage_flg; + locoff = var->location - tmp->location; + fprintf(o_src, "\tmovl\t%d(%%ebp), %%%s\n", base, cpureg); + if (locoff) + { + fprintf(o_src, "\taddl\t$%d, %%%s\n", locoff, cpureg); + } + } + /* else if (!var->litflag) { */ + else if (var->sec_no == SEC_STACK) + { + fprintf(o_src, "\tleal\t%s, %%%s\n", memref(var), cpureg); + } + else + { + fprintf(o_src, "\tmovl\t%s, %%%s\n", memref(var), cpureg); + + } +} + +void loadloc_to_eax(struct sym *sy_p) +{ + unsigned base, locoff; + struct sym *sy = sy_p, *var, *tmp; + if (sy == NULL) + { + hterror(104, 8, "*** fatal error: variable undefined!\n"); + return; + } +#ifdef DEBUG_COMPILER + fprintf(o_src,"#gen_loadloc litflg %d\n",sy->litflag); +#endif + if (sy->litflag == 4) + sy = ((struct refmod *) sy)->sym; /* temp bypass */ + if (sy->litflag == 2) + { + gen_subscripted((struct vref *) sy); + var = (struct sym *) ((struct vref *) sy)->sym; + if (var->linkage_flg) + { + tmp = var; + while (tmp->linkage_flg == 1) + tmp = tmp->parent; + if (tmp == 0) + yyerror("linkage section broken"); + base = tmp->linkage_flg; + /*locoff = tmp->location - var->location;*/ + locoff = var->location - tmp->location; + /*if (symlen(var)>=4)*/ + fprintf(o_src, "\tmovl\t%d(%%ebp), %%ebx\n", base); + /*else + fprintf(o_src,"\tmovs%cl %d(%%ebp), %%ebx\n", + varsize_ch(var),base);*/ + if (locoff) + { + fprintf(o_src, "\taddl\t$%d, %%ebx\n", locoff); + } + fprintf(o_src, "\taddl\t%%ebx, %%eax\n"); + } + else + { + if (var->sec_no == SEC_STACK) + fprintf(o_src, "\tleal\t%s, %%ebx\n", memref(var)); + else + { + if (var->sec_no == SEC_DATA) + /* fprintf(o_src,"\tlea%c\tw_base+%d, %%ebx\n", + varsize_ch(var),var->location); */ + fprintf(o_src, "\tleal\tw_base%d+%d, %%ebx\n", pgm_segment, + var->location); + else if (var->sec_no == SEC_CONST) + /* fprintf(o_src,"\tlea%c\tc_base+%d, %%ebx\n", + varsize_ch(var),var->location); */ + fprintf(o_src, "\tleal\tc_base%d+%d, %%ebx\n", pgm_segment, + var->location); + } + + fprintf(o_src, "\taddl\t%%ebx,%%eax\n"); + } + } + else + { + load_location(sy, "eax"); + } + /* At that stage, the address is ready in %eax; do we need + to correct it because of RefMod's? */ + if (sy_p->litflag == 4) + { /* should avoid all that if literal 1 */ + struct refmod * rfp = (struct refmod *) sy_p; + fprintf(o_src, "\tmovl\t%%eax, %%ebx\n"); + value_to_eax((rfp->off)); + fprintf(o_src, "\tdecl\t%%eax\n"); + fprintf(o_src, "\taddl\t%%ebx, %%eax\n"); + } +} + +/* store variable pointer in eax to sy. + sy must be a pointer or a linkage section 01/77 variable */ +void set_ptr(struct sym *sy) +{ + /*unsigned base;*/ + if (sy->litflag == 0 && sy->linkage_flg) + { + if (sy->linkage_flg == 1) + { + yyerror("only level 01 or 77 linkage vars may be set"); + return; + } + fprintf(o_src, "\tmovl\t%%eax,%d(%%ebp)\n", sy->linkage_flg); + return; + } + else + { + if (sy->litflag == 0) + { + load_location(sy, "ebx"); + fprintf(o_src, "\tmovl\t%%eax,0(%%ebx)\n"); + } + else + { + fprintf(o_src, "\tpushl\t%%eax\t# saving ptr value\n"); + loadloc_to_eax(sy); + fprintf(o_src, "\tmovl\t%%eax,%%ebx\n"); + fprintf(o_src, "\tpopl\t%%eax\n"); + fprintf(o_src, "\tmovl\t%%eax,0(%%ebx)\n"); + } + } +} + +void gen_loaddesc1(struct sym *sy, int variable_length) +{ + struct sym *var; + var = sy; + if (var->litflag == 2 || var->litflag == 4) + { + var = ((struct vref *) var)->sym; + if (var->litflag == 2) + { + var = ((struct vref *) var)->sym; + } + } + if (sy->litflag == 4) + { + struct refmod * rflp = (struct refmod *) sy; + struct sym * syl = rflp->len; + if (syl == NULL) + { + fprintf(o_src, "# corrected length EOV\n"); + value_to_eax(rflp->off); + fprintf(o_src, "\tnegl\t%%eax\n"); + fprintf(o_src, "\taddl\t$%d, %%eax\n", symlen(var)); + fprintf(o_src, "\tincl\t%%eax\n"); + fprintf(o_src, "\tmovl\t%%eax, rf_base%d+%d\n", pgm_segment, + rflp->slot * 8); + } + else + { + fprintf(o_src, "# corrected length %s\n", syl->name); + if (syl->litflag == 1) + { + /* the statement below does not always work if the literal + begins with a zero: as thinks it is an octal number. + We should really convert the "name" into a proper + value. (See bug #704519)*/ + /*fprintf(o_src,"\tmovl\t$%s, rf_base%d+%d\n", + syl->name,pgm_segment, rflp->slot*8);*/ + value_to_eax(syl); + fprintf(o_src, "\tmovl\t%%eax, rf_base%d+%d\n", pgm_segment, + rflp->slot * 8); + } + else + { + value_to_eax(syl); + fprintf(o_src, "\tmovl\t%%eax, rf_base%d+%d\n", pgm_segment, + rflp->slot * 8); + } + } + fprintf(o_src, "\tmovl\t$'%c', rf_base%d+%d\n", 'X' /*'G'*/, + pgm_segment, rflp->slot * 8 + 4); + fprintf(o_src, "\tmovl\t$rf_base%d+%d, %%eax\n", pgm_segment, + rflp->slot * 8); + } + else + { + /* adjust its length if there is a variable size item inside */ + if (variable_length && (get_variable_item(sy) != NULL)) + { + adjust_desc_length(sy); + } + else + { +#ifdef DEBUG_COMPILER + fprintf(o_src,"\tmovl\t%s, %%eax\t# descriptor of [%s]\n", + memrefd(var),sch_convert(var->name)); +#else + fprintf(o_src, "\tmovl\t%s, %%eax\n", memrefd(var)); +#endif + } + } + push_eax(); +} + +/* quick fix for generating a suitable descriptor for + ACCEPT of numeric fields (screen/curses enabled) when + refmods are used */ +void gen_loaddesc2(struct sym *sy, int variable_length) +{ + struct sym *var; + int adjust; + + var = sy; + adjust = 0; + + if (var->litflag == 2 || var->litflag == 4) + { + var = ((struct vref *) var)->sym; + if (var->litflag == 2) + { + var = ((struct vref *) var)->sym; + } + } + if (sy->litflag == 4) + { + struct refmod * rflp = (struct refmod *) sy; + struct sym * syl = rflp->len; + /* if (var->type == '9') */ + if (var->type != 'X') + { + fprintf(o_src, "\tmovl\t$%d, %%eax\n", var->len); + adjust++; + } + else + { + if (syl == NULL) + { + fprintf(o_src, "#corrected length EOV\n"); + value_to_eax(rflp->off); + fprintf(o_src, "\tnegl\t%%eax\n"); + fprintf(o_src, "\taddl\t$%d, %%eax\n", symlen(var)); + fprintf(o_src, "\tincl\t%%eax\n"); + fprintf(o_src, "\tmovl\t%%eax, rf_base%d+%d\n", pgm_segment, + rflp->slot * 8); + } + else + { + if (syl->litflag == 1) + { + /* the statement below does not always work if the literal + begins with a zero: as thinks it is an octal number. + We should really convert the "name" into a proper + value. (See bug #704519)*/ + /*fprintf(o_src,"\tmovl\t$%s, rf_base%d+%d\n", + syl->name,pgm_segment, rflp->slot*8);*/ + value_to_eax(syl); + fprintf(o_src, "\tmovl\t%%eax, rf_base%d+%d\n", + pgm_segment, rflp->slot * 8); + } + else + { + value_to_eax(syl); + fprintf(o_src, "\tmovl\t%%eax, rf_base%d+%d\n", + pgm_segment, rflp->slot * 8); + } + } + } + fprintf(o_src, "\tmovl\t$'X', rf_base%d+%d\n", pgm_segment, rflp->slot + * 8 + 4); + fprintf(o_src, "\tmovl\t$rf_base%d+%d, %%eax\n", pgm_segment, + rflp->slot * 8); + } + else + adjust++; + if (adjust) + { + /* adjust its length if there is a variable size item inside */ + if (variable_length && (get_variable_item(sy) != NULL)) + { + adjust_desc_length(sy); + } + else + { +#ifdef DEBUG_COMPILER + fprintf(o_src,"\tmovl\t%s, %%eax\t# descriptor of [%s]\n", + memrefd(var),sch_convert(var->name)); +#else + fprintf(o_src, "\tmovl\t%s, %%eax\n", memrefd(var)); +#endif + } + } + push_eax(); +} + +void gen_loadval(struct sym *sy) +{ + unsigned base, locoff; + struct sym *var; + struct sym *tmp = sy; + +#ifdef DEBUG_COMPILER + fprintf(o_src,"#gen_loadval\n"); +#endif + if (sy == NULL) + { + hterror(104, 8, "*** fatal error: variable undefined!\n"); + return; + } + if (sy->litflag == 2) + { + gen_subscripted((struct vref *) sy); + var = (struct sym *) ((struct vref *) sy)->sym; + if (var->linkage_flg) + { + tmp = var; + while (tmp->linkage_flg == 1) + tmp = tmp->parent; + if (tmp == 0) + yyerror("linkage section broken"); + base = tmp->linkage_flg; + locoff = tmp->location - var->location; + if (symlen(var) >= 4) + fprintf(o_src, "\tmovl\t%d(%%ebp), %%ebx\n", base); + else + fprintf(o_src, "\tmovs%cl %d(%%ebp), %%ebx\n", varsize_ch(var), + base); + if (locoff) + { + fprintf(o_src, "\taddl\t$%d, %%ebx\n", locoff); + } + fprintf(o_src, "\taddl\t%%eax, %%ebx\n"); + fprintf(o_src, "\tmovl\t%%ebx, %%eax\n"); + tmp = var; + } + else + { + fprintf(o_src, "\tleal\t%s, %%ebx\n", memrefat(var)); + fprintf(o_src, "\taddl\t%%ebx,%%eax\n"); + tmp = var; + } + } + else if (sy->litflag == 0) + { + tmp = sy; + load_address(tmp); + } + if (tmp->type == DTYPE_DISPLAY) + { + value_to_eax_at_eax(tmp); + return; + } + if (sy->litflag == 1) + value_to_eax(sy); + else + load_at_eax(tmp); +} + +void gen_pushval(struct sym *sy) +{ + unsigned base, locoff; + struct sym *var, *tmp; + if (sy == NULL) + { + hterror(104, 8, "*** fatal error: variable undefined!\n"); + return; + } + if (sy->litflag == 2) + { + gen_subscripted((struct vref *) sy); + var = (struct sym *) ((struct vref *) sy)->sym; + if (var->linkage_flg) + { + tmp = var; + while (tmp->linkage_flg == 1) + tmp = tmp->parent; + if (tmp == 0) + yyerror("linkage section broken"); + base = tmp->linkage_flg; + locoff = tmp->location - var->location; + if (symlen(var) >= 4) + fprintf(o_src, "\tmovl\t%d(%%ebp), %%ebx\n", base); + else + fprintf(o_src, "\tmovs%cl\t%d(%%ebp), %%ebx\n", + varsize_ch(var), base); + if (locoff) + { + fprintf(o_src, "\taddl\t$%d, %%ebx\n", locoff); + } + fprintf(o_src, "\taddl\t%%eax, %%ebx\n"); + push_ebx(); + } + else + { + fprintf(o_src, "\tleal\t-%d(%%ebp), %%ebx\n", var->location); + fprintf(o_src, "\taddl\t%%ebx,%%eax\n"); + push_at_eax(var); + } + } + else if (sy->litflag == 0) + { + load_address(sy); + push_at_eax(sy); + } + else + { + /*value_to_eax(sy);*/ + } +} + +void gen_store_fnres(struct sym *sy) +{ + if (sy == NULL) + return; + switch (sy->type) + { + case DTYPE_BININT: + switch (symlen(sy)) + { + case 4: + fprintf(o_src, "\tmovl\t%%eax, %s\n", memrefat(sy)); + break; + case 2: + fprintf(o_src, "\tmov\t%%ax, %s\n", memrefat(sy)); + break; + } + ; + break; + default: + break; + }; +} + +/* The following functions will be activated when we change from + defining the outermost group to define each elementary item. */ +/*void init_field_val( struct sym *sy ) { + struct lit *val=(struct lit *)sy->value; + / *if (val->type != 'X' || sy->type != 'X' || val->nick != NULL) {* / + / * can't call gen_move passing a NULL pointer! + This happens because it is a PROCEDURE DIVISION USING VAR ...* / + / * if (val != NULL) + gen_move_init((struct sym *)val,sy); + / *}* / + / *}*/ + +void def_field_storage(struct sym *sy, int fld_len) +{ + /*struct lit *val=(struct lit *)sy->value; + int vlen; + if (val == NULL || + val->type != 'X' || sy->type != 'X' || val->nick != NULL) {*/ + fprintf(o_src, "\t.space\t%d\n", fld_len); + /*} + else { + vlen = strlen(val->name); + if (vlen < fld_len) { + emit_lit( val->name, vlen ); + fprintf(o_src,"\n"); + emit_lit_fill( ' ', fld_len - vlen ); + fprintf(o_src,"\n"); + } + else { + emit_lit( val->name, fld_len ); + fprintf(o_src,"\n"); + } + }*/ +} + +void gen_set(struct sym *idx, int which, struct sym *var, int adrof_idx, + int adrof_var) +{ + struct vref *ref; +// struct vrange *vr; + struct sym *sy = idx; + + if (idx->litflag == 4) + sy = ((struct refmod *) idx)->sym; + else if (idx->litflag == 2) + sy = (struct sym *) ((struct vref *) idx)->sym; + + if (sy->type == '8') + { /* conditional? */ +// vr = sy->refmod_redef.vr; + /* + If 88 level value has more than one entry, + default to first value entry. + + if ((vr!=NULL) || (sy->value2 != sy->value)) { + yyerror("conditional is not unique"); + return; + } + */ + if (idx->litflag == 2) + { + ref = malloc(sizeof(struct vref)); + ref->litflag = 2; + ref->sym = sy->parent; + ref->next = ((struct vref *) idx)->next; + gen_move((struct sym *) sy->value, (struct sym *) ref); + free(ref); + ref = NULL; + } + else + { + gen_move((struct sym *) sy->value, sy->parent); + } + return; + } + /* we are setting a value to true but is not a level 88 */ + if ((int) var == 1) + { + yyerror("not a level 88 '%s'", sy->name); + return; + } + + if (sy->type == DTYPE_BININT && sy->ix_desc != NULL) + { /* switch? */ + gen_set_switch(var, sy); + return; + } + + if (sy->flags.is_pointer || adrof_idx) + { /* pointer? */ +#ifdef DEBUG_COMPILER + fprintf(o_src,"# set %s to %s\n",idx?idx->name:"(null)", + var?var->name:"(null)"); + fprintf(o_src,"# adrof_idx: %d, adrof_var: %d\n", + adrof_idx, adrof_var); +#endif + if (which != SET_TO) + { + yyerror("only SET TO work with pointers"); + return; + } + if (adrof_idx && !(idx->linkage_flg)) + { + yyerror("only linkage variables may be set to a new address"); + return; + } + if (adrof_var) + { + /*load_location(var,"eax");*/ + loadloc_to_eax(var); + set_ptr(idx); + } + else + { + /* value_to_eax(var); <-- this is not working! */ + if (var == NULL) + { + fprintf(o_src, "\txorl\t%%eax,%%eax\n"); + } + else + { + load_location(var, "ebx"); + fprintf(o_src, "\tmovl\t0(%%ebx),%%eax\n"); + } + set_ptr(idx); + } + return; + } + /******** it is not a pointer, so must be an index ********/ + + /* first get the second operand */ + if (idx->type != DTYPE_BININT) + { + gen_set_complex(var, which, idx); + return; + } + fprintf(o_src, "# SET %s \n", idx->name); + + if (symlen(idx) > 4) + yywarn("index variable truncated to long"); + + gen_loadval(var); + + switch (which) + { + case SET_TO: /* just move this value */ + fprintf(o_src, "\tmov%c\t%%eax, %s\n", varsize_ch(idx), memrefat(idx)); + break; + case SET_UP_BY: /* we need to add this value to the index */ + fprintf(o_src, "\tadd%c\t%%eax, %s\n", varsize_ch(idx), memrefat(idx)); + break; + case SET_DOWN_BY: + fprintf(o_src, "\tsub%c\t%%eax, %s\n", varsize_ch(idx), memrefat(idx)); + break; + default: + yyerror("SET option unavailable"); + } +} + +int push_selection_subject_copy(int level, struct selsubject *ssbj, int stkadd, + int objtype) +{ + struct selsubject *p; + + /* find the target subject */ + while (level--) + ssbj = ssbj->next; + + /* calculate the subject address */ + for (p = ssbj->next; p; p = p->next) + { + if (ssbj->type == SSUBJ_EXPR) + { + stkadd += 8; + } + else if (ssbj->type == SSUBJ_COND) + { + stkadd += 4; + } + } + + /* push expressions to the stack, conditions in %eax */ + switch (ssbj->type) + { + case SSUBJ_COND: + fprintf(o_src, "\tmovl %d(%%esp),%%eax\n", stkadd); + break; + case SSUBJ_EXPR: + fprintf(o_src, "\tpushl %d(%%esp)\n", stkadd + 4); + fprintf(o_src, "\tpushl %d(%%esp)\n", stkadd + 4); + break; + case SSUBJ_STR: + gen_loadvar(ssbj->var); + break; + case FALSE: + return 1; + } + return 0; +} + +void gen_when_check(int level, struct selsubject *ssbj, int type, int endcase, + struct sym *var) +{ + int invert = 0; + int stkadd = 0; + int cleanup, bypass; + fprintf(o_src, + "# WHEN check: level=%d, subject->type=%d, object type=%d\n", + level, ssbj->type, type); + stkadd += selection_object_size(type); + + /* check if compatible subject/object found */ + switch (selection_subject_type(level, ssbj)) + { + case SSUBJ_STR: + if ((type != SOBJ_STR) && (type != SOBJ_NEGSTR) && (type != SOBJ_ANY)) + { + yyerror("incompatible selection object"); + } + break; + case SSUBJ_EXPR: + if ((type != SOBJ_EXPR) && (type != SOBJ_NEGEXPR) && (type + != SOBJ_RANGE) && (type != SOBJ_NEGRANGE) + && (type != SOBJ_COND) && (type != SOBJ_NEGCOND) && (type + != SOBJ_ANY)) + { + yyerror("incompatible selection object"); + } + break; + case SSUBJ_COND: + if ((type != SOBJ_TRUE) && (type != SOBJ_FALSE) && (type != SOBJ_ANY)) + { + yyerror("incompatible selection object"); + } + break; + case SSUBJ_FALSE: + invert = 1; + case SSUBJ_TRUE: + if ((type != SOBJ_COND) && (type != SOBJ_NEGCOND) && (type != SOBJ_ANY)) + { + yyerror("incompatible selection object"); + } + } + + /* perform the actual tests */ + switch (type) + { + case SOBJ_STR: + case SOBJ_NEGSTR: + fprintf(o_src, "# SOBJ_STR or SOBJ_NEGSTR\n"); + push_selection_subject_copy(level, ssbj, stkadd, type); + gen_loadvar(var); + asm_call("tcob_compare"); + fprintf(o_src, "\tand\t%%eax,%%eax\n"); /* equal */ + if (type == SOBJ_STR) + fprintf(o_src, "\tjnz\t.L%d\n", endcase); + else + fprintf(o_src, "\tjz\t.L%d\n", endcase); + break; + case SOBJ_EXPR: + case SOBJ_NEGEXPR: + fprintf(o_src, "# SOBJ_EXPR or SOBJ_NEGEXPR\n"); + push_selection_subject_copy(level, ssbj, stkadd, type); + gen_compare_exp(EQUAL); + if (type == SOBJ_EXPR) + fprintf(o_src, "\tjnz\t.L%d\n", endcase); + else + fprintf(o_src, "\tjz\t.L%d\n", endcase); + break; + case SOBJ_RANGE: + case SOBJ_NEGRANGE: + cleanup = loc_label++; + bypass = loc_label++; + fprintf(o_src, "# SOBJ_RANGE or SOBJ_NEGRANGE\n"); + push_selection_subject_copy(level, ssbj, stkadd, type); + gen_compare_exp(LESS); + if (type == SOBJ_RANGE) + fprintf(o_src, "\tjz\t.L%d\n", cleanup); + else + fprintf(o_src, "\tjnz\t.L%d\n", cleanup); + stkadd -= 8; + push_selection_subject_copy(level, ssbj, stkadd, type); + gen_compare_exp(GREATER); + if (type == SOBJ_RANGE) + fprintf(o_src, "\tjz\t.L%d\n", endcase); + else + fprintf(o_src, "\tjnz\t.L%d\n", endcase); + /* cleanup unused double at stack */ + fprintf(o_src, "\tjmp\t.L%d\n", bypass); + fprintf(o_src, ".L%d:\taddl\t$8, %%esp\n", cleanup); + fprintf(o_src, "\tjmp\t.L%d\n", endcase); + fprintf(o_src, ".L%d:\n", bypass); + break; + case SOBJ_COND: + case SOBJ_NEGCOND: + /*invert=push_selection_subject_copy(level,ssbj,stkadd,type);*/ + if (type == SOBJ_COND) + fprintf(o_src, "\tjnz\t.L%d\n", endcase); + else + fprintf(o_src, "\tjz\t.L%d\n", endcase); + break; + case SOBJ_ANY: /* no tests needed, just accept */ + break; + case SOBJ_TRUE: + invert = push_selection_subject_copy(level, ssbj, stkadd, type); + fprintf(o_src, "\tand\t%%eax,%%eax\n"); + if (invert) + fprintf(o_src, "\tjz\t.L%d\n", endcase); + else + fprintf(o_src, "\tjnz\t.L%d\n", endcase); + break; + case SOBJ_FALSE: + invert = push_selection_subject_copy(level, ssbj, stkadd, type); + fprintf(o_src, "\tand\t%%eax,%%eax\n"); + if (invert) + fprintf(o_src, "\tjnz\t.L%d\n", endcase); + else + fprintf(o_src, "\tjz\t.L%d\n", endcase); + break; + } +} + +void gen_bypass_when_case(int bypass) +{ + if (bypass) + { + fprintf(o_src, ".L%d:\n", bypass); + } +} + +int gen_end_when(int n, int endcase, int sentence) +{ + int lab; + if (sentence) + { + fprintf(o_src, "\tjmp\t.L%d\t# end WHEN\n", n); + lab = 0; + } + else + { + lab = loc_label++; + fprintf(o_src, "\tjmp\t.L%d\t# bypass WHEN test\n", lab); + } + fprintf(o_src, ".L%d:\n", endcase); + return lab; +} + +void push_condition() +{ + fprintf(o_src, "\tpushl\t%%eax\t# push_condition\n"); +} + +void gen_goto_depending(struct list *l, struct sym *sy) +{ + struct list *tmp; + struct sym *var; + + var = sy; + if (var->litflag == 2 || var->litflag == 4) + { + var = ((struct vref *) var)->sym; + if (var->litflag == 2) + var = ((struct vref *) var)->sym; + } + if (!HTG_libcob) + gen_loadloc(sy); + gen_loaddesc(sy); + + asm_call("tcob_get_index"); /* this will return %eax with var's value */ + for (tmp = l; tmp != NULL; tmp = tmp->next) + { + fprintf(o_src, "\tdecl\t%%eax\n"); + fprintf(o_src, "\tjz\t.LB_%s\n", label_name((struct sym *) tmp->var)); + } + free_list(l); +} + +void gen_goto(struct list *l) +{ + struct sym *sy = (struct sym *) l->var; + if (inner_stack_size) + { + fprintf(o_src, "\taddl\t$%d, %%esp\n", inner_stack_size); + } + stabs_line(); + fprintf(o_src, "\tjmp\t.LB_%s\n", label_name(sy)); + if (l->next) + { + yyerror("GOTO only allows one target"); + } + free_list(l); +} + +int gen_check_zero() +{ + int i = loc_label++; + fprintf(o_src, "\tand\t%%eax,%%eax\n"); + fprintf(o_src, "\tjz\t.L%d\n", i); + stabs_line(); + return i; +} + +unsigned long gen_at_end(int status) +{ + int i, j; + union label_def label; + i = loc_label++; + j = loc_label++; + + fprintf(o_src, "\tcmp\t$%d, %%eax\n", status); + fprintf(o_src, "\tjz\t.L%d\n", j); + fprintf(o_src, "\tjmp\t.L%d\n", i); + + /* fprintf(o_src,"L%d:\n",j); */ + fprintf(o_src, "\t.align 16\n"); + fprintf(o_src, ".L%d:\n", j); + + stabs_line(); + label.l.n = i; + label.l.off = label.l.defined = 0; + return label.x; +} + +unsigned long gen_testif(void) +{ + int i, j; + union label_def label; + i = loc_label++; + j = loc_label++; + fprintf(o_src, "\tjz\t.L%d\n", j); + fprintf(o_src, "\tjmp\t.L%d\n", i); + + /* fprintf(o_src,"L%d:\n",j); */ + fprintf(o_src, "\t.align 16\n"); + fprintf(o_src, ".L%d:\n", j); + + stabs_line(); + + label.l.n = i; + label.l.off = label.l.defined = 0; + return label.x; +} + +void gen_not(void) +{ + int i, j; + i = loc_label++; + j = loc_label++; + + fprintf(o_src, "\tjz\t.L%d\n", i); + fprintf(o_src, "\txorl\t%%eax,%%eax\n"); + fprintf(o_src, "\tjmp\t.L%d\n", j); + fprintf(o_src, ".L%d:\tincl\t%%eax\n", i); + + /* fprintf(o_src,"L%d:\n",j); */ + fprintf(o_src, "\t.align 16\n"); + fprintf(o_src, ".L%d:\n", j); + + stabs_line(); +} + +unsigned long gen_andstart(void) +{ + int i; + union label_def label; + i = loc_label++; + fprintf(o_src, "\tjnz\t.L%d\n", i); + label.l.n = i; + label.l.off = label.l.defined = 0; + return label.x; +} + +unsigned long gen_orstart(void) +{ + int i; + union label_def label; + i = loc_label++; + fprintf(o_src, "\tjz\t.L%d\n", i); + label.l.n = i; + label.l.off = label.l.defined = 0; + return label.x; +} + +void gen_dstlabel(unsigned long lbl) +{ + char slab[32]; + union label_def label; + label.x = lbl; + sprintf(slab, ".L%d", label.l.n); + fprintf(o_src, ".L%d:\n", label.l.n); + stabs_line(); +} + +unsigned long gen_passlabel(void) +{ + int i; + union label_def label; + i = loc_label++; + fprintf(o_src, "\tjmp\t.L%d\n", i); + label.l.off = label.l.defined = 0; + label.l.n = i; + return label.x; +} + +unsigned long gen_marklabel(void) +{ + int i; + union label_def label; + i = loc_label++; + fprintf(o_src, ".L%d:\n", i); + stabs_line(); + label.l.defined = 1; + label.l.n = i; + return label.x; +} + +void gen_jmplabel(unsigned long lbl) +{ + union label_def label; + label.x = lbl; + fprintf(o_src, "\tjmp\t.L%d\n", label.l.n); +} + +void gen_push_int(struct sym *sy) +{ + /* gen_loadloc( sy ); */ + /*/ fprintf(o_src,"\tmovl\t$c_base%d+%u, %%eax\n", + pgm_segment,sy->descriptor); */ + gen_loadvar(sy); + asm_call("tcob_get_index"); + /* this must be done without calling push_eax */ + fprintf(o_src, "\tpushl\t%%eax\n"); +} + +void gen_perform_test_counter(unsigned long lbl) +{ + union label_def label; + label.x = lbl; + fprintf(o_src, "\tcmpl\t$0,0(%%esp)\n"); + fprintf(o_src, "\tjle\t.L%dE\n", label.l.n); +} + +void gen_perform_times(unsigned long lbl) +{ + union label_def label; + label.x = lbl; + fprintf(o_src, "\tdecl\t0(%%esp)\n"); + fprintf(o_src, "\tjnz\t.L%d\n", label.l.n); + fprintf(o_src, ".L%dE:\tpopl\t%%ecx\n", label.l.n); +} + +void gen_perform_thru(struct sym *s1, struct sym *s2) +{ + /*stabs_block(0);*/ + if (s2 == NULL) + s2 = s1; + fprintf(o_src, "\tleal\t.L%d, %%eax\n", loc_label); + fprintf(o_src, "\tpushl\t%%eax\n"); + fprintf(o_src, "\tleal\t.LB_%s, %%eax\n", label_name(s1)); + fprintf(o_src, "\tpushl\t%%eax\n"); + fprintf(o_src, "\tleal\t.LE_%s, %%eax\n", label_name(s2)); + /* fprintf(o_src,"\tpushl\t%%ax\n");*/ + fprintf(o_src, "\tpushl\t%%eax\n"); + fprintf(o_src, "\tjmp\t.LB_%s\n", label_name(s1)); + + fprintf(o_src, "\t.align 16\n"); + fprintf(o_src, ".L%d:\n", loc_label++); + /*stabs_block(1);*/ + stabs_line(); +} + +/* increment loop index, check for end */ +void gen_SearchLoopCheck(unsigned long lbl5, struct sym *syidx, + struct sym *sytbl) +{ + + /*struct sym *sy1, *sy2;*/ + struct lit *v; + char tblmax[21]; + + strcpy(tblmax, "1"); + v = (struct lit *) install(tblmax, SYTB_LIT, 0); + save_literal(v, DTYPE_DISPLAY); + + gen_add((struct sym *) v, syidx, 0); + + sprintf(tblmax, "%d", sytbl->times); + v = (struct lit *) install(tblmax, SYTB_LIT, 0); + save_literal(v, DTYPE_DISPLAY); + + gen_compare(syidx, GREATER, (struct sym *) v); + fprintf(o_src, "\tjz\t.L%ld\n", lbl5); + + stabs_line(); +} + +void gen_SearchAllLoopCheck(unsigned long lbl3, struct sym *syidx, + struct sym *sytbl, struct sym *syvar, unsigned long lstart, + unsigned long lend) +{ + + struct sym *sy1; + struct vref *vr1; + struct index_to_table_list *it1, *it2; + unsigned long l1, l2, l3, l4, l5, l6; + + l1 = loc_label++; + l2 = loc_label++; + l3 = loc_label++; + l4 = loc_label++; + l5 = loc_label++; + l6 = loc_label++; + + it1 = index2table; + it2 = NULL; + while (it1 != NULL) + { + if (strcmp(it1->tablename, sytbl->name) == 0) + { + it2 = it1; + it1 = NULL; + } + else + { + it1 = it1->next; + } + } + + if (it2 == NULL) + { + return; + } + + if ((it2->seq != '1') && (it2->seq != '2')) + { + return; + } + +#ifdef DEBUG_COMPILER + if (it2->seq == '1') + { + fprintf(o_src,"#gen_SearchAllLoopCheck: sequence for table %s is %c=ASCENDING\n", + sytbl->name, it2->seq); + } + if (it2->seq == '2') + { + fprintf(o_src,"#gen_SearchAllLoopCheck: sequence for table %s is %c=DESCENDING\n", + sytbl->name, it2->seq); + } + fprintf(o_src,"#gen_SearchAllLoopCheck: l1=L%lu, l2=L%lu, l3=L%lu, l4=L%lu, l5=L%lu, l6=L%lu\n", + l1, l2, l3, l4, l5, l6); +#endif + + vr1 = create_subscript(syidx); + sy1 = (struct sym *) create_subscripted_var(sytbl, vr1); + + /* table sort sequence: '0' = none, '1' = ASCENDING, '2' = DESCENDING */ + + /* if ((bu - bl) > 1) */ + fprintf(o_src, "\tmovl\t-%d(%%ebp), %%eax\n", stack_offset - 12); + fprintf(o_src, "\tsubl\t-%d(%%ebp), %%eax\n", stack_offset - 8); + + fprintf(o_src, "\tcmpl\t$1, %%eax\n"); + fprintf(o_src, "\tjle .L%ld\n", l1); + + fprintf(o_src, "\t.align 16\n"); + + /* if (itbl1 > in) { *//* '2' = DESCENDING */ + if (it2->seq == '2') + { + gen_compare(sy1, GREATER, syvar); + fprintf(o_src, "\tjnz\t.L%ld\n", l2); + } + else + { + gen_compare(sy1, LESS, syvar); + fprintf(o_src, "\tjnz\t.L%ld\n", l2); + } + fprintf(o_src, "\t.align 16\n"); + + /* bl = idx + 1; */ + /* fprintf(o_src,"\tmovl\t-%d(%%ebp), %%eax\n", syidx->location); */ + fprintf(o_src, "\tmovl\t%s, %%eax\n", memrefat(syidx)); + fprintf(o_src, "\taddl\t$1, %%eax\n"); + fprintf(o_src, "\tmovl\t%%eax, -%d(%%ebp)\n", stack_offset - 8); + + gen_jmplabel(l3); + fprintf(o_src, "\t.align 16\n"); + + /* else { */ + gen_dstlabel(l2); + + /* bu = idx - 1; */ + /* fprintf(o_src,"\tmovl\t-%d(%%ebp), %%eax\n", syidx->location); */ + fprintf(o_src, "\tmovl\t%s, %%eax\n", memrefat(syidx)); + fprintf(o_src, "\tsubl\t$1, %%eax\n"); + fprintf(o_src, "\tmovl\t%%eax, -%d(%%ebp)\n", stack_offset - 12); + + gen_dstlabel(l3); + + /* idx = ((bu - bl)/2 + bl); */ + fprintf(o_src, "\tmovl\t-%d(%%ebp), %%eax\n", stack_offset - 12); + fprintf(o_src, "\tsubl\t-%d(%%ebp), %%eax\n", stack_offset - 8); + fprintf(o_src, "\tmovl\t%%eax, %%edx\n"); + fprintf(o_src, "\tsarl\t$31, %%edx\n"); + fprintf(o_src, "\tmovl\t%%edx, %%ecx\n"); + fprintf(o_src, "\tsarl\t$31, %%ecx\n"); + fprintf(o_src, "\tleal\t(%%ecx,%%eax), %%edx\n"); + fprintf(o_src, "\tmovl\t%%edx, %%eax\n"); + fprintf(o_src, "\tsarl\t$1, %%eax\n"); + fprintf(o_src, "\taddl\t-%d(%%ebp), %%eax\n", stack_offset - 8); + /* fprintf(o_src,"\tmovl\t%%eax, -%d(%%ebp)\n", syidx->location); */ + fprintf(o_src, "\tmovl\t%%eax, %s\n", memrefat(syidx)); + + gen_jmplabel(l6); + fprintf(o_src, "\t.align 16\n"); + + /* else { *//* l1 */ + gen_dstlabel(l1); + + if (it2->seq == '2') + { + /* if (itbl1 > in) { */ + gen_compare(sy1, GREATER, syvar); + fprintf(o_src, "\tjnz\t.L%ld\n", l4); + } + else + { + /* if (itbl1 < in) { */ + gen_compare(sy1, LESS, syvar); + fprintf(o_src, "\tjnz\t.L%ld\n", l4); + } + fprintf(o_src, "\t.align 16\n"); + + /* if (bu > idx) { */ + /* fprintf(o_src,"\tmovl\t-%d(%%ebp), %%eax\n", syidx->location); */ + fprintf(o_src, "\tmovl\t%s, %%eax\n", memrefat(syidx)); + fprintf(o_src, "\tcmpl\t%%eax, -%d(%%ebp)\n", stack_offset - 12); + + fprintf(o_src, "\tjle\t.L%ld\n", l5); + fprintf(o_src, "\t.align 16\n"); + + /* idx = bu; */ + fprintf(o_src, "\tmovl\t-%d(%%ebp), %%eax\n", stack_offset - 12); + /* fprintf(o_src,"\tmovl\t%%eax, -%d(%%ebp)\n", syidx->location); */ + fprintf(o_src, "\tmovl\t%%eax, %s\n", memrefat(syidx)); + + gen_jmplabel(l6); + fprintf(o_src, "\t.align 16\n"); + + /* else { */ + gen_dstlabel(l5); + + /* r++; */ + fprintf(o_src, "\taddl\t$1, -%d(%%ebp)\n", stack_offset - 4); + + gen_jmplabel(l6); + fprintf(o_src, "\t.align 16\n"); + + /* } */ + /* } */ + /* else { */ + gen_dstlabel(l4); + + /* r++; */ + fprintf(o_src, "\taddl\t$1, -%d(%%ebp)\n", stack_offset - 4); + + gen_dstlabel(l6); + + fprintf(o_src, "\tmovl\t-%d(%%ebp), %%eax\n", stack_offset - 4); + fprintf(o_src, "\tcmpl\t$1, %%eax\n"); + fprintf(o_src, "\tjz\t.L%ld\n", lbl3); + + gen_jmplabel(lstart); + fprintf(o_src, "\t.align 16\n"); + gen_dstlabel(lend); + + stabs_line(); +} + +void Initialize_SearchAll_Boundaries(struct sym *sy, struct sym *syidx) +{ + int i; + struct lit *v; + char tblmax[21]; + struct index_to_table_list *i2t1, *i2t2; + + i = sy->times / 2; + + sprintf(tblmax, "%d", i); + v = (struct lit *) install(tblmax, SYTB_LIT, 0); +#ifdef DEBUG_COMPILER + if (v->type) + { /* not already saved */ + fprintf(o_src,"#Initialize_SearchAll_Boundaries: literal is saved: %s\n", tblmax); + } + else + { + fprintf(o_src,"#Initialize_SearchAll_Boundaries: literal not saved: %s\n", tblmax); + } +#endif + + save_literal(v, DTYPE_DISPLAY); + gen_move((struct sym *) v, syidx); + + fprintf(o_src, "\tmovl\t$0, %%eax\n"); + fprintf(o_src, "\tmovl\t%%eax,-%d(%%ebp)\n", stack_offset - 4); + + fprintf(o_src, "\tmovl\t$1, %%eax\n"); + fprintf(o_src, "\tmovl\t%%eax,-%d(%%ebp)\n", stack_offset - 8); + + fprintf(o_src, "\tmovl\t$%d, %%eax\n", sy->times); + fprintf(o_src, "\tmovl\t%%eax,-%d(%%ebp)\n", stack_offset - 12); + + i2t2 = NULL; + i2t1 = index2table; + while (i2t1 != NULL) + { + if (strcmp(i2t1->tablename, sy->name) == 0) + { + if (i2t1->seq != '0') + { + i2t2 = i2t1; + } + i2t1 = NULL; + } + else + { + i2t1 = i2t1->next; + } + } + + if (i2t2 == NULL) + { + yyerror("Undefined sort order and key for table"); + } + +} + +void resolve_labels() +{ + struct sym *sy = NULL, *sy1 = NULL, *sy2 = NULL; + int i, def; + fprintf(o_src, "# resolving paragraphs/sections labels\n"); + for (i = 0; i < HASHLEN; i++) + { + for (sy = labtab[i]; sy != NULL; sy = sy->next) + { + fprintf(o_src, "## 1 %d,%d\n", HASHLEN, i); + + if (sy == NULL) + continue; + + fprintf(o_src, "## 2\n"); + fprintf(o_src, "## %s\n", sy->name); + if (sy->type == 'f') + continue; + sy1 = sy; + while (sy1) + { + if (sy1->defined == 2) + { /*Labels used but not defined */ + /* fprintf(stderr,"%s of %s: used but not defined \n",sy1->name,(sy1->parent)?sy1->parent->name:NULL); */ + def = 0; + sy2 = sy; + /* find if we have already defined the label on + the same section (same parent) */ + while (sy2) + { + if ((sy2->defined == 1) && (sy1->parent) + && (sy2->parent) && (sy1->parent->name) + && (sy2->parent->name)) + { + if (!strcmp(sy1->parent->name, sy2->parent->name)) + { + def++; + /*fprintf(stderr,"%s of %s: found on the same section \n",sy2->name,(sy2->parent)?sy2->parent->name:NULL);*/ + break; + } + } + sy2 = sy2->clone; + } + /* find if defined on another section */ + if (!def) + { + sy2 = sy; + /*fprintf(stderr,"%s of %s: look on the program\n",sy1->name,(sy1->parent)?sy1->parent->name:NULL); */ + while (sy2) + { + /*fprintf(stderr,"%s of %s: compare with %s of %s\n",*/ + /* sy1->name,(sy1->parent)?sy1->parent->name:NULL, */ + /* sy2->name,(sy2->parent)?sy2->parent->name:NULL); */ + + /* look for it on another section or look if it is a + section (not a paragraph) */ + if ((sy2->defined == 1 && sy2->parent + != sy1->parent) || (sy2->defined == 1 + && sy2->parent == NULL && sy2->parent + == NULL)) + { + /* If we have found it, + it needs a cast or the cast is incorrect */ + if (def) + { + yyerror("procedure name not unique: %s", + sy1->name); + } + else + { + fprintf(o_src, ".LB_%s = ", label_name(sy1)); + fprintf(o_src, ".LB_%s\n", label_name(sy2)); + fprintf(o_src, ".LE_%s = ", label_name(sy1)); + fprintf(o_src, ".LE_%s\n", label_name(sy2)); + def++; + } + /*break;*/ + } + sy2 = sy2->clone; + } /* while sy2 */ + } /* if(!def) */ + if (!def) + { /* really not defined, print an error */ + yyerror("undefined procedure: %s", sy1->name); + + } + + } /* if (sy1->defined == 2) */ + sy1 = sy1->clone; + } /* while (sy1) */ + } /* for */ + } /* for */ + fprintf(o_src, "# finish resolving paragraphs/sections labels\n"); +} + +void open_section(struct sym *sect) +{ + sect->type = 'S'; + fprintf(o_src, ".LB_%s:\n", label_name(sect)); + /* fprintf(o_src,".LB_%s:\n",sect->name); */ + curr_section = sect; +} + +void close_section(void) +{ + close_paragr(); + if (curr_section) + { + fprintf(o_src, ".LE_%s:\n", label_name(curr_section)); + /* fprintf(o_src,".LE_%s:\n",curr_section->name); */ + gen_exit(0); + } +} + +char * label_name(struct sym *lab) +{ + if (lab->parent) + { + sprintf(name_buf, "%s__%s_%d", lab->name, lab->parent->name, + pgm_segment); + chg_underline(name_buf); + /*fprintf(stderr,"# label_name: %s\n",name_buf);*/ + return name_buf; + } + sprintf(name_buf, "%s_%d", lab->name, pgm_segment); + chg_underline(name_buf); + /*fprintf(stderr,"# label_name: %s\n",name_buf);*/ + return name_buf; +} + +void close_paragr(void) +{ + if (curr_paragr) + { + fprintf(o_src, ".LE_%s:\n", label_name(curr_paragr)); + /*fprintf(o_src,".stabn\t192,0,0,.LB_%s-main\n", + label_name( curr_paragr )); + #if !defined(__WINDOWS__) + fprintf(o_src,".stabn\t224,0,0,.LE_%s-main\n", + #else + fprintf(o_src,".stabn\t224,0,0,.LE_%s-_main\n", + #endif + label_name( curr_paragr ));*/ + gen_exit(0); + curr_paragr = NULL; + } +} + +void open_paragr(struct sym *paragr) +{ + paragr->type = 'P'; + curr_paragr = paragr; + fprintf(o_src, ".LB_%s:\n", label_name(paragr)); +} + +void gen_stoprun(void) +{ + + if ((main_flag == 1) && (main_entry_flag == FALSE)) + { + strcpy(main_entry_buf, pgm_label); + main_entry_flag = TRUE; + } + + fprintf(o_src, "\tleal\t.Lend_pgm_%s, %%eax\n", pgm_label); + fprintf(o_src, "\tpushl\t%%eax\n"); + fprintf(o_src, "\tjmp\t.Lend_pgm_%s\n", pgm_label); +} + +void gen_exit(int code) +{ + int l1, l2; + struct list *list; + struct sym *f; + + if (code) + { + if (initial_flag) + { + /* ensure all files are closed and initialized */ + for (list = files_list; list != NULL; list = list->next) + { + f = (struct sym *) list->var; + gen_save_filevar(f, NULL); + asm_call("tcob_file_init"); + } + } + + /* fprintf(o_src,"\tmovl\t-%d(%%ebp), %%ebx\n",stack_offset - 16); */ + fprintf(o_src, "\tmovl\t-%d(%%ebp), %%ebx\n", stack_offset - 24); + fprintf(o_src, "\tmov\t%%ebp,%%esp\n"); + fprintf(o_src, "\tpop\t%%ebp\n"); + fprintf(o_src, "\tret\n"); + /* + fprintf(o_src,"\tleal\t.Lend_pgm_%s, %%eax\n",pgm_label); + fprintf(o_src,"\tpushl\t%%eax\n"); + fprintf(o_src,"\tjmp\t.Lend_pgm_%s\n",pgm_label); + */ + } + else + { + /*fprintf(o_src,"\tleal\t.LE_%s, %%eax\n",label_name(curr_paragr));*/ + /*push_eax();*/ + /*asm_call("exit_paragraph");*/ + l1 = loc_label++; + l2 = loc_label++; + if (curr_paragr != NULL) + { + fprintf(o_src, "\tleal\t.LE_%s, %%eax\n", label_name(curr_paragr)); + } + else + { + fprintf(o_src, "\tleal\t.LE_%s, %%eax\n", label_name(curr_section)); + } + fprintf(o_src, "\tcmpl\t4(%%esp), %%eax\n"); + fprintf(o_src, "\tjb\t\t.L%d\n", l1); + fprintf(o_src, "\tcmpl\t0(%%esp), %%eax\n"); + fprintf(o_src, "\tjb\t\t.L%d\n", l2); + fprintf(o_src, ".L%d:\n", l1); + fprintf(o_src, "\taddl\t$8,%%esp\n"); + inner_stack_size = 0; + fprintf(o_src, "\tret\n"); + fprintf(o_src, ".L%d:\n", l2); + /* + fprintf(o_src,"\tleal\t.Lend_pgm_%s, %%eax\n",pgm_label); + fprintf(o_src,"\tpushl\t%%eax\n"); + fprintf(o_src,"\tjmp\t.Lend_pgm_%s\n",pgm_label); + */ + } +} + +void gen_condition(struct sym *sy) +{ + struct vrange *vr; + struct vref *ref; + struct sym *sy1 = sy; + /*fprintf(o_src,"# 88 condition (top): (%s , %s)\n", + sy->value->name,sy->value2->name);*/ + /* is this an indexed condition ? */ + if (sy->litflag == 2) + { + sy1 = (struct sym *) ((struct vref *) sy)->sym; + } + gen_loadvar((struct sym *) NULL); + gen_loadvar((struct sym *) sy1->value2); + gen_loadvar((struct sym *) sy1->value); + vr = sy1->refmod_redef.vr; + while (vr) + { + /*fprintf(o_src,"# 88 condition: (%s , %s)\n", + vr->value->name,vr->value2->name);*/ + gen_loadvar((struct sym *) vr->value2); + gen_loadvar((struct sym *) vr->value); + vr = vr->next; + } + if (sy->litflag == 2) + { + /* alloc a tmp node for condition parent + so gen_loadvar will be happy */ + ref = malloc(sizeof(struct vref)); + ref->litflag = 2; + ref->sym = sy1->parent; + ref->next = ((struct vref *) sy)->next; + gen_loadvar((struct sym *) ref); + free(ref); + ref = NULL; + } + else + { + gen_loadvar(sy->parent); + } + asm_call("tcob_check_condition"); + fprintf(o_src, "\tand\t%%eax,%%eax\n"); +} + +/* compare for already stacked expressions */ +void gen_compare_exp(int value) +{ + stackframe_cnt += 16; /* must pop everything after comparing */ + asm_call("tcob_compare_doubles"); + switch (value) + { + case 0: + fprintf(o_src, "\txor\t%%eax,%%eax\n\tinc\t%%eax\n"); /* false */ + break; + case 1: + fprintf(o_src, "\tand\t%%eax,%%eax\n"); /* equal */ + break; + case 2: + fprintf(o_src, "\tinc\t%%eax\n"); /* less */ + break; + case 3: + fprintf(o_src, "\tdec\t%%eax\n"); /* less or equal */ + gen_not(); + break; + case 4: + fprintf(o_src, "\tdec\t%%eax\n"); /* greater */ + break; + case 5: + fprintf(o_src, "\tinc\t%%eax\n"); /* greater or equal */ + gen_not(); + break; + case 6: + fprintf(o_src, "\tand\t%%eax,%%eax\n"); /* not equal */ + gen_not(); + break; + case 7: + fprintf(o_src, "\txor\t%%eax,%%eax\n"); /* true */ + break; + } +} + +void gen_compare(struct sym *s1, int value, struct sym *s2) +{ + /* if any of sy1 or sy2 is an expression, we must + compare full expressions */ + if ((s1->litflag == 5) || (s2->litflag == 5)) + { + push_expr(s2); + push_expr(s1); + gen_compare_exp(value); + } + else + { + gen_loadvar(s2); + gen_loadvar(s1); + asm_call("tcob_compare"); + switch (value) + { + case 0: + fprintf(o_src, "\txor\t%%eax,%%eax\n\tinc\t%%eax\n"); /* false */ + break; + case 1: + fprintf(o_src, "\tand\t%%eax,%%eax\n"); /* equal */ + break; + case 2: + fprintf(o_src, "\tinc\t%%eax\n"); /* less */ + break; + case 3: + fprintf(o_src, "\tdec\t%%eax\n"); /* less or equal */ + gen_not(); + break; + case 4: + fprintf(o_src, "\tdec\t%%eax\n"); /* greater */ + break; + case 5: + fprintf(o_src, "\tinc\t%%eax\n"); /* greater or equal */ + gen_not(); + break; + case 6: + fprintf(o_src, "\tand\t%%eax,%%eax\n"); /* not equal */ + gen_not(); + break; + case 7: + fprintf(o_src, "\txor\t%%eax,%%eax\n"); /* true */ + break; + } + } +} + +int push_subexpr(struct sym *sy) +{ + if (sy == NULL) + return 0; + /* generate code to compute expr */ + if (sy->litflag == 5) + { + push_subexpr((struct sym *) ((struct expr *) sy)->left); + push_subexpr((struct sym *) ((struct expr *) sy)->right); + switch (((struct expr *) sy)->op) + { + case '+': + add_expr(); + break; + case '-': + subtract_expr(); + break; + case '*': + multiply_expr(); + break; + case '/': + divide_expr(); + break; + case '^': + pow_expr(); + break; + default: + yyerror("unknown expression operator"); + } + } + /* sy is really a symbol, not expr */ + else + { +#ifdef DEBUG_COMPILER + fprintf(o_src,"# push_subexpr: %s\n",sy->name); +#endif + if (sy) + { /*only if not yet pushed*/ + if (is_numeric_sy(sy)) + { + fprintf(o_src, "\tsubl\t$%d, %%esp\n", sizeof(double)); + fprintf(o_src, "\tleal\t0(%%esp),%%eax\n"); + push_eax(); + gen_loadvar(sy); + asm_call("tcob_fldtod"); + } + else + { + return 0; + } + } + } + return 1; +} + +void add_expr(void) +{ + fprintf(o_src, "\tleal\t8(%%esp),%%eax\n"); + push_eax(); + asm_call("tcob_add_double"); + fprintf(o_src, "\taddl\t$8, %%esp\n"); +} + +void subtract_expr(void) +{ + fprintf(o_src, "\tleal\t8(%%esp),%%eax\n"); + push_eax(); + asm_call("tcob_subtract_double"); + fprintf(o_src, "\taddl\t$8, %%esp\n"); +} + +void multiply_expr(void) +{ + fprintf(o_src, "\tleal\t8(%%esp),%%eax\n"); + push_eax(); + asm_call("tcob_multiply_double"); + fprintf(o_src, "\taddl\t$8, %%esp\n"); +} + +void divide_expr(void) +{ + fprintf(o_src, "\tleal\t8(%%esp),%%eax\n"); + push_eax(); + asm_call("tcob_divide_double"); + fprintf(o_src, "\taddl\t$8, %%esp\n"); +} + +void pow_expr(void) +{ + fprintf(o_src, "\tleal\t8(%%esp),%%eax\n"); + push_eax(); + asm_call("tcob_pow_double"); + fprintf(o_src, "\taddl\t$8, %%esp\n"); +} + +void gen_save_filevar(struct sym *f, struct sym *buf) +{ + + if (!(f->recordsym)) + { + yyerror("No FD for file e %s", f->name); + return; + } + + if (buf != NULL) + { + gen_loadloc(buf); + } + else + { +#ifdef DEBUG_COMPILER + fprintf(o_src,"# File '%s' Record Description Stack Location\n",f->name); +#endif + + /* fprintf(o_src,"\tleal\t-u(%%ebp), %%eax\n",f->record); */ + fprintf(o_src, "\tmovl\t%s, %%eax\n", memref(f->recordsym)); + push_eax(); + } + if (f->type == 'K') + fprintf(o_src, "\tmovl\t$_%s, %%eax\n", f->name); + else +#ifdef DEBUG_COMPILER + fprintf(o_src,"# File name '%s', Record name '%s'\n",f->name, f->recordsym->name); +#endif + fprintf(o_src, "\tmovl\t$s_base%d+%u, %%eax\n", pgm_segment, + f->location); + push_eax(); +} + +void gen_save_filedesc(struct sym *f) +{ + if (f->type == 'K') + fprintf(o_src, "\tmovl\t$_%s, %%eax\n", f->name); + else +#ifdef DEBUG_COMPILER + fprintf(o_src,"# File name '%s', Record name '%s'\n",f->name, f->recordsym->name); +#endif + fprintf(o_src, "\tmovl\t$s_base%d+%u, %%eax\n", pgm_segment, + f->location); + push_eax(); +} + +/*static void gen_prtvar( struct sym *r, struct sym *buf ) { + struct sym *f; + f=r->ix_desc; + if (buf!=NULL) + gen_loadloc( buf ); + fprintf(o_src,"\tleal\t-%d(%%ebp), %%eax\n",f->record); + push_eax(); + if (buf != NULL) + fprintf(o_src,"\tmovl\t$%d, %%eax\n",buf->len); + else + fprintf(o_src,"\tmovl\t$%d, %%eax\n",r->len); + push_eax(); + }*/ + +void gen_save_sort_fields(struct sym *f, struct sym *buf) +{ + struct sym *datafld; + if (f == NULL) + return; + datafld = (struct sym *) f->sort_data; + while (datafld != NULL) + { + gen_loadloc(datafld); + datafld = (struct sym *) (datafld->sort_data); + } + fprintf(o_src, "\tmovl\t$c_base%d+%u, %%eax\n", pgm_segment, f->descriptor); + push_eax(); + gen_save_filevar(f, buf); + /* returns number of stack levels used in storing fields */ +} + +void dump_alternate_keys(struct sym *r, struct alternate_list *alt) +{ + struct alternate_list *tmp; + struct sym *key; + while (alt) + { + key = alt->key; + fprintf(o_src, "# alternate key %s\n", key->name); + fprintf(o_src, + /* "\t.word\t%d\n\t.long\tc_base+%d,0\n\t.word\t%d\n", */ + "\t.word\t%d\n\t.long\tc_base%d+%d\n\t.word\t%d\n\t.long\t0\n", + /*r->location - key->location,*/ + key->location - r->location, pgm_segment, key->descriptor, + alt->duplicates); + tmp = alt; + alt = alt->next; + free(tmp); + tmp = NULL; + } + fprintf(o_src, "# end of alternate keys\n.word\t-1\n"); +} + +/* + ** dump all file descriptors in file_list + */ +void dump_fdesc() +{ + + struct sym *f; + struct sym *r; + struct list *list/*,*visited*/; + unsigned char fflags; + + /*fprintf(o_src,".data\n\t.align 4\n");*/ + fprintf(o_src, "s_base%d:\t.long\t0\n", pgm_segment); + if (files_list != NULL) + { + /* fprintf(o_src,"s_base:\n"); */ + } + for (list = files_list; list != NULL; list = list->next) + { + f = (struct sym *) list->var; + r = f->recordsym; +#ifdef DEBUG_COMPILER + /* fprintf(o_src,"# FILE DESCRIPTOR, File: %s, Record: %s, Data Loc: %d(%x)\n", + f->name,r->name,global_offset); */ + fprintf(o_src,"# FILE DESCRIPTOR, File: %s, Record: %s, Data Loc: %d(hex: %x)\n", + f->name,r->name,f->location,f->location); + fprintf(o_src,"# FILE DESCRIPTOR2, opt: %x\n", + f->flags.optional); +#endif + if (f->filenamevar == NULL) + { + yyerror("No file name assigned to %s.", f->name); + continue; + } + if (f->type == 'K') + { + fprintf(o_src, "\t.extern\t_%s:far\n", f->name); + continue; + } + if (f->type == 'J') + { + fprintf(o_src, "\tpublic\t_%s\n", f->name); + fprintf(o_src, "_%s\tlabel\tbyte\n", f->name); + } + fflags = f->flags.optional; + fprintf(o_src, "\t.byte\t%u\n", RTL_FILE_VERSION); + fprintf(o_src, "\t.long\tc_base%d+%u\n", pgm_segment, + f->filenamevar->descriptor); + fprintf(o_src, "\t.word\t%u\n", r->len); + fprintf(o_src, "\t.byte\t%d,%d\n", f->organization, f->access_mode); + fprintf(o_src, "\t.long\t0\n"); /* open_mode */ + fprintf(o_src, "\t.space\t2\n"); /* file_status */ + fprintf(o_src, "\t.space\t2\n"); /* file_status (future ptr) */ + fprintf(o_src, "\t.long\t0\n"); /* struct DBT (libdb) */ + fprintf(o_src, "\t.long\t0\n"); /* start_record */ + fprintf(o_src, "\t.byte\t%x\n", fflags); /* flags */ + if (f->organization == 1) + { /* indexed file */ + if (f->ix_desc) + { + fprintf(o_src, "\t.word\t%d\n\t.long\tc_base%d+%d\n", + f->ix_desc->location - r->location, pgm_segment, + f->ix_desc->descriptor); + } + else + { + /* no key field was given for this file */ + fprintf(o_src, "\t.word\t0\n\t.long\t0\n"); + } + fprintf(o_src, "\t.long\t0\n"); /* struct altkey_desc *key_in_use */ + dump_alternate_keys(r, (struct alternate_list *) f->alternate); + } + } +} + +unsigned long int emt_call(struct lit *v, int stack_size, int exceplabel, + int notexceplabel, struct sym *ret) +{ + struct parm_list *list, *tmp; + struct sym *cp; + struct lit *lp; + int len, totlen = 0, err = 0; + int saved_stack_offset = stack_offset; + int stack_save; + int endlabel; + char callname[128]; + char *sp = '\0'; + + /******** prepare all parameters which are passed by content ********/ + for (list = parameter_list; list != NULL; list = list->next) + { + cp = (struct sym *) list->var; + if (cp->litflag != 1) + { + if (cp->call_mode == CM_CONT) + { + len = symlen(cp); /* should we round to 4? */ + totlen += len; + list->sec_no = SEC_STACK; + list->location = stack_offset + len; + stack_offset += len; + fprintf(o_src, "\tsubl\t$%d, %%esp\n", len); + push_immed(len); /* length */ + gen_loadloc(cp); /* src address */ + fprintf(o_src, "\tleal\t-%d(%%ebp), %%eax\n", list->location); + push_eax(); /* dest address ie on stack */ + asm_call("memcpy"); + } + } + } + /******** get the parameters from the parameter list ********/ + for (list = parameter_list; list != NULL;) + { + cp = (struct sym *) list->var; + if (cp->litflag == 1) + { + lp = (struct lit*) cp; +#ifdef DEBUG_COMPILER + fprintf(o_src, "#call %s by %d\n", lp->name,lp->call_mode); +#endif + if (lp->call_mode == CM_REF) + gen_loadloc((struct sym *) list->var); + else if (lp->call_mode == CM_VAL) + { + value_to_eax(cp); + if (symlen(cp) > 4) + push_edx(); + push_eax(); + } + /* else + gen_loadvar((struct sym *)list->var)*/; + } + else + { +#ifdef DEBUG_COMPILER + fprintf(o_src, "#call %s by %d\n", cp->name,cp->call_mode); +#endif + if (cp->call_mode == CM_REF) + gen_loadloc((struct sym *) list->var); + else if (cp->call_mode == CM_VAL) + { + gen_pushval((struct sym *) list->var); + } + else if (cp->call_mode == CM_CONT) + { + fprintf(o_src, "\tleal\t-%d(%%ebp), %%eax\n", list->location); + push_eax(); + } + else + gen_loadvar((struct sym *) list->var); + } + tmp = list; + list = list->next; + free(tmp); + tmp = NULL; + } + parameter_list = NULL; + if ((v->litflag == 1) && (!HTG_all_calls_dynamic)) + { + /* call literal (static) routine */ + + /* + check for valid characters in program name + */ + sp = v->name; + if (!(isalpha(*sp) || (*sp == '_'))) + { + err++; + yyerror("Invalid character '%c' in program name '%s'", *sp, v->name); + } + sp++; + while (*sp != '\0') + { + if (!(isalnum(*sp) || (*sp == '$') || (*sp == '.') || (*sp == '_'))) + { + err++; + yyerror("Invalid character '%c' in program name '%s'", *sp, + v->name); + } + sp++; + } + if (err != 0) + { + return 0; + } + + /* use standard C call convention */ + if (curr_call_convention == 0) + asm_call(v->name); + else + { + /* + When the STDCALL (WINAPI) call convention is used + stack pointer is cleared by called function + */ + stack_save = stackframe_cnt; + /* set the Win32 (MinGW) naming convention (function_name@arg_length) */ + sprintf(callname, "%s@%d", v->name, stack_save); + asm_call(callname); + /* reset the stack pointer */ + fprintf(o_src, "\tsubl\t$%d, %%esp\n", stack_save); + } + endlabel = 0; + gen_store_fnres(ret); + gen_enter_runelement(RUN_ELEMENT_RETURN); + } + else + { +#if defined(__WINDOWS__) + /* + // this code execute a workaround on the situation of + // calling "system" on a program compiled using + // dinamic calls... "cblsys" is found on cobroutines... + // Nilo, 2007, april 17 + */ + if ( !strcmp(v->name,"system") ) + { + strcpy(v->name,"cblsys"); + } +#endif + /* call dynamic routine (call by name) */ + stack_save = stackframe_cnt; + stackframe_cnt = 0; + + if (curr_call_convention == 0) + fprintf(o_src, "\tpushl\t$0\n"); + else + { + fprintf(o_src, "\tpushl\t$%d\n", stack_save + 1); + } + stackframe_cnt = stackframe_cnt + 4; + + gen_loadvar((struct sym *) v); + asm_call("tcob_resolve_subr"); + + /* + PROBLEM CODE - FIX ME ? --------------------- + + With the 'static call' the call paramaters are + pushed on to the stack, then the CALL function + is called. No problem here. + + With the 'dynamic call' the call paramaters are + pushed on to the stack, then the 'tcob_resolve_subr' + paramaters are pushed on to the stack, then the + 'tcob_resolve_subr' function is called. + If the 'tcob_resolve_subr' function is true then + the pointer to the function is called. If false + then the CALL is by-passed (jump). + + Problem: + When the CALL is by-passed the stack pointer + is not reset. + + Temporary fix: + Reset the stack pointer before the compare and jump. + Then reset the stack pointer back before the function + call. + */ + stackframe_cnt = stack_save; + + /* Reset the stack pointer in case 'tcob_resolve_subr' fails */ + fprintf(o_src, "\taddl\t$%d, %%esp\n", stack_save); + + fprintf(o_src, "\tand\t%%eax,%%eax\n"); + fprintf(o_src, "\tjz\t.L%d\n", exceplabel); + + /* Reset the stack pointer when 'tcob_resolve_subr' succeeds */ + fprintf(o_src, "\tsubl\t$%d, %%esp\n", stack_save); + fprintf(o_src, "\tcall\t*%%eax\n"); + + if (curr_call_convention == 0) + cleanup_rt_stack(); + + endlabel = loc_label++; + gen_store_fnres(ret); + gen_enter_runelement(RUN_ELEMENT_RETURN); + fprintf(o_src, "\tjmp\t.L%d\n", notexceplabel); + + HTG_prg_uses_dcall = 1; /* mark we use dynamic calls for the linker step */ + } + /*fprintf(o_src,"\taddl\t$%d, %%esp\n",stack_size*2);*/ + if (totlen != 0) + fprintf(o_src, "\taddl\t$%d, %%esp\n", totlen); + stack_offset = saved_stack_offset; + return endlabel; +} + +unsigned long int emt_call_loadlib(struct lit *v) +{ + + gen_loadvar((struct sym *) v); + asm_call("tcob_call_loadlib"); + return 0; +} + +int begin_on_except() +{ + int lab = loc_label++; + fprintf(o_src, ".L%d:\t# begin_on_except\n", lab); + stabs_line(); + return lab; +} + +void check_call_except(int excep, int notexcep, int exceplabel, + int notexceplabel, int endlabel) +{ + + /* generate code only if was "call " */ + if (endlabel != 0) + { + fprintf(o_src, ".L%d:\t# exceplabel\n", exceplabel); + if (excep) + { + fprintf(o_src, "\tjmp\t.L%d\n", excep); + } + /* if no exception phrase was given */ + if (excep == 0) + { + /* fprintf(o_src,"\tcall\ttcob_resolve_subr_error\n"); */ + asm_call("tcob_resolve_subr_error"); + fprintf(o_src, "\tjmp\t.L%d\n", endlabel); + } + fprintf(o_src, ".L%d:\t# notexceplabel\n", notexceplabel); + if (notexcep) + { + fprintf(o_src, "\tjmp\t.L%d\n", notexcep); + } + fprintf(o_src, ".L%d:\t# endlabel\n", endlabel); + } +} + +/* Generates code for inline intrinsic functions, + returns a field containing the return value of the intrinsic functions */ +struct sym *gen_inline_intrinsic(struct sym *v) +{ + struct parm_list *list, *tmp; + struct sym *temporary; + static struct lit *when_compiled = NULL; + struct sym *cp = NULL; + if (parameter_list) + cp = (struct sym *) parameter_list->var; + + if (strcasecmp("LENGTH", v->name) == 0) + { + temporary = define_temp_field(DTYPE_BININT, sizeof(int)); + fprintf(o_src, "\tmovl\t$%d, %s #%s\n", set_field_length(cp, 1), + memrefat(temporary), cp->name); + } + else if (strcasecmp("ORD", v->name) == 0) + { + temporary = define_temp_field(DTYPE_BININT, sizeof(int)); + fprintf(o_src, "\tmovsbl\t%s, %%eax\n", memrefat(cp)); + fprintf(o_src, "\taddl\t$1, %%eax\n"/*, memrefat(cp), + memrefat(temporary), cp->name*/); + fprintf(o_src, "\tmovl\t%%eax, %s\n", memrefat(temporary)); + } + else if (strcasecmp("CHAR", v->name) == 0) + { + temporary = define_temp_field(DTYPE_ALPHANUMERIC, 1); + gen_loadval(cp); + fprintf(o_src, "\tsubl\t$1, %%eax\n" /*,memrefat(cp), + memrefat(temporary), cp->name*/); + fprintf(o_src, "\tmovb\t%%al, %s\n", memrefat(temporary)); + } + else if (strcasecmp("WHEN-COMPILED", v->name) == 0) + { + if (when_compiled == NULL) + { /* If first time, create the literal */ + char now_str[22]; + time_t now; + now = time(NULL); + /* Needs fix to fill positions 15 to 21 */ + /* (milliseconds and diff between local and Univeral Time) */ + strftime(now_str, 22, "%Y%m%d%H%M%S0000000", localtime(&now)); + when_compiled = install_lit(now_str, 22, 0); + save_literal(when_compiled, DTYPE_DISPLAY); +#ifdef DEBUG_COMPILER + fprintf(o_src,"#Creating compile time literal:%s\n",now_str); +#endif + } + temporary = (struct sym *) when_compiled; + } + else + { + yyerror("inline Intrinsic function type not yet implemented"); + } + + /* Free parameter list */ + for (list = parameter_list; list != NULL;) + { + tmp = list; + list = list->next; + free(tmp); + tmp = NULL; + } + parameter_list = NULL; + return temporary; +} + +/* + * Makes a call to an intrinsic function using the parameter list. + * Returns a pointer to a temporaty field that contains the value returned by + * the function. + * + * This function does not use anything platform dependent, + * and may be trasferred to htcobgen + */ +struct sym *gen_intrinsic_call(struct sym *v) +{ + struct parm_list *list, *tmp; + struct sym *cp; + char intrinsic_name[50] = "tcob_intrinsic_"; + unsigned short inp; + struct sym *temporary = NULL; + struct intrinsic_function *function = NULL; + + /* fprintf(stderr,"in:%s\n",v->name); */ +#ifdef DEBUG_COMPILER + fprintf(o_src, "#call intrinsic %s \n", v->name); +#endif + /* Look for data types of intrinsic function */ + function = lookup_intrinsic_function(v->name); + if (function == NULL) + { + yyerror("Intrinsic function type not recognized"); + return NULL; + } + /* Define a temporaty field as needed */ + switch (function->function_type) + { + case ITYPE_FLOAT: + temporary = define_temp_field(DTYPE_FLOAT, sizeof(double)); + break; + case ITYPE_DATE: /* Date fields defined as PIC 9(8) */ + temporary = define_temp_field(DTYPE_DISPLAY, 8); + break; + case ITYPE_INT: + temporary = define_temp_field(DTYPE_BININT, sizeof(int)); + break; + case ITYPE_DATETIME: + temporary = define_temp_field(DTYPE_ALPHANUMERIC, 21); + break; + case ITYPE_JULIANDATE: + temporary = define_temp_field(DTYPE_DISPLAY, 7); + break; + case ITYPE_YEAR: + temporary = define_temp_field(DTYPE_DISPLAY, 4); + break; + case ITYPE_ALPHA: + /* Maximmum length supported is 255 chars */ + /* Is the maximum supported by define_temp_field */ + temporary = define_temp_field(DTYPE_ALPHANUMERIC, 255); + break; + case ITYPE_INLINE: + return gen_inline_intrinsic(v); + break; + default: + yyerror("Intrinsic function type not recognized"); + return NULL; + } + /* construct the routine name */ + strcat(intrinsic_name, v->name); + /* Force to lowercase, change - to _ */ + for (inp = 15; inp <= (strlen(v->name) + 15); inp++) + { + if (intrinsic_name[inp] >= 'A' && intrinsic_name[inp] <= 'Z') + intrinsic_name[inp] += 32; + if (intrinsic_name[inp] == '-') + intrinsic_name[inp] = '_'; + } + /* First we push a NULL to mark end of parameters */ + push_immed(0); + /******** get the parameters from the parameter list ********/ + /* Intrinsics are always called by reference */ + inp = 0; /* used to count number of args */ + for (list = parameter_list; list != NULL;) + { + cp = (struct sym *) list->var; +#ifdef DEBUG_COMPILER + fprintf(o_src, "#call intrinsic parameter %s \n", cp->name); +#endif + gen_loadvar(cp); + tmp = list; + list = list->next; + free(tmp); + tmp = NULL; + inp++; + } + parameter_list = NULL; + /* check number of args */ + if ((function->args != ANY_NUMBER) && (function->args != inp)) + { + yyerror("Invalid number of args calling intrinsic %s", v->name); + } + + /* push the destination field */ + gen_loadvar(temporary); + asm_call(intrinsic_name); + /*gen_store_fnres(temporary);*/ + + return temporary; +} + +/* end of HTCOBEMT.C */ diff --git a/compiler/htcobemt.o b/compiler/htcobemt.o new file mode 100644 index 0000000..0217d2c Binary files /dev/null and b/compiler/htcobemt.o differ diff --git a/compiler/htcobgen.c b/compiler/htcobgen.c new file mode 100644 index 0000000..213fa9a --- /dev/null +++ b/compiler/htcobgen.c @@ -0,0 +1,6251 @@ +/* + * Copyright (C) 2005, David Essex, Rildo Pragana. + * Copyright (C) 2003, Rildo Pragana, Bernard Giroud. + * Copyright (C) 2002, 2001, 2000, 1999, Rildo Pragana, Jim Noeth, + * David Essex, Glen Colbert, Andrew Cameron. + * Copyright (C) 1993, 1991 Rildo Pragana. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA + */ + +/* + * Assembler Code Generator for Cobol Compiler + */ + +#include "htconfig.h" +#include "htversion.h" +#include "htcoboly.h" +#include "htcoblib.h" +#include "htglobals.h" +#include "mwindows.h" + +//unsigned int gen_move_first(struct sym *sy, unsigned int loc, unsigned int size, unsigned int *idx); // walter 13-12-05 +void gen_loaddesc2(struct sym *sy, int variable_length); + +int pgm_segment = 0; /* # of program in source file */ +int screen_io_enable = 0; /* use screen routines or not for accept/display */ + +int decimal_comma = 0; /* decimal char 1 = ',' ; 0 ='.' */ +#define decimal_char() (decimal_comma ? ',' : '.') + +char currency_symbol = '$'; +char sch_convert_buf[512]; + +struct sym *screen_status_field = NULL; /* variable of crt status */ +struct sym *cursor_field = NULL; /* variable of cursor */ +struct lit *program_name_literal = NULL; /* literal thar holds the program name */ + +int stabs_on_sw = 0; + +extern struct lextab literal; +extern int yydebug; +extern struct sym *curr_file; + +struct sym *curr_paragr = NULL, *curr_section = NULL; +struct sym *curr_field; +short curr_call_mode = 0; +short curr_call_convention = 0; +unsigned stack_offset = 0; /* offset for variables on the stack */ +/*#define SAVED_EBX_OFFSET 4*/ /* relative to %ebp */ +unsigned stack_plus = 0; +unsigned global_offset = 4; /* offset for global variables (DATA) */ +/*unsigned file_offset=0;*/ +unsigned literal_offset = 0; +unsigned data_offset = 0; +/*#define data_offset global_offset*/ +unsigned linkage_offset = 0; +unsigned using_offset = 8; +/* tmpvar_offset: for storage of temporary variables, +with space reclaimed after the current instruction*/ +unsigned tmpvar_offset = 0; +unsigned tmpvar_max = 0; + +unsigned last_lineno = 0; +short at_procedure = 0; +short refmod_slots = 0; +static char name_buf[MAXNAMEBUF]; + +struct lit *spe_lit_ZE = NULL; /* figurative constant ZERO */ +struct lit *spe_lit_SP = NULL; /* figurative constant SPACE */ +struct lit *spe_lit_LV = NULL; /* figurative constant LOW-VALUE */ +struct lit *spe_lit_HV = NULL; /* figurative constant HIGH-VALUE */ +struct lit *spe_lit_QU = NULL; /* figurative constant QUOTE */ +static char init_ctype; /* hold homogenous type */ +static short init_val; /* hold homogenous value */ +static struct init_str_tab *istrp; +static unsigned curr_01_location; /* hold current root father when set_field_location */ + +struct list *expr_list = NULL; +struct list *files_list = NULL; +struct list *disp_list = NULL; +struct parm_list *parameter_list = NULL; +struct list *fields_list = NULL; +struct list *last_field = NULL; +struct index_to_table_list *index2table = NULL; +struct named_sect *named_sect_list = NULL; +struct list *switches_list = NULL; +struct list *vars_list = NULL; +short next_available_sec_no = SEC_FIRST_NAMED; +short default_sec_no = SEC_WORKING; +short curr_sec_no = SEC_WORKING; + +struct parm_list *chaining_list = NULL; /* chaining variables */ + +int screen_label = 0; +int para_label = 0; +int block_label = 0; +int line_label = 0; +int paragr_num = 1; +int loc_label = 1; +unsigned char picture[100]; /* for max 50 signs and counts */ +int picix, piccnt, decimals, sign, v_flag, n_flag, digits, pscale; +int filler_num = 1; +int active[37]; +int at_linkage = 0; +int stackframe_cnt = 0; +int inner_stack_size = 0; +#if !defined(__WINDOWS__) +char program_id[120] = "main"; +char *pgm_label = "main"; +#else +char program_id[120] = "_main"; +char *pgm_label = "_main"; +#endif +int initial_flag = 0; +struct list *report_list = NULL; +static int need_desc_length_cleanup = 0; +extern int stabs_started; + + +extern int main_flag; /* Does it have an main entry point */ +extern int main_entry_flag; /* Specify main entry point */ +extern char main_entry_buf[]; /* main entry point name */ + +int module_flag = 1; /* All (sub)programs are modules (routines) */ +int nested_flag = 0; /* Is this program nested inside another program */ +int has_linkage = 0; /* Has linkage section ? */ +/* + ** Symbol table management routines + */ + +struct sym *vartab[ HASHLEN ] = {NULL}; +struct sym *labtab[ HASHLEN ] = {NULL}; +struct lit *littab[ HASHLEN ] = {NULL}; + +int +hash(char *s) +{ + int val; + for (val = 0; *s != '\0';) + val += (unsigned char) toupper(*s++); // walter coloquei (unsigned char) + return ( val % HASHLEN); +} + +char * +savename(char *s) +{ + char *ap; + if ((ap = (char *) malloc(strlen(s) + 1)) != NULL) + strcpy(ap, s); + return ( ap); +} + +char * +upcase(char *s, char *buf) +{ + char *t; + int n = SYMBUF_SIZE - 1; + t = buf; + while (*s && n--) + { + *t++ = toupper(*s++); + } + if (n <= 0) + { + yyerror("Too large symbol"); + } + *t = 0; + return buf; +} + +void +update_xreflist(struct sym *as) +{ + if ((as->xrefs.pos > 0) && + (as->xrefs.lineno[as->xrefs.pos - 1] == source_lineno)) + return; + + if (as->xrefs.size <= as->xrefs.pos) + { + as->xrefs.size += 10; + as->xrefs.lineno = realloc(as->xrefs.lineno, sizeof (int) * as->xrefs.size); + } + as->xrefs.lineno[as->xrefs.pos] = source_lineno; + as->xrefs.pos++; +} + +struct sym * +lookup(char *s, int tab) +{ + char sbuf[SYMBUF_SIZE]; + if (tab == SYTB_LIT) + { /* literals tab */ + struct lit *as; + for (as = littab[ hash(s) ]; as != NULL; as = as->next) + if (strcmp(s, as->name) == 0) + return ( (struct sym *) as); + return ( NULL); + } + else + { + struct sym *as; + s = upcase(s, sbuf); + if (tab == SYTB_VAR) + as = vartab[ hash(s) ]; + else + as = labtab[ hash(s) ]; + for (; as != NULL; as = as->next) + if (strcmp(s, as->name) == 0) + return ( as); + return ( NULL); + } +} + +struct sym * +install(char *name, int tab, int cloning) +{ + char sbuf[SYMBUF_SIZE]; + struct sym *clone; + struct sym *as; + struct lit *al; + int val; + + if (tab == SYTB_LIT) + { + al = (struct lit *) malloc(sizeof (struct lit)); + if (al == NULL) + return NULL; + if ((al->name = savename(name)) == NULL) + return NULL; + val = hash(al->name); + al->next = littab[ val ]; + littab[ val ] = al; + al->type = 0; + al->all = 0; + al->litflag = 1; + al->nick = NULL; + al->len = strlen(name); + return ( (struct sym *) al); + } + else + { + name = upcase(name, sbuf); + if ((as = lookup(name, tab)) == NULL) + { + as = (struct sym *) malloc(sizeof (struct sym)); + memset(as, 0, sizeof (struct sym)); + if (as == NULL) + return NULL; + if ((as->name = savename(name)) == NULL) + return NULL; + val = hash(as->name); + if (tab == SYTB_VAR) + { + /* fprintf(stderr,"install: creating %s -> 0x%x\n",as->name,as); */ + as->next = vartab[ val ]; + vartab[ val ] = as; + } + else + { + as->next = labtab[ val ]; + labtab[ val ] = as; + } + as->type = 0; + as->flags.is_pointer = 0; + as->flags.just_r = 0; + as->flags.separate_sign = 0; + as->flags.leading_sign = 0; + as->flags.blank = 0; + as->flags.sync = 0; + as->slack = 0; + as->pscale = 0; + as->defined = 0; + as->value = as->sort_data = NULL; + as->linkage_flg = 0; + as->litflag = 0; + as->scr = NULL; + as->clone = as->parent = NULL; + as->son = NULL; + as->occurs = NULL; + as->xrefs.size = 1; + as->xrefs.pos = 0; + as->xrefs.lineno = malloc(sizeof (int)); + as->xrefs.lineno[0] = 0; + } + else if ((cloning && (as->defined == 1)) || (cloning == 2)) + { + /* install clone (cloning==2 -> force) */ + /* fprintf(stderr,"install: cloning %s -> 0x%x\n",as->name,as); */ + clone = (struct sym *) malloc(sizeof (struct sym)); + memset(clone, 0, sizeof (struct sym)); + if (clone == NULL) + return NULL; + clone->name = as->name; + clone->type = 0; + clone->flags.is_pointer = 0; + clone->flags.just_r = 0; + clone->flags.separate_sign = 0; + clone->flags.leading_sign = 0; + clone->flags.blank = 0; + clone->flags.sync = 0; + clone->slack = 0; + clone->pscale = 0; + clone->defined = 0; + clone->value = as->sort_data = NULL; + clone->linkage_flg = 0; + clone->litflag = 0; + clone->scr = NULL; + clone->parent = NULL; + clone->occurs = NULL; + clone->clone = as->clone; + as->clone = clone; + as = clone; + } + return ( as); + } +} + +struct lit * +install_lit(char *name, int length, int all) +{ + struct lit *al; + int val; + + /* if length was not given, take the length from the name string */ + if (length == 0) + { + length = strlen(name); + } + al = (struct lit *) malloc(sizeof (struct lit)); + if (al == NULL) + return NULL; + /* it is safer to null terminate it, so alloc one char more */ + al->name = malloc(length + 1); + if (al->name == NULL) + { + return NULL; + } + memcpy(al->name, name, length); + *(al->name + length) = 0; + + val = hash(al->name); + al->next = littab[ val ]; + littab[ val ] = al; + al->type = 0; + al->all = all; + al->litflag = 1; + al->nick = NULL; + al->len = length; + return al; +} + +struct sym * +lookup_label(struct sym *sy, struct sym *parent) +{ + +#if 0 +#ifdef DEBUG_COMPILER + fprintf(stderr, "lookup_label: %s", sy->name); +#endif +#endif + while (sy->clone && (sy->parent != parent)) + sy = sy->clone; + if (sy->parent == parent) + { +#if 0 +#ifdef DEBUG_COMPILER + if (sy->parent != NULL) + fprintf(stderr, " found -> %s\n", sy->parent->name); + else + fprintf(stderr, " found\n"); +#endif +#endif + return sy; + } + else + { +#if 0 +#ifdef DEBUG_COMPILER + fprintf(stderr, " not found\n"); +#endif +#endif + return NULL; + } +} + +struct sym * +lookup_variable(struct sym *sy, struct sym *parent) +{ + struct sym *tmp; + /* sy = lookup(sy->name,SYTB_VAR); */ + if (parent->litflag == 2) + { + parent = (struct sym *) ((struct vref *) parent)->sym; + } + while (1) + { + tmp = sy; + while (tmp && tmp->parent != parent) + tmp = tmp->parent; + if (tmp && tmp->parent == parent) + break; + if (sy->clone == NULL) + break; + sy = sy->clone; + } + return sy; +} + +struct sym * +lookup_parent(struct sym *sy, struct sym *parent) +{ + struct sym *tmp; + if (parent->litflag == 2) + { + parent = (struct sym *) ((struct vref *) parent)->sym; + } + while (sy) + { + tmp = sy; + while (tmp && tmp->parent != parent) + tmp = tmp->parent; + if (tmp && tmp->parent == parent) + break; + sy = sy->clone; + } + return sy; +} + +struct sym * +lookup_for_redefines(struct sym *sy) +{ + struct sym *tmp; + if (curr_field->parent == NULL) + { + tmp = lookup(sy->name, SYTB_VAR); + } + else + { + tmp = lookup_variable(sy, curr_field->parent); + } + return tmp; +} + +void +clear_symtab() +{ + struct sym *sy, *sy1, *tmp; + /* struct lit *lt,*lt1,*ltmp; */ + int i; + for (i = 0; i < HASHLEN; i++) + { + for (sy1 = vartab[i]; sy1 != NULL;) + { + for (sy = sy1->clone; sy;) + { + if (sy) + { + tmp = sy; + sy = sy->clone; + free(tmp); + } + } + tmp = sy1; + sy1 = sy1->next; + free(tmp); + } + vartab[i] = NULL; + } + for (i = 0; i < HASHLEN; i++) + { + for (sy1 = labtab[i]; sy1 != NULL;) + { + for (sy = sy1->clone; sy;) + { + if (sy) + { + tmp = sy; + sy = sy->clone; + free(tmp); + } + } + tmp = sy1; + sy1 = sy1->next; + free(tmp); + } + labtab[i] = NULL; + } + /*for (i=0;inext; + free(ltmp); + } + littab[i] = NULL; + }*/ +} + +/* clear_offset() is called when starting a new program segment */ +void +clear_offsets() +{ + stack_offset = 0; + global_offset = 4; + literal_offset = 0; + data_offset = 0; + linkage_offset = 0; + using_offset = 8; + refmod_slots = 0; + free_list(fields_list); + fields_list = NULL; + free_list(files_list); + files_list = NULL; + /* clear all current paragraphs/sections and fields */ + curr_paragr = NULL; + curr_section = NULL; + curr_field = NULL; + /* free tmpvar storage */ + tmpvar_offset = 0; + tmpvar_max = 0; + stabs_started = 0; +} + +/*** we need this because the literal string is already stored ***/ +char +sign_to_char(int digit) +{ + char cDigit; + if (!digit) + cDigit = '}'; + else if (digit == 0x80) + cDigit = '{'; + else if (digit > 0) + cDigit = (char) ('A' + digit - 1); + else + cDigit = (char) ('J' - digit - 1); + return cDigit; +} + +void +invert_literal_sign(struct lit *sy) +{ + char *s = sy->name; + int off = strlen(sy->name) - 1; + s[off] = sign_to_char(-(s[off] - '0')); +} + +void +check_decimal_point(struct lit *lit) +{ + char *s = lit->name; + if ((decimal_comma && strchr(s, '.')) || + (!decimal_comma && strchr(s, ','))) + { + yyerror("wrong decimal point character in numeric literal"); + } +} + +int +is_variable(struct sym *sy) +{ + int r = 0; + if (sy->litflag == 0) + { + switch (sy->type) + { + case '8': /* 88 field */ + case DTYPE_DISPLAY: /* numeric */ + case DTYPE_ALPHA: /* alpha */ + case DTYPE_BININT: /* binary (comp/computational) */ + case DTYPE_PACKED: /* compacted (comp-3/comptational-3) */ + case DTYPE_ACCEPT_DISPLAY: /* screen data */ + case DTYPE_EDITED: /* edited */ + case DTYPE_GROUP: /* group */ + case DTYPE_FLOAT: /* float(comp-1 4 bytes) / double(comp-2 8 bytes) */ + case DTYPE_ALPHANUMERIC: /* alphanum */ + r = 1; + break; + default: + r = 0; + break; + } + } + return r; +} + +int +is_subscripted(struct sym *sy) +{ + if (sy->occurs_flg) /* the item itself "occurs" */ + return 1; + while (sy->parent != NULL) + { /* some parenr "occurs" */ + sy = sy->parent; + if (sy->occurs_flg) + return 1; + } + return 0; +} + +int +adjust_linkage_vars(int start_offset) +{ + struct sym *sy, *sy1; + int i; + int offset = start_offset; + + for (i = 0; i < HASHLEN; i++) + { + for (sy1 = vartab[i]; sy1 != NULL; sy1 = sy1->next) + { + for (sy = sy1; sy; sy = sy->clone) + { + if (sy->parent == NULL && sy->linkage_flg == 1) + { + sy->linkage_flg = -offset; + offset += 4; + } + } + } + } + return offset; +} + +/* + * Put a field to its initial value. + * It can be a value specified by 'value' or an initialization value + * If it is a group field, initialize all the fields under it. + */ +static void +set_initial_value(struct sym *sy) +{ + int j, nb_fields; + struct init_str init_templ; + + if (sy->redefines) return; +#ifdef DEBUG_COMPILER + if (sy->value) + fprintf(o_src, "# initial value to field '%s' = '%s' \n", + sy->name, sy->value->name); + else + fprintf(o_src, "# initial value to field '%s', INITIALIZED \n", + sy->name); +#endif + /* Initialize a non-group field */ + if (sy->level == 77 || (sy->level == 1 && sy->son == NULL)) + { + if (sy->value) + gen_move_init((struct sym *) sy->value, sy); /* initial value */ + else + gen_initialize(sy, 0); /* initialize at spaces or 0 */ + return; + } + + /* Initialize a group to zero or blank */ + init_ctype = ' '; + init_val = -1; + nb_fields = get_nb_fields(sy, 1); + if (init_ctype != '&' && init_ctype != ' ' && init_val > 1) + { + gen_init_str(sy, init_ctype, symlen(sy)); + return; + } + + /* Initialize a group's fields one by one */ +#ifdef DEBUG_COMPILER + fprintf(o_src, "# istrp = malloc(%d) nb_fields = %d\n", + nb_fields * sizeof (init_templ), nb_fields); +#endif + istrp = malloc(nb_fields * sizeof (init_templ)); + build_init_str(sy, nb_fields); + for (j = 0; j < nb_fields; j++) + { + if (istrp->ent[j].value != NULL) + { + unsigned saved_loc = istrp->ent[j].sy->location; + istrp->ent[j].sy->location = istrp->ent[j].location; + gen_move_init((struct sym *) istrp->ent[j].sy->value + , istrp->ent[j].sy); + istrp->ent[j].sy->location = saved_loc; + } + } + free(istrp); + istrp = NULL; + return; +} + +/* + * Initialize all the variables at the beginig of the program + */ +void +do_init_val() +{ + struct sym *sy, *sy1, *v; + int i; + char typ; + for (i = 0; i < HASHLEN; i++) + for (sy1 = vartab[i]; sy1 != NULL; sy1 = sy1->next) + for (sy = sy1; sy != NULL; sy = sy->clone) + if (sy->type != 'F' && sy->type != '8' && + sy->type != 'K' && sy->type != 'J') + { + v = sy; + typ = v->type; + if (typ == 'F' || typ == 'R' || typ == 'K' || typ == 'J' + || typ == '8') + continue; + /* Here only work with level 1 and 77 */ + if (v->level != 1 && v->level != 77) continue; + /* Don't initialize fields in linkage */ + if (v->linkage_flg) continue; + + set_initial_value(v); + } +} + +void +save_field_in_list(struct sym *sy) +{ + struct list *list; + if (fields_list == NULL) + { + list = (struct list *) malloc(sizeof (struct list)); + last_field = fields_list = list; + list->next = NULL; + list->var = sy; + } + else + { + list = (struct list *) malloc(sizeof (struct list)); + list->var = sy; + list->next = NULL; + last_field->next = list; + last_field = list; + } +} + +void +save_literal(struct lit *v, int type) +{ + char *s; + char *dp; + int piclen; + /* if (v->type) return; */ /* already saved */ + s = v->name; + piclen = 3; /* assume 'X'-only literal */ + if ((type == DTYPE_DISPLAY) && (*(v->name + v->len - 1) > '9')) + { + piclen += 2; /* we need space for the sign picture char */ + } + if (type != DTYPE_ALPHANUMERIC && (dp = strchr(s, decimal_char())) != NULL) + { + piclen += 4; /* reserve space for 'V' and decimal part */ + v->decimals = v->len - (int) (dp - s) - 1; + } + else v->decimals = 0; + /* v->pscale=0; */ + if (type == DTYPE_ALPHANUMERIC && v->len > 255) + { + piclen += (v->len / 255)*2; + } + v->type = type; + /****** save literal in fields list for later *******/ + save_field_in_list((struct sym *) v); + /******** save address of const string ************/ + v->location = literal_offset; + v->sec_no = SEC_CONST; + if (v->decimals) + literal_offset += v->len; + /* it's already one chr larger (decimal point) */ + else + literal_offset += v->len + 1; + /******** save address of field descriptor ********/ + v->descriptor = literal_offset; + literal_offset += HTG_fld_desc_len + piclen; + /* printf("save_literal: name=%s, type=%c, offset=%x, piclen=%d\n", + v->name, v->type, v->descriptor, piclen); */ +} + +void +save_named_sect(struct sym *sy) +{ + /*char *s; + char *dp;*/ + struct named_sect *nsp; + nsp = (struct named_sect *) malloc(sizeof (struct named_sect)); + sy->flags.external = 1; + nsp->sec_no = next_available_sec_no++; + /* nsp->os_name = sy->name; walter...why these ??? */ + nsp->os_name = (char *) malloc(strlen(nsp->os_name) + 1); + strcpy(nsp->os_name, sy->name); + chg_underline(nsp->os_name); + nsp->next = named_sect_list; + named_sect_list = nsp; + curr_sec_no = nsp->sec_no; + sy->sec_no = curr_sec_no; +} + +struct lit * +save_special_literal(char val, char picc, char *nick) +{ + struct lit *v; + v = (struct lit *) install(nick, SYTB_LIT, 0); + if (v->type) return NULL; /* already saved */ + v->decimals = 0; + /* v->pscale=0; */ + v->type = picc; + v->nick = (char *) malloc(2); + v->nick[0] = val; + v->nick[1] = 0; + v->len = 1; + v->all = 0; + save_field_in_list((struct sym *) v); + v->location = literal_offset; + v->sec_no = SEC_CONST; + literal_offset += 2; /* we have only 1-char special literals */ + v->descriptor = literal_offset; + literal_offset += (HTG_fld_desc_len + 3); + return v; +} + +void +define_switch_field(struct sym *sy, struct sym *sy2) +{ + + curr_field = NULL; + define_field(77, sy); + curr_field->len = 2; + curr_field->type = DTYPE_BININT; + curr_field->decimals = 0; + picture[0] = '9'; + picture[1] = 4; + picture[2] = 0; + curr_field->ix_desc = sy2; + update_field(curr_field); + sy2->defined = 1; /* switch number is implicitly defined */ + switches_list = insert_list(switches_list, sy); +} + +struct lit * +define_num_lit(int value) +{ + char tblmax[21]; + struct lit *v; + + sprintf(tblmax, "%d", value); + v = (struct lit *) install(tblmax, SYTB_LIT, 0); + save_literal(v, DTYPE_DISPLAY); + return v; +} + +void +save_switch_value(struct sym *sy, int value) +{ + struct lit *v; + + v = define_num_lit(value); + define_field(88, sy); + sy->value = v; + sy->value2 = v; +} + +void +put_disp_list(struct sym *sy) +{ + struct list *list, *tmp; +#if 0 + if ((!(sy->defined)) && (sy->litflag != 1)) + { + yyerror("variable %s not defined", sy->name); + } +#endif + /* fprintf(o_src,"# put_disp_list: %s\n",sy->name); */ + list = (struct list *) malloc(sizeof (struct list)); + list->var = sy; + list->next = NULL; + if (disp_list == NULL) + disp_list = list; + else + { + tmp = disp_list; + while (tmp->next != NULL) tmp = tmp->next; + tmp->next = list; + } +} + +int +pic_digits(struct sym *sy, char target) +{ + char *p = NULL; + int len = 0; + if (sy == NULL) + return 0; + if (sy->litflag) + { + len = strlen(sy->name); + if (strchr(sy->name, decimal_char())) len--; + if (strchr(sy->name, '+')) len--; + if (strchr(sy->name, '-')) len--; + /* printf("pic_digits: %s -> %d\n",sy->name,len); */ + return len; + } + else + { + p = sy->picstr; + while (*p) + { + if (*p++ == target) + { + len += *p++; + } + else + p++; + } + } + /* printf("pic_digits: %s -> %d\n",sy->name,len); */ + return len; +} + +/* Return the maximum length which might be occupied by a corresponding value */ +int +get_max_edt_len(struct sym * sy) +{ + int plen; + /*walter*/ + if (sy->type == DTYPE_BININT) + return (sy->len * 3); + /*fimwalter*/ + if (sy->type == DTYPE_ALPHANUMERIC || sy->type == DTYPE_ALPHA || + sy->type == DTYPE_EDITED || sy->type == DTYPE_GROUP || + sy->type == DTYPE_ALPHANUMERICL || sy->type == DTYPE_ACCEPT_DISPLAY) + { + plen = sy->len; + } + else + { + plen = pic_digits(sy, '9'); + if (sy->picstr[0] == 'S') plen++; + if (sy->decimals > 0) plen++; + if (sy->pscale != 0) plen = plen + abs(sy->pscale); + } + return plen; +} + +int +query_comp_len(struct sym * sy) +{ + int plen; +// char target = '9'; + + if (sy->stype == 'X') + { +// target = 'X'; + plen = pic_digits(sy, 'X'); + /* for the time being, picture is altered just before output + in htcobemt.c */ + /* strcpy(sy->picstr,"9\xa"); */ /* max picture for 4 bytes */ + return plen; + } + else + { + if ((plen = pic_digits(sy, '9')) <= 2) + return 1; + if (plen <= 4) + return 2; + if (plen <= 9) + return 4; + return 8; + } +} + +int +symlen(struct sym *sy) +{ + /*int plen;*/ + if (sy->type == DTYPE_PACKED) + return sy->len / 2 + 1; + else if (sy->litflag == 1) + return ((struct lit *) sy)->len; + return sy->len; +} + +/* Returns the minimum number of 9 to hold a complete value */ +int +sym_min_pic(struct sym *sy) +{ + + if (sy->type != DTYPE_BININT) + return sy->len; + if (sy->stype != 'X') + return pic_digits(sy, '9'); + switch (symlen(sy)) + { + case 1: return 3; + case 2: return 5; + case 4: return 10; + case 8: return 19; + } + return pic_digits(sy, '9'); +} + +void +add_alternate_key(struct sym *sy, int duplicates) +{ + struct sym *f = curr_file; + struct alternate_list *alt, *new; + alt = (struct alternate_list *) f->alternate; + new = malloc(sizeof (struct alternate_list)); + new->next = alt; + new->key = sy; + new->duplicates = duplicates; + f->alternate = (struct sym *) new; +} + +struct list * +insert_list(struct list *l, void *item) +{ + struct list *tmp; + if (l == NULL) + { + l = malloc(sizeof (struct list)); + l->var = item; + l->next = NULL; + } + else + { + for (tmp = l; tmp->next != NULL; tmp = tmp->next); + tmp->next = malloc(sizeof (struct list)); + tmp->next->var = item; + tmp->next->next = NULL; + } + return l; +} + +struct gvar_list * +gvar_list_append(struct gvar_list *l, struct sym *item, int linenum) +{ + struct gvar_list *tmp; + + if (l == NULL) + { + tmp = malloc(sizeof (struct gvar_list)); + l = tmp; + } + else + { + for (tmp = l; tmp->next != NULL; tmp = tmp->next); + tmp->next = malloc(sizeof (struct gvar_list)); + tmp = tmp->next; + } + tmp->u.sym = item; + tmp->attribute = linenum; + tmp->next = NULL; + + return l; +} + +void +sort_keys_append(struct sym *fname, struct gvar_list *l) +{ + struct gvar_list *gvar_w1, *gvar_w2; + struct sym *sym_wk; + + for (gvar_w1 = l; gvar_w1 != NULL; gvar_w1 = gvar_w1->next) + { + for (gvar_w2 = gvar_w1->u.gvar; gvar_w2 != NULL; gvar_w2 = gvar_w2->next) + { + sym_wk = gvar_w2->u.sym; + sym_wk->direction = gvar_w1->attribute; + sym_wk->sort_data = fname->sort_data; + /* fname->sort_data = sym_wk; */ + fname->sort_data = (void *) sym_wk; + } + } +} + +struct gvar_list * +sort_key_list_create(struct gvar_list *item, int atrbt) +{ + struct gvar_list *l; + + l = malloc(sizeof (struct gvar_list)); + l->u.gvar = item; + l->attribute = atrbt; + l->next = NULL; + + return l; +} + +struct gvar_list * +sort_keys_list_append(struct gvar_list *l, struct gvar_list *item) +{ + struct gvar_list *tmp; + + if (l == NULL) + { + l = item; + } + else + { + for (tmp = l; tmp->next != NULL; tmp = tmp->next); + tmp->next = item; + } + + return l; +} + +void +free_list(struct list *l) +{ + struct list *tmp; + while (l != NULL) + { + tmp = l->next; + free(l); + l = tmp; + } + l = NULL; +} + +void +mark_decl_list(struct list *l) +{ + struct list *tmp; + while (l != NULL) + { + ((struct sym *) l->var)->refmod_redef.declarative = curr_section; + tmp = l->next; + free(l); + l = tmp; + } +} + +struct scr_info * +alloc_scr_info() +{ + struct scr_info *new; + struct scr_info *parent_info = NULL; + + if (curr_field && curr_field->parent) + parent_info = curr_field->parent->scr; + + new = malloc(sizeof (struct scr_info)); + new->attr = 0; + new->line = 0; + new->column = 0; + new->foreground = NULL; + new->background = NULL; + new->color = NULL; + new->line_var = NULL; + new->column_var = NULL; + new->from = NULL; + new->to = NULL; + new->line_sign = 0; + new->column_sign = 0; + new->size = NULL; + + if (parent_info) /* If exists copy information from parent field */ + { + new->attr = parent_info->attr; + new->foreground = parent_info->foreground; + new->background = parent_info->background; + new->color = parent_info->color; + /* new->line = parent_info->line; */ + /* new->column = parent_info->column; */ + /* new->line_var = parent_info->line_var; */ + /* new->column_var = parent_info->column_var; */ + /* new->line_sign = parent_info->line_sign; */ + /* new->column_sign = parent_info->column_sign; */ + } + if (parent_info && curr_field->parent->son != curr_field) + { + new->line = new->column = 0; + new->line_var = new->column_var = NULL; + new->line_sign = new->column_sign = 0; + } + return new; +} + +struct inspect_before_after * +alloc_inspect_before_after(struct inspect_before_after *ba, + int before_after, struct sym *var) +{ + if (ba == NULL) + { + ba = malloc(sizeof (struct inspect_before_after)); + ba->before = ba->after = NULL; + } + if (before_after == 1) + { /* before given */ + if (ba->before) + { + yyerror("only one BEFORE phrase can be given"); + } + else + { + ba->before = var; + } + } + else if (before_after == 2) + { /* after given */ + if (ba->after) + { + yyerror("only one AFTER phrase can be given"); + } + else + { + ba->after = var; + } + } + return ba; +} + +struct converting_struct * +alloc_converting_struct(struct sym *fromvar, struct sym *tovar, + struct inspect_before_after *ba) +{ + struct converting_struct *new; + new = malloc(sizeof (struct converting_struct)); + new->fromvar = fromvar; + new->tovar = tovar; + new->before_after = ba; + return new; +} + +struct tallying_list * +alloc_tallying_list(struct tallying_list *tl, struct sym *count, + struct tallying_for_list *tfl) +{ + struct tallying_list *new; + new = malloc(sizeof (struct tallying_list)); + new->next = tl; + new->tflist = tfl; + new->count = count; + return new; +} + +struct tallying_for_list * +alloc_tallying_for_list(struct tallying_for_list *tfl, int options, + struct sym *forvar, struct inspect_before_after *ba) +{ + struct tallying_for_list *new; + new = malloc(sizeof (struct tallying_for_list)); + new->next = tfl; + new->options = options; + new->forvar = forvar; + new->before_after = ba; + return new; +} + +struct replacing_list * +alloc_replacing_list(struct replacing_list *rl, int options, + struct replacing_by_list *rbl, struct sym *byvar, + struct inspect_before_after *ba) +{ + + struct replacing_list *new; + new = malloc(sizeof (struct replacing_list)); + new->next = rl; + new->options = options; + new->replbylist = rbl; + new->byvar = byvar; + new->before_after = ba; + return new; +} + +struct replacing_by_list * +alloc_replacing_by_list(struct replacing_by_list *rbl, + struct sym *replvar, struct sym *byvar, + struct inspect_before_after *ba) +{ + struct replacing_by_list *new; + new = malloc(sizeof (struct replacing_by_list)); + new->next = rbl; + new->replvar = replvar; + new->byvar = byvar; + new->before_after = ba; + return new; +} + +struct unstring_delimited * +alloc_unstring_delimited(short int all, struct sym *var) +{ + struct unstring_delimited *ud; + ud = malloc(sizeof (struct unstring_delimited)); + ud->next = NULL; + ud->var = var; + ud->all = all; + return ud; +} + +struct unstring_destinations * +alloc_unstring_dest(struct sym *var, struct sym *delim, struct sym *count) +{ + struct unstring_destinations *ud; + ud = malloc(sizeof (struct unstring_destinations)); + ud->next = NULL; + ud->var = var; + ud->delim = delim; + ud->count = count; + return ud; +} + +struct string_from * +alloc_string_from(struct sym *var, struct sym *delim) +{ + struct string_from *sf; + sf = malloc(sizeof (struct string_from)); + sf->next = NULL; + sf->var = var; + sf->delim = delim; + return sf; +} + +void +gen_unstring(struct sym *var, struct unstring_delimited *delim, + struct unstring_destinations *dest, struct sym *ptr, + struct sym *tally) +{ + + struct unstring_destinations *dest1; + struct unstring_delimited *delim1; + + fprintf(o_src, "# UNSTRING %s\n", var->name); + gen_loadvar((struct sym *) NULL); /* mark the end of destinations */ + while (dest) + { + gen_loadvar(dest->count); + gen_loadvar(dest->delim); + gen_loadvar(dest->var); + dest1 = dest; + dest = dest->next; + free(dest1); + } + gen_loadvar((struct sym *) NULL); /* mark the end of delimiters */ + while (delim) + { + push_immed(delim->all); /* push "all" flag */ + gen_loadvar(delim->var); + delim1 = delim; + delim = delim->next; + free(delim1); + } + gen_loadvar(tally); + gen_loadvar(ptr); + gen_loadvar(var); + asm_call("tcob_unstring"); +} + +void +gen_stringcmd(struct string_from *sf, struct sym *sy, struct sym *ptr) +{ + struct string_from *sf1; + fprintf(o_src, "# STRING into %s\n", sy->name); + gen_loadvar((struct sym *) NULL); /* mark the end of variables */ + /* DELIMITED BY SIZE implied at end of source list */ + if (sf && (sf->delim == (struct sym *) - 1)) + sf->delim = (struct sym *) NULL; + /* Load the string_from source list */ + while (sf) + { + gen_loadvar(sf->delim); + gen_loadvar(sf->var); + sf1 = sf; + sf = sf->next; + /* Delimiter of -1 means use previous delimiter */ + if (sf && (sf->delim == (struct sym *) - 1)) + sf->delim = sf1->delim; + free(sf1); + } + gen_loadvar(ptr); + gen_loadvar(sy); + asm_call("tcob_stringcmd"); +} + +/* walter acrescentei cor */ +static +void +gen_display_screen_item(struct sym *sy, int main, int color) +{ + struct sym *tmp, *var = sy; + struct list *tmpl; + + if (var->litflag == 2 || var->litflag == 4) + { + var = ((struct vref *) var)->sym; + if (var->litflag == 2) + var = ((struct vref *) var)->sym; + } + if ((!(var->defined)) && (var->litflag != 1)) + { + yyerror("variable %s not defined", var->name); + } + if (main) + { + fprintf(o_src, "# Screen Section: %s\n", var->name); + } + if (var->son == NULL) + { + fprintf(o_src, "# Screen Field: %s\n", var->name); + gen_call_scr_process(var); + } + else + { + for (tmp = var->son; tmp != NULL; tmp = tmp->brother) + { + gen_display_screen_item(tmp, 0, color); + } + } + if (main) + { + asm_call("tcob_display_screen"); + if (disp_list->next) + { + yyerror("we do not handle more than one screen"); + } + tmpl = disp_list; + disp_list = disp_list->next; + free(tmpl); + } +} + +/* walter acrescentei cor */ +void +gen_display_screen(int nl, int color) +{ + gen_display_line(1, nl, color); +} + +/* walter acrescentei cor */ +void +gen_display_line(int dupon, int nl, int color) +{ + struct list *tmp; + /*int len;*/ + int dspflags; + int first = 1; + struct sym *sy; + if (disp_list) + { + /* separate screen displays from display of regular variables */ + sy = (struct sym *) disp_list->var; + if (disp_list && sy->litflag != 1) + { + if (sy->litflag != 4 && sy->litflag != 2 && sy->scr) + { + gen_display_screen_item(disp_list->var, 1, color); + return; + } + } + /* continue w/a regular variable display */ + if (nl & SCR_ERASE_EOL) + { + if (screen_io_enable == 0) + { + push_immed(dupon); + asm_call("tcob_display_erase"); + } + } + } + + while (disp_list) + { + sy = disp_list->var; + + if ((!(sy->defined)) && (sy->litflag == 0)) + { + yyerror("variable %s not defined,%d", sy->name, sy->litflag); + } + + if (screen_io_enable == 0) + { + push_immed(dupon); + gen_loadvar(sy); + asm_call("tcob_display"); + } + else + { + dspflags = nl; + if (first) + { + first = 0; + } + else + { + dspflags &= ~2; /* avoid erasing from now on */ + } + if (disp_list->next != NULL) + { + dspflags |= 1; /* allow newline only at the last item */ + } + push_immed(color); /* walter */ + push_immed(dspflags); + gen_loadvar(sy); + asm_call("tcob_display_curses"); + } + tmp = disp_list; + disp_list = disp_list->next; + free(tmp); + tmp = NULL; + } + if (!(nl & SCR_NO_ADVANCING)) + { + if (screen_io_enable == 0) + { + push_immed(dupon); + asm_call("tcob_newline"); + } + } + stabs_line(); +} + +/* + * Call the function to set the display or accept position + */ +void +gen_gotoxy_expr() +{ + stackframe_cnt += 16; /* eliminate the coords expressions */ + asm_call("tcob_goxy_expr"); +} + +void +gen_gotox_expr() +{ + stackframe_cnt += 8; /* eliminate the coord expressions */ + asm_call("tcob_gox_expr"); +} + +void +gen_gotoy_expr() +{ + stackframe_cnt += 8; /* eliminate the coord expressions */ + asm_call("tcob_goy_expr"); +} + +/* walter + main sempre 1, o unico caso que e 0 e qdo usa recursividade + echo 0 - stop literal (forcado) e qdo vem do parse traz valor + acrescentei color */ +void +gen_accept(struct sym *sy, int echo, int main, int color) +{ + struct sym *tmp, *var = sy; + int not_screen_mask = SCR_ERASE_EOL | SCR_ERASE_EOS | SCR_NO_ADVANCING; + + if ((echo & not_screen_mask) != echo) + { /* determine if the options require curses */ + screen_io_enable = 1; + HTG_prg_uses_term = 1; + } + + + if (var->litflag == 2 || var->litflag == 4) + { + var = ((struct vref *) var)->sym; + if (var->litflag == 2) + { + var = ((struct vref *) var)->sym; + } + } + + if (sy->litflag == 4) + { + echo |= SCR_IS_REFMOD; + } + + if (var->scr) + { /* screen or screen-item accept */ + if (main) + { + fprintf(o_src, "# Screen Section: %s\n", + var->name); + } + if (var->son == NULL) + { + fprintf(o_src, "# Screen Field: %s\n", + var->name); + gen_call_scr_process(var); + } + else + { + for (tmp = var->son; tmp != NULL; tmp = tmp->brother) + { + gen_accept(tmp, echo, 0, color); + } + } + if (main) + asm_call("tcob_accept_screen"); + } + else + { + push_immed(color); /* walter */ + push_immed(echo); + /* why this? Why not the standard code generating + function, gen_loaddesc()??? */ + /*fprintf(o_src,"\tmovl\t$c_base%d+%u, %%eax\n", +pgm_segment,var->descriptor); + push_eax();*/ + gen_loaddesc2(sy, 1); + /* this work better with the original symbol (sy), + because it will be interpreted as a refmod + or subscripted variable. */ + /* gen_loadloc( var ); */ + gen_loadloc(sy); + if (screen_io_enable == 0) + asm_call("tcob_accept_std"); + else + asm_call("tcob_accept_curses"); + } + stabs_line(); +} + +void +gen_accept_from_chron(struct sym *sy, int date_fmt, int is_yyyy) +{ + push_immed(is_yyyy); + push_immed(date_fmt); + gen_loadvar(sy); + asm_call("tcob_accept_chron"); +} + +void +gen_accept_from_inkey(struct sym *sy) +{ + gen_loadloc(sy); + asm_call("tcob_accept_inkey"); +} + +/* walter */ +void +gen_accept_from_escapekey(struct sym *sy) +{ + gen_loadloc(sy); + asm_call("tcob_accept_escapekey"); +} + +void +gen_accept_from_cmdline(struct sym *sy) +{ + + struct sym *sy1; + + gen_loadvar(sy); + /* + fprintf(o_src,"\tmovl\t12(%%ebp), %%eax\n"); + push_eax(); + fprintf(o_src,"\tmovl\t8(%%ebp), %%eax\n"); + push_eax(); + */ + asm_call("tcob_accept_cmd_line"); + + /* Set RETURN-CODE with the value returned by + * the "accept_cmd_line" function, which is stored + * in register %eax + */ + + if ((sy1 = lookup(SVAR_RETURN_CODE, SYTB_VAR)) != NULL) + { + if (sy1->sec_no == SEC_STACK) + { + fprintf(o_src, "\tleal\t-%d(%%ebp), %%edx\n", sy1->location); + } + else + { + fprintf(o_src, "\tleal\tw_base%d+%d, %%edx\n", + pgm_segment, sy1->location); + } + fprintf(o_src, "\tmovl\t%%eax, (%%edx)\n"); + } +} + +void +gen_accept_env_var(struct sym *sy, struct lit *v) +{ + + struct sym *sy1, *sy2; + + sy1 = (struct sym *) v; + + /* gen_loadloc( sy ); */ + /* fprintf(o_src,"\tmovl\t$c_base+%u, %%eax\n",sy->descriptor); */ + /* push_eax(); */ + + gen_loadloc(sy1); + + gen_loadvar(sy); + asm_call("tcob_accept_env_var"); + + /* Set RETURN-CODE with the value returned by + * the "accept_env_var" function, which is stored + * in register %eax + */ + + if ((sy2 = lookup(SVAR_RETURN_CODE, SYTB_VAR)) != NULL) + { + if (sy2->sec_no == SEC_STACK) + { + fprintf(o_src, "\tleal\t-%d(%%ebp), %%edx\n", sy2->location); + } + else + { + fprintf(o_src, "\tleal\tw_base%d+%d, %%edx\n", + pgm_segment, sy2->location); + } + fprintf(o_src, "\tmovl\t%%eax, (%%edx)\n"); + } + + /* void save_literal( struct lit *v, int type ) */ + /* currency_symbol = $4->name[0]; */ + /* char *name; */ /* name (value) of literal */ + /* gen_loadloc( sy ); */ + /* gen_loaddesc( sy ); */ + +} + +/******** structure allocation for perform info(s) ***********/ + +struct perf_info * +create_perf_info(struct sym *sy1, struct sym *sy2, unsigned long lj, unsigned long le) +{ + struct perf_info *rf; + rf = malloc(sizeof (struct perf_info)); + rf->pname1 = sy1; + rf->pname2 = sy2; + rf->ljmp = lj; + rf->lend = le; + return rf; +} + +struct perform_info * +create_perform_info(void) +{ + struct perform_info *rf; + rf = malloc(sizeof (struct perform_info)); + rf->pf[0] = NULL; + rf->pf[1] = NULL; + rf->pf[2] = NULL; + rf->pf[3] = NULL; + rf->pf[4] = NULL; + rf->pf[5] = NULL; + return rf; +} + +char * +check_perform_variables(struct sym *sy1, struct perform_info *pi1) +{ + + int i, j, k; + + j = 0; + for (i = 0; i < 6; i++) + { + if (pi1->pf[i] != NULL) + { + j++; +#if 0 +#ifdef DEBUG_COMPILER + fprintf(stderr, + "debug trace: check_perform_variables: var(%d:%d) '%s'\n", + i, j, pi1->pf[i]->pname2->name); +#endif +#endif + } + } + + for (i = 0; i < j; i++) + { +#if 0 +#ifdef DEBUG_COMPILER + fprintf(stderr, + "debug trace: check_perform_variables: var1='%s' var2(%d)='%s'\n", + sy1->name, + i, pi1->pf[i]->pname2->name); +#endif +#endif + if (strcmp(sy1->name, pi1->pf[i]->pname2->name) == 0) + { + return sy1->name; + } + } + + for (i = 0; i < j; i++) + { + for (k = i + 1; k < j; k++) + { + +#if 0 +#ifdef DEBUG_COMPILER + fprintf(stderr, + "debug trace: check_perform_variables: var1(%d)='%s' var2(%d)='%s'\n", + i, pi1->pf[i]->pname2->name, + k, pi1->pf[k]->pname2->name); +#endif +#endif + if (strcmp(pi1->pf[i]->pname2->name, pi1->pf[k]->pname2->name) == 0) + { + return pi1->pf[i]->pname2->name; + } + } + } + + return NULL; +} + +/******** structure allocation for math verbs variables ***********/ + +struct expr * +create_expr(char op, struct expr *left, struct expr *right) +{ + struct expr *e = malloc(sizeof (struct expr)); + struct list *list = (struct list *) malloc(sizeof (struct list)); + e->litflag = 5; +#ifdef DEBUG_COMPILER + fprintf(o_src, "#create_expr: [0x%x] %c ", (int) e, op); + if (left->litflag < 2) + { + fprintf(o_src, "%s ", ((struct sym *) left)->name); + } + else + { + fprintf(o_src, "0x%x ", (int) left); + } + if (right->litflag < 2) + { + fprintf(o_src, "%s\n", ((struct sym *) right)->name); + } + else + { + fprintf(o_src, "0x%x\n", (int) right); + } +#endif + e->op = op; + e->left = left; + e->right = right; + expr_list = list; + list->next = NULL; + list->var = e; + return e; +} + +void +free_expr(struct expr *e) +{ + if ((e != NULL) && (e->litflag == 5)) + { +#ifdef DEBUG_COMPILER + fprintf(o_src, "#free_expr: %c (%d,%d) ", e->op, + e->left->litflag, e->right->litflag); + if (e->left->litflag < 2) + { + fprintf(o_src, "%s ", ((struct sym *) e->left)->name); + } + else + { + fprintf(o_src, "0x%x ", (int) e->left); + } + if (e->right->litflag < 2) + { + fprintf(o_src, "%s\n", ((struct sym *) e->right)->name); + } + else + { + fprintf(o_src, "0x%x\n", (int) e->right); + } +#endif + free_expr(e->right); + free_expr(e->left); + free(e); + } + e = NULL; +} + +void +free_expr_list() +{ + struct list *list; + struct expr *e; + for (list = expr_list; list != NULL; list = list->next) + { + e = (struct expr *) list->var; + free_expr(e); + } + expr_list = NULL; +} + +struct math_var * +create_mathvar_info(struct math_var *mv, struct sym *sy, unsigned int opt) +{ + + struct math_var *rf, *tmp1, *tmp2; + + /* if (is_numeric_sy(sy) == 0) { + yyerror("invalid (non numeric) variable or literal \'%s\' used in arithmetic verb", sy->name); + return mv; + } + */ + rf = malloc(sizeof (struct math_var)); + rf->sname = sy; + /* rf->rounded = opt; */ + rf->opts = opt; + rf->next = NULL; + +#if 0 +#ifdef DEBUG_COMPILER + fprintf(stderr, + "debug trace : create_mathvar_info 0: sy->name=%s;\n", + sy->name); + fprintf(stderr, + "debug trace : create_mathvar_info 1: rf->sname->name=%s;\n", + rf->sname->name); +#endif +#endif + + if (mv == NULL) + { + tmp2 = rf; + tmp1 = rf; + } + else + { + tmp1 = mv; + tmp2 = mv; + while (tmp1->next != NULL) + { +#if 0 +#ifdef DEBUG_COMPILER + fprintf(stderr, + "debug trace : create_mathvar_info 2: tmp1->sname->name=%s;\n", + tmp1->sname->name); +#endif +#endif + tmp1 = tmp1->next; + } + tmp1->next = rf; + } + +#if 0 +#ifdef DEBUG_COMPILER + fprintf(stderr, + "debug trace : create_mathvar_info 3: tmp1->sname->name=%s;\n", + tmp1->sname->name); +#endif +#endif + +#if 0 +#ifdef DEBUG_COMPILER + tmp1 = tmp2; + while (tmp1 != NULL) + { + fprintf(stderr, + "debug trace : create_mathvar_info 4: tmp1->sname->name=%s;\n", + tmp1->sname->name); + tmp1 = tmp1->next; + } +#endif +#endif + + return tmp2; +} + +void +delete_mathvar_info(struct math_var *mv) +{ + + struct math_var *tmp1, *tmp2; + + tmp1 = mv; + while (tmp1 != NULL) + { +#if 0 +#ifdef DEBUG_COMPILER + fprintf(stderr, + "debug trace : delete_mathvar_info 1: tmp1->sname->name=%s;\n", + tmp1->sname->name); +#endif +#endif + tmp2 = tmp1->next; + tmp1->next = NULL; + tmp1->sname = NULL; + free(tmp1); + tmp1 = tmp2; + } +} + +struct invalid_key_element * +gen_before_invalid_key() +{ + struct invalid_key_element *p = malloc(sizeof (struct invalid_key_element)); + p->lbl1 = loc_label++; + p->lbl2 = loc_label++; + p->lbl3 = loc_label++; + gen_jmplabel(p->lbl1); + gen_dstlabel(p->lbl2); + return p; +} + +struct invalid_key_element * +gen_after_invalid_key(struct invalid_key_element *p) +{ + gen_jmplabel(p->lbl3); + return p; +} + +struct invalid_keys * +gen_invalid_keys(struct invalid_key_element *p1, struct invalid_key_element *p2) +{ + struct invalid_keys *p = malloc(sizeof (struct invalid_keys)); + p->invalid_key = p1; + p->not_invalid_key = p2; + if (p1) gen_dstlabel(p1->lbl1); + if (p2) gen_dstlabel(p2->lbl1); + return p; +} + +/******** functions to generate math verbs ***********/ + +void +gen_add(struct sym *s1, struct sym *s2, int rnd) +{ + push_immed(rnd); + gen_loadvar(s2); + gen_loadvar(s1); + asm_call("tcob_add"); +} + +void +gen_subtract(struct sym *s1, struct sym *s2, int rnd) +{ + push_immed(rnd); + gen_loadvar(s2); + gen_loadvar(s1); + asm_call("tcob_subtract"); +} + +void +gen_multiply(struct sym *s1, struct sym *s2, struct sym *s3, int rnd) +{ + push_immed(rnd); + gen_loadvar(s3); + gen_loadvar(s2); + gen_loadvar(s1); + asm_call("tcob_multiply"); +} + +void +gen_compute1(struct math_var *vl1, struct sym *sy1) +{ + push_expr(sy1); + while (vl1->next != NULL) + { + assign_expr(vl1->sname, vl1->opts, '0'); + vl1 = vl1->next; + } + assign_expr(vl1->sname, vl1->opts, '1'); + +} + +void +gen_compute2(struct math_var *vl1, struct sym *sy1, struct math_ose *v1) +{ + /* option flags: 1=rounded, 2=on_size_error */ + int opts; + opts = vl1->opts | MATH_OPT_ON_SIZE_ERROR; + + gen_dstlabel(v1->lbl4); /* generate bypass jump label */ + push_expr(sy1); + while (vl1->next != NULL) + { + assign_expr(vl1->sname, opts, '0'); + math_on_size_error3(v1); + vl1 = vl1->next; + } + assign_expr(vl1->sname, opts, '1'); + math_on_size_error3(v1); + math_on_size_error5(v1); +} + +void +gen_add1(struct math_var *vl0, struct math_var *vl2, struct math_ose *v1) +{ + struct math_var *vl1; + /* option flags: 1=rounded, 2=on_size_error */ + int opts; + + /* ON SIZE ERROR option only */ + if (v1 != NULL) + { + /* generate bypass jump label */ + gen_dstlabel(v1->lbl4); + } + while (vl2 != NULL) + { + push_expr(vl2->sname); + vl1 = vl0; + while (vl1 != NULL) + { + push_expr(vl1->sname); + add_expr(); + vl1 = vl1->next; + } + if (v1 != NULL) + { + opts = vl2->opts | MATH_OPT_ON_SIZE_ERROR; + } + else + { + opts = vl2->opts; + } + assign_expr(vl2->sname, opts, '1'); + /* ON SIZE ERROR option only */ + math_on_size_error3(v1); + vl2 = vl2->next; + } + math_on_size_error5(v1); + +} + +void +gen_add2(struct math_var *vl1, struct math_var *vl2, struct sym *sy1, struct math_ose *v1) +{ + int i = 0; + /* option flags: 1=rounded, 2=on_size_error */ + int opts; + + /* ON SIZE ERROR option only */ + if (v1 != NULL) + { + /* generate bypass jump label */ + gen_dstlabel(v1->lbl4); /* generate bypass jump label */ + } + if (sy1 != NULL) + { + push_expr(sy1); + while (vl1 != NULL) + { + push_expr(vl1->sname); + add_expr(); + vl1 = vl1->next; + } + } + else + { + push_expr(vl1->sname); + vl1 = vl1->next; + i = 1; + while (vl1 != NULL) + { + push_expr(vl1->sname); + add_expr(); + vl1 = vl1->next; + i++; + } + if (i < 2) + { + yyerror("At least 2 variables and/or numeric literals required in ADD statement"); + } + } + while (vl2->next != NULL) + { + if (v1 != NULL) + { + opts = vl2->opts | MATH_OPT_ON_SIZE_ERROR; + } + else + { + opts = vl2->opts; + } + assign_expr(vl2->sname, opts, '0'); + /* ON SIZE ERROR option only */ + math_on_size_error3(v1); + vl2 = vl2->next; + } + if (v1 != NULL) + { + opts = vl2->opts | MATH_OPT_ON_SIZE_ERROR; + } + else + { + opts = vl2->opts; + } + assign_expr(vl2->sname, opts, '1'); + /* ON SIZE ERROR option only */ + math_on_size_error3(v1); + math_on_size_error5(v1); +} + +void +gen_add3(struct math_var *vl0, struct math_var *vl2, struct math_ose *v1) +{ + struct math_var *vl1; + /* option flags: 1=rounded, 2=on_size_error */ + int opts; + + while (vl2 != NULL) + { + push_expr(vl2->sname); + vl1 = vl0; + while (vl1 != NULL) + { + push_expr(vl1->sname); + add_expr(); + vl1 = vl1->next; + } + if (v1 != NULL) + { + opts = vl2->opts | MATH_OPT_ON_SIZE_ERROR; + } + else + { + opts = vl2->opts; + } + assign_expr(vl2->sname, opts, '1'); + /* ON SIZE ERROR option only */ + math_on_size_error3(v1); + vl2 = vl2->next; + } + +} + +void +gen_subtract1(struct math_var *vl0, struct math_var *vl2, struct math_ose *v1) +{ + struct math_var *vl1; + /* option flags: 1=rounded, 2=on_size_error */ + int opts; + + /* ON SIZE ERROR option only */ + if (v1 != NULL) + { + /* generate bypass jump label */ + gen_dstlabel(v1->lbl4); + } + while (vl2 != NULL) + { + push_expr(vl2->sname); + vl1 = vl0; + while (vl1 != NULL) + { + push_expr(vl1->sname); + subtract_expr(); + vl1 = vl1->next; + } + if (v1 != NULL) + { + opts = vl2->opts | MATH_OPT_ON_SIZE_ERROR; + } + else + { + opts = vl2->opts; + } + assign_expr(vl2->sname, opts, '1'); + /* ON SIZE ERROR option only */ + math_on_size_error3(v1); + vl2 = vl2->next; + } + math_on_size_error5(v1); +} + +void +gen_subtract2(struct math_var *vl1, struct math_var *vl2, struct sym *sy1, struct math_ose *v1) +{ + /* option flags: 1=rounded, 2=on_size_error */ + int opts; + + /* ON SIZE ERROR option only */ + if (v1 != NULL) + { + /* generate bypass jump label */ + gen_dstlabel(v1->lbl4); + } + push_expr(sy1); + while (vl1 != NULL) + { + push_expr(vl1->sname); + subtract_expr(); + vl1 = vl1->next; + } + while (vl2->next != NULL) + { + if (v1 != NULL) + { + opts = vl2->opts | MATH_OPT_ON_SIZE_ERROR; + } + else + { + opts = vl2->opts; + } + assign_expr(vl2->sname, opts, '0'); + /* ON SIZE ERROR option only */ + math_on_size_error3(v1); + vl2 = vl2->next; + } + if (v1 != NULL) + { + opts = vl2->opts | MATH_OPT_ON_SIZE_ERROR; + } + else + { + opts = vl2->opts; + } + assign_expr(vl2->sname, opts, '1'); + /* ON SIZE ERROR option only */ + math_on_size_error3(v1); + math_on_size_error5(v1); +} + +void +gen_subtract3(struct math_var *vl0, struct math_var *vl2, struct math_ose *v1) +{ + struct math_var *vl1; + /* option flags: 1=rounded, 2=on_size_error */ + int opts; + + while (vl2 != NULL) + { + push_expr(vl2->sname); + vl1 = vl0; + while (vl1 != NULL) + { + push_expr(vl1->sname); + subtract_expr(); + vl1 = vl1->next; + } + if (v1 != NULL) + { + opts = vl2->opts | MATH_OPT_ON_SIZE_ERROR; + } + else + { + opts = vl2->opts; + } + assign_expr(vl2->sname, opts, '1'); + /* ON SIZE ERROR option only */ + math_on_size_error3(v1); + vl2 = vl2->next; + } +} + +void +gen_multiply1(struct math_var *vl1, struct sym *sy1, struct math_ose *v1) +{ + /* option flags: 1=rounded, 2=on_size_error */ + int opts; + + /* ON SIZE ERROR option only */ + if (v1 != NULL) + { + /* generate bypass jump */ + gen_dstlabel(v1->lbl4); + } + while (vl1->next != NULL) + { + push_expr(sy1); + push_expr(vl1->sname); + multiply_expr(); + if (v1 != NULL) + { + opts = vl1->opts | MATH_OPT_ON_SIZE_ERROR; + } + else + { + opts = vl1->opts; + } + assign_expr(vl1->sname, opts, '1'); + /* ON SIZE ERROR option only */ + math_on_size_error3(v1); + vl1 = vl1->next; + } + push_expr(sy1); + push_expr(vl1->sname); + multiply_expr(); + if (v1 != NULL) + { + opts = vl1->opts | MATH_OPT_ON_SIZE_ERROR; + } + else + { + opts = vl1->opts; + } + assign_expr(vl1->sname, opts, '1'); + /* ON SIZE ERROR option only */ + math_on_size_error3(v1); + math_on_size_error5(v1); +} + +void +gen_multiply2(struct math_var *vl1, struct sym *sy1, struct sym *sy2, struct math_ose *v1) +{ + /* option flags: 1=rounded, 2=on_size_error */ + int opts; + + /* ON SIZE ERROR option only */ + if (v1 != NULL) + { + /* generate bypass jump label */ + gen_dstlabel(v1->lbl4); + } + push_expr(sy1); + push_expr(sy2); + multiply_expr(); + while (vl1->next != NULL) + { + if (v1 != NULL) + { + opts = vl1->opts | MATH_OPT_ON_SIZE_ERROR; + } + else + { + opts = vl1->opts; + } + assign_expr(vl1->sname, opts, '0'); + /* ON SIZE ERROR option only */ + math_on_size_error3(v1); + vl1 = vl1->next; + } + if (v1 != NULL) + { + opts = vl1->opts | MATH_OPT_ON_SIZE_ERROR; + } + else + { + opts = vl1->opts; + } + assign_expr(vl1->sname, opts, '1'); + /* ON SIZE ERROR option only */ + math_on_size_error3(v1); + math_on_size_error5(v1); +} + +void +gen_divide1(struct math_var *vl1, struct sym *sy1, struct math_ose *v1) +{ + /* option flags: 1=rounded, 2=on_size_error */ + int opts; + + /* ON SIZE ERROR option only */ + if (v1 != NULL) + { + /* generate bypass jump */ + gen_dstlabel(v1->lbl4); + } + while (vl1 != NULL) + { + push_expr(vl1->sname); + push_expr(sy1); + divide_expr(); + if (v1 != NULL) + { + opts = vl1->opts | MATH_OPT_ON_SIZE_ERROR; + } + else + { + opts = vl1->opts; + } + assign_expr(vl1->sname, opts, '1'); + /* ON SIZE ERROR option only */ + math_on_size_error3(v1); + vl1 = vl1->next; + } + math_on_size_error5(v1); +} + +void +gen_divide2(struct math_var *vl1, struct sym *sy1, struct sym *sy2, struct math_ose *v1) +{ + /* option flags: 1=rounded, 2=on_size_error */ + int opts; + + /* ON SIZE ERROR option only */ + if (v1 != NULL) + { + /* generate bypass jump label */ + gen_dstlabel(v1->lbl4); + } + push_expr(sy1); + push_expr(sy2); + divide_expr(); + while (vl1->next != NULL) + { + if (v1 != NULL) + { + opts = vl1->opts | MATH_OPT_ON_SIZE_ERROR; + } + else + { + opts = vl1->opts; + } + assign_expr(vl1->sname, opts, '0'); + /* ON SIZE ERROR option only */ + math_on_size_error3(v1); + vl1 = vl1->next; + } + if (v1 != NULL) + { + opts = vl1->opts | MATH_OPT_ON_SIZE_ERROR; + } + else + { + opts = vl1->opts; + } + assign_expr(vl1->sname, opts, '1'); + /* ON SIZE ERROR option only */ + math_on_size_error3(v1); + math_on_size_error5(v1); +} + +void +gen_divide4(struct sym *s1, struct sym *s2, struct sym *s3, struct sym *s4, int rnd, struct math_ose *v1) +{ + + /* [NOT]ON SIZE ERROR option */ + if (v1 != NULL) + { + /* generate bypass jump */ + gen_dstlabel(v1->lbl4); + } + push_immed(rnd); + gen_loadvar(s4); + gen_loadvar(s3); + gen_loadvar(s2); + gen_loadvar(s1); + asm_call("tcob_divide1"); + math_on_size_error3(v1); + math_on_size_error5(v1); +} + +/******** functions for subscripted var manipulation ***********/ +struct vref * +create_subscripted_var(struct sym * sy, struct vref *subs) +{ + struct vref *ref; + ref = malloc(sizeof (struct vref)); + ref->litflag = 2; + ref->sym = sy; + ref->next = subs; + return ref; +} + +struct vref * +create_subscript(struct sym *sy) +{ + struct vref *ref; + ref = malloc(sizeof (struct vref)); + ref->litflag = ','; /* the end of subscript is here */ + ref->sym = sy; /* this is the actual variable */ + ref->next = NULL; + return ref; +} + +struct vref * +add_subscript_item(struct vref *subs, char op, struct sym *item) +{ + struct vref *ref, *tmp; + ref = malloc(sizeof (struct vref)); + tmp = subs; + while (tmp->next) tmp = tmp->next; + tmp->next = ref; + ref->litflag = ','; + ref->sym = item; + ref->next = NULL; + tmp->litflag = op; + return subs; +} + +struct vref * +add_subscript(struct vref *ref, struct vref *subs) +{ + struct vref *tmp; + tmp = subs; + while (tmp->next) tmp = tmp->next; + tmp->next = ref; + return subs; +} + +int +check_subscripts(struct sym *subs) +{ + struct vref *ref; + struct sym *sy; + sy = ((struct vref *) subs)->sym; + for (ref = (struct vref *) subs; ref; ref = ref->next) + { + +#ifdef DEBUG_COMPILER + fprintf(o_src, "#check_subscripts: symbol: %s, op: '%c'\n", + ((struct sym *) ref->sym)->name, + ref->litflag == 2 ? 2 : ref->litflag); +#endif + + if (ref->litflag == ',') + { + while (sy && !sy->occurs_flg) + { +#ifdef DEBUG_COMPILER + fprintf(o_src, "#check_subscripts: symbol: %s\n", + sy->name); +#endif + sy = sy->parent; + } + if (!sy) + { + hterror(102, 4, "check_subscripts: no parent found"); + return 0; /* excess subscripts, error */ + } + sy = sy->parent; + } + } + while (sy && !sy->occurs_flg) /* any other subscripts needed ? */ + sy = sy->parent; + return (sy == NULL) ? 1 : 0; +} + +void +create_occurs_info(int min, int max, struct sym *depend) +{ + curr_field->occurs = (struct occurs *) malloc(sizeof (struct occurs)); + curr_field->occurs->min = min; + curr_field->occurs->max = max; + curr_field->occurs->depend = depend; + curr_field->times = max; + curr_field->occurs_flg++; +} + +/******** functions for refmoded var manipulation ***********/ +struct refmod * +create_refmoded_var(struct sym * sy, struct sym *syoff, struct sym *sylen) +{ + struct refmod *ref; + ref = malloc(sizeof (struct refmod)); + ref->litflag = 4; + ref->sym = sy; + ref->off = syoff; + ref->len = sylen; + ref->slot = refmod_slots++; + return ref; +} + +int +check_refmods(struct sym *var) +{ + struct refmod *ref = (struct refmod *) var; + struct sym *sy = ref->sym; + + if (sy->litflag == 2) sy = ((struct vref *) sy)->sym; + + return (sy == NULL) ? 1 : 0; +} + +struct sym * +get_variable_item(struct sym *sy) +{ + struct sym *son, *item; + if (sy->litflag != 0) + return NULL; + if (sy->occurs != NULL) + return sy; + for (son = sy->son; son != NULL; son = son->brother) + { + if ((item = get_variable_item(son))) + return item; + } + return NULL; +} + +void +adjust_desc_length(struct sym *sy) +{ + int stack_save = stackframe_cnt; + struct sym *item; + stackframe_cnt = 0; + item = get_variable_item(sy); + /* push_immed(0); */ + gen_temp_storage(sizeof (struct fld_desc)); + gen_loaddesc1(item, 0); + gen_loaddesc1(sy, 0); + push_immed(item->occurs->max); + push_immed(item->occurs->min); + gen_loadvar(item->occurs->depend); + asm_call("tcob_adjust_length"); + stackframe_cnt = stack_save; + need_desc_length_cleanup = 1; +} + +void +gen_loadloc(struct sym *sy_p) +{ + loadloc_to_eax(sy_p); + push_eax(); +} + +void +gen_loaddesc(struct sym *sy) +{ + gen_loaddesc1(sy, 1); +} + +void +gen_loadvar(struct sym *sy) +{ + struct sym *var; + if (sy == NULL) + { + push_immed(0); + } + else + { + var = sy; + if (var->litflag == 2 || var->litflag == 4) + { + var = ((struct vref *) var)->sym; + if (var->litflag == 2) + var = ((struct vref *) var)->sym; + } + if (!HTG_libcob) + gen_loadloc(sy); + gen_loaddesc(sy); + } +} + +int +is_numeric_sy(struct sym *sy) +{ + char type; + if (sy->litflag == 2) + { /* subscripted ? */ + sy = ((struct vref *) sy)->sym; + } + type = sy->type; + if ((type == DTYPE_DISPLAY) || (type == DTYPE_BININT) + || (type == DTYPE_PACKED) || (type == DTYPE_FLOAT)) + return 1; + return 0; +} + +int +is_numeric_dest_sy(struct sym *sy) +{ + char type; + if (sy->litflag == 2) + { /* subscripted ? */ + sy = ((struct vref *) sy)->sym; + } + type = sy->type; + if ((type == DTYPE_DISPLAY) + || (type == DTYPE_BININT) + || (type == DTYPE_PACKED) + || (type == DTYPE_FLOAT) + || (type == DTYPE_EDITED)) + return 1; + return 0; +} + +void +gen_class_check(struct sym *sy, int class) +{ + int invert = 0; + class &= ~(COND_UNARY | COND_CLASS); + if (class & 4) + { /* was it inverted (NOT) ? */ + class ^= 7; + invert++; + } + if (class == CLASS_NUMERIC) + { + /*if (!sy || is_numeric_sy(sy)) { + */ + if (sy) /* don't save already pushed variable */ + gen_loadvar(sy); + else + stackframe_cnt += 8; + asm_call("tcob_check_numeric"); + fprintf(o_src, "\tand\t%%eax,%%eax\n"); + /*} + else { + yyerror("invalid NUMERIC class check"); + }*/ + } + else + { + /* from now on, only alphabetic tests are allowed */ + /*if (is_numeric_sy(sy)) { + yyerror("invalid ALPHABETIC class check"); + }*/ + gen_loadvar(sy); + switch (class) + { + case CLASS_ALPHABETIC: + asm_call("tcob_check_alphabetic"); + break; + case CLASS_ALPHABETIC_UPPER: + asm_call("tcob_check_upper"); + break; + case CLASS_ALPHABETIC_LOWER: + asm_call("tcob_check_lower"); + break; + default: + yyerror("unknown class condition"); + break; + } + fprintf(o_src, "\tand\t%%eax,%%eax\n"); + } + if (invert) + gen_not(); +} + +void +gen_inspect(struct sym *var, void *list, int operation) +{ + /*struct inspect_before_after *ba,*ba1;*/ + struct tallying_list *tl, *tl1; + struct tallying_for_list *tfl, *tfl1; + struct replacing_list *rl, *rl1; + struct replacing_by_list *rbl, *rbl1; + struct converting_struct *cv; + + if (!operation) + { + if (!list) return; + fprintf(o_src, "# INSPECT TALLYING %s\n", var->name); + gen_loadvar((struct sym *) NULL); + tl = (struct tallying_list *) list; + while (tl) + { + tfl = tl->tflist; + push_immed(0); + while (tfl) + { + gen_loadvar(tfl->before_after->after); + gen_loadvar(tfl->before_after->before); + if (tfl->options != INSPECT_CHARACTERS) + { + gen_loadvar(tfl->forvar); + } + push_immed(tfl->options); + free(tfl->before_after); + tfl1 = tfl; + tfl = tfl->next; + free(tfl1); + } + gen_loadvar(tl->count); + tl1 = tl; + tl = tl->next; + free(tl1); + tl1 = NULL; + } + gen_loadvar(var); + asm_call("tcob_inspect_tallying"); + } + else if (operation == 1) + { + if (!list) return; + fprintf(o_src, "# INSPECT REPLACING %s\n", var->name); + rl = (struct replacing_list *) list; + push_immed(0); + while (rl) + { + if (rl->options == INSPECT_CHARACTERS) + { + gen_loadvar(rl->before_after->after); + gen_loadvar(rl->before_after->before); + gen_loadvar(rl->byvar); + push_immed(rl->options); + } + else + { + rbl = rl->replbylist; + while (rbl) + { + gen_loadvar(rbl->before_after->after); + gen_loadvar(rbl->before_after->before); + gen_loadvar(rbl->byvar); + gen_loadvar(rbl->replvar); + free(rbl->before_after); + rbl1 = rbl; + rbl = rbl->next; + free(rbl1); + push_immed(rl->options); + } + } + rl1 = rl; + rl = rl->next; + free(rl1); + rl1 = NULL; + } + gen_loadvar(var); + asm_call("tcob_inspect_replacing"); + } + else + { + fprintf(o_src, "# INSPECT CONVERTING %s\n", var->name); + cv = (struct converting_struct *) list; + gen_loadvar(cv->before_after->after); + gen_loadvar(cv->before_after->before); + gen_loadvar(cv->tovar); + gen_loadvar(cv->fromvar); + gen_loadvar(var); + asm_call("tcob_inspect_converting"); + } +} + +void +gen_tcob_proto1(struct sym *sy) +{ + gen_loadvar(sy); + asm_call("tcob_proto1"); +} + +void +gen_tcob_proto2(struct sym *sy1, struct sym *sy2) +{ + gen_loadvar(sy2); + gen_loadvar(sy1); + asm_call("tcob_proto2"); +} + +void +gen_moves(struct sym *sy_src, struct gvar_list *gsylst) +{ + struct gvar_list *sy_dst; + + for (sy_dst = gsylst; sy_dst->next != NULL; sy_dst = sy_dst->next) + { + gen_move(sy_src, sy_dst->u.sym); + } + gen_move(sy_src, sy_dst->u.sym); +} + +void +gen_move(struct sym *sy_src, struct sym *sy_dst) +{ + long tmplabel = 0; + struct sym *var; + +#ifdef DEBUG_COMPILER + { + struct sym *esys = sy_src, *esyd = sy_dst; + if (esys->litflag == 4) + esys = ((struct refmod *) esys)->sym; + if (esyd->litflag == 4) + esyd = ((struct refmod *) esyd)->sym; + fprintf(o_src, "# MOVE %s --> ", sch_convert(esys->name)); + fprintf(o_src, " %s\n", sch_convert(esyd->name)); + } +#endif + /* Make sure BLANK test is done on a sym struct, and not a vref struct */ + var = sy_dst; + if (var->litflag == 2 || var->litflag == 4) + { + var = ((struct vref *) var)->sym; + if (var->litflag == 2) + var = ((struct vref *) var)->sym; + } + /* A blank when zero field is treated here instead of the RTS */ + if (var->flags.blank) + { + tmplabel = loc_label++; + gen_compare(sy_src, EQUAL, (struct sym *) spe_lit_ZE); + fprintf(o_src, "\tjnz\t.L%ld\n", tmplabel); + gen_loadvar(sy_dst); + gen_loadvar((struct sym *) spe_lit_SP); + asm_call("tcob_move_x_x"); + gen_jmplabel(tmplabel + 1); + fprintf(o_src, ".L%ld:\n", tmplabel); + } + /* default move */ + gen_loadvar(sy_dst); + gen_loadvar(sy_src); + /* an initial value of a literal X field into an numeric edited field + should move straight instead of going thru an edition */ + /* if (sy_src->type == DTYPE_ALPHANUMERIC && sy_dst->type == DTYPE_EDITED) { + asm_call("tcob_move_x_x"); + } + else { */ + RTL_CALL("move"); + /* } */ +#ifdef TODO + if (sy_src->type == DTYPE_ALPHANUMERIC && sy_dst->type == DTYPE_EDITED) + { + asm_call("tcob_move_x_x"); + } + else + { + asm_call("tcob_move"); + } +#endif + if (tmplabel) + { + tmplabel = loc_label++; + fprintf(o_src, ".L%ld:\n", tmplabel); + } +} + +void +gen_movelength(struct sym *sy1, struct sym *sy2) +{ + if (sy1->litflag == 1) + { + push_immed(((struct lit *) sy1)->len); + } + else + { + push_immed(sy1->len); + } + gen_loadvar(sy2); + asm_call("tcob_assign_int"); +} + +void +gen_move_init(struct sym *sy_src, struct sym *sy_dst) +{ +#ifdef DEBUG_COMPILER + { + struct sym *esys = sy_src, *esyd = sy_dst; + fprintf(o_src, "# MOVE_INIT %s --> ", sch_convert(esys->name)); + fprintf(o_src, " %s\n", sch_convert(esyd->name)); + } +#endif + /* default move */ + gen_loadvar(sy_dst); + gen_loadvar(sy_src); + /* an initial value of a literal X field into an numeric edited field + should move straight instead of going thru an edition */ + if (sy_src->type == DTYPE_ALPHANUMERIC && sy_dst->type == DTYPE_EDITED) + { + asm_call("tcob_move_x_x"); + } + else + { + RTL_CALL("move"); + } +} + +void +gen_movecorr(struct sym *sy1, struct sym *sy2) +{ + struct sym *t1, *t2; + if (sy1->litflag || sy2->litflag) + { + yyerror("sorry we don't handle this case yet!"); + return; + } +#ifdef DEBUG_COMPILER + fprintf(o_src, "# MOVE CORR %s --> %s\n", sy1->name, sy2->name); +#endif + t1 = sy1->son; + /* repeat for all sons of sy1 */ + while (t1 != NULL) + { + if (!t1->redefines && t1->times == 1) + { + t2 = sy2->son; + /* repeat for all sons of sy2 */ + while (t2 != NULL) + { + if (!t2->redefines && t2->times == 1) + { + if (strcmp(t1->name, t2->name) == 0) + { + if ((t1->type != DTYPE_GROUP) + || (t2->type != DTYPE_GROUP)) + { + gen_move(t1, t2); + } + else + { + gen_movecorr(t1, t2); + } + } + } + t2 = t2->brother; + } + } + t1 = t1->brother; + } +} + +struct sym * +define_label(struct sym *lab, int lab_type, + struct sym *parent, int parent_type) +{ + + struct sym *tlab = lab; + struct lit *tlit; + struct sym *tparent; + + if (parent == NULL) + { + tparent = curr_section; + } + else + { + tparent = parent; + } + if (lab_type == 1) + { + tlit = (struct lit *) lab; + tlab = install(tlit->name, SYTB_LAB, 0); + } + else + { + tlab = lab; + } + + if (tlab->defined == 0) + { + tlab->defined = 2; + tlab->parent = tparent; + } + else + { + if (parent_type == 1) + { + tlit = (struct lit *) parent; + tlab = install(tlit->name, SYTB_LAB, 0); + } + if ((tlab = lookup_label(tlab, tparent)) == NULL) + { + tlab = install(tlab->name, SYTB_LAB, 2); + tlab->defined = 2; + tlab->parent = tparent; + } + } + return tlab; +} + +void +gen_addcorr(struct sym *sy1, struct sym *sy2, int rnd) +{ + struct sym *t1, *t2; + if (sy1->litflag || sy2->litflag) + { + yyerror("sorry we don't handle this case yet!"); + } +#ifdef DEBUG_COMPILER + fprintf(o_src, "# ADD CORR %s --> %s\n", sy1->name, sy2->name); +#endif + t1 = sy1->son; + /* repeat for all sons of sy1 */ + while (t1 != NULL) + { + if (!t1->redefines && t1->times == 1) + { + t2 = sy2->son; + /* repeat for all sons of sy2 */ + while (t2 != NULL) + { + if (!t2->redefines && t2->times == 1) + { + if (strcmp(t1->name, t2->name) == 0) + { + if ((t1->type != DTYPE_GROUP) + && (t2->type != DTYPE_GROUP)) + { + gen_add(t1, t2, rnd); + } + else + { + gen_addcorr(t1, t2, rnd); + } + } + } + t2 = t2->brother; + } + } + t1 = t1->brother; + } +} + +void +gen_addcorr1(struct math_var *mv1, struct math_var *mv2, int rnd, struct math_ose + *v1) +{ + struct sym *sy1, *sy2; + struct sym *t1, *t2; + struct math_var *tmv1, *tmv2; + static int addcorr_level = 0; + + if (mv1->sname->litflag || mv2->sname->litflag) + { + yyerror("sorry we don't handle this case yet!"); + } +#ifdef DEBUG_COMPILER + fprintf(o_src, "# ADD CORR %s --> %s, lv %d\n", + mv1->sname->name, mv2->sname->name, addcorr_level); +#endif + /* ON SIZE ERROR option only */ + if (addcorr_level == 0 && v1 != NULL) + { + /* generate bypass jump label */ + gen_dstlabel(v1->lbl4); + } + addcorr_level++; + sy1 = mv1->sname; + sy2 = mv2->sname; + t1 = sy1->son; + /* repeat for all sons of sy1 */ + while (t1 != NULL) + { + if (!t1->redefines && t1->times == 1) + { + t2 = sy2->son; + /* repeat for all sons of sy2 */ + while (t2 != NULL) + { + if (!t2->redefines && t2->times == 1) + { + if (strcmp(t1->name, t2->name) == 0) + { + tmv1 = create_mathvar_info(NULL, t1, 0); + tmv2 = create_mathvar_info(NULL, t2, 0); + if ((t1->type != DTYPE_GROUP) + && (t2->type != DTYPE_GROUP)) + { + gen_add3(tmv1, tmv2, v1); + } + else + { + gen_addcorr1(tmv1, tmv2, rnd, v1); + } + delete_mathvar_info(tmv1); + delete_mathvar_info(tmv2); + } + } + t2 = t2->brother; + } + } + t1 = t1->brother; + } + addcorr_level--; + if (addcorr_level == 0) + { + math_on_size_error5(v1); + } + +} + +void +gen_subtractcorr(struct sym *sy1, struct sym *sy2, int rnd) +{ + struct sym *t1, *t2; + if (sy1->litflag || sy2->litflag) + { + yyerror("sorry we don't handle this case yet!"); + } +#ifdef DEBUG_COMPILER + fprintf(o_src, "# SUB CORR %s --> %s\n", sy1->name, sy2->name); +#endif + t1 = sy1->son; + /* repeat for all sons of sy1 */ + while (t1 != NULL) + { + if (!t1->redefines && t1->times == 1) + { + t2 = sy2->son; + /* repeat for all sons of sy2 */ + while (t2 != NULL) + { + if (!t2->redefines && t2->times == 1) + { + if (strcmp(t1->name, t2->name) == 0) + { + if ((t1->type != DTYPE_GROUP) + && (t2->type != DTYPE_GROUP)) + { + gen_subtract(t1, t2, rnd); + } + else + { + gen_subtractcorr(t1, t2, rnd); + } + } + } + t2 = t2->brother; + } + } + t1 = t1->brother; + } +} + +void +gen_subtractcorr1(struct math_var *mv1, struct math_var *mv2, int rnd, + struct math_ose *v1) +{ + struct sym *sy1, *sy2; + struct sym *t1, *t2; + struct math_var *tmv1, *tmv2; + static int subcorr_level = 0; + + if (mv1->sname->litflag || mv2->sname->litflag) + { + yyerror("sorry we don't handle this case yet!"); + } +#ifdef DEBUG_COMPILER + fprintf(o_src, "# SUB CORR %s --> %s, lv %d\n", + mv1->sname->name, mv2->sname->name, subcorr_level); +#endif + /* ON SIZE ERROR option only */ + if (subcorr_level == 0 && v1 != NULL) + { + /* generate bypass jump label */ + gen_dstlabel(v1->lbl4); + } + subcorr_level++; + sy1 = mv1->sname; + sy2 = mv2->sname; + t1 = sy1->son; + /* repeat for all sons of sy1 */ + while (t1 != NULL) + { + if (!t1->redefines && t1->times == 1) + { + t2 = sy2->son; + /* repeat for all sons of sy2 */ + while (t2 != NULL) + { + if (!t2->redefines && t2->times == 1) + { + if (strcmp(t1->name, t2->name) == 0) + { + tmv1 = create_mathvar_info(NULL, t1, 0); + tmv2 = create_mathvar_info(NULL, t2, 0); + if ((t1->type != DTYPE_GROUP) + && (t2->type != DTYPE_GROUP)) + { + gen_subtract3(tmv1, tmv2, v1); + } + else + { + gen_subtractcorr1(tmv1, tmv2, rnd, v1); + delete_mathvar_info(tmv1); + delete_mathvar_info(tmv2); + } + } + } + t2 = t2->brother; + } + } + t1 = t1->brother; + } + subcorr_level--; + if (subcorr_level == 0) + { + math_on_size_error5(v1); + } +} + +void +gen_set_complex(struct sym *idx, int which, struct sym * var) +{ +#ifdef DEBUG_COMPILER + fprintf(o_src, "# set complex %s to %s\n", idx ? idx->name : "(null)", + var ? var->name : "(null)"); +#endif + switch (which) + { + case SET_TO: /* just move this value */ + gen_move(idx, var); + break; + case SET_UP_BY: /* we need to add this value to the index */ + gen_add(idx, (struct sym *) define_num_lit(1), 0); + break; + case SET_DOWN_BY: + gen_subtract(idx, (struct sym *) define_num_lit(1), 0); + break; + default: + yyerror("SET option unavailable"); + } +} + +void +gen_set_list(struct list *idx, int which, struct sym *var, + int adrof_idx, int adrof_var) +{ + struct sym * svar; + + while (idx != NULL) + { + svar = idx->var; + fprintf(o_src, "# SET %s \n", svar->name); + gen_set(idx->var, which, var, adrof_idx, adrof_var); + idx = idx->next; + } + vars_list = NULL; +} + +/******* short-circuit conditional evaluators ********/ +int +gen_evaluate_start() +{ + int i = loc_label++; + fprintf(o_src, "# EVALUATE statement\n"); + return i; +} + +int +subject_set_size(struct selsubject *ssbj) +{ + int size = 0; + while (ssbj != NULL) + { + size++; + ssbj = ssbj->next; + } + return size; +} + +int +selection_object_size(int type) +{ + switch (type) + { + case SOBJ_EXPR: + case SOBJ_NEGEXPR: + return 8; + case SOBJ_RANGE: + case SOBJ_NEGRANGE: + return 16; + default: + return 0; + } +} + +int +selection_subject_type(int level, struct selsubject *ssbj) +{ + while (level--) + { + ssbj = ssbj->next; + } + return ssbj->type; +} + +void +gen_perform(struct sym *sy) +{ + gen_perform_thru(sy, sy); +} + +void +set_usage(struct sym *sy, int usage) +{ + sy->stype = ' '; + switch (usage) + { + case USAGE_COMP1: + sy->len = 4; + sy->decimals = 7; + sy->type = 'U'; + sy->sign = 1; + /* default picture is 14 digits "S9(7)V9(7)" */ + strcpy((char *) picture, "S\x01\x39\x07\x56\x01\x39\x07"); + break; + case USAGE_COMP2: + sy->len = 8; + sy->decimals = 15; + sy->type = 'U'; + sy->sign = 1; + /* default picture is 30 digits "S9(15)V9(15)" */ + strcpy((char *) picture, "S\x01\x39\x0f\x56\x01\x39\x0f"); + break; + case USAGE_COMP3: + sy->type = 'C'; + break; + case USAGE_COMP: + sy->stype = 'B'; + /* field length computed by query_comp_length() */ + sy->len = 0; + sy->type = 'B'; /* binary field */ + break; + case USAGE_COMP5: + sy->stype = '5'; + sy->len = 0; + sy->type = 'B'; /* binary field */ + break; + case USAGE_COMPX: + sy->stype = 'X'; + sy->len = 0; + sy->type = 'B'; /* binary field */ + break; + case USAGE_POINTER: /* POINTER */ + sy->len = 4; + sy->decimals = 0; + sy->type = 'B'; /* pointers are binary fields */ + /* pointer default picture: "9(10)" */ + strcpy((char *) picture, "9\x0a"); + sy->flags.is_pointer = 1; + break; + case USAGE_BINARY_CHAR: + sy->len = 1; + sy->type = 'B'; + break; + case USAGE_BINARY_SHORT: + sy->len = 2; + sy->type = 'B'; + break; + case USAGE_BINARY_LONG: + sy->len = 4; + sy->type = 'B'; + break; + case USAGE_BINARY_DOUBLE: + sy->len = 8; + sy->type = 'B'; + break; + case USAGE_INDEX: + sy->len = 4; + sy->type = 'B'; + sy->decimals = 0; + break; + } +} + +void +gen_picture(void) +{ + if (curr_field->type != DTYPE_GROUP) + { + curr_field->picstr = (char *) malloc(strlen((char *) picture) + 1); + strcpy(curr_field->picstr, (char *) picture); + } +} + +int +save_pic_char(char c, int i) +{ + char c1 = (char) toupper(c); + unsigned int n; + + switch (c1) + { + case 'A': + piccnt += i; + if (curr_field->type != DTYPE_ALPHANUMERIC + && curr_field->type != DTYPE_EDITED) + curr_field->type = DTYPE_ALPHA; + break; + case 'X': + piccnt += i; + if (curr_field->type == DTYPE_DISPLAY) + curr_field->type = DTYPE_ALPHANUMERIC; + break; + case 'Z': + curr_field->type = DTYPE_EDITED; + case '9': + piccnt += i; + if (v_flag) decimals += i; + n_flag = 1; + break; + case 'V': + if (v_flag) + yyerror("invalid picture: V already given"); + v_flag = 1; + break; + case 'P': + piccnt += i; + if (!n_flag) + v_flag = 1; /* implicit V just before the first P */ + if (v_flag) + { + decimals += i; + pscale += i; + } + else + pscale -= i; + break; + case 'S': + sign = 1; + break; + case '.': + case ',': + case '0': + case 'B': + case '/': + case '+': + case '-': + case '*': + case 'C': + case 'R': + case 'D': + curr_field->type = DTYPE_EDITED; + piccnt += i; + break; + default: + if (c1 == currency_symbol) + { + curr_field->type = DTYPE_EDITED; + piccnt += i; + break; + } + else + return 0; + } /* switch(c1) */ + + if (picture[picix] == 0) + { /* first char in PIC string? */ + picture[picix] = c1; + picture[picix + 1] = 0; + } + if (((char) picture[picix] != c1) || (picture[picix + 1] == 255)) + { + picix += 2; + picture[picix] = c1; + picture[picix + 1] = 0; + } + for (n = i + picture[picix + 1]; n > 255; n -= 255) + { + picture[picix + 1] = 255; + picture[picix + 2] = picture[picix]; + picix += 2; + } + picture[picix + 1] = n; + + return 1; +} + +void +define_special_fields() +{ + + struct sym *sy, *tmp; + struct lit *ly; + + sy = install(SVAR_RETURN_CODE, SYTB_VAR, 0); + spe_lit_SP = save_special_literal(' ', 'X', "%SPACES%"); + spe_lit_LV = save_special_literal('\0', 'X', "%LOW-VALUES%"); + spe_lit_HV = save_special_literal('\xff', 'X', "%HIGH-VALUES%"); + spe_lit_ZE = save_special_literal('0', '9', "%ZEROS%"); + spe_lit_QU = save_special_literal('"', 'X', "%QUOTES%"); + spe_lit_SP->all = 1; + spe_lit_LV->all = 1; + spe_lit_HV->all = 1; + spe_lit_ZE->all = 1; + spe_lit_QU->all = 1; + + ly = spe_lit_ZE; + + /* sy->len=5; */ + sy->len = 4; + sy->decimals = 0; + sy->pscale = 0; + sy->level = 1; + sy->defined = 1; + sy->type = DTYPE_BININT; /* assume numeric "usage is comp" item */ + sy->redefines = NULL; + sy->linkage_flg = at_linkage; + sy->sec_no = SEC_RETURN_CODE; + sy->times = 1; + sy->occurs_flg = 0; + sy->flags.just_r = 0; + sy->flags.separate_sign = 0; + sy->flags.leading_sign = 0; + sy->flags.blank = 0; + sy->flags.value = 1; + sy->son = sy->brother = NULL; + picture[0] = 'S'; + picture[1] = 1; + picture[2] = '9'; + picture[3] = 6; + picture[4] = 0; + tmp = curr_field; + curr_field = sy; + + curr_field->value = ly; + curr_field->value2 = ly; + + update_field(curr_field); + close_fields(); + curr_field = tmp; + + tmp = NULL; + ly = NULL; + +} + +/* + * Define a temp field of the desired type and desired lenght + */ +struct sym * +define_temp_field(char desired_type, int desired_len) +{ + struct sym *sy, *tmp; + /* fprintf(stderr,"begin define temp %c\n",desired_type); */ +#ifdef DEBUG_COMPILER + fprintf(o_src, "#define_temp_field:%c,%d,SO:%d\n", + desired_type, desired_len, stack_offset); +#endif + sy = malloc(sizeof (struct sym)); + memset(sy, 0, sizeof (struct sym)); + sy->litflag = 0; + sy->name = "%noname%"; + sy->len = desired_len; + sy->decimals = 0; /* suppose no decimals yet */ + sy->pscale = 0; + sy->level = 1; + sy->type = desired_type; + sy->redefines = NULL; + sy->parent = NULL; + sy->linkage_flg = 0; + sy->sec_no = SEC_DATA; /* not optimal; should be in stack */ + /* sy->sec_no=SEC_STACK; */ + sy->times = 1; + sy->occurs_flg = 0; + sy->occurs = NULL; + sy->flags.just_r = 0; + sy->flags.separate_sign = 0; + sy->flags.leading_sign = 0; + sy->flags.blank = 0; + sy->son = sy->brother = NULL; + switch (desired_type) + { + case DTYPE_ALPHANUMERIC: + picture[0] = 'X'; + picture[1] = (char) sy->len; /* this make the max 255 */ + picture[2] = 0; + break; + case DTYPE_BININT: /* Make it signed */ + picture[0] = 'S'; + picture[1] = 1; + picture[2] = '9'; + picture[3] = 9; + picture[4] = 0; + break; + default: + picture[0] = '9'; + picture[1] = (char) sy->len; /* this make the max 255 */ + picture[2] = 0; + break; + } + tmp = curr_field; + curr_field = sy; + + piccnt = sy->len; + update_field(curr_field); + close_fields(); + curr_field = tmp; + tmp = NULL; + + /* fprintf(stderr,"end define_temp_field: %c\n",desired_type); */ + return sy; +} + +int +define_implicit_field(struct sym *sy, struct sym *sykey, int idxlen) +{ + int i = 1, /*m=0, d,*/ r = 0; + struct sym *tmp = NULL; + char tmp_picture[3]; + struct index_to_table_list *i2t; + + /* Fix me: + * This is a fix to ensure that indexes are defined as int (4 bytes) + * For some reason if defined otherwise (1, 2 bytes) the search all + * will not work. + */ + +#if 0 + for (i = 1; i < idxlen; i = i * 10) + { + m++; + } + d = idxlen; + while (d != 0) + { + m++; + i = i * 10; + d = idxlen / i; + } +#endif + + /* Fix me: + * This is a fix to ensure that indexes are defined as int (4 bytes) + */ + /* sy->len=m; */ + sy->len = 4; + + sy->decimals = 0; /* suppose no decimals yet */ + sy->pscale = 0; + sy->level = 1; + sy->type = DTYPE_BININT; /* assume numeric "usage is comp" item */ + sy->redefines = NULL; + sy->linkage_flg = 0; /* should not go in the linkage section, never! */ + /* sy->sec_no=SEC_STACK; */ + sy->sec_no = default_sec_no; + sy->times = 1; + sy->occurs_flg = 0; + sy->son = sy->brother = NULL; + sy->flags.is_pointer = 0; + sy->flags.blank = 0; + + memcpy(tmp_picture, picture, 3); + picture[0] = '9'; + + /* Fix me: + * This is a fix to ensure that indexes are defined as int (4 bytes) + */ + /* picture[1] = (char)m; */ + picture[1] = (char) 8; + picture[2] = 0; + tmp = curr_field; + curr_field = sy; + update_field(curr_field); + close_fields(); + curr_field = tmp; + memcpy(picture, tmp_picture, 3); + tmp = NULL; + + i2t = malloc(sizeof (struct index_to_table_list)); + if (i2t == NULL) + { + return 0; + } + i2t->next = NULL; + + i = strlen(sy->name); + i2t->idxname = malloc(i + 1); + if (i2t->idxname == NULL) + { + free(i2t); + i2t = NULL; + return 0; + } + strcpy(i2t->idxname, sy->name); + + i = strlen(curr_field->name); + i2t->tablename = malloc(i + 1); + if (i2t->tablename == NULL) + { + free(i2t->idxname); + free(i2t); + i2t = NULL; + return 0; + } + strcpy(i2t->tablename, curr_field->name); + + i2t->seq = '0'; /* no sort sequence is yet defined for the table */ + i2t->keyname = NULL; + if (sykey != NULL) + { + + if (sykey->level == -1) + { + i2t->seq = '1'; + } + + if (sykey->level == -2) + { + i2t->seq = '2'; + } + + i = strlen(sykey->name); + i2t->keyname = malloc(i + 1); + if (i2t->keyname == NULL) + { + free(i2t->idxname); + free(i2t->tablename); + free(i2t); + return 0; + } + strcpy(i2t->keyname, sykey->name); + } + + if (index2table == NULL) + { + index2table = i2t; + } + else + { + i2t->next = index2table; + index2table = i2t; + } + +#ifdef DEBUG_COMPILER + fprintf(o_src, "#trace (define_implicit_field): index '%s' table '%s' tablekey '%s' sequence '%c'\n", + i2t->idxname, + i2t->tablename, + i2t->keyname, + i2t->seq + ); +#endif + + i2t = NULL; + + return r; +} + +struct sym* +determine_table_index_name(struct sym *sy) +{ + struct sym *rsy = NULL; + struct index_to_table_list *i2t; + + i2t = index2table; + while (i2t != NULL) + { + if (strcmp(i2t->tablename, sy->name) == 0) + { + rsy = lookup(i2t->idxname, SYTB_VAR); + i2t = NULL; + } + else + { + i2t = i2t->next; + } + } + +#ifdef DEBUG_COMPILER + if (rsy == NULL) + { + fprintf(o_src, "#trace (determine_table_index_name): table name '%s' index name '(NULL)'\n", + sy->name + ); + } + else + { + fprintf(stderr, "trace (determine_table_index_name): table name '%s' index name '%s'\n", + sy->name, + rsy->name + ); + } +#endif + return rsy; +} + +/* walter + verify if the variable is in the occurs */ +int +in_occurs(struct sym *syfield) +{ + struct sym *sy; + + sy = syfield; + while (sy && sy->occurs_flg == 0) + { + sy = sy->parent; + } + if (!sy) return 0; + return 1; +} + +void +define_field(int level, struct sym *sy) +{ + struct sym *tmp; + struct sym *tmp1 = sy; + struct sym *tmp2; + + if (sy == NULL) + { + sy = malloc(sizeof (struct sym)); + sy->name = "%noname%"; + } + if (level == 88) + { + sy->type = '8'; + sy->defined = 1; + sy->len = 0; + sy->decimals = 0; + sy->pscale = 0; + sy->level = level; + sy->linkage_flg = at_linkage; + sy->sec_no = 0; + sy->times = 1; + sy->occurs_flg = 0; + sy->flags.just_r = 0; + sy->flags.separate_sign = 0; + sy->flags.leading_sign = 0; + sy->flags.blank = 0; + sy->son = sy->brother = NULL; + if (curr_field->level == 88) + { + curr_field->brother = sy; + sy->parent = curr_field->parent; + } + else + sy->parent = curr_field; + curr_field = sy; + check_fields(sy); + return; + } + if (level == 1 || level == 77 || level == 66) + curr_sec_no = default_sec_no; + sy->len = 0; + sy->decimals = 0; /* suppose no decimals yet */ + sy->pscale = 0; + sy->level = level; + sy->redefines = NULL; + sy->linkage_flg = at_linkage; + sy->sec_no = (at_linkage ? SEC_ARGS : curr_sec_no); + sy->times = 1; + sy->occurs_flg = 0; + sy->flags.just_r = 0; + sy->flags.blank = 0; + sy->son = sy->brother = NULL; + sy->picstr = NULL; + + /* Determine location in hierarchy */ + tmp = curr_field; + if (tmp && ((level == 1) || (level == 77) || (level == 66))) + close_fields(); + if (!tmp && (level > 1) && (level < 49)) + { + yyerror("data field hierarchy broken"); + } + if (level != 77 && level != 66) + { + while (tmp != NULL && tmp->level > level) + { + tmp1 = tmp; + tmp = tmp->parent; + } + if (tmp == NULL) + sy->parent = NULL; + else if (tmp->level < level) + { + sy->parent = tmp; + if (tmp->son == NULL) + tmp->son = sy; + /*else + yyerror("malformed data hierarchy");*/ + else + { + tmp1->brother = sy; + sy->parent = tmp; + sy->level = tmp1->level; + } + } + else + { + tmp->brother = sy; + sy->parent = tmp->parent; + } + } + + /* is it already defined ? */ + if ((tmp2 = lookup(sy->name, SYTB_VAR)) != NULL) + { + if (tmp2 != sy && tmp2->parent == NULL && sy->parent == NULL) + yyerror("Variable %s already defined", tmp2->name); + } + + /* Set initial values of inheritable fields */ + if (sy->parent) + { + struct sym *syp = sy->parent; + sy->type = syp->type; + sy->flags.separate_sign = syp->flags.separate_sign; + sy->flags.leading_sign = syp->flags.leading_sign; + } + else + { + sy->type = DTYPE_DISPLAY; + sy->flags.separate_sign = 0; + sy->flags.leading_sign = 0; + } + + curr_field = sy; +} + +void +update_renames_field(struct sym *sy1, struct sym *sy2) +{ + struct sym *sy = curr_field; + + sy->son = NULL; + sy->parent = sy1->parent; + sy->redefines = sy1; + if (sy2 == NULL) + { + sy->type = sy1->type; + sy->location = sy1->location; + sy->len = sy1->len; + if (sy1->type == DTYPE_GROUP) + { + sy->pic = 0; + sy->descriptor = literal_offset; + literal_offset += FLD_DESC_SIZE0; + } + else + { + /* We should really reuse the original descriptor */ + /* sy->descriptor = sy1->descriptor; */ + sy->picstr = sy1->picstr; + sy->descriptor = literal_offset; + literal_offset += FLD_DESC_SIZE1; + sy->pic = literal_offset; + literal_offset += (strlen(sy1->picstr) + 1); + } + } + else + { + sy->type = DTYPE_GROUP; + sy->location = sy1->location; + sy->len = sy2->location - sy1->location + sy2->len; + sy->pic = 0; + sy->descriptor = literal_offset; + literal_offset += FLD_DESC_SIZE0; + } + save_field_in_list(sy); + curr_field = NULL; /* so that close_fields won't be invoked */ +} + +struct sym * +alloc_filler(void) +{ + char s[15]; + struct sym *sy; + sprintf(s, "FIL$%05d", filler_num++); + sy = install(s, SYTB_VAR, 0); + sy->defined = 1; + return sy; +} + +struct selsubject * +save_sel_subject(int type, struct selsubject *ssubj, struct sym *sy) +{ + struct selsubject *tmp = malloc(sizeof (struct selsubject)); + struct selsubject *tmp1; + tmp->type = type; + tmp->var = sy; + tmp->next = NULL; + if (ssubj != NULL) + { + tmp1 = ssubj; + while (tmp1->next) + tmp1 = tmp1->next; + tmp1->next = tmp; + return ssubj; + } + return tmp; +} + +void +compute_subject_set_size(struct selsubject *ssbj) +{ + int stack_adjust = 0; + while (ssbj != NULL) + { + if (ssbj->type == SSUBJ_EXPR) + { + stack_adjust += 8; + } + else if (ssbj->type == SSUBJ_COND) + { + stack_adjust += 4; + } + ssbj = ssbj->next; + } + inner_stack_size += stack_adjust; +} + +void +release_sel_subject(int label, struct selsubject *ssbj) +{ + struct selsubject *tmp; + int stack_adjust = 0; + fprintf(o_src, ".L%d:\t# EVALUATE end\n", label); + while (ssbj != NULL) + { + if (ssbj->type == SSUBJ_EXPR) + { + stack_adjust += 8; + } + else if (ssbj->type == SSUBJ_COND) + { + stack_adjust += 4; + } + tmp = ssbj; + ssbj = ssbj->next; + free(tmp); + } + if (stack_adjust) + fprintf(o_src, "\taddl\t$%d, %%esp\n", stack_adjust); + /* we're leaving this level of stack frame */ + inner_stack_size -= stack_adjust; +} + +int +check_fields(struct sym *sy) +{ + struct sym *tmp; +// int len; + int elen; + char *p; /* walter */ + int sylen, i, isd; /* walter */ + + /* Only fields that are signed, class numeric, and usage DISPLAY may + * leave the sign flags on. */ + if ((sy->type != DTYPE_DISPLAY) || (sy->picstr[0] != 'S')) + { + sy->flags.separate_sign = 0; + sy->flags.leading_sign = 0; + } + /* Recursively check children */ + if (sy->son != NULL) + { +// len = 0; + for (tmp = sy->son; tmp != NULL; tmp = tmp->brother) + { + check_fields(tmp); + } + } + /* + These tests are done in YACC + + if (sy->type == DTYPE_DISPLAY && sy->len > 18) { + yyerror("Maximum elementary numeric item size of %s > 18 digits exceeded", sy->name); + } + if (sy->type == DTYPE_ALPHANUMERIC && sy->len > 12750) + yyerror("Maximum elementary alphanumeric item size of %s > 12750 exceeded", sy->name); + */ + if (sy->level == 88) + { + if (sy->parent->len == 0) + yyerror("Parent variable of 88 has no storage"); + } + if (sy->value != NULL) + { + sylen = sy->value->len; /* walter */ + switch (sy->type) + { /* test if numbers initiates with 0 and correct the error below walter */ + case DTYPE_DISPLAY: + case DTYPE_BININT: + case DTYPE_PACKED: + case DTYPE_EDITED: + case DTYPE_FLOAT: + p = sy->value->name; + i = sylen; + sylen = 0; + isd = 0; + while (i) + { + switch (*p++) + { + case '0': if (isd) sylen++; + break; + default: sylen++; + isd = 1; + break; + } + i--; + } + break; + } + + if (sylen > (elen = get_max_edt_len(sy))) + { + HTG_temporary_severity = 4; + yyerror("Value (length %d) of symbol %s is greater than it's picture (%d)", sylen, sy->name, elen); + HTG_temporary_severity = 8; + } + if (sy->value->type == DTYPE_ALPHANUMERIC && + (sy->type == DTYPE_DISPLAY || sy->type == DTYPE_BININT)) + if (!sy->flags.blank) + yyerror("Invalid value type for symbol %s", sy->name); + } + return 0; +} + +int +set_field_value_sw(struct sym *sy, int times) +{ + struct sym *tmp; + unsigned int res; + + struct + { + unsigned int v : 1, sv : 1, tmpv : 1, tmpsv : 1; + } f; + + f.v = 0; + f.sv = 0; + if (sy->son != NULL) + { + for (tmp = sy->son; tmp != NULL; tmp = tmp->brother) + { + res = set_field_value_sw(tmp, times); + f.v = f.v || res; + } + } + sy->flags.value = f.v = f.v || sy->value != NULL; + sy->flags.spec_value = f.sv = f.v; + + /* fprintf(stderr,"set_field_value_sw: %s -> %d,%d\n",sy->name,f.v,f.sv); */ + /* return f.v*2 + f.sv; */ + return f.v; +} + +int +set_field_length(struct sym *sy, int times) +{ + struct sym *tmp; + int len, tmplen; + if (sy->son != NULL) + { + len = 0; + sy->type = DTYPE_GROUP; + for (tmp = sy->son; tmp != NULL; tmp = tmp->brother) + { + tmplen = tmp->times * set_field_length(tmp, times); + if (tmp->redefines == NULL) + len += tmplen; + } + sy->len = len; + } + len = symlen(sy) + sy->slack; + /* fprintf(stderr,"set_field_length: %s -> %d\n",sy->name,len*times); */ + return len * times; +} + +unsigned +field_alignment(struct sym *sy, unsigned location) +{ + unsigned slack_bytes = 0, mod_loc; + + if (sy->flags.sync == 0) return 0; + switch (sy->type) + { + case DTYPE_BININT: + mod_loc = (location - curr_01_location) % symlen(sy); + slack_bytes = (mod_loc == 0 ? 0 : symlen(sy) - mod_loc); + break; + } +#if 0 +#ifdef DEBUG_COMPILER + fprintf(o_src, "#fa: %d, %d, %d, %d, %d\n", curr_01_location, location, symlen(sy), mod_loc, slack_bytes); +#endif +#endif + return slack_bytes; +} + +void +set_field_location(struct sym *sy, unsigned location) +{ + struct sym *tmp; + + /* fprintf(stderr,"set_field_location: %s -> %d\n",sy->name,location); */ + if (sy->level == 1) curr_01_location = location; + /********* allocate field descriptor *************/ + sy->descriptor = literal_offset; + if (HTG_libcob) + { + literal_offset += (sy->type == DTYPE_GROUP ? CFLD_DESC_SIZE0 : CFLD_DESC_SIZE1); + } + else + { + literal_offset += (sy->type == DTYPE_GROUP ? FLD_DESC_SIZE0 : FLD_DESC_SIZE1); + } + /********* generate picture for field ************/ + if (sy->type != DTYPE_GROUP) + { + sy->pic = literal_offset; + literal_offset += (strlen(sy->picstr) + 1); + } + else + sy->decimals = sy->pic = 0; + save_field_in_list(sy); + if (sy->redefines != NULL) + { + location = sy->redefines->location; + sy->slack = 0; + sy->flags.in_redefinition = 1; + } + else + { + sy->slack = field_alignment(sy, location); + location += sy->slack; + sy->flags.in_redefinition = 0; + } + if (sy->parent != NULL && sy->parent->flags.in_redefinition) sy->flags.in_redefinition = 1; + sy->location = location; + for (tmp = sy->son; tmp != NULL; tmp = tmp->brother) + { + set_field_location(tmp, location); + if (tmp->redefines == NULL) + { + if (tmp->sec_no == SEC_STACK) + { + location -= (symlen(tmp) + tmp->slack) * tmp->times; + /* negative for it's at the stack */ + } + else + { + location += (symlen(tmp) + tmp->slack) * tmp->times; + } + } + } +} + +void +scr_set_column(struct scr_info *si, struct sym *sy, int plus_minus) +{ + int val; + si->column = 0; + si->column_var = NULL; + si->column_sign = plus_minus; + if (sy->litflag == 1) + { + si->column_var = NULL; + val = atoi(sy->name); + if (val == 0) + yyerror("line could not be 0"); + si->column = val; + } + else + { + if (!(sy->defined)) + yyerror("variable not defined %s ", sy->name); + if (sy->type == DTYPE_ALPHANUMERIC) + yyerror("variable %s must be numeric", sy->name); + si->column_var = sy; + } +} + +void +scr_set_line(struct scr_info *si, struct sym *sy, int plus_minus) +{ + int val; + si->line = 0; + si->line_var = NULL; + si->line_sign = plus_minus; + if (sy->litflag == 1) + { + si->line_var = NULL; + val = atoi(sy->name); + if (val == 0) + yyerror("line could not be 0"); + si->line = val; + } + else + { + if (!(sy->defined)) + yyerror("variable not defined %s ", sy->name); + if (sy->type == DTYPE_ALPHANUMERIC) + yyerror("variable %s must be numeric", sy->name); + + si->line_var = sy; + } +} + +/*void scr_push_display_position(struct lit *lit)*/ +void +scr_push_display_position(struct sym *sy) +{ + int len = 0, pos, lin, col; + struct lit *literal; + + if (sy->litflag) + { + /* is a literal */ + literal = (struct lit *) sy; + len = strlen(literal->name); + switch (len) + { + case 4: + pos = atoi(literal->name); + lin = pos / 100; + col = pos - (100 * lin); + push_immed(lin); + push_immed(col); + asm_call("tcob_goxy"); + break; + case 6: + pos = atoi(literal->name); + lin = pos / 1000; + col = pos - (1000 * lin); + push_immed(lin); + push_immed(col); + asm_call("tcob_goxy"); + break; + default: + yyerror("DISPLAY AT must be followed by a 4 digits or 6 digits integer"); + break; + } + } + else + { + /* is a variable */ + switch (sy->len) + { + case 4: + push_immed(4); + gen_loadloc(sy); + asm_call("tcob_goxy_variable"); + break; + case 6: + push_immed(6); + gen_loadloc(sy); + asm_call("tcob_goxy_variable"); + break; + default: + yyerror("DISPLAY AT must be followed by a 4 digits or 6 digits variable"); + break; + } + + + } +} + +/*************** report section ******************/ + +void +save_report(struct sym *rep, struct sym *file) +{ + struct rd *rd = (struct rd *) rep; + struct list *item = malloc(sizeof (struct list)); + item->var = rd; + item->next = report_list; + report_list = item; + rd->file = file; + rd->type = 'W'; + rd->controls = rd->items = NULL; + rd->page_limit = 66; + rd->heading = 1; + rd->footing = 66; + rd->first_detail = rd->last_detail = 1; +} + +void +update_report_field(struct sym *sy) +{ + update_field(curr_field); + sy->type = 'Q'; +} + +void +update_screen_field(struct sym *sy, struct scr_info *si) +{ + struct sym *tmp; + char *pic; + update_field(curr_field); + sy->type = DTYPE_ACCEPT_DISPLAY; + sy->scr = si; + si->label = screen_label++; + /* if picture is empty (implicit filler), and there is a + value declared, create its picture from value literal. */ + + if (*(sy->picstr) == 0 && sy->value != NULL) + { + tmp = (struct sym *) sy->value; + pic = sy->picstr = malloc(3); + *pic++ = 'X'; + *pic++ = strlen(tmp->name); + *pic = 0; + sy->len = strlen(tmp->name); + } +} + +void +update_field(struct sym *sy) +{ + if (sy->level != 88 && sy->level != 66) + { + gen_picture(); + } + /* printf("upd_flds:symbol: %s, %d, piccnt: %d, %d\n", sy->name, + sy->len, piccnt,pscale); */ + /* Physical sizes for BINARY and FLOAT types are not (generally) + * affected by the PICTURE. */ + if ((sy->type != DTYPE_BININT) + && (sy->type != DTYPE_FLOAT)) + { + if (piccnt == 1 && abs(pscale) == 1) + sy->len = 1; /* only one P in the picture */ + else + sy->len = piccnt - abs(pscale); + } + /* SIGN IS ... SEPARATE only affects field length when class is numeric, + * usage is DISPLAY, and field is signed. However, sign flags must be + * temporarily retained in case this is a group item. */ + if ((sy->type == DTYPE_DISPLAY) + && (sy->picstr[0] == 'S') + && (sy->flags.separate_sign)) + { + sy->len++; + } + /* fprintf(stderr,"symbol: %s, piccnt: %d, %d\n", sy->name, + piccnt,pscale); */ + /* update COMP field length (but not BINARY-) */ + if ((sy->type == DTYPE_BININT) + && (sy->len == 0)) + { + sy->len = query_comp_len(sy); + } +} + +void +close_fields(void) +{ + struct sym *sy; + int saved_length; + int ns_offset = 0; + if (curr_field == NULL) return; + /* printf("close: %s, %d\n", curr_field->name, curr_field->len); */ + /********** locate level 01 field **************/ + for (sy = curr_field; sy->parent != NULL; sy = sy->parent); + if (sy->level != 1 && sy->level != 77 && sy->level != 66) + { + yyerror("field not subordinate to any other: %s", sy->name); + } + /********** propagate value flags *************/ + sy->flags.spec_value = set_field_value_sw(sy, 1); + /********** update length of fields *************/ + if (sy->linkage_flg) + { + linkage_offset += (set_field_length(sy, 1) * sy->times); + set_field_location(sy, linkage_offset); + } + else if (sy->sec_no == SEC_DATA) + { + saved_length = (set_field_length(sy, 1) * sy->times); + set_field_location(sy, data_offset); + data_offset += saved_length; + } + else if (sy->sec_no >= SEC_FIRST_NAMED) + { + saved_length = (set_field_length(sy, 1) * sy->times); + set_field_location(sy, ns_offset); + ns_offset += saved_length; + } + else + { + stack_offset += (set_field_length(sy, 1) * sy->times); + set_field_location(sy, stack_offset); + } + check_fields(sy); + curr_field = NULL; +} + +/*int +show_labels() { + struct sym *sy,*sy1,*sy2; + int i,j=0; + FILE *f; + f = fopen("show.labels","w"); + for (i=0;inext) { + if (sy->type == 'f') continue; + sy1 = sy; + while (sy1) { + fprintf(f,"Label: %s, defined: %d, type: %c, parent: %s\n", + sy1->name, sy1->defined, sy1->type, + sy1->parent ? sy1->parent->name : "(NULL)"); + j++; + sy1=sy1->clone; + } + } + } + fclose(f); + return j; +}*/ + +char * +var_name(struct sym *sy) +{ + unsigned int n; + n = MAXNAMEBUF; + strcpy(name_buf, ""); + while (n > strlen(sy->name) + 4) + { + if (n < MAXNAMEBUF) + strcat(name_buf, " OF "); + strcat(name_buf, sy->name); + n -= strlen(sy->name) + 4; + if ((lookup(sy->name, SYTB_VAR)->clone == NULL) + || (sy->parent == NULL)) + break; + sy = sy->parent; + } + return name_buf; +} + +/* save variable values, including 88-var range/values list */ +void +set_variable_values(struct lit *v1, struct lit *v2) +{ + struct vrange /**vr,*/*new; + if (curr_field->value == NULL) + { + curr_field->refmod_redef.vr = NULL; + curr_field->value = v1; + curr_field->value2 = v2; + curr_field->flags.value = 1; + curr_field->flags.spec_value = 1; + } + else + { + new = malloc(sizeof (struct vrange)); + new->value = v1; + new->value2 = v2; + /* spec_value is not used for 88 */ + new->next = curr_field->refmod_redef.vr; + curr_field->refmod_redef.vr = new; + } +} + +void +assign_expr(struct sym *sy, int opt, char end) +{ + push_immed(opt); + gen_loadvar(sy); + if (end == '1') + { + stackframe_cnt += sizeof (double); /* value to be poped too */ + } + asm_call("tcob_assign_double"); +} + +int +push_expr(struct sym *sy) +{ + int retcode; +#ifdef DEBUG_COMPILER + fprintf(o_src, "##### push_expr begin\n"); +#endif + retcode = push_subexpr(sy); +#ifdef DEBUG_COMPILER + fprintf(o_src, "##### push_expr end\n"); +#endif + return retcode; +} + +void +alloc_file_entry(struct sym *f) +{ + f->record = stack_offset; + f->sort_file = 0; +#ifdef DEBUG_COMPILER + fprintf(o_src, "# Allocate space for file '%s' Stack Addr: %d\n", + f->name, stack_offset); +#endif +} + +/* + ** define a file, but don't generate code yet. + ** (will be done later at dump_fdesc()) + */ +void +gen_fdesc(struct sym *f, struct sym *r) +{ + int len; + struct list *list, *templist; + struct alternate_list *alt; + list = (struct list *) malloc(sizeof (struct list)); + + if (files_list == NULL) + { + files_list = list; + } + else + { + templist = files_list; + while (templist->next != NULL) + { + templist = templist->next; + } + templist->next = list; + } + list->var = f; + list->next = NULL; + + f->recordsym = r; + while (r != NULL) + { + r->ix_desc = f; + r = r->redefines; + } + len = sizeof (struct file_desc) - 10; /* suppose without indexes */ + /* f->location = file_offset; */ + if (f->organization == 1) + { /* indexed file */ + len += 10 + 2; + /* 10 -> remaining of struct file_desc (only for indexed files) + 2 --> size of terminating "word -1| */ + /* now count each alternate description size */ + alt = (struct alternate_list *) f->alternate; + while (alt) + { + len += sizeof (struct altkey_desc); + alt = alt->next; + } + } + f->fdesc = global_offset; + global_offset += len; + /* file_offset += len; */ +} + +void +gen_status(struct sym *f) +{ + + if (f->parent) + { + push_eax(); + gen_loadloc(f->parent); + asm_call("tcob_save_status"); + } +} + +void +gen_perform_decl(struct sym *f) +{ + struct sym *decl_sym = f->refmod_redef.declarative; + int tmplabel; + + if (decl_sym) + { +#ifdef DEBUG_COMPILER + fprintf(o_src, "# decl: on %s\n", decl_sym->name); +#endif + tmplabel = gen_check_zero(); + gen_perform(decl_sym); + gen_dstlabel(tmplabel); + } +} + +/****** sort statement related functions *******/ +struct sortfile_node * +alloc_sortfile_node(struct sym *sy) +{ + struct sortfile_node *sn; + if (sy->type != 'F') + { + yyerror("only files can be found here"); + return NULL; + } + sn = malloc(sizeof (struct sortfile_node)); + sn ->next = NULL; + sn->sy = sy; + return sn; +} + +struct sym * +create_status_register(char *name) +{ + struct sym *sy; + char pic[] = {'9', 2, 0}; + sy = install(name, SYTB_VAR, 0); + if (sy->type) return sy; /* it already exists */ + sy->type = DTYPE_DISPLAY; + sy->picstr = malloc(strlen(pic) + 1); + strcpy(sy->picstr, pic); + sy->defined = 1; + sy->occurs_flg = 0; + sy->times = 1; + sy->len = 2; + sy->son = sy->brother = NULL; + sy->linkage_flg = 0; + sy->sec_no = SEC_DATA; + sy->location = data_offset; + data_offset += 2; + sy->descriptor = literal_offset; + literal_offset += FLD_DESC_SIZE1; + sy->pic = literal_offset; + literal_offset += strlen(pic) + 1; + save_field_in_list(sy); + return sy; +} + +void +gen_sort_using(struct sym *f, struct sortfile_node *sn) +{ + struct sym *vstatus = create_status_register("SORT-RETURN"); + gen_save_sort_fields(f, NULL); + push_immed(0); + while (sn) + { + gen_loadloc(sn->sy->filenamevar); + gen_save_filedesc(sn->sy); + sn = sn->next; + } + asm_call("tcob_sort_using"); + /* save status returned by operation */ + push_eax(); + gen_loadloc(vstatus); + asm_call("tcob_save_status"); +} + +void +gen_sort_giving(struct sym *f, struct sortfile_node *sn) +{ + struct sym *vstatus = create_status_register("SORT-RETURN"); + gen_save_sort_fields(f, NULL); + push_immed(0); + while (sn) + { + gen_loadloc(sn->sy->filenamevar); + gen_save_filedesc(sn->sy); + sn = sn->next; + } + asm_call("tcob_sort_giving"); + /* save status returned by operation */ + push_eax(); + gen_loadloc(vstatus); + asm_call("tcob_save_status"); +} + +void +gen_sort(struct sym *f) +{ + struct sym *datafld; + if ((f->recordsym)) + { + gen_loadloc(f->filenamevar); + gen_save_filevar(f, NULL); + asm_call("tcob_sort_open"); + gen_status(f); + gen_perform_decl(f); + gen_close_sort(f); + } + else + { /* walter */ + push_immed(0); + if (f->sort_data) + { + datafld = (struct sym *) f->sort_data; + while (datafld != NULL) + { + gen_loadloc(datafld); /* value of field */ + push_immed((int) datafld->direction); + gen_loaddesc2(datafld, 1); /* field struct */ + datafld = (struct sym *) (datafld->sort_data); + if (datafld == (struct sym *) f->sort_data) + datafld = NULL; + } + } + if (f->occurs) + { + gen_loaddesc(f->occurs->depend); /* depending on */ + gen_loadloc(f->occurs->depend); + push_immed((int) f->occurs->max); /* occurs n times */ + push_immed((int) f->occurs->min); /* occurs initial times */ + } + else + { + push_immed(0); + push_immed(0); + push_immed((int) f->times); /* occurs n times */ + push_immed(1); /* occurs initial times */ + } + push_immed((int) f->len); + gen_loadloc(f); + gen_loaddesc2(f, 1); + asm_call("tcob_sort_mem"); + } +} + +void +gen_open(int mode, struct sym *f) +{ + push_immed(mode); + gen_loadloc(f->filenamevar); + gen_save_filevar(f, NULL); + asm_call("tcob_open"); + gen_status(f); + gen_perform_decl(f); +} + +void +gen_close_sort(struct sym *f) +{ + struct sym *sortf; + /********** allocate memory for SORT descriptor ***********/ + save_field_in_list(f); + f->descriptor = literal_offset; + sortf = (struct sym *) (f->sort_data); + while (sortf != NULL) + { + literal_offset += 2; + sortf = (struct sym *) (sortf->sort_data); + } + literal_offset++; +} + +void +gen_close(struct sym *f) +{ + gen_save_filevar(f, NULL); + asm_call("tcob_close"); + gen_status(f); + gen_perform_decl(f); +} + +void +gen_return_stmt(struct sym *f, struct sym *buf) +{ + gen_save_filevar(f, buf); + asm_call("tcob_sort_return"); + gen_status(f); + gen_perform_decl(f); +} + +int +gen_reads(struct sym *f, struct sym *buf, struct sym *key, + int next_prev, int sel, int withlock) +{ + int r = 0; + int t_next_prev = next_prev; + /* NOTE: + * While this is functional, it requires to be updated to trap more syntax errors + */ + + if (f->type != 'F') + { + yyerror("invalid variable \'%s\', file name expected", f->name); + r++; + return r; + } + +#if 0 + /* READ w/o [NOT] AT END or [NOT] INVALID KEY clauses */ + if (sel == 0) + { + if ((next_prev != 0) && (key != NULL)) + { + yyerror("invalid clause NEXT found in READ statement with KEY IS data-name option"); + r++; + } + else + { + } + + } + + /* READ with [NOT] AT END clauses */ + if (sel == 1) + { + } + + /* READ with [NOT] INVALID KEY clauses */ + if (sel == 2) + { + if (next_prev != 0) + { + yyerror("invalid clause NEXT found in READ statement with INVALID KEY option"); + r++; + } + else + { + } + } + + /* RETURN w/o [NOT] AT END clauses */ + if (sel == 4) + { + } + + /* RETURN with [NOT] AT END clauses */ + if (sel == 5) + { + } +#endif + + if (r == 0) + { + /* fprintf(stderr, "sel %d, np %d\n", sel, next_prev); */ + if (f->access_mode == ACC_SEQUENTIAL && + f->sort_file == 1) + { + gen_return_stmt(f, buf); + return r; + } + if ((f->access_mode == ACC_SEQUENTIAL || f->access_mode == ACCEV_SEQUENTIAL) && + f->organization != ORG_LINESEQUENTIAL) + { + if (t_next_prev == 0) t_next_prev = 1; + gen_read_next(f, buf, t_next_prev, withlock); + return r; + } + if ((sel > -1) && (sel < 4)) + { + /* if (sel == 1) t_next_prev = 1; */ /* AT END implies read next */ + if (t_next_prev > 0 + && (f->organization == ORG_INDEXED || f->organization == ORG_RELATIVE) + && (f->access_mode == ACC_DYNAMIC || f->access_mode == ACC_SEQUENTIAL || f->access_mode == ACCEV_SEQUENTIAL + || f->access_mode == ACCEV_DYNAMIC) + ) + { + gen_read_next(f, buf, t_next_prev, withlock); + } + else + { + gen_read(f, buf, key, withlock); + } + } + else + { + if (f->organization != ORG_SEQUENTIAL) + gen_read_next(f, buf, next_prev, withlock); + else + gen_return_stmt(f, buf); + } + } + return r; +} + +void +gen_unlock(struct sym *f) +{ + if (f->type != 'F') + { + yyerror("invalid variable \'%s\', file expected", f->name); + return; + } + gen_save_filevar(f, NULL); + asm_call("tcob_unlock"); +} + +void +gen_read(struct sym *f, struct sym *buf, struct sym *key, + int withlock) +{ + struct rec_varying *rv = (struct rec_varying *) f->rec_varying; + /* gen_check_varying(f); */ + if (f->organization == ORG_RELATIVE) + { + /*gen_loadloc( f->ix_desc ); + fprintf(o_src,"\tmovl\t$c_base+%u, %%eax\n", + f->ix_desc->descriptor); + push_eax();*/ + gen_loadvar(f->ix_desc); + asm_call("tcob_get_index"); + push_eax(); + } + if (f->organization == ORG_INDEXED) + { + gen_loadvar(key); + } + /* pass the desc/address of reclen, if VARYING ... */ + if (rv != NULL) + gen_loadvar(rv->reclen); + else + gen_loadvar(NULL); + gen_save_filevar(f, buf); + if (withlock == 1) + asm_call1("tcob_setlock"); + else + if (withlock == 2) + asm_call1("tcob_ignorelock"); + asm_call("tcob_read"); + gen_status(f); + /* gen_perform_decl(f); */ /* must be generated after At End or Invalid Key */ +} + +void +gen_read_next(struct sym *f, struct sym *buf, int next_prev, + int withlock) +{ + struct rec_varying *rv = (struct rec_varying *) f->rec_varying; + if (rv != NULL) + gen_loadvar(rv->reclen); + else + gen_loadvar(NULL); + gen_save_filevar(f, buf); + if (next_prev == 1) + { + if (withlock == 1) + asm_call1("tcob_setlock"); + else + if (withlock == 2) + asm_call1("tcob_ignorelock"); + asm_call("tcob_read_next"); + } + else + { + if (withlock == 1) + asm_call1("tcob_setlock"); + else + if (withlock == 2) + asm_call1("tcob_ignorelock"); + asm_call("tcob_read_prev"); + } + gen_status(f); + /* gen_perform_decl(f); */ /* must be generated after At End or Invalid Key */ +} + +void +gen_release(struct sym *r, struct sym *buf) +{ + struct sym *f; + f = r->ix_desc; + if (buf != NULL) + { + gen_move(buf, r); + } + gen_save_sort_fields(f, buf); + asm_call("tcob_sort_release"); + gen_status(f); + gen_perform_decl(f); +} + +void +gen_write(struct sym *r, struct sym *advar, struct sym *buf, int opt) +{ + struct sym *f = r->ix_desc; + struct rec_varying *rv = (struct rec_varying *) f->rec_varying; + gen_check_varying(f); + if (opt) + { + if (buf != NULL) + { + gen_move(buf, r); + } + if (advar != NULL) + gen_loadvar(advar); + if (rv != NULL) + gen_loadvar(rv->reclen); + else + gen_loadvar(NULL); + push_immed(opt); + + /* gen_save_filevar( f,buf ); */ + /* Is this code correct ??? It works but ... */ + gen_save_filevar(f, r); + + asm_call("tcob_write_adv"); + +#if 0 + /* This code does not work !!! */ + + if (rv != NULL) + gen_loadvar(rv->reclen); + else + gen_loadvar(NULL); + push_immed(opt); + gen_save_filevar(f, buf); + if (buf == NULL) + asm_call("tcob_write_adv"); + else + { + gen_move(buf, r); + /* asm_call("tcob_write_adv_from"); */ + asm_call("tcob_write_adv"); + } + +#endif + } + else + { + if (f->organization == ORG_RELATIVE) + { + /*gen_loadloc( f->ix_desc ); + fprintf(o_src,"\tmovl\t$c_base+%u, %%eax\n", + f->ix_desc->descriptor); + push_eax();*/ + gen_loadvar(f->ix_desc); + asm_call("tcob_get_index"); + push_eax(); + } + /* Handle Write From by moving the data and then setting Buf to NULL + * only if it is not a relative record. + */ + if ((buf != NULL) && (f->organization != ORG_RELATIVE)) + { + gen_move(buf, r); + buf = NULL; + } + if (rv != NULL) + gen_loadvar(rv->reclen); + else + gen_loadvar(NULL); + gen_save_filevar(f, buf); + asm_call("tcob_write"); + } + gen_status(f); + gen_perform_decl(f); +} + +void +gen_rewrite(struct sym *r, struct sym *buf) +{ + struct sym *f = r->ix_desc; + struct rec_varying *rv = (struct rec_varying *) f->rec_varying; + gen_check_varying(f); + if (f->organization == ORG_RELATIVE) + { + /*gen_loadloc( f->ix_desc ); + fprintf(o_src,"\tmovl\t$c_base+%u, %%eax\n", + f->ix_desc->descriptor); + push_eax();*/ + gen_loadvar(f->ix_desc); + asm_call("tcob_get_index"); + push_eax(); + } + if (rv != NULL) + gen_loadvar(rv->reclen); + else + gen_loadvar(NULL); + gen_save_filevar(f, buf); + asm_call("tcob_rewrite"); + gen_status(f); + gen_perform_decl(f); +} + +void +gen_start(struct sym *f, int cond, struct sym *key) +{ + gen_check_varying(f); + if (f->organization == ORG_RELATIVE) + { + /*gen_loadloc( f->ix_desc ); + fprintf(o_src,"\tmovl\t$c_base+%u, %%eax\n", + f->ix_desc->descriptor); + push_eax();*/ + gen_loadvar(f->ix_desc); + asm_call("tcob_get_index"); + push_eax(); + } + else + { + gen_loadvar(key); + } + push_immed(cond); + gen_save_filevar(f, NULL); + asm_call("tcob_start"); + gen_status(f); + gen_perform_decl(f); +} + +void +gen_delete(struct sym *f) +{ + gen_check_varying(f); + if (f->organization == ORG_RELATIVE) + { + /*gen_loadloc( f->ix_desc ); + fprintf(o_src,"\tmovl\t$c_base+%u, %%eax\n", + f->ix_desc->descriptor); + push_eax();*/ + gen_loadvar(f->ix_desc); + asm_call("tcob_get_index"); + push_eax(); + } + gen_save_filevar(f, NULL); + asm_call("tcob_delete"); + gen_status(f); + gen_perform_decl(f); +} + +void +set_rec_varying_info(struct sym *f, struct lit *lmin, + struct lit *lmax, struct sym *reclen) +{ + struct rec_varying *rv = malloc(sizeof (struct rec_varying)); + f->rec_varying = (char *) rv; + rv->lmin = lmin; + rv->lmax = lmax; + rv->reclen = reclen; +} + +void +gen_check_varying(struct sym *f) +{ + struct rec_varying *rv = (struct rec_varying *) f->rec_varying; + if (rv != NULL) + { + gen_loadvar(rv->reclen); + gen_loadvar((struct sym *) rv->lmax); + gen_loadvar((struct sym *) rv->lmin); + gen_save_filedesc(f); + asm_call("tcob_check_varying"); + } +} + +int +get_switch_number(struct sym *sy) +{ + return (sy->name[2] - '0'); +} + +void +gen_get_switches() +{ + struct list *l = switches_list; + struct sym *svar; + + while (l != NULL) + { + svar = l->var; + push_immed(get_switch_number(svar->ix_desc)); + gen_loadvar(svar); + asm_call("tcob_get_switch"); + l = l-> next; + } +} + +void +gen_set_switch(struct sym *var, struct sym *sy) +{ + + gen_move(var, sy); + push_immed(get_switch_number(sy->ix_desc)); + gen_loadvar(sy); + asm_call("tcob_set_switch"); + +} + +struct list * +chain_var(struct sym *sy) +{ + vars_list = insert_list(vars_list, sy); + return vars_list; +} + +void +gen_push_using(struct sym *sy) +{ + struct parm_list *list; + if (sy->type == 'F') + yyerror("file could not be used as parameter in a CALL"); + list = (struct parm_list *) malloc(sizeof (struct parm_list)); + list->var = (void *) sy; + list->next = parameter_list; + list->location = 0; + list->sec_no = 0; + parameter_list = list; +} + +void +gen_save_usings(struct gvar_list *gsylst) +{ + struct gvar_list *gl; + + for (gl = gsylst; gl->next != NULL; gl = gl->next) + { + gen_save_using(gl->u.sym); + } + gen_save_using(gl->u.sym); +} + +void +gen_save_using(struct sym *sy) +{ + sy->linkage_flg = using_offset; + using_offset += 4; +} + +void +gen_save_chainings(struct gvar_list *gsylst) +{ + struct gvar_list *gl; + + for (gl = gsylst; gl->next != NULL; gl = gl->next) + { + gen_save_chaining(gl->u.sym); + } + gen_save_chaining(gl->u.sym); +} + +void +gen_save_chaining(struct sym *sy) +{ + struct parm_list *list; + if (sy->type == 'F') + yyerror("only variables could be used as parameter in CHAINING"); + list = (struct parm_list *) malloc(sizeof (struct parm_list)); + list->var = (void *) sy; + list->next = chaining_list; + list->location = 0; + list->sec_no = 0; + chaining_list = list; +} + +void +gen_chain(struct sym *v, int stack_size, int exceplabel) +{ + + struct parm_list *list, *tmp; + struct sym *cp; +#ifdef DEBUG_COMPILER + fprintf(o_src, "#chain %s\n", v->name); +#endif + push_immed(0); + for (list = parameter_list; list != NULL; list = tmp) + { + cp = (struct sym *) list->var; + gen_loadvar(cp); + tmp = list->next; + free(list); + } + parameter_list = NULL; + gen_loadvar(v); + asm_call("tcob_chain"); + +} + +short +get_std_val(struct sym *sy) +{ + if (sy->value == NULL) + { + return 0; + } + else if (sy->value == spe_lit_ZE) + { + return 2; + } + else if (sy->value == spe_lit_SP) + { + return 3; + } + else if (sy->value == spe_lit_LV) + { + return 4; + } + else if (sy->value == spe_lit_HV) + { + return 5; + } + else + { + return 1; + } +} + +/* + * Count the number of items under the field sy + * if (sw_val) ??? + */ +int +get_nb_fields(struct sym *sy_org, int sw_val) +{ + struct sym *tmp; + int nb_fields = 1, tmpnf; + char ftype; + short val; + /* walter 13-12-05 */ + // char ftype = sy->type; + struct sym *sy; + int oc; + + sy = sy_org; + oc = 0; + if (sy->litflag == 2) + { + oc = 1; + sy = ((struct vref *) sy)->sym; + if (sy->litflag == 2) + sy = ((struct vref *) sy)->sym; + } + /* fim walter */ + ftype = sy->type; + + if (sy->type == DTYPE_GROUP) + { + for (tmp = sy->son; tmp != NULL; tmp = tmp->brother) + { + tmpnf = get_nb_fields(tmp, sw_val); + + if (tmp->redefines == NULL) + nb_fields += tmpnf; + } + /* if(oc) // walter 13-12-05 + return nb_fields;*/ + } + else + { + /* Packed fields are presently considered non-homogenous */ + if (ftype == DTYPE_PACKED) ftype = '&'; + if (ftype == DTYPE_DISPLAY && sy->picstr[0] == 'S') ftype = '&'; + if (init_ctype == ' ') init_ctype = ftype; + if (ftype != init_ctype && init_ctype != '&') + init_ctype = '&'; + if (sw_val) + { + val = get_std_val(sy); + if (init_val == -1) init_val = val; + if (ftype == init_ctype && init_ctype != '&' && + val != init_val) + init_ctype = '&'; + } + } + if (oc) return nb_fields; + else + return nb_fields * sy->times; +} + +/* + * sy : field + * initp : 0 + * init_loc : initial location + * nb_fields : number of fields + */ +static int +_build_init_str(struct sym *sy, int initp, + unsigned *init_loc, int nb_fields, + struct sym *fsy, struct vref *ref) +{ // walter 13-12-05 + char mem_warn[] = "**** WARNING invading end of malloced memory"; + struct sym *tmp; + int stidx = -1, endidx = -1; + int i, j; + struct sym *sy_org = NULL; //walter 13-12-05 + struct vref *refa; // walter 13-12-05 + + if (initp >= nb_fields) + { + fprintf(stderr, "%s, f,sym: %s\n", mem_warn, sy->name); + return initp; + } + // walter 13-12-05 + if (ref) + { + sy_org = malloc(sizeof (struct sym)); + refa = (struct vref *) sy_org; + //sy_org=(struct sym*)create_subscripted_var( sy, ref ); + refa->litflag = 2; + refa->sym = sy; + refa->next = ref->next; + //create_subscripted_var( struct sym * sy, struct vref *subs ) + } + else + sy_org = sy; + // fim walter + + stidx = initp; + istrp->ent[initp].sy = sy_org; // walter 13-12-05 + istrp->ent[initp].type = sy->type; + istrp->ent[initp].value = sy->value; + istrp->ent[initp].len = symlen(sy); + istrp->ent[initp].location = *init_loc; + if (sy->type != DTYPE_GROUP) + { + *init_loc += istrp->ent[initp].len; + } + initp++; + if (sy->type == DTYPE_GROUP) + { + for (tmp = sy->son; tmp != NULL; tmp = tmp->brother) + { + if (tmp->redefines == NULL) + initp = _build_init_str(tmp, initp, init_loc, nb_fields, fsy, ref); // walter 13-12-05 + } + } + endidx = initp; + if (ref && fsy && fsy == sy) // only for these ocorrency walter 13-12-05 + return initp; + + for (i = 1; i < sy->times; i++) + { + if (initp >= nb_fields) + { + fprintf(stderr, "%s, i,sym: %s\n", mem_warn, sy->name); + break; + } + for (j = stidx; j < endidx; j++) + { + if (initp >= nb_fields) + { + fprintf(stderr, "%s, j,sym: %s\n", mem_warn, sy->name); + break; + } + istrp->ent[initp].sy = istrp->ent[j].sy; + istrp->ent[initp].type = istrp->ent[j].type; + istrp->ent[initp].value = istrp->ent[j].value; + istrp->ent[initp].len = istrp->ent[j].len; + istrp->ent[initp].location = *init_loc; + if (istrp->ent[j].type != DTYPE_GROUP) + *init_loc += istrp->ent[initp].len; + initp++; + } + } + + return initp; +} + +int +build_init_str(struct sym *sy_org, int nb_fields) +{ + unsigned init_loc; + /* walter 13-12-05 */ + struct sym *sy = NULL, *ref = NULL; + struct vref *ref1 = NULL; + int i; + + sy = sy_org; + init_loc = sy->location; + i = 0; + if (sy->litflag == 2) + { + ref1 = ((struct vref *) sy); + ref = ((struct vref *) sy)->next->sym; + sy = ((struct vref *) sy)->sym; + if (sy->litflag == 2) + sy = ((struct vref *) sy)->sym; + if (ref->litflag == 1) + { // index by literal + i = atoi(ref->name); + init_loc = ((i - 1) * sy->len) + sy->location; + ref = NULL; + } + } + /* fim walter */ + return _build_init_str(sy, 0, &init_loc, nb_fields, sy, ref1); +} + +void +gen_from_init_str(int nb_fields) +{ + int i; + + for (i = 0; i < nb_fields; i++) + { + unsigned temp_loc = istrp->ent[i].sy->location; + istrp->ent[i].sy->location = istrp->ent[i].location; + gen_init_str(istrp->ent[i].sy, istrp->ent[i].type, istrp->ent[i].len); + istrp->ent[i].sy->location = temp_loc; + } +} + +/* + * Initialize field 'sy' of type 'init_ctype' and of length 'len' + * + */ +void +gen_init_str(struct sym *sy, char init_ctype, int len) +{ +#ifdef DEBUG_COMPILER + fprintf(o_src, "# init_str %s, type %c, len %d, loc %d\n", sy->name, init_ctype, len, sy->location); +#endif + + switch (init_ctype) + { + case DTYPE_DISPLAY: + case DTYPE_PACKED: + if (sy->value != NULL) + gen_move_init((struct sym *) sy->value, sy); /* initial value */ + else + gen_move((struct sym *) spe_lit_ZE, sy); + break; + + case DTYPE_BININT: + if (sy->type == DTYPE_BININT) + { + if (sy->value != NULL) + gen_move_init((struct sym *) sy->value, sy); /* initial value */ + else + gen_move((struct sym *) spe_lit_ZE, sy); + } + else + { + if (sy->value != NULL) + gen_move_init((struct sym *) sy->value, sy); /* initial value */ + else + gen_move((struct sym *) spe_lit_LV, sy); + } + break; + + default: + if (sy->value != NULL) + gen_move_init((struct sym *) sy->value, sy); /* initial value */ + else + gen_move((struct sym *) spe_lit_SP, sy); + break; + } +} + +/* + * Generate an initialize field + * + */ +void +gen_initializes(struct gvar_list *gsylst) +{ + struct gvar_list *gl; + + for (gl = gsylst; gl->next != NULL; gl = gl->next) + { + gen_initialize(gl->u.sym, 1); + } + gen_initialize(gl->u.sym, 1); +} + +/* walter 13-12-05 +void gen_initializes_verb(struct gvar_list *gsylst, struct lit *init_alphab, struct lit *init_alpha, struct lit *init_alphaedt, struct lit *init_num, struct lit *init_numedt) { + struct gvar_list *gl; + unsigned int idx=0; + + for(gl=gsylst; gl->next!=NULL; gl=gl->next) { + gen_move_first(gl->u.sym, 0, 0, &idx); + } + gen_move_first(gl->u.sym, 0, 0, &idx); + return; +} + +unsigned int gen_move_first(struct sym *sy, unsigned int loc, unsigned int size, unsigned int *idx) { + struct sym *var, *tmp, *cop, *ref; + int subs, i, ntimes, bSign=0; + unsigned char cDigit; + char *valor; + unsigned int loc_cop=0; + + if(sy==NULL) return loc; + var=sy; // Make sure BLANK test is done on a sym struct, and not a vref struct +// litflag +// 1-literal +// 2-variable +// 4-refmod +// 5-expr +// ,-end of subscripted +// + - -subscript arith +// + if(var->litflag==4 || var->litflag==2 || var->litflag==4) { + gen_subscripted( (struct vref *)var ); +// ref=((struct vref *)var)->next->sym; +// valor=ref->name; +// if(!ref->litflag) +// valor=ref->value->name; +// integer's name is just it's value in ascii +// if(*valor!='%') { // eca +// for(i=0; (cDigit = valor[i]); i++) { +// if(cDigit=='}') { +// cDigit=0; +// } else if(cDigit=='{') { +// cDigit=0; +// bSign=1; +// } else if((cDigit>='A') && (cDigit<='I')) { +// cDigit-='A'-1; +// } else if ((cDigit>='J') && (cDigit<='R')) { +// cDigit-='J'-1; +// bSign=1; +// } else if(isdigit(cDigit)){ +// cDigit-='0'; +// } else +// cDigit=0; +// *idx=(*idx * 10) + cDigit; +// } +// } + var=((struct vref *)var)->sym; + if(var->litflag==2) + var=((struct vref *)var)->sym; + } + + if(var->flags.external) return loc; + if(var->type == DTYPE_GROUP) { + if(loc==0) loc=var->location; + ntimes=var->times; + if(*idx) ntimes=1; + do { + tmp=var->son; + while(tmp!=NULL) { + if(tmp->redefines) { + loc=gen_move_first(tmp, tmp->location, var->len, idx); + } else { + loc=gen_move_first(tmp, loc, var->len, idx); + } + tmp=tmp->brother; + } + ntimes--; + } while(ntimes); + return loc; + } else { + if(loc==0) { + loc=var->location; + ntimes=var->times; + } + } + cop = malloc(sizeof(struct sym)); + memcpy(cop, var, sizeof(struct sym)); + if(*idx) (*idx)--; + while(*idx) { + loc+=size; + (*idx)--; + } + i = cop->times; + while(i--) { + cop->location=loc; + gen_init_str(cop, cop->type, 1); + loc += cop->len; + } + free(cop); + return loc; +} +fim walter */ + +void +gen_initialize(struct sym *sy_start, int from_initializes) +{ + /*struct sym *sy;*/ + int nb_fields; + struct init_str init_templ; + /* Possible optimization: + * 1) Compress the init sequence to reduce the number + * of elementary moves. + */ + if (sy_start == NULL) return; + if (sy_start->flags.external && !from_initializes) return; // walter 13-12-05 + +#ifdef DEBUG_COMPILER + fprintf(o_src, "# INITIALIZE %s, type %c\n", sy_start->name, sy_start->type); +#endif + init_ctype = ' '; + nb_fields = get_nb_fields(sy_start, 0); + if (init_ctype != '&' && init_ctype != ' ') + { + gen_init_str(sy_start, init_ctype, symlen(sy_start)); + return; + } +#ifdef DEBUG_COMPILER + fprintf(o_src, "# (2) istrp = malloc(%d) nb_fields = %d\n", + nb_fields * sizeof (init_templ), nb_fields); +#endif + istrp = malloc(nb_fields * sizeof (init_templ)); + build_init_str(sy_start, nb_fields); + gen_from_init_str(nb_fields); + free(istrp); + istrp = NULL; +#ifdef DEBUG_COMPILER + fprintf(o_src, "# END_INITIALIZE\n"); +#endif +} + +/* + * Cancel statement + * The parameter is the field or literal containing the name of the routine to cancel + * if the parameter is NULL, a is a CACNEL ALL + */ + +void +gen_cancel(struct sym *routine_name) +{ + if (routine_name) + { + gen_loadvar(routine_name); + asm_call("tcob_cancel"); + } + else + { + asm_call("tcob_cancel_all"); + } +} + +/* + * GOBACK statement. + * If is a module generate EXIT PROGRAM, else STOP RUN + */ +void +gen_goback() +{ + if (module_flag) /* If is a module generate EXIT PROGRAM, else STOP RUN */ + gen_exit(1); + else + gen_stoprun(); +} + +/* ok nao achei nenhuma referencia para esta funcao +void mark_actives( int first, int last ) { + int i; + if (last36) first=0; + if (last<0 || last>36) last=0; + for (i=first;i<=last;i++) active[i]=1; +} + + ok + used with qsort + return: strncmp from *z1 and *z2 + see man qsort for more explanation */ +int +sort_exref_compare(const void *z1, const void *z2) +{ + char ss1[256], ss2[256]; + + strncpy(ss1, var_name(*(struct sym **) z1), sizeof (ss1)); + strncpy(ss2, var_name(*(struct sym **) z2), sizeof (ss2)); + return strncmp(ss1, ss2, sizeof (ss1)); +} + +void +dump_symbols() +{ + int i, j, k, arsize, slen; + struct sym *sy, *sy1, **sytable; + char t, *s, *str1, sa1[256]; + + if (!HTG_list_flag) + return; + + fprintf(o_lst, + "\n======================================================================="); + fprintf(o_lst, "\n\nSymbols of module:%20.20s\n", pgm_label); + fprintf(o_lst, "--------------------------------------\n"); + for (i = 0; i < HASHLEN; i++) + { + /* for (sy=labtab[i];sy!=NULL;sy=sy->next) { */ + for (sy = vartab[i]; sy != NULL; sy = sy->next) + { + t = sy->type; + sy1 = sy; + while (sy1) + { + /* check if any variables (excluding intrinsic functions) + are undefined */ + if ((sy1->defined == 0) && (sy->type == 0)) + { + yyerror("Declared but undefined variable \'%s\' found.", sy1->name); + /* fprintf(stderr, "Undefined variable \'%s\', defined=%d, type=%c, line=%d;\n", + sy1->name, sy1->defined, sy1->type, sy1->xrefs.lineno[0]); */ + } +#if 0 + else + { + fprintf(stderr, "Defined variable \'%s\', defined=%d, type=%c, line=%d;\n", + sy1->name, sy1->defined, sy1->type, sy1->xrefs.lineno[0]); + } +#endif + sy1 = sy1->clone; + } + } + } + + if (!HTG_list_flag) + { + return; + } + + + /* Determine size of tree */ + for (i = 0, j = 0; i < HASHLEN; i++) + { + for (sy1 = vartab[i]; sy1 != NULL; sy1 = sy1->next) + { + for (sy = sy1; sy; sy = sy->clone) + { + if (sy->xrefs.lineno[0] != 0) + { + j++; + } + } + } + } + arsize = j; + + /* Allocate sort array */ + sytable = (struct sym**) malloc(sizeof (struct sym *) * (arsize)); + + /* Initialize sort array from hash tree */ + for (i = 0, j = 0; i < HASHLEN; i++) + { + for (sy1 = vartab[i]; sy1 != NULL; sy1 = sy1->next) + { + for (sy = sy1; sy; sy = sy->clone) + { + if (sy->xrefs.lineno[0] != 0) + { + sytable[j] = sy; + str1 = var_name(sytable[j]); + j++; + } + } + } + } + + /* Sort array using the quick sort function */ + qsort(sytable, arsize, sizeof (struct sym *), sort_exref_compare); + + if (HTG_xref_flag) + { + + fprintf(o_lst, "\n---------------------------------------------------- Cross Refrence Listing --------------------------------------------------------\n\n"); + fprintf(o_lst, "Variable Symbol ( Qualifiers ) Locations\n"); + fprintf(o_lst, "-----------------------------------------+------------------------------------------------------------------------------------------\n"); + for (i = 0; i < arsize; i++) + { + sy = sytable[i]; + if (sy->xrefs.lineno[0] != 0) + { + s = var_name(sy); + + strcpy(sa1, ""); + j = 0; + k = 0; + slen = strlen(s); + if (slen > 40) + { + for (j = 0; j < (slen - 40); j = j + k) + { + str1 = strstr(s + j, " OF "); + k = strlen(str1 + 4); + k = slen - j - k; + strncpy(sa1, s + j, k); + sa1[k] = '\0'; + fprintf(o_lst, "%-40s\n", sa1); + } + strcpy(sa1, s + j); + } + else + { + strcpy(sa1, s); + } + fprintf(o_lst, "%-40s ", sa1); + + for (j = 0; j < sy->xrefs.pos; j++) + { + if ((j % 8 == 0) && (j > 0)) + { + fprintf(o_lst, "\n%-40s ", ""); + } + fprintf(o_lst, "%06d ", sy->xrefs.lineno[j]); + } + fprintf(o_lst, "\n"); + } + } + } + + if (!HTG_list_flag) + { + return; + } + + fprintf(o_lst, "\n---------------------------------------------------------------+-----------------\n"); + fprintf(o_lst, "Symbol ( Variables ) Type Level Len Dec Mul | Desc Loc Pic S\n"); + fprintf(o_lst, "---------------------------------------------------------------+-----------------\n"); + for (i = 0; i < arsize; i++) + { + sy = sytable[i]; + s = var_name(sy); + + strcpy(sa1, ""); + j = 0; + k = 0; + slen = strlen(s); + if (slen > 40) + { + for (j = 0; j < (slen - 40); j = j + k) + { + str1 = strstr(s + j, " OF "); + k = strlen(str1 + 4); + k = slen - j - k; + strncpy(sa1, s + j, k); + sa1[k] = '\0'; + fprintf(o_lst, "%-40s\n", sa1); + } + strcpy(sa1, s + j); + } + else + { + strcpy(sa1, s); + } + + fprintf(o_lst, + "%-40s%4c%1c%3d %5d %3d %3d%c| %04X %04X%c%04X %1d\n", + sa1, + /* sy->type, */ + sy->type ? sy->type : '0', + sy->flags.just_r ? 'R' : ' ', + sy->level, + sy->len, + sy->decimals, + sy->times, + sy->occurs_flg ? '*' : ' ', + sy->descriptor, + sy->location, + sy->linkage_flg ? '*' : ' ', + sy->pic, + sy->sec_no); + } + fprintf(o_lst, "\n\n"); + + + fprintf(o_lst, "\n-----------------------------------------------\n"); + fprintf(o_lst, "Symbol ( 88-condition ) Variable tested"); + fprintf(o_lst, "\n-----------------------------------------------\n"); + for (i = 0; i < HASHLEN; i++) + { + for (sy = vartab[i]; sy != NULL; sy = sy->next) + { + t = sy->type; + if (t == '8') + fprintf(o_lst, "%22.22s %22.22s\n", + sy->name, + sy->parent->name); + } + } + + fprintf(o_lst, + "\n-----------------------------------------------------------------------\n"); + fprintf(o_lst, "%s%s%s", + " Paragraph ", + " Section ", " Type"); + fprintf(o_lst, + "\n-----------------------------------------------------------------------\n"); + for (i = 0; i < HASHLEN; i++) + { + for (sy = labtab[i]; sy != NULL; sy = sy->next) + { + t = sy->type; + sy1 = sy; + while (sy1) + { + if ((sy1->type == 'P') || (sy1->type == 'S')) + { + fprintf(o_lst, "%32.32s %32.32s %c\n", + (sy1->type == 'P') ? sy1->name : "", + (sy1->type == 'S') ? sy1->name : + (sy1->parent ? sy1->parent->name : ""), + sy1->type); + } + sy1 = sy1->clone; + } + } + } + + fprintf(o_lst, "\n\nTinyCOBOL compile audit summary:\n"); + fprintf(o_lst, "Total lines compiled : %4d\n", source_lineno); + fprintf(o_lst, "Total number of warnings : %4d\n", wrncnt); + fprintf(o_lst, "Total number of errors found : %4d\n", errcnt); + +} + +/* ok + search for "-" caracter in *s and replace it with _ + enter: char * + return: void */ +void +chg_underline(char *s) +{ + char *s1; + s1 = s; /* walter */ + while (*s1) + { + if (*s1 == '-') *s1 = '_'; + s1++; + } + /* while ((s1=strchr(s,'-'))!=NULL) *s1='_'; */ +} + +void +gen_enter_runelement(int type) +{ + /* this should be cleaned if we are going to load it */ + fprintf(o_src, "\tmovl\t$s_base%d+0, %%eax\n", pgm_segment); + push_eax(); + push_immed(type); + push_immed(program_name_literal->len); + loadloc_to_eax((struct sym *) program_name_literal); + push_eax(); + asm_call("tcob_enter_runelement"); +} +/* end of HTCOBGEN.C */ diff --git a/compiler/htcobgen.o b/compiler/htcobgen.o new file mode 100644 index 0000000..82f90ab Binary files /dev/null and b/compiler/htcobgen.o differ diff --git a/compiler/htcobol b/compiler/htcobol new file mode 100644 index 0000000..a165f02 Binary files /dev/null and b/compiler/htcobol differ diff --git a/compiler/htcobol.c b/compiler/htcobol.c new file mode 100644 index 0000000..b0e28ec --- /dev/null +++ b/compiler/htcobol.c @@ -0,0 +1,128 @@ +/* + * Copyright (C) 2001, 2002 David Essex, Rildo Pragana. + * Copyright (C) 1993, 1991 Rildo Pragana. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA + */ + +#include "htconfig.h" +#include "htversion.h" +#include "htcoboly.h" +#include "htcoblib.h" +#include "htglobals.h" + +int main(int argc, char *argv[]) +{ + int rc = 1, idx, r; +#if defined (__MINGW32__) + char *pt; +#endif + + prg_name = argv[0]; + +#if defined (__MINGW32__) + strncpy(COBINSTDIR, argv[0], PATHMAX - 1); + COBINSTDIR[PATHMAX - 1] = '\0'; + pt = strrchr(COBINSTDIR, LT_DIRSEP_CHAR); + if (pt != NULL) { + *pt = '\0'; + } + else { + strncpy(COBINSTDIR, COBDIR_DEFAULT, PATHMAX - 1); + COBINSTDIR[PATHMAX - 1] = '\0'; + } +#endif + /* fprintf (stderr, "htcobol debug 0: main: before initialize_setup COBINSTDIR=%s\n", COBINSTDIR); */ + initialize_setup(); + + r = read_compiler_options(); + + process_verbose_options(argc, argv); +/* fprintf (stderr, "htcobol debug 1: main: after process_verbose_options\n"); */ + + idx = process_command_line(argc, argv); +/* fprintf (stderr, "htcobol debug 3: main: after process_command_line\n"); */ + if (idx == argc) { + fprintf (stderr, "No input file name provided\n"); + exit (8); + } +/* fprintf (stderr, "htcobol debug 3: main: after file input check\n"); */ + + strcpy (file_path, argv[idx]); + setup_filenames(); +/* fprintf (stderr, "htcobol debug 4: main: after setup_filenames\n"); */ + +/* fprintf (stderr, "htcobol debug 5: main: HTG_compile_level_flag=%d\n", HTG_compile_level_flag); */ + switch (HTG_compile_level_flag) + { + case HTG_COMPILE_LEVEL_P: + rc = process_pp(); + break; + + case HTG_COMPILE_LEVEL_PC: + rc = process_pp(); + if (rc == 0) { + rc = process_compile(); + } + break; + + case HTG_COMPILE_LEVEL_PCA: + case HTG_COMPILE_LEVEL_PCAL: + case HTG_COMPILE_LEVEL_PCAM: + case HTG_COMPILE_LEVEL_PCAS: + rc = process_pp(); + if (rc == 0) { + rc = process_compile(); + if (rc < 8) { + rc = process_assemble(); + } + } + break; + + default: + break; + } + + if (rc == 0) { + if (HTG_compile_level_flag == HTG_COMPILE_LEVEL_PCAL) { + if (r == 0) { + setup_ld_paths(); + } + else { + setup_ld_paths_defaults(); + } + rc = process_ld(); + } + if (HTG_compile_level_flag == HTG_COMPILE_LEVEL_PCAM) { + rc = process_shlib_ld (); + } + if (HTG_compile_level_flag == HTG_COMPILE_LEVEL_PCAS) { + rc = process_lib_ld (); + } + } + else { + HTG_RETURN_CODE = rc; + } + + do_file_cleanup(); + + if (HTG_verbose_verbose == TRUE ) { + printf("Compiler return code %d\n", HTG_RETURN_CODE); + } + + return HTG_RETURN_CODE; + +} diff --git a/compiler/htcobol.exe b/compiler/htcobol.exe new file mode 100644 index 0000000..90d22e2 Binary files /dev/null and b/compiler/htcobol.exe differ diff --git a/compiler/htcobol.o b/compiler/htcobol.o new file mode 100644 index 0000000..5e0c44f Binary files /dev/null and b/compiler/htcobol.o differ diff --git a/compiler/htcobol.output b/compiler/htcobol.output new file mode 100644 index 0000000..e765b05 --- /dev/null +++ b/compiler/htcobol.output @@ -0,0 +1,28193 @@ +Terminals unused in grammar + + LOW_PREC + ZERONUM + COMMENTING + END_OF_PAGE + ONLY + PADDING + PROCEED + TOKDUMMY + + +State 136 conflicts: 7 shift/reduce +State 151 conflicts: 2 shift/reduce +State 165 conflicts: 7 shift/reduce +State 172 conflicts: 1 shift/reduce +State 242 conflicts: 2 shift/reduce +State 288 conflicts: 2 shift/reduce +State 305 conflicts: 1 shift/reduce +State 391 conflicts: 1 shift/reduce +State 397 conflicts: 1 shift/reduce +State 408 conflicts: 1 shift/reduce +State 410 conflicts: 1 shift/reduce +State 414 conflicts: 1 shift/reduce +State 436 conflicts: 1 shift/reduce +State 456 conflicts: 1 shift/reduce +State 461 conflicts: 1 shift/reduce +State 471 conflicts: 2 reduce/reduce +State 474 conflicts: 2 shift/reduce +State 485 conflicts: 1 shift/reduce +State 495 conflicts: 1 shift/reduce +State 544 conflicts: 2 shift/reduce +State 567 conflicts: 1 shift/reduce +State 574 conflicts: 1 shift/reduce +State 609 conflicts: 1 shift/reduce +State 640 conflicts: 45 shift/reduce +State 649 conflicts: 1 shift/reduce +State 669 conflicts: 2 shift/reduce +State 695 conflicts: 1 shift/reduce +State 702 conflicts: 1 shift/reduce +State 717 conflicts: 1 shift/reduce +State 719 conflicts: 1 shift/reduce +State 720 conflicts: 1 shift/reduce +State 721 conflicts: 1 shift/reduce +State 736 conflicts: 1 shift/reduce +State 753 conflicts: 1 shift/reduce +State 756 conflicts: 2 shift/reduce +State 765 conflicts: 1 shift/reduce +State 784 conflicts: 1 shift/reduce +State 817 conflicts: 1 shift/reduce +State 832 conflicts: 1 shift/reduce +State 833 conflicts: 2 shift/reduce +State 848 conflicts: 1 shift/reduce +State 857 conflicts: 1 shift/reduce +State 859 conflicts: 1 shift/reduce +State 948 conflicts: 2 shift/reduce +State 952 conflicts: 1 shift/reduce +State 956 conflicts: 1 shift/reduce +State 988 conflicts: 1 shift/reduce +State 999 conflicts: 1 shift/reduce +State 1018 conflicts: 1 shift/reduce +State 1019 conflicts: 2 shift/reduce +State 1052 conflicts: 1 shift/reduce +State 1053 conflicts: 1 shift/reduce +State 1098 conflicts: 1 shift/reduce +State 1144 conflicts: 1 shift/reduce +State 1166 conflicts: 1 shift/reduce +State 1187 conflicts: 1 shift/reduce +State 1200 conflicts: 1 shift/reduce +State 1202 conflicts: 1 shift/reduce +State 1225 conflicts: 1 shift/reduce +State 1232 conflicts: 1 shift/reduce +State 1253 conflicts: 1 shift/reduce +State 1254 conflicts: 1 shift/reduce +State 1255 conflicts: 1 shift/reduce +State 1269 conflicts: 1 shift/reduce +State 1300 conflicts: 1 shift/reduce +State 1326 conflicts: 1 shift/reduce +State 1335 conflicts: 1 shift/reduce +State 1338 conflicts: 1 shift/reduce +State 1351 conflicts: 1 shift/reduce +State 1392 conflicts: 1 shift/reduce +State 1401 conflicts: 1 shift/reduce +State 1474 conflicts: 1 shift/reduce +State 1485 conflicts: 1 shift/reduce +State 1514 conflicts: 1 shift/reduce +State 1523 conflicts: 2 shift/reduce +State 1536 conflicts: 2 shift/reduce +State 1603 conflicts: 1 shift/reduce +State 1604 conflicts: 1 shift/reduce +State 1644 conflicts: 1 shift/reduce +State 1667 conflicts: 2 shift/reduce +State 1668 conflicts: 1 shift/reduce +State 1669 conflicts: 2 shift/reduce +State 1688 conflicts: 1 shift/reduce +State 1690 conflicts: 1 shift/reduce +State 1735 conflicts: 18 shift/reduce +State 1805 conflicts: 19 shift/reduce +State 1827 conflicts: 1 shift/reduce +State 1877 conflicts: 1 shift/reduce + + +Grammar + + 0 $accept: root_ $end + + 1 root_: program_sequences + + 2 program_sequences: program + 3 | program_sequence + 4 | program_sequence program + + 5 program_sequence: program end_program + + 6 $@1: /* empty */ + + 7 program_sequence: program $@1 program_sequence end_program + 8 | program_sequence program end_program + + 9 $@2: /* empty */ + + 10 end_program: END PROGRAM $@2 IDSTRING + + 11 program: identification_division environment_division_opt data_division_opt procedure_division_opt + + 12 $@3: /* empty */ + + 13 $@4: /* empty */ + + 14 $@5: /* empty */ + + 15 identification_division: IDENTIFICATION DIVISION PERIOD_TOK PROGRAM_ID PERIOD_TOK $@3 IDSTRING $@4 programid_opts_opt PERIOD_TOK $@5 identification_division_options_opt + + 16 programid_opts_opt: /* empty */ + 17 | is_opt INITIAL_TOK programid_program_opt + 18 | is_opt COMMON programid_program_opt + + 19 programid_program_opt: /* empty */ + 20 | PROGRAM + + 21 identification_division_options_opt: /* empty */ + 22 | identification_division_options_opt identification_division_option + + 23 identification_division_option: AUTHOR PERIOD_TOK + 24 | DATE_WRITTEN PERIOD_TOK + 25 | DATE_COMPILED PERIOD_TOK + 26 | INSTALLATION PERIOD_TOK + 27 | SECURITY PERIOD_TOK + + 28 $@6: /* empty */ + + 29 environment_division_opt: ENVIRONMENT DIVISION PERIOD_TOK $@6 configuration_opt input_output_opt + 30 | /* empty */ + + 31 configuration_opt: CONFIGURATION SECTION PERIOD_TOK configuration_section + 32 | /* empty */ + + 33 configuration_section: configuration_section configuration_option + 34 | /* empty */ + + 35 $@7: /* empty */ + + 36 configuration_option: SOURCE_COMPUTER PERIOD_TOK $@7 STRING debug_mode_opt PERIOD_TOK + + 37 $@8: /* empty */ + + 38 configuration_option: OBJECT_COMPUTER PERIOD_TOK $@8 STRING program_collating_opt PERIOD_TOK + 39 | SPECIAL_NAMES PERIOD_TOK special_names_opt + 40 | error + + 41 program_collating_opt: PROGRAM collating_sequence + 42 | /* empty */ + + 43 collating_sequence: collating_opt SEQUENCE is_opt STRING + + 44 collating_opt: COLLATING + 45 | /* empty */ + + 46 debug_mode_opt: with_opt DEBUGGING MODE + 47 | /* empty */ + + 48 special_names_opt: /* empty */ + 49 | special_names PERIOD_TOK + 50 | error + + 51 special_names: special_name + 52 | special_names special_name + + 53 special_name: switches_details_list + 54 | alphabet_details + 55 | currency_details + 56 | decimal_point_details + 57 | screen_status_details + 58 | cursor_details + 59 | special_name_class + + 60 currency_details: CURRENCY sign_opt is_opt CLITERAL + + 61 sign_opt: SIGN + 62 | /* empty */ + + 63 special_name_class: CLASS STRING is_opt special_name_class_item_list + + 64 special_name_class_item_list: special_name_class_item + 65 | special_name_class_item_list special_name_class_item + + 66 special_name_class_item: CLITERAL + 67 | CLITERAL THRU CLITERAL + + 68 decimal_point_details: DECIMAL_POINT is_opt COMMA + + 69 screen_status_details: DISPLAY_SCREEN STATUS is_opt STRING + + 70 cursor_details: CURSOR is_opt STRING + + 71 switches_details_list: /* empty */ + 72 | switches_details_list switches_details + + 73 $@9: /* empty */ + + 74 switches_details: STRING is_opt STRING $@9 switch_on_opt switch_off_opt + + 75 switch_on_opt: ON status_opt is_opt STRING + 76 | /* empty */ + + 77 switch_off_opt: OFF status_opt is_opt STRING + 78 | /* empty */ + + 79 status_opt: STATUS + 80 | /* empty */ + + 81 alphabet_details: ALPHABET STRING is_opt alphabet_type + + 82 alphabet_type: NATIVE + 83 | STANDARD_1 + 84 | STANDARD_2 + 85 | alphabet_literal_list + + 86 alphabet_literal_list: alphabet_literal_item + 87 | alphabet_literal_list alphabet_literal_item + + 88 alphabet_literal_item: without_all_literal + 89 | without_all_literal THRU without_all_literal + 90 | without_all_literal alphabet_also_list + + 91 alphabet_also_list: ALSO without_all_literal + 92 | alphabet_also_list ALSO without_all_literal + + 93 input_output_opt: INPUT_OUTPUT SECTION PERIOD_TOK input_output_section + 94 | /* empty */ + + 95 input_output_section: file_control_paragraph i_o_control_paragraph + 96 | error + + 97 file_control_paragraph: FILE_CONTROL PERIOD_TOK file_control + + 98 i_o_control_paragraph: /* empty */ + 99 | I_O_CONTROL PERIOD_TOK i_o_control_opt + + 100 file_control: file_select + 101 | file_control file_select + + 102 $@10: /* empty */ + + 103 file_select: SELECT optional_opt def_name $@10 select_clauses PERIOD_TOK + + 104 select_clauses: select_clauses select_clause + 105 | /* empty */ + + 106 select_clause: organization_opt is_opt organization_options + 107 | ASSIGN to_opt assign_clause + 108 | ACCESS mode_opt is_opt access_options + 109 | file_opt STATUS is_opt STRING + 110 | RECORD key_opt is_opt STRING + 111 | RELATIVE key_opt is_opt STRING + 112 | ALTERNATE RECORD key_opt is_opt STRING with_duplicates + 113 | RESERVE NLITERAL areas_opt + 114 | error + + 115 file_opt: FILE_TOK + 116 | /* empty */ + + 117 organization_opt: ORGANIZATION + 118 | /* empty */ + + 119 assign_clause: PORTNUM + 120 | filename + 121 | PORTNUM filename + 122 | EXTERNAL filename + 123 | error + + 124 with_duplicates: with_opt DUPLICATES + 125 | /* empty */ + + 126 optional_opt: OPTIONAL + 127 | /* empty */ + + 128 areas_opt: AREA + 129 | AREAS + 130 | /* empty */ + + 131 is_opt: IS + 132 | /* empty */ + + 133 are_opt: ARE + 134 | /* empty */ + + 135 mode_opt: MODE + 136 | /* empty */ + + 137 organization_options: INDEXED + 138 | SEQUENTIAL + 139 | RELATIVE + 140 | LINE SEQUENTIAL + 141 | anystring + + 142 access_options: SEQUENTIAL + 143 | DYNAMIC + 144 | RANDOM + 145 | anystring + + 146 i_o_control_opt: /* empty */ + 147 | i_o_control_list PERIOD_TOK + + 148 i_o_control_list: i_o_control_clause + 149 | i_o_control_list i_o_control_clause + + 150 i_o_control_clause: i_o_control_same_clause + 151 | i_o_control_multiple_file_tape_clause + + 152 i_o_control_same_clause: SAME same_clause_options are_opta for_opt string_list + + 153 same_clause_options: /* empty */ + 154 | RECORD + 155 | SORT + 156 | SORT_MERGE + + 157 i_o_control_multiple_file_tape_clause: MULTIPLE FILE_TOK tape_opt contains_opt i_o_control_multiple_file_list + + 158 i_o_control_multiple_file_list: i_o_control_multiple_file + 159 | i_o_control_multiple_file_list i_o_control_multiple_file + + 160 i_o_control_multiple_file: STRING i_o_control_multiple_file_position_opt + + 161 i_o_control_multiple_file_position_opt: /* empty */ + 162 | POSITION integer + + 163 tape_opt: TAPE + 164 | /* empty */ + + 165 are_opta: AREA + 166 | /* empty */ + + 167 for_opt: FOR + 168 | /* empty */ + + 169 string_list: STRING + 170 | string_list STRING + 171 | error + + 172 name_list: variable + 173 | name_list variable + 174 | error + + 175 $@11: /* empty */ + + 176 data_division_opt: DATA DIVISION PERIOD_TOK $@11 file_section_opt working_storage_opt linkage_section_opt report_section_opt screen_section_opt + 177 | /* empty */ + + 178 $@12: /* empty */ + + 179 file_section_opt: FILE_TOK SECTION PERIOD_TOK $@12 file_section + 180 | /* empty */ + + 181 $@13: /* empty */ + + 182 working_storage_opt: WORKING_STORAGE SECTION PERIOD_TOK $@13 working_storage_section + 183 | /* empty */ + + 184 $@14: /* empty */ + + 185 linkage_section_opt: LINKAGE SECTION PERIOD_TOK $@14 linkage_section + 186 | /* empty */ + + 187 report_section_opt: REPORT SECTION PERIOD_TOK report_sections + 188 | /* empty */ + + 189 report_sections: report_sections report_section + 190 | /* empty */ + + 191 $@15: /* empty */ + + 192 $@16: /* empty */ + + 193 $@17: /* empty */ + + 194 report_section: RD $@15 STRING $@16 report_controls PERIOD_TOK $@17 report_description + + 195 report_controls: /* empty */ + 196 | report_controls report_control + + 197 report_control: is_opt GLOBAL + 198 | CODE gliteral + 199 | report_controls_control + 200 | report_controls_page + + 201 report_controls_control: control_is_are final_opt report_break_list + + 202 report_controls_page: PAGE limit_is_are_opt integer line_lines_opt heading_opt first_detail_opt last_detail_opt footing_opt + + 203 heading_opt: /* empty */ + 204 | HEADING is_opt integer + + 205 line_lines_opt: lines_opt + 206 | LINE + + 207 lines_opt: /* empty */ + 208 | LINES + + 209 control_is_are: CONTROL is_opt + 210 | CONTROLS are_opt + + 211 limit_is_are_opt: /* empty */ + 212 | LIMIT IS + 213 | LIMITS ARE + + 214 footing_opt: /* empty */ + 215 | FOOTING is_opt integer + + 216 last_detail_opt: /* empty */ + 217 | LAST DETAIL is_opt integer + + 218 first_detail_opt: /* empty */ + 219 | FIRST DETAIL is_opt integer + + 220 final_opt: /* empty */ + 221 | FINAL + + 222 report_break_list: /* empty */ + 223 | report_break_list name + + 224 report_description: report_item + 225 | report_description report_item + + 226 $@18: /* empty */ + + 227 report_item: integer def_name_opt $@18 report_clauses PERIOD_TOK + + 228 report_clauses: report_clause + 229 | report_clauses report_clause + + 230 report_clause: report_clause_line + 231 | report_clause_next_group + 232 | report_clause_type + 233 | report_clause_usage_display + 234 | report_clause_picture + 235 | report_clause_sign_is + 236 | report_clause_justified + 237 | report_clause_blank_zero + 238 | report_clause_column + 239 | report_clause_svs + 240 | report_clause_group_indicate + + 241 report_clause_type: TYPE is_opt report_clause_type2 + + 242 report_clause_type2: REPORT HEADING + 243 | PAGE HEADING + + 244 $@19: /* empty */ + + 245 report_clause_type2: CONTROL HEADING $@19 name_final_opt + 246 | DETAIL + + 247 $@20: /* empty */ + + 248 report_clause_type2: CONTROL FOOTING $@20 name_final_opt + 249 | PAGE FOOTING + 250 | REPORT FOOTING + 251 | RH + 252 | PH + + 253 $@21: /* empty */ + + 254 report_clause_type2: CH $@21 name_final_opt + 255 | DE + + 256 $@22: /* empty */ + + 257 report_clause_type2: CF $@22 name_final_opt + 258 | PF + 259 | RF + + 260 report_clause_sign_is: SIGN is_opt leading_trailing SEPARATE character_opt + 261 | leading_trailing SEPARATE character_opt + + 262 $@23: /* empty */ + + 263 report_clause_picture: PICTURE $@23 is_opt picture + + 264 report_clause_usage_display: USAGE is_opt DISPLAY + 265 | DISPLAY + + 266 report_clause_justified: JUSTIFIED right_opt + + 267 report_clause_next_group: NEXT GROUP is_opt integer_on_next_page + + 268 report_clause_line: report_clause_line_is integer ON NEXT PAGE + 269 | report_clause_line_is integer NEXT PAGE + 270 | report_clause_line_is integer + 271 | report_clause_line_is PLUS integer + + 272 report_clause_line_is: LINE is_are_opt + 273 | LINE NUMBER is_opt + 274 | LINE NUMBERS are_opt + 275 | LINES are_opt + + 276 report_clause_column: report_clause_column_is integer + + 277 report_clause_column_is: COLUMN report_clause_column_orientation is_are_opt + 278 | COLUMN NUMBER report_clause_column_orientation is_opt + 279 | COLUMN NUMBERS report_clause_column_orientation are_opt + 280 | COLUMNS report_clause_column_orientation are_opt + + 281 report_clause_column_orientation: /* empty */ + 282 | LEFT + 283 | CENTER + 284 | RIGHT + + 285 is_are_opt: /* empty */ + 286 | IS + 287 | ARE + + 288 $@24: /* empty */ + + 289 report_clause_svs: SOURCE $@24 is_opt gname_page_counter + 290 | VALUE is_opt literal + + 291 $@25: /* empty */ + + 292 $@26: /* empty */ + + 293 report_clause_svs: SUM $@25 gname_list $@26 upon_opt reset_opt + + 294 gname_page_counter: gname + 295 | PAGE_COUNTER + + 296 report_clause_group_indicate: /* empty */ + 297 | GROUP indicate_opt + + 298 report_clause_blank_zero: BLANK when_opt ZERO + + 299 indicate_opt: /* empty */ + 300 | INDICATE + + 301 upon_opt: /* empty */ + 302 | UPON gname_list + + 303 reset_opt: /* empty */ + 304 | RESET gname + 305 | RESET FINAL + + 306 number_opt: /* empty */ + 307 | NUMBER + + 308 leading_trailing: LEADING + 309 | TRAILING + + 310 right_opt: /* empty */ + 311 | RIGHT + + 312 name_final_opt: gname + 313 | FINAL + + 314 integer_on_next_page: integer + 315 | PLUS integer + 316 | NEXT PAGE + + 317 of_opt: OF + 318 | /* empty */ + + 319 $@27: /* empty */ + + 320 screen_section_opt: SCREEN SECTION PERIOD_TOK $@27 screen_section + 321 | /* empty */ + + 322 screen_section: screen_section screen_item + 323 | /* empty */ + + 324 $@28: /* empty */ + + 325 screen_item: integer def_name_opt $@28 screen_clauses PERIOD_TOK + + 326 $@29: /* empty */ + + 327 screen_clauses: screen_clauses LINE $@29 number_is_opt plus_minus_opt name_or_lit + + 328 $@30: /* empty */ + + 329 screen_clauses: screen_clauses COLUMN $@30 number_is_opt plus_minus_opt name_or_lit + 330 | screen_clauses with_opt screen_attrib + + 331 $@31: /* empty */ + + 332 screen_clauses: screen_clauses with_opt FOREGROUNDCOLOR $@31 name_or_lit + + 333 $@32: /* empty */ + + 334 screen_clauses: screen_clauses with_opt BACKGROUNDCOLOR $@32 name_or_lit + + 335 $@33: /* empty */ + + 336 screen_clauses: screen_clauses with_opt COLOR $@33 name_or_lit + 337 | screen_clauses screen_source_destination + 338 | screen_clauses value_is_are gliteral + 339 | screen_clauses pictures + + 340 $@34: /* empty */ + + 341 screen_clauses: screen_clauses SIZE $@34 name_or_lit + 342 | /* empty */ + + 343 $@35: /* empty */ + + 344 screen_source_destination: USING $@35 name_or_lit + + 345 $@36: /* empty */ + + 346 screen_source_destination: FROM $@36 name_or_lit screen_to_name + + 347 $@37: /* empty */ + + 348 screen_source_destination: TO $@37 name + + 349 screen_to_name: /* empty */ + 350 | TO name + + 351 screen_attrib: BLANK SCREEN + 352 | BLANK LINE + 353 | ERASE EOL + 354 | ERASE EOS + 355 | ERASE + 356 | with_opt BELL + 357 | sign_clause + 358 | FULL + 359 | REQUIRED + 360 | SECURE + 361 | AUTO + 362 | JUSTIFIED RIGHT + 363 | JUSTIFIED LEFT + 364 | BLINK + 365 | REVERSEVIDEO + 366 | UNDERLINE + 367 | LOWLIGHT + 368 | HIGHLIGHT + 369 | BLANK when_opt ZERO + 370 | with_opt NOECHO + 371 | with_opt UPDATE + 372 | with_opt NO ADVANCING + 373 | UPPER + 374 | LOWER + + 375 screen_attribx: BLANK SCREEN + 376 | BLANK LINE + 377 | ERASE EOL + 378 | ERASE EOS + 379 | ERASE + 380 | with_opt BELL + 381 | sign_clause + 382 | FULL + 383 | REQUIRED + 384 | SECURE + 385 | AUTO + 386 | JUSTIFIED RIGHT + 387 | JUSTIFIED LEFT + 388 | BLINK + 389 | REVERSEVIDEO + 390 | UNDERLINE + 391 | LOWLIGHT + 392 | HIGHLIGHT + 393 | BLANK when_opt ZERO + 394 | with_opt NOECHO + 395 | with_opt UPDATE + 396 | with_opt NO ADVANCING + 397 | UPPER + 398 | LOWER + 399 | FOREGROUNDCOLOR integer + 400 | BACKGROUNDCOLOR integer + + 401 sign_clause: sign_is_opt LEADING separate_opt + 402 | sign_is_opt TRAILING separate_opt + + 403 separate_opt: SEPARATE character_opt + 404 | /* empty */ + + 405 character_opt: CHARACTER + 406 | /* empty */ + + 407 sign_is_opt: SIGN is_opt + 408 | is_opt + + 409 plus_minus_opt: PLUS + 410 | '+' + 411 | MINUS + 412 | '-' + 413 | /* empty */ + + 414 number_is_opt: NUMBER is_opt + 415 | /* empty */ + + 416 $@38: /* empty */ + + 417 $@39: /* empty */ + + 418 $@40: /* empty */ + + 419 file_section: file_section FD $@38 STRING $@39 file_description_fd_clauses PERIOD_TOK $@40 file_description + + 420 $@41: /* empty */ + + 421 $@42: /* empty */ + + 422 $@43: /* empty */ + + 423 file_section: file_section SD $@41 STRING $@42 file_description_sd_clauses PERIOD_TOK $@43 file_description + 424 | error + 425 | /* empty */ + + 426 file_description: field_description + 427 | file_description field_description + + 428 $@44: /* empty */ + + 429 field_description: integer def_name_opt $@44 data_clauses PERIOD_TOK + + 430 data_clauses: /* empty */ + 431 | data_clauses data_clause + 432 | data_clauses redefines_clause + + 433 $@45: /* empty */ + + 434 redefines_clause: REDEFINES $@45 redefines_var + + 435 redefines_var: VARIABLE + 436 | SUBSCVAR + + 437 data_clause: array_options + 438 | pictures + 439 | usage_option + 440 | sign_clause + 441 | value_option + 442 | SYNCHRONIZED sync_options + 443 | JUSTIFIED sync_options + 444 | is_opt EXTERNAL + 445 | is_opt GLOBAL + 446 | BLANK when_opt ZERO + + 447 $@46: /* empty */ + + 448 data_clause: RENAMES $@46 variable thru_gname_opt + + 449 sync_options: /* empty */ + 450 | LEFT + 451 | RIGHT + + 452 thru_gname_opt: /* empty */ + 453 | THRU variable + + 454 $@47: /* empty */ + + 455 array_options: OCCURS integer times_opt $@47 indexed_by_opt + + 456 $@48: /* empty */ + + 457 $@49: /* empty */ + + 458 array_options: OCCURS integer TO integer times_opt DEPENDING $@48 on_opt gname $@49 indexed_by_opt + + 459 key_is_opt: DIRECTION key_opt is_opt STRING + 460 | /* empty */ + + 461 indexed_by_opt: key_is_opt INDEXED by_opt index_name_list + 462 | /* empty */ + + 463 index_name_list: def_name + 464 | index_name_list def_name + + 465 usage_option: usage_opt is_opt usage + + 466 usage: USAGENUM + 467 | DISPLAY + 468 | POINTER + + 469 value_option: value_is_are value_list + + 470 value_is_are: VALUE is_opt + 471 | VALUES are_opt + + 472 value_list: value + 473 | value_list comma_opt value + + 474 value: gliteral + 475 | gliteral THRU gliteral + + 476 $@50: /* empty */ + + 477 pictures: PICTURE $@50 is_opt picture + + 478 picture: /* empty */ + 479 | picture pic_elem + + 480 pic_elem: CHAR multiplier_opt + + 481 multiplier_opt: /* empty */ + 482 | MULTIPLIER + + 483 file_description_fd_clauses: /* empty */ + 484 | file_description_fd_clauses file_description_fd_clause + + 485 file_description_sd_clauses: /* empty */ + 486 | file_description_sd_clauses file_description_sd_clause + + 487 file_description_fd_clause: is_opt EXTERNAL + 488 | is_opt GLOBAL + 489 | file_description_clause_block + 490 | file_description_clause_record + 491 | file_description_clause_label + 492 | file_description_clause_value + 493 | file_description_clause_data + 494 | file_description_clause_report + 495 | file_description_clause_linage + 496 | file_description_clause_code_set + + 497 file_description_sd_clause: file_description_clause_record + 498 | file_description_clause_data + + 499 file_description_clause_block: BLOCK contains_opt integer to_integer_opt chars_or_recs_opt + + 500 file_description_clause_record: RECORD contains_opt integer to_rec_varying character_opts + 501 | RECORD is_opt VARYING in_opt size_opt from_rec_varying to_rec_varying character_opts depend_rec_varying + + 502 file_description_clause_label: LABEL record_is_are std_or_omitt + + 503 file_description_clause_value: VALUE OF FILE_ID is_opt filename + + 504 file_description_clause_data: DATA record_is_are var_strings + + 505 file_description_clause_report: report_is_are STRING + + 506 file_description_clause_code_set: CODE_SET is_opt STRING + + 507 file_description_clause_linage: LINAGE is_opt data_name lines_opt file_description_clause_linage_footing file_description_clause_linage_top file_description_clause_linage_bottom + + 508 file_description_clause_linage_footing: /* empty */ + 509 | with_opt FOOTING at_opt data_name + + 510 file_description_clause_linage_top: /* empty */ + 511 | lines_at_opt TOP data_name + + 512 file_description_clause_linage_bottom: /* empty */ + 513 | lines_at_opt BOTTOM data_name + + 514 lines_at_opt: /* empty */ + 515 | LINES + 516 | LINES AT + 517 | AT + + 518 report_is_are: REPORT is_opt + 519 | REPORTS are_opt + + 520 var_strings: STRING + 521 | var_strings STRING + + 522 chars_or_recs_opt: /* empty */ + 523 | CHARACTERS + 524 | RECORDS + + 525 to_integer_opt: /* empty */ + 526 | TO integer + + 527 depend_rec_varying: /* empty */ + 528 | DEPENDING on_opt STRING + + 529 from_rec_varying: /* empty */ + 530 | from_opt nliteral + + 531 from_opt: FROM + 532 | /* empty */ + + 533 to_rec_varying: /* empty */ + 534 | TO nliteral + + 535 record_is_are: RECORD is_opt + 536 | RECORDS are_opt + + 537 std_or_omitt: STANDARD + 538 | OMITTED + + 539 usage_opt: /* empty */ + 540 | USAGE + + 541 times_opt: /* empty */ + 542 | TIMES + + 543 when_opt: /* empty */ + 544 | WHEN + + 545 contains_opt: /* empty */ + 546 | CONTAINS + + 547 character_opts: /* empty */ + 548 | CHARACTERS + + 549 order_opt: /* empty */ + 550 | ORDER + + 551 data_opt: /* empty */ + 552 | DATA + + 553 working_storage_section: working_storage_section field_description + 554 | /* empty */ + + 555 linkage_section: /* empty */ + 556 | linkage_section field_description + + 557 $@51: /* empty */ + + 558 $@52: /* empty */ + + 559 procedure_division_opt: PROCEDURE DIVISION $@51 using_parameters PERIOD_TOK $@52 declaratives_opt procedure_division + 560 | /* empty */ + + 561 procedure_division: /* empty */ + 562 | procedure_division procedure_decl + + 563 procedure_decl: procedure_section + 564 | paragraph + + 565 $@53: /* empty */ + + 566 procedure_decl: $@53 statements PERIOD_TOK + + 567 $@54: /* empty */ + + 568 procedure_decl: error $@54 PERIOD_TOK + 569 | PERIOD_TOK + + 570 $@55: /* empty */ + + 571 declaratives_opt: DECLARATIVES PERIOD_TOK $@55 declaratives_procedure declaratives_division END DECLARATIVES PERIOD_TOK + 572 | /* empty */ + + 573 declaratives_division: /* empty */ + 574 | declaratives_division declaratives_decl + + 575 declaratives_decl: declaratives_procedure + 576 | paragraph + + 577 $@56: /* empty */ + + 578 declaratives_decl: $@56 statements PERIOD_TOK + + 579 $@57: /* empty */ + + 580 declaratives_decl: error $@57 PERIOD_TOK + + 581 $@58: /* empty */ + + 582 declaratives_procedure: procedure_section $@58 use_phrase + 583 | error + + 584 use_phrase: USE AFTER use_phrase_exception_error PROCEDURE on_opt use_phrase_option PERIOD_TOK + 585 | error + + 586 use_phrase_exception_error: EXCEPTION + 587 | ERROR_TOK + 588 | STANDARD EXCEPTION + 589 | STANDARD ERROR_TOK + + 590 use_phrase_option: gname_list + 591 | open_mode + + 592 procedure_section: LABELSTR SECTION PERIOD_TOK + + 593 paragraph: LABELSTR dot_or_eos + + 594 dot_or_eos: '.' + 595 | PERIOD_TOK + + 596 statement_list: statements + + 597 statements: statement + 598 | statements statement + + 599 statement: move_statement + 600 | initialize_statement + 601 | compute_statement + 602 | add_statement + 603 | subtract_statement + 604 | multiply_statement + 605 | divide_statement + 606 | accept_statement + 607 | display_statement + 608 | open_statement + 609 | close_statement + 610 | read_statement + 611 | return_statement + 612 | release_statement + 613 | write_statement + 614 | rewrite_statement + 615 | delete_statement + 616 | start_statement + 617 | perform_statement + 618 | goto_statement + 619 | exit_statement + 620 | stop_statement + 621 | call_statement + 622 | call_loadlib_statement + 623 | chain_statement + 624 | set_statement + 625 | sort_statement + 626 | merge_statement + 627 | inspect_statement + 628 | string_statement + 629 | unstring_statement + 630 | initiate_statement + 631 | generate_statement + 632 | terminate_statement + 633 | proto_statement + 634 | trace_statement + 635 | goback_statement + 636 | cancel_statement + 637 | unlock_statement + 638 | if_statement + 639 | evaluate_statement + 640 | search_statement + 641 | CONTINUE + + 642 perform_statement: PERFORM perform_options + + 643 $@59: /* empty */ + + 644 if_statement: if_part $@59 end_if_opt + + 645 @60: /* empty */ + + 646 $@61: /* empty */ + + 647 if_statement: if_part ELSE @60 conditional_statement $@61 end_if_opt + + 648 search_statement: SEARCH search end_search_opt + 649 | SEARCH ALL search_all end_search_opt + + 650 @62: /* empty */ + + 651 $@63: /* empty */ + + 652 evaluate_statement: EVALUATE @62 selection_subject_set $@63 when_case_list end_evaluate_or_eos + + 653 end_evaluate_or_eos: END_EVALUATE + 654 | PERIOD_TOK + + 655 @64: /* empty */ + + 656 selection_subject_set: @64 selection_subject + + 657 @65: /* empty */ + + 658 selection_subject_set: selection_subject_set ALSO @65 selection_subject + + 659 selection_subject: expr + 660 | condition + 661 | TRUE_TOK + 662 | FALSE_TOK + + 663 @66: /* empty */ + + 664 @67: /* empty */ + + 665 when_case_list: WHEN @66 @67 when_case sentence_or_nothing + + 666 @68: /* empty */ + + 667 @69: /* empty */ + + 668 $@70: /* empty */ + + 669 when_case_list: when_case_list WHEN @68 @69 when_case $@70 sentence_or_nothing + + 670 @71: /* empty */ + + 671 when_case: @71 selection_object + + 672 @72: /* empty */ + + 673 when_case: when_case ALSO @72 selection_object + 674 | OTHER + + 675 selection_object: ANY + 676 | TRUE_TOK + 677 | FALSE_TOK + 678 | not_opt expr + 679 | not_opt expr THRU expr + 680 | not_opt cond_name + + 681 sentence_or_nothing: /* empty */ + 682 | conditional_statement + + 683 @73: /* empty */ + + 684 if_part: IF condition @73 end_then_opt conditional_statement + + 685 $@74: /* empty */ + + 686 conditional_statement: $@74 statement_list + + 687 $@75: /* empty */ + + 688 conditional_statement: $@75 NEXT SENTENCE + + 689 not_opt: /* empty */ + 690 | NOT + + 691 end_if_opt: /* empty */ + 692 | END_IF + + 693 end_then_opt: /* empty */ + 694 | THEN + + 695 @76: /* empty */ + + 696 @77: /* empty */ + + 697 @78: /* empty */ + + 698 search: variable_indexed @76 search_varying_opt @77 search_at_end @78 search_when_list + + 699 @79: /* empty */ + + 700 $@80: /* empty */ + + 701 search_all: variable_indexed @79 search_at_end $@80 search_all_when_list + + 702 search_varying_opt: VARYING variable + 703 | /* empty */ + + 704 @81: /* empty */ + + 705 search_at_end: at_opt END @81 statement_list + 706 | /* empty */ + + 707 search_when_list: search_when + 708 | search_when_list search_when + + 709 @82: /* empty */ + + 710 search_when: WHEN search_when_conditional @82 search_when_statement + + 711 search_when_statement: statement_list + 712 | NEXT SENTENCE + + 713 search_when_conditional: name_or_lit extended_cond_op name_or_lit + + 714 search_all_when_list: search_all_when + 715 | search_all_when_list search_all_when + + 716 $@83: /* empty */ + + 717 @84: /* empty */ + + 718 search_all_when: WHEN $@83 search_all_when_conditional @84 search_all_when_statement + + 719 search_all_when_statement: statement_list + 720 | NEXT SENTENCE + + 721 search_all_when_conditional: variable is_opt CONDITIONAL to_opt variable + 722 | variable is_opt CONDITIONAL to_opt literal + + 723 @85: /* empty */ + + 724 search_all_when_conditional: search_all_when_conditional AND @85 search_all_when_conditional + + 725 end_search_opt: /* empty */ + 726 | END_SEARCH + + 727 unlock_statement: UNLOCK name + + 728 proto_statement: TCOBPROTO1 gname + 729 | TCOBPROTO2 gname gname + + 730 trace_statement: READY TRACE + 731 | RESET TRACE + + 732 initiate_statement: INITIATE name + + 733 generate_statement: GENERATE name + + 734 terminate_statement: TERMINATE name + + 735 cancel_statement: CANCEL gname + 736 | CANCEL ALL + + 737 $@86: /* empty */ + + 738 $@87: /* empty */ + + 739 $@88: /* empty */ + + 740 merge_statement: MERGE name sort_keys $@86 sort_collating_opt $@87 merge_using $@88 sort_output + + 741 merge_using: USING sort_file_list + + 742 sort_statement: sort_file + 743 | sort_variable_indexed + + 744 $@89: /* empty */ + + 745 $@90: /* empty */ + + 746 $@91: /* empty */ + + 747 sort_file: SORT name sort_keys $@89 sort_duplicates_opt sort_collating_opt $@90 sort_input $@91 sort_output + + 748 $@92: /* empty */ + + 749 sort_variable_indexed: SORT variable_indexed sort_keys_idx $@92 sort_duplicates_opt sort_collating_opt + + 750 sort_keys: sort_key + 751 | sort_keys sort_key + + 752 sort_keys_idx: sort_key_idx + 753 | sort_keys_idx sort_key_idx + + 754 sort_key: on_opt DIRECTION key_opt sort_keys_names + + 755 sort_key_idx: on_opt DIRECTION key_opt sort_keys_names_idx + + 756 sort_keys_names: name + 757 | sort_keys_names name + + 758 sort_keys_names_idx: variable_indexed + 759 | sort_keys_names_idx variable_indexed + + 760 sort_duplicates_opt: /* empty */ + 761 | with_opt DUPLICATES in_opt order_opt + + 762 sort_collating_opt: /* empty */ + 763 | collating_sequence + + 764 sort_input: INPUT PROCEDURE is_opt perform_range + 765 | USING sort_file_list + + 766 sort_output: OUTPUT PROCEDURE is_opt perform_range + 767 | GIVING sort_file_list + + 768 sort_file_list: name + 769 | sort_file_list name + + 770 move_statement: MOVE gname TO name_var_list + 771 | MOVE CORRESPONDING name_var TO name_var + 772 | MOVE LENGTH OF gname TO name_var + 773 | MOVE gname TO + + 774 initialize_statement: INITIALIZE gname_list initialize_replacing_opt + 775 | INITIALIZE + + 776 initialize_replacing_opt: /* empty */ + 777 | REPLACING initialize_replacing_lists + + 778 initialize_replacing_lists: initialize_replacing_list + 779 | initialize_replacing_lists initialize_replacing_list + + 780 initialize_replacing_list: initialize_type_list data_opt BY gname + + 781 initialize_type_list: ALPHABETIC + 782 | ALPHANUMERIC + 783 | NUMERIC + 784 | ALPHANUMERIC_EDITED + 785 | NUMERIC_EDITED + + 786 compute_statement: COMPUTE compute_body end_compute_opt + 787 | COMPUTE + + 788 compute_body: var_list_name CONDITIONAL expr on_size_error_opt + + 789 end_compute_opt: /* empty */ + 790 | END_COMPUTE + + 791 add_statement: ADD add_body end_add_opt + 792 | ADD + + 793 add_body: var_list_gname TO var_list_name on_size_error_opt + 794 | var_list_gname add_to_opt GIVING var_list_name on_size_error_opt + 795 | CORRESPONDING var_list_gname TO var_list_name rounded_opt on_size_error_opt + + 796 add_to_opt: /* empty */ + 797 | TO gname + + 798 end_add_opt: /* empty */ + 799 | END_ADD + + 800 subtract_statement: SUBTRACT subtract_body end_subtract_opt + 801 | SUBTRACT + + 802 subtract_body: var_list_gname FROM var_list_name on_size_error_opt + 803 | var_list_gname FROM gname GIVING var_list_name on_size_error_opt + 804 | CORRESPONDING var_list_gname FROM var_list_name rounded_opt on_size_error_opt + + 805 end_subtract_opt: /* empty */ + 806 | END_SUBTRACT + + 807 multiply_statement: MULTIPLY multiply_body end_multiply_opt + 808 | MULTIPLY + + 809 multiply_body: gname BY gname GIVING var_list_name on_size_error_opt + 810 | gname BY var_list_name on_size_error_opt + + 811 end_multiply_opt: /* empty */ + 812 | END_MULTIPLY + + 813 divide_statement: DIVIDE divide_body end_divide_opt + 814 | DIVIDE + + 815 divide_body: gname BY gname GIVING var_list_name on_size_error_opt + 816 | gname BY gname GIVING name rounded_opt REMAINDER name on_size_error_opt + 817 | gname INTO gname GIVING name rounded_opt REMAINDER name on_size_error_opt + 818 | gname INTO gname GIVING var_list_name on_size_error_opt + 819 | gname INTO var_list_name on_size_error_opt + + 820 end_divide_opt: /* empty */ + 821 | END_DIVIDE + + 822 accept_statement: accept_hardware + 823 | accept_chronological + 824 | accept_screen + 825 | ACCEPT + + 826 accept_hardware: ACCEPT name FROM INKEY end_accept_opt + 827 | ACCEPT name FROM INPUT STATUS end_accept_opt + 828 | ACCEPT name FROM CMD_LINE end_accept_opt + 829 | ACCEPT name FROM ESCKEY end_accept_opt + 830 | ACCEPT name FROM ENVIRONMENT_VARIABLE CLITERAL end_accept_opt + + 831 accept_chronological: ACCEPT name FROM DATE_TIME end_accept_opt + + 832 accept_screen: ACCEPT name accept_display_options end_accept_opt + + 833 $@93: /* empty */ + + 834 @94: /* empty */ + + 835 $@95: /* empty */ + + 836 accept_screen: ACCEPT name accept_display_options on_opt EXCEPTION $@93 variable @94 statement_list $@95 end_accept_opt + + 837 end_accept_opt: /* empty */ + 838 | END_ACCEPT + + 839 display_statement: display_line + 840 | display_screen + 841 | DISPLAY + + 842 display_line: DISPLAY display_varlist display_upon display_line_options end_display_opt + + 843 display_screen: DISPLAY display_varlist accept_display_options end_display_opt + + 844 display_varlist: gname + 845 | display_varlist sep_opt gname + + 846 display_upon: UPON CONSOLE + 847 | UPON STD_OUTPUT + 848 | UPON STD_ERROR + + 849 display_line_options: /* empty */ + 850 | display_line_options with_opt NO ADVANCING + 851 | display_line_options with_opt ERASE + 852 | display_line_options with_opt ERASE EOS + 853 | display_line_options with_opt ERASE EOL + 854 | display_line_options with_opt ERASE SCREEN + + 855 end_display_opt: /* empty */ + 856 | END_DISPLAY + + 857 scr_line: LINE number_opt expr + + 858 scr_position: COLUMN number_opt expr + 859 | POSITION expr + + 860 scr_line_position: AT NLITERAL + 861 | AT variable + + 862 accept_display_options: /* empty */ + 863 | accept_display_options accept_display_option + + 864 accept_display_option: with_opt screen_attribx + 865 | scr_line + 866 | scr_position + 867 | scr_line_position + + 868 open_statement: OPEN open_options + 869 | OPEN + + 870 open_options: open_mode open_varlist + 871 | open_options open_mode open_varlist + + 872 open_mode: INPUT + 873 | I_O + 874 | OUTPUT + 875 | EXTEND + 876 | error + + 877 open_varlist: name + 878 | open_varlist sep_opt name + + 879 close_statement: CLOSE close_files + 880 | CLOSE + + 881 close_files: close_file + 882 | close_files sep_opt close_file + + 883 close_file: name close_options_opt + + 884 close_options_opt: close_options + 885 | with_lock_opt + + 886 close_options: with_opt NO REWIND + 887 | REEL + 888 | UNIT + 889 | REEL for_opt REMOVAL + 890 | UNIT for_opt REMOVAL + + 891 with_lock_opt: with_opt LOCK + 892 | with_opt IGNORE LOCK + 893 | /* empty */ + + 894 return_statement: RETURN return_body end_return_opt + 895 | RETURN + + 896 return_body: name record_opt read_into_opt + 897 | name record_opt read_into_opt read_at_end_opt + + 898 read_statement: READ read_body end_read_opt + 899 | READ + + 900 read_body: name read_next_opt record_opt read_into_opt with_lock_opt read_key_opt + 901 | name read_next_opt record_opt read_into_opt with_lock_opt read_key_opt read_at_end_opt + 902 | name read_next_opt record_opt read_into_opt with_lock_opt read_key_opt read_invalid_key_opt + + 903 read_next_opt: /* empty */ + 904 | NEXT + 905 | PREVIOUS + + 906 read_into_opt: /* empty */ + 907 | INTO name + + 908 read_key_opt: /* empty */ + 909 | KEY is_opt name + + 910 read_at_end_opt: NOT at_opt on_end + 911 | AT on_end + 912 | on_end + + 913 $@96: /* empty */ + + 914 read_at_end_opt: AT on_end NOT at_opt $@96 on_end + + 915 $@97: /* empty */ + + 916 read_at_end_opt: on_end NOT at_opt $@97 on_end + + 917 @98: /* empty */ + + 918 on_end: END @98 statement_list + + 919 read_invalid_key_opt: read_invalid_key + 920 | read_not_invalid_key + 921 | read_invalid_key read_not_invalid_key + + 922 @99: /* empty */ + + 923 read_invalid_key: INVALID key_opt @99 statement_list + + 924 @100: /* empty */ + + 925 read_not_invalid_key: NOT INVALID key_opt @100 statement_list + + 926 end_read_opt: /* empty */ + 927 | END_READ + + 928 end_return_opt: /* empty */ + 929 | END_RETURN + + 930 release_statement: RELEASE name release_from_opt + + 931 release_from_opt: /* empty */ + 932 | FROM gname + + 933 $@101: /* empty */ + + 934 write_statement: WRITE name write_from_opt write_options $@101 invalid_key_opt end_write_opt + + 935 write_from_opt: /* empty */ + 936 | FROM gname + + 937 write_options: /* empty */ + 938 | before_after advancing_opt gname line_lines_opt + 939 | before_after advancing_opt PAGE + + 940 end_write_opt: /* empty */ + 941 | END_WRITE + + 942 $@102: /* empty */ + + 943 rewrite_statement: REWRITE name write_from_opt $@102 invalid_key_opt end_rewrite_opt + + 944 end_rewrite_opt: /* empty */ + 945 | END_REWRITE + + 946 $@103: /* empty */ + + 947 delete_statement: DELETE name record_opt $@103 invalid_key_opt end_delete_opt + + 948 end_delete_opt: /* empty */ + 949 | END_DELETE + + 950 $@104: /* empty */ + + 951 start_statement: START start_body invalid_key_opt $@104 end_start_opt + + 952 start_body: name + 953 | name KEY is_opt cond_op name + + 954 end_start_opt: /* empty */ + 955 | END_START + + 956 goto_statement: GO to_opt goto_label + 957 | GO to_opt goto_label_list DEPENDING on_opt variable + + 958 goto_label: label + + 959 goto_label_list: label + 960 | goto_label_list label + 961 | goto_label_list LISTSEP label + + 962 $@105: /* empty */ + + 963 @106: /* empty */ + + 964 @107: /* empty */ + + 965 @108: /* empty */ + + 966 $@109: /* empty */ + + 967 call_statement: CALL $@105 call_convention_opt gname using_options returning_options @106 @107 @108 on_exception_or_overflow on_not_exception $@109 end_call_opt + 968 | CALL + + 969 call_convention_opt: /* empty */ + 970 | CALL_CONV_C + 971 | CALL_CONV_STDCALL + + 972 $@110: /* empty */ + + 973 call_loadlib_statement: CALL_LOADLIB gname $@110 end_call_loadlib_opt + 974 | CALL_LOADLIB + + 975 end_call_loadlib_opt: END_CALL_LOADLIB + 976 | /* empty */ + + 977 $@111: /* empty */ + + 978 @112: /* empty */ + + 979 @113: /* empty */ + + 980 $@114: /* empty */ + + 981 chain_statement: CHAIN $@111 gname using_options @112 @113 on_exception_or_overflow $@114 end_chain_opt + 982 | CHAIN + + 983 exit_statement: EXIT + 984 | EXIT PARAGRAPH + 985 | EXIT PROGRAM + + 986 stop_statement: STOP RUN + 987 | STOP stop_literal + + 988 stop_literal: CLITERAL + 989 | NLITERAL + + 990 goback_statement: GOBACK + + 991 var_list_name: name rounded_opt sep_opt + 992 | var_list_name name rounded_opt sep_opt + + 993 var_list_gname: gname sep_opt + 994 | var_list_gname gname sep_opt + + 995 rounded_opt: /* empty */ + 996 | ROUNDED + + 997 on_size_error_opt: /* empty */ + 998 | NOT on_opt SIZE on_size_error + 999 | on_opt SIZE on_size_error + + 1000 $@115: /* empty */ + + 1001 on_size_error_opt: on_opt SIZE on_size_error NOT on_opt SIZE $@115 on_size_error + + 1002 @116: /* empty */ + + 1003 on_size_error: ERROR_TOK @116 statement_list + + 1004 size_opt: /* empty */ + 1005 | SIZE + + 1006 end_call_opt: /* empty */ + 1007 | END_CALL + + 1008 end_chain_opt: /* empty */ + 1009 | END_CHAIN + + 1010 set_statement: SET set_list + + 1011 set_list: set_target TO address_of_opt set_variable_or_nlit + 1012 | set_target UP BY var_or_nliteral + 1013 | set_target DOWN BY var_or_nliteral + 1014 | address_of_opt variable TO address_of_opt set_variable + + 1015 set_target: name_list + 1016 | cond_name + + 1017 set_variable: variable + 1018 | NULL_TOK + + 1019 set_variable_or_nlit: name_or_lit + 1020 | ON + 1021 | OFF + 1022 | NULL_TOK + 1023 | TRUE_TOK + + 1024 address_of_opt: /* empty */ + 1025 | ADDRESS of_opt + + 1026 $@117: /* empty */ + + 1027 string_statement: STRINGCMD string_from_list INTO name string_with_pointer $@117 on_overflow_opt end_stringcmd_opt + + 1028 $@118: /* empty */ + + 1029 unstring_statement: UNSTRING name unstring_delimited INTO unstring_destinations string_with_pointer unstring_tallying $@118 on_overflow_opt end_unstring_opt + + 1030 unstring_delimited: DELIMITED by_opt unstring_delimited_vars + 1031 | /* empty */ + + 1032 unstring_delimited_vars: all_opt gname + 1033 | unstring_delimited_vars OR all_opt gname + + 1034 unstring_destinations: unstring_dest_var + 1035 | unstring_destinations sep_opt unstring_dest_var + + 1036 unstring_dest_var: name unstring_delim_opt unstring_count_opt + + 1037 unstring_delim_opt: /* empty */ + 1038 | DELIMITER in_opt name + + 1039 unstring_count_opt: /* empty */ + 1040 | COUNT in_opt name + + 1041 unstring_tallying: /* empty */ + 1042 | TALLYING in_opt name + + 1043 all_opt: /* empty */ + 1044 | ALL + + 1045 $@119: /* empty */ + + 1046 on_overflow_opt: $@119 on_overflow on_not_overflow + + 1047 @120: /* empty */ + + 1048 on_exception_or_overflow: on_opt exception_or_overflow @120 statement_list + 1049 | /* empty */ + + 1050 exception_or_overflow: EXCEPTION + 1051 | OVERFLOW_TOK + + 1052 @121: /* empty */ + + 1053 on_not_exception: NOT on_opt EXCEPTION @121 statement_list + 1054 | /* empty */ + + 1055 @122: /* empty */ + + 1056 on_overflow: on_opt OVERFLOW_TOK @122 statement_list + 1057 | /* empty */ + + 1058 @123: /* empty */ + + 1059 on_not_overflow: not_excep on_opt OVERFLOW_TOK @123 statement_list + 1060 | /* empty */ + + 1061 invalid_key_opt: invalid_key_sentence + 1062 | not_invalid_key_sentence + 1063 | invalid_key_sentence not_invalid_key_sentence + 1064 | /* empty */ + + 1065 @124: /* empty */ + + 1066 invalid_key_sentence: INVALID key_opt @124 statement_list + + 1067 @125: /* empty */ + + 1068 not_invalid_key_sentence: not_excep INVALID key_opt @125 statement_list + + 1069 not_excep: NOTEXCEP + 1070 | NOT + + 1071 string_with_pointer: with_opt POINTER name + 1072 | /* empty */ + + 1073 string_from_list: string_from + 1074 | string_from_list sep_opt string_from + 1075 | error + + 1076 string_from: gname + 1077 | gname DELIMITED by_opt delimited_by + + 1078 delimited_by: gname + 1079 | SIZE + 1080 | error + + 1081 end_stringcmd_opt: /* empty */ + 1082 | END_STRINGCMD + + 1083 end_unstring_opt: /* empty */ + 1084 | END_UNSTRING + + 1085 $@126: /* empty */ + + 1086 inspect_statement: INSPECT name tallying_clause $@126 replacing_clause + 1087 | INSPECT name converting_clause + + 1088 converting_clause: CONVERTING noallname TO noallname inspect_before_after + + 1089 tallying_clause: TALLYING tallying_list + 1090 | /* empty */ + + 1091 tallying_list: tallying_list name FOR tallying_for_list + 1092 | /* empty */ + + 1093 tallying_for_list: tallying_for_list CHARACTERS inspect_before_after + 1094 | tallying_for_list ALL noallname inspect_before_after + 1095 | tallying_for_list LEADING noallname inspect_before_after + 1096 | /* empty */ + + 1097 replacing_clause: REPLACING replacing_list + 1098 | /* empty */ + + 1099 replacing_list: replacing_list CHARACTERS BY noallname inspect_before_after + 1100 | replacing_list replacing_kind replacing_by_list + 1101 | /* empty */ + + 1102 replacing_by_list: replacing_by_list noallname BY noallname inspect_before_after + 1103 | /* empty */ + + 1104 replacing_kind: ALL + 1105 | LEADING + 1106 | TRAILING + 1107 | FIRST + + 1108 inspect_before_after: inspect_before_after BEFORE initial_opt noallname + 1109 | inspect_before_after AFTER initial_opt noallname + 1110 | /* empty */ + + 1111 initial_opt: INITIAL_TOK + 1112 | /* empty */ + + 1113 expr: gname + 1114 | expr '*' expr + 1115 | expr '/' expr + 1116 | expr '+' expr + 1117 | expr '-' expr + 1118 | expr POW_OP expr + 1119 | '(' expr ')' + + 1120 expr_opt: /* empty */ + 1121 | expr + + 1122 using_options: /* empty */ + + 1123 @127: /* empty */ + + 1124 @128: /* empty */ + + 1125 using_options: USING @127 dummy @128 parm_list + + 1126 returning_options: /* empty */ + 1127 | RETURNING variable + 1128 | GIVING variable + + 1129 dummy: /* empty */ + + 1130 using_parameters: /* empty */ + 1131 | USING gname_list + 1132 | CHAINING gname_list + + 1133 parm_list: parm_list sep_opt parameter + 1134 | parameter + + 1135 parameter: gname + 1136 | by_opt parm_type gname + + 1137 parm_type: REFERENCE + 1138 | VALUE + 1139 | CONTENT + + 1140 intrinsic_parm_list: intrinsic_parm_list sep_opt intrinsic_parm + 1141 | intrinsic_parm + + 1142 intrinsic_parm: gname + + 1143 perform_range: label perform_thru_opt + + 1144 perform_options: perform_statements END_PERFORM + + 1145 @129: /* empty */ + + 1146 $@130: /* empty */ + + 1147 perform_options: gname TIMES @129 perform_statements $@130 END_PERFORM + + 1148 @131: /* empty */ + + 1149 @132: /* empty */ + + 1150 $@133: /* empty */ + + 1151 perform_options: with_test_opt UNTIL @131 condition @132 perform_statements $@133 END_PERFORM + + 1152 @134: /* empty */ + + 1153 @135: /* empty */ + + 1154 $@136: /* empty */ + + 1155 perform_options: with_test_opt VARYING name FROM gname by_opt gname UNTIL @134 condition @135 perform_after_opt perform_statements $@136 END_PERFORM + 1156 | label perform_thru_opt + + 1157 @137: /* empty */ + + 1158 perform_options: label perform_thru_opt with_test_opt UNTIL @137 condition + 1159 | label perform_thru_opt gname TIMES + + 1160 @138: /* empty */ + + 1161 @139: /* empty */ + + 1162 perform_options: label perform_thru_opt with_test_opt VARYING name FROM gname by_opt gname UNTIL @138 condition @139 perform_after_opt + + 1163 perform_thru_opt: /* empty */ + 1164 | THRU label + + 1165 with_test_opt: /* empty */ + 1166 | with_opt TEST before_after + + 1167 perform_after_opt: /* empty */ + 1168 | AFTER perform_after + 1169 | AFTER perform_after AFTER perform_after + 1170 | AFTER perform_after AFTER perform_after AFTER perform_after + 1171 | AFTER perform_after AFTER perform_after AFTER perform_after AFTER perform_after + 1172 | AFTER perform_after AFTER perform_after AFTER perform_after AFTER perform_after AFTER perform_after + 1173 | AFTER perform_after AFTER perform_after AFTER perform_after AFTER perform_after AFTER perform_after AFTER perform_after + + 1174 @140: /* empty */ + + 1175 perform_after: name FROM gname by_opt gname UNTIL @140 condition + + 1176 $@141: /* empty */ + + 1177 perform_statements: $@141 statement_list + + 1178 before_after: BEFORE + 1179 | AFTER + + 1180 $@142: /* empty */ + + 1181 condition: expr extended_cond_op $@142 expr_opt + 1182 | NOT condition + + 1183 @143: /* empty */ + + 1184 condition: condition AND @143 implied_op_condition + + 1185 @144: /* empty */ + + 1186 condition: condition OR @144 implied_op_condition + 1187 | '(' condition ')' + 1188 | cond_name + + 1189 implied_op_condition: condition + 1190 | cond_op expr + 1191 | expr + + 1192 sign_condition: POSITIVE + 1193 | NEGATIVE + 1194 | ZERO + + 1195 class_condition: NUMERIC + 1196 | ALPHABETIC + 1197 | ALPHABETIC_LOWER + 1198 | ALPHABETIC_UPPER + + 1199 extended_cond_op: IS ext_cond + 1200 | IS NOT ext_cond + 1201 | IS ext_cond OR ext_cond + 1202 | ext_cond + 1203 | NOT is_opt ext_cond + 1204 | ext_cond OR ext_cond + + 1205 ext_cond: conditional + 1206 | class_condition + 1207 | sign_condition + + 1208 cond_op: conditional + 1209 | NOT conditional + 1210 | conditional OR conditional + + 1211 conditional: CONDITIONAL than_to_opt + + 1212 comma_opt: /* empty */ + 1213 | ',' + + 1214 sep_opt: /* empty */ + 1215 | LISTSEP + + 1216 key_opt: /* empty */ + 1217 | KEY + + 1218 advancing_opt: /* empty */ + 1219 | ADVANCING + + 1220 than_to_opt: /* empty */ + 1221 | TO + 1222 | THAN + + 1223 record_opt: /* empty */ + 1224 | RECORD + + 1225 at_opt: /* empty */ + 1226 | AT + + 1227 in_opt: /* empty */ + 1228 | IN + + 1229 in_of: IN + 1230 | OF + + 1231 by_opt: /* empty */ + 1232 | BY + + 1233 with_opt: /* empty */ + 1234 | WITH + + 1235 on_opt: /* empty */ + 1236 | ON + + 1237 gname_opt: gname + 1238 | /* empty */ + + 1239 to_opt: /* empty */ + 1240 | TO + + 1241 name_var_list: name_var + 1242 | name_var_list sep_opt name_var + + 1243 gname_list: gname + 1244 | gname_list sep_opt gname + + 1245 gname: name + 1246 | gliteral + + 1247 @145: /* empty */ + + 1248 gname: FUNCTION LABELSTR '(' @145 intrinsic_parm_list ')' + 1249 | FUNCTION LABELSTR + + 1250 name_or_lit: name + 1251 | literal + + 1252 noallname: name + 1253 | without_all_literal + + 1254 gliteral: without_all_literal + 1255 | all_literal + + 1256 without_all_literal: literal + 1257 | special_literal + + 1258 all_literal: ALL literal + 1259 | ALL special_literal + + 1260 special_literal: SPACES + 1261 | ZERO + 1262 | QUOTES + 1263 | HIGHVALUES + 1264 | LOWVALUES + + 1265 var_or_nliteral: variable + 1266 | nliteral + + 1267 nliteral: signed_nliteral + + 1268 literal: signed_nliteral + 1269 | CLITERAL + + 1270 signed_nliteral: NLITERAL + 1271 | '+' NLITERAL + 1272 | '-' NLITERAL + + 1273 def_name_opt: def_name + 1274 | /* empty */ + + 1275 def_name: STRING + 1276 | FILLER + + 1277 variable_indexed: SUBSCVAR + + 1278 filename: literal + 1279 | STRING + + 1280 data_name: literal + 1281 | STRING + + 1282 $@146: /* empty */ + + 1283 cond_name: VARCOND '(' $@146 subscripts ')' + 1284 | VARCOND + + 1285 name: variable '(' gname ':' gname_opt ')' + 1286 | variable + 1287 | LABELSTR + + 1288 name_var: gname + + 1289 variable: qualified_var + + 1290 $@147: /* empty */ + + 1291 variable: qualified_var LPAR $@147 subscripts ')' + + 1292 qualified_var: unqualified_var + 1293 | unqualified_var in_of qualified_var + + 1294 unqualified_var: VARIABLE + 1295 | SUBSCVAR + + 1296 subscripts: subscript + 1297 | subscripts comma_opt subscript + + 1298 subscript: gname + 1299 | subscript '+' gname + 1300 | subscript '-' gname + + 1301 integer: signed_nliteral + + 1302 label: LABELSTR in_of LABELSTR + 1303 | LABELSTR + 1304 | NLITERAL + 1305 | NLITERAL in_of NLITERAL + 1306 | NLITERAL in_of LABELSTR + + 1307 anystring: STRING + 1308 | LABELSTR + + +Terminals, with rules where they appear + +$end (0) 0 +'(' (40) 1119 1187 1248 1283 1285 +')' (41) 1119 1187 1248 1283 1285 1291 +'*' (42) 1114 +'+' (43) 410 1116 1271 1299 +',' (44) 1213 +'-' (45) 412 1117 1272 1300 +'.' (46) 594 +'/' (47) 1115 +':' (58) 1285 +error (256) 40 50 96 114 123 171 174 424 568 580 583 585 876 1075 1080 +LOW_PREC (258) +IDSTRING (259) 10 15 +STRING (260) 36 38 43 63 69 70 74 75 77 81 109 110 111 112 160 169 + 170 194 419 423 459 505 506 520 521 528 1275 1279 1281 1307 +VARIABLE (261) 435 1294 +VARCOND (262) 1283 1284 +SUBSCVAR (263) 436 1277 1295 +LABELSTR (264) 592 593 1248 1249 1287 1302 1303 1306 1308 +CMD_LINE (265) 828 +ENVIRONMENT_VARIABLE (266) 830 +INKEY (267) 826 +ESCKEY (268) 829 +CHAR (269) 480 +MULTIPLIER (270) 482 +USAGENUM (271) 466 +ZERONUM (272) +CONDITIONAL (273) 721 722 788 1211 +TO (274) 348 350 458 526 534 770 771 772 773 793 795 797 1011 1014 + 1088 1221 1240 +IS (275) 131 212 286 1199 1200 1201 +ARE (276) 133 213 287 +THRU (277) 67 89 453 475 679 1164 +THAN (278) 1222 +NO (279) 372 396 850 886 +COMMENTING (280) +DIRECTION (281) 459 754 755 +READ (282) 898 899 +WRITE (283) 934 +INPUT_OUTPUT (284) 93 +RELEASE (285) 930 +NLITERAL (286) 113 860 989 1270 1271 1272 1304 1305 1306 +CLITERAL (287) 60 66 67 830 988 1269 +PORTNUM (288) 119 121 +DATE_TIME (289) 831 +POW_OP (290) 1118 +OR (291) 1033 1186 1201 1204 1210 +AND (292) 724 1184 +NOT (293) 690 910 914 916 925 998 1001 1053 1070 1182 1200 1203 1209 +ACCEPT (294) 825 826 827 828 829 830 831 832 836 +ACCESS (295) 108 +ADD (296) 791 792 +ADDRESS (297) 1025 +ADVANCING (298) 372 396 850 1219 +AFTER (299) 584 1109 1168 1169 1170 1171 1172 1173 1179 +ALL (300) 649 736 1044 1094 1104 1258 1259 +ALPHABET (301) 81 +ALPHABETIC (302) 781 1196 +ALPHABETIC_LOWER (303) 1197 +ALPHABETIC_UPPER (304) 1198 +ALPHANUMERIC (305) 782 +ALPHANUMERIC_EDITED (306) 784 +ALSO (307) 91 92 658 673 +ALTERNATE (308) 112 +ANY (309) 675 +AREA (310) 128 165 +AREAS (311) 129 +ASSIGN (312) 107 +AT (313) 516 517 860 861 911 914 1226 +AUTHOR (314) 23 +AUTO (315) 361 385 +BACKGROUNDCOLOR (316) 334 400 +BEFORE (317) 1108 1178 +BELL (318) 356 380 +BLANK (319) 298 351 352 369 375 376 393 446 +BLINK (320) 364 388 +BLOCK (321) 499 +BOTTOM (322) 513 +BY (323) 780 809 810 815 816 1012 1013 1099 1102 1232 +CALL (324) 967 968 +CALL_CONV_C (325) 970 +CALL_CONV_STDCALL (326) 971 +CALL_LOADLIB (327) 973 974 +CANCEL (328) 735 736 +CENTER (329) 283 +CF (330) 257 +CH (331) 254 +CHAIN (332) 981 982 +CHAINING (333) 1132 +CHARACTER (334) 405 +CHARACTERS (335) 523 548 1093 1099 +CLASS (336) 63 +CLOSE (337) 879 880 +CODE (338) 198 +CODE_SET (339) 506 +COLLATING (340) 44 +COLOR (341) 336 +COLUMN (342) 277 278 279 329 858 +COLUMNS (343) 280 +COMMA (344) 68 +COMMON (345) 18 +COMPUTE (346) 786 787 +CONFIGURATION (347) 31 +CONSOLE (348) 846 +CONTAINS (349) 546 +CONTENT (350) 1139 +CONTINUE (351) 641 +CONTROL (352) 209 245 248 +CONTROLS (353) 210 +CONVERTING (354) 1088 +CORRESPONDING (355) 771 795 804 +COUNT (356) 1040 +CURRENCY (357) 60 +CURSOR (358) 70 +DATA (359) 176 504 552 +DATE_COMPILED (360) 25 +DATE_WRITTEN (361) 24 +DE (362) 255 +DEBUGGING (363) 46 +DECIMAL_POINT (364) 68 +DECLARATIVES (365) 571 +DELETE (366) 947 +DELIMITED (367) 1030 1077 +DELIMITER (368) 1038 +DEPENDING (369) 458 528 957 +DETAIL (370) 217 219 246 +DISPLAY (371) 264 265 467 841 842 843 +DISPLAY_SCREEN (372) 69 +DIVIDE (373) 813 814 +DIVISION (374) 15 29 176 559 +DOWN (375) 1013 +DUPLICATES (376) 124 761 +DYNAMIC (377) 143 +ELSE (378) 647 +END (379) 10 571 705 918 +END_ACCEPT (380) 838 +END_ADD (381) 799 +END_CALL (382) 1007 +END_CALL_LOADLIB (383) 975 +END_CHAIN (384) 1009 +END_COMPUTE (385) 790 +END_DELETE (386) 949 +END_DISPLAY (387) 856 +END_DIVIDE (388) 821 +END_EVALUATE (389) 653 +END_IF (390) 692 +END_MULTIPLY (391) 812 +END_OF_PAGE (392) +END_PERFORM (393) 1144 1147 1151 1155 +END_READ (394) 927 +END_RETURN (395) 929 +END_REWRITE (396) 945 +END_SEARCH (397) 726 +END_START (398) 955 +END_STRINGCMD (399) 1082 +END_SUBTRACT (400) 806 +END_UNSTRING (401) 1084 +END_WRITE (402) 941 +ENVIRONMENT (403) 29 +EOL (404) 353 377 853 +EOS (405) 354 378 852 +ERASE (406) 353 354 355 377 378 379 851 852 853 854 +ERROR_TOK (407) 587 589 1003 +EVALUATE (408) 652 +EXCEPTION (409) 586 588 836 1050 1053 +EXIT (410) 983 984 985 +EXTEND (411) 875 +EXTERNAL (412) 122 444 487 +FALSE_TOK (413) 662 677 +FD (414) 419 +FILE_CONTROL (415) 97 +FILE_ID (416) 503 +FILE_TOK (417) 115 157 179 +FILLER (418) 1276 +FINAL (419) 221 305 313 +FIRST (420) 219 1107 +FOOTING (421) 215 248 249 250 509 +FOR (422) 167 1091 +FOREGROUNDCOLOR (423) 332 399 +FROM (424) 346 531 802 803 804 826 827 828 829 830 831 932 936 1155 + 1162 1175 +FULL (425) 358 382 +FUNCTION (426) 1248 1249 +GENERATE (427) 733 +GIVING (428) 767 794 803 809 815 816 817 818 1128 +GLOBAL (429) 197 445 488 +GO (430) 956 957 +GOBACK (431) 990 +GROUP (432) 267 297 +HEADING (433) 204 242 243 245 +HIGHLIGHT (434) 368 392 +HIGHVALUES (435) 1263 +IDENTIFICATION (436) 15 +IF (437) 684 +IGNORE (438) 892 +IN (439) 1228 1229 +INDEXED (440) 137 461 +INDICATE (441) 300 +INITIALIZE (442) 774 775 +INITIAL_TOK (443) 17 1111 +INITIATE (444) 732 +INPUT (445) 764 827 872 +INSPECT (446) 1086 1087 +INSTALLATION (447) 26 +INTO (448) 817 818 819 907 1027 1029 +INVALID (449) 923 925 1066 1068 +I_O (450) 873 +I_O_CONTROL (451) 99 +JUSTIFIED (452) 266 362 363 386 387 443 +KEY (453) 909 953 1217 +LABEL (454) 502 +LAST (455) 217 +LEADING (456) 308 401 1095 1105 +LEFT (457) 282 363 387 450 +LENGTH (458) 772 +LIMIT (459) 212 +LIMITS (460) 213 +LINAGE (461) 507 +LINE (462) 140 206 272 273 274 327 352 376 857 +LINES (463) 208 275 515 516 +LINKAGE (464) 185 +LISTSEP (465) 961 1215 +LOCK (466) 891 892 +LOWER (467) 374 398 +LOWLIGHT (468) 367 391 +LOWVALUES (469) 1264 +LPAR (470) 1291 +MERGE (471) 740 +MINUS (472) 411 +MODE (473) 46 135 +MOVE (474) 770 771 772 773 +MULTIPLE (475) 157 +MULTIPLY (476) 807 808 +NATIVE (477) 82 +NEGATIVE (478) 1193 +NEXT (479) 267 268 269 316 688 712 720 904 +NOECHO (480) 370 394 +NOTEXCEP (481) 1069 +NULL_TOK (482) 1018 1022 +NUMBER (483) 273 278 307 414 +NUMBERS (484) 274 279 +NUMERIC (485) 783 1195 +NUMERIC_EDITED (486) 785 +OBJECT_COMPUTER (487) 38 +OCCURS (488) 455 458 +OF (489) 317 503 772 1230 +OFF (490) 77 1021 +OMITTED (491) 538 +ON (492) 75 268 1020 1236 +ONLY (493) +OPEN (494) 868 869 +OPTIONAL (495) 126 +ORDER (496) 550 +ORGANIZATION (497) 117 +OTHER (498) 674 +OUTPUT (499) 766 874 +OVERFLOW_TOK (500) 1051 1056 1059 +PADDING (501) +PAGE (502) 202 243 249 268 269 316 939 +PAGE_COUNTER (503) 295 +PARAGRAPH (504) 984 +PERFORM (505) 642 +PF (506) 258 +PH (507) 252 +PICTURE (508) 263 477 +PLUS (509) 271 315 409 +POINTER (510) 468 1071 +POSITION (511) 162 859 +POSITIVE (512) 1192 +PREVIOUS (513) 905 +PROCEDURE (514) 559 584 764 766 +PROCEED (515) +PROGRAM (516) 10 20 41 985 +PROGRAM_ID (517) 15 +QUOTES (518) 1262 +RANDOM (519) 144 +RD (520) 194 +READY (521) 730 +RECORD (522) 110 112 154 500 501 535 1224 +RECORDS (523) 524 536 +REDEFINES (524) 434 +REEL (525) 887 889 +REFERENCE (526) 1137 +RELATIVE (527) 111 139 +REMAINDER (528) 816 817 +REMOVAL (529) 889 890 +RENAMES (530) 448 +REPLACING (531) 777 1097 +REPORT (532) 187 242 250 518 +REPORTS (533) 519 +REQUIRED (534) 359 383 +RESERVE (535) 113 +RESET (536) 304 305 731 +RETURN (537) 894 895 +RETURNING (538) 1127 +REVERSEVIDEO (539) 365 389 +REWIND (540) 886 +REWRITE (541) 943 +RF (542) 259 +RH (543) 251 +RIGHT (544) 284 311 362 386 451 +ROUNDED (545) 996 +RUN (546) 986 +SAME (547) 152 +SCREEN (548) 320 351 375 854 +SD (549) 423 +SEARCH (550) 648 649 +SECTION (551) 31 93 179 182 185 187 320 592 +SECURE (552) 360 384 +SECURITY (553) 27 +SELECT (554) 103 +SENTENCE (555) 688 712 720 +SEPARATE (556) 260 261 403 +SEQUENCE (557) 43 +SEQUENTIAL (558) 138 140 142 +SET (559) 1010 +SIGN (560) 61 260 407 +SIZE (561) 341 998 999 1001 1005 1079 +SORT (562) 155 747 749 +SORT_MERGE (563) 156 +SOURCE (564) 289 +SOURCE_COMPUTER (565) 36 +SPACES (566) 1260 +SPECIAL_NAMES (567) 39 +STANDARD (568) 537 588 589 +STANDARD_1 (569) 83 +STANDARD_2 (570) 84 +START (571) 951 +STATUS (572) 69 79 109 827 +STD_ERROR (573) 848 +STD_OUTPUT (574) 847 +STOP (575) 986 987 +STRINGCMD (576) 1027 +SUBTRACT (577) 800 801 +SUM (578) 293 +SYNCHRONIZED (579) 442 +TALLYING (580) 1042 1089 +TAPE (581) 163 +TCOBPROTO1 (582) 728 +TCOBPROTO2 (583) 729 +TERMINATE (584) 734 +TEST (585) 1166 +THEN (586) 694 +TIMES (587) 542 1147 1159 +TOKDUMMY (588) +TOP (589) 511 +TRACE (590) 730 731 +TRAILING (591) 309 402 1106 +TRUE_TOK (592) 661 676 1023 +TYPE (593) 241 +UNDERLINE (594) 366 390 +UNIT (595) 888 890 +UNLOCK (596) 727 +UNSTRING (597) 1029 +UNTIL (598) 1151 1155 1158 1162 1175 +UP (599) 1012 +UPDATE (600) 371 395 +UPON (601) 302 846 847 848 +UPPER (602) 373 397 +USAGE (603) 264 540 +USE (604) 584 +USING (605) 344 741 765 1125 1131 +VALUE (606) 290 470 503 1138 +VALUES (607) 471 +VARYING (608) 501 702 1155 1162 +WHEN (609) 544 665 669 710 718 +WITH (610) 1234 +WORKING_STORAGE (611) 182 +ZERO (612) 298 369 393 446 1194 1261 +PERIOD_TOK (613) 15 23 24 25 26 27 29 31 36 38 39 49 93 97 99 103 147 + 176 179 182 185 187 194 227 320 325 419 423 429 559 566 568 569 + 571 578 580 584 592 595 654 + + +Nonterminals, with rules where they appear + +$accept (368) + on left: 0 +root_ (369) + on left: 1, on right: 0 +program_sequences (370) + on left: 2 3 4, on right: 1 +program_sequence (371) + on left: 5 7 8, on right: 3 4 7 8 +$@1 (372) + on left: 6, on right: 7 +end_program (373) + on left: 10, on right: 5 7 8 +$@2 (374) + on left: 9, on right: 10 +program (375) + on left: 11, on right: 2 4 5 7 8 +identification_division (376) + on left: 15, on right: 11 +$@3 (377) + on left: 12, on right: 15 +$@4 (378) + on left: 13, on right: 15 +$@5 (379) + on left: 14, on right: 15 +programid_opts_opt (380) + on left: 16 17 18, on right: 15 +programid_program_opt (381) + on left: 19 20, on right: 17 18 +identification_division_options_opt (382) + on left: 21 22, on right: 15 22 +identification_division_option (383) + on left: 23 24 25 26 27, on right: 22 +environment_division_opt (384) + on left: 29 30, on right: 11 +$@6 (385) + on left: 28, on right: 29 +configuration_opt (386) + on left: 31 32, on right: 29 +configuration_section (387) + on left: 33 34, on right: 31 33 +configuration_option (388) + on left: 36 38 39 40, on right: 33 +$@7 (389) + on left: 35, on right: 36 +$@8 (390) + on left: 37, on right: 38 +program_collating_opt (391) + on left: 41 42, on right: 38 +collating_sequence (392) + on left: 43, on right: 41 763 +collating_opt (393) + on left: 44 45, on right: 43 +debug_mode_opt (394) + on left: 46 47, on right: 36 +special_names_opt (395) + on left: 48 49 50, on right: 39 +special_names (396) + on left: 51 52, on right: 49 52 +special_name (397) + on left: 53 54 55 56 57 58 59, on right: 51 52 +currency_details (398) + on left: 60, on right: 55 +sign_opt (399) + on left: 61 62, on right: 60 +special_name_class (400) + on left: 63, on right: 59 +special_name_class_item_list (401) + on left: 64 65, on right: 63 65 +special_name_class_item (402) + on left: 66 67, on right: 64 65 +decimal_point_details (403) + on left: 68, on right: 56 +screen_status_details (404) + on left: 69, on right: 57 +cursor_details (405) + on left: 70, on right: 58 +switches_details_list (406) + on left: 71 72, on right: 53 72 +switches_details (407) + on left: 74, on right: 72 +$@9 (408) + on left: 73, on right: 74 +switch_on_opt (409) + on left: 75 76, on right: 74 +switch_off_opt (410) + on left: 77 78, on right: 74 +status_opt (411) + on left: 79 80, on right: 75 77 +alphabet_details (412) + on left: 81, on right: 54 +alphabet_type (413) + on left: 82 83 84 85, on right: 81 +alphabet_literal_list (414) + on left: 86 87, on right: 85 87 +alphabet_literal_item (415) + on left: 88 89 90, on right: 86 87 +alphabet_also_list (416) + on left: 91 92, on right: 90 92 +input_output_opt (417) + on left: 93 94, on right: 29 +input_output_section (418) + on left: 95 96, on right: 93 +file_control_paragraph (419) + on left: 97, on right: 95 +i_o_control_paragraph (420) + on left: 98 99, on right: 95 +file_control (421) + on left: 100 101, on right: 97 101 +file_select (422) + on left: 103, on right: 100 101 +$@10 (423) + on left: 102, on right: 103 +select_clauses (424) + on left: 104 105, on right: 103 104 +select_clause (425) + on left: 106 107 108 109 110 111 112 113 114, on right: 104 +file_opt (426) + on left: 115 116, on right: 109 +organization_opt (427) + on left: 117 118, on right: 106 +assign_clause (428) + on left: 119 120 121 122 123, on right: 107 +with_duplicates (429) + on left: 124 125, on right: 112 +optional_opt (430) + on left: 126 127, on right: 103 +areas_opt (431) + on left: 128 129 130, on right: 113 +is_opt (432) + on left: 131 132, on right: 17 18 43 60 63 68 69 70 74 75 77 81 + 106 108 109 110 111 112 197 204 209 215 217 219 241 260 263 264 + 267 273 278 289 290 407 408 414 444 445 459 465 470 477 487 488 + 501 503 506 507 518 535 721 722 764 766 909 953 1203 +are_opt (433) + on left: 133 134, on right: 210 274 275 279 280 471 519 536 +mode_opt (434) + on left: 135 136, on right: 108 +organization_options (435) + on left: 137 138 139 140 141, on right: 106 +access_options (436) + on left: 142 143 144 145, on right: 108 +i_o_control_opt (437) + on left: 146 147, on right: 99 +i_o_control_list (438) + on left: 148 149, on right: 147 149 +i_o_control_clause (439) + on left: 150 151, on right: 148 149 +i_o_control_same_clause (440) + on left: 152, on right: 150 +same_clause_options (441) + on left: 153 154 155 156, on right: 152 +i_o_control_multiple_file_tape_clause (442) + on left: 157, on right: 151 +i_o_control_multiple_file_list (443) + on left: 158 159, on right: 157 159 +i_o_control_multiple_file (444) + on left: 160, on right: 158 159 +i_o_control_multiple_file_position_opt (445) + on left: 161 162, on right: 160 +tape_opt (446) + on left: 163 164, on right: 157 +are_opta (447) + on left: 165 166, on right: 152 +for_opt (448) + on left: 167 168, on right: 152 889 890 +string_list (449) + on left: 169 170 171, on right: 152 170 +name_list (450) + on left: 172 173 174, on right: 173 1015 +data_division_opt (451) + on left: 176 177, on right: 11 +$@11 (452) + on left: 175, on right: 176 +file_section_opt (453) + on left: 179 180, on right: 176 +$@12 (454) + on left: 178, on right: 179 +working_storage_opt (455) + on left: 182 183, on right: 176 +$@13 (456) + on left: 181, on right: 182 +linkage_section_opt (457) + on left: 185 186, on right: 176 +$@14 (458) + on left: 184, on right: 185 +report_section_opt (459) + on left: 187 188, on right: 176 +report_sections (460) + on left: 189 190, on right: 187 189 +report_section (461) + on left: 194, on right: 189 +$@15 (462) + on left: 191, on right: 194 +$@16 (463) + on left: 192, on right: 194 +$@17 (464) + on left: 193, on right: 194 +report_controls (465) + on left: 195 196, on right: 194 196 +report_control (466) + on left: 197 198 199 200, on right: 196 +report_controls_control (467) + on left: 201, on right: 199 +report_controls_page (468) + on left: 202, on right: 200 +heading_opt (469) + on left: 203 204, on right: 202 +line_lines_opt (470) + on left: 205 206, on right: 202 938 +lines_opt (471) + on left: 207 208, on right: 205 507 +control_is_are (472) + on left: 209 210, on right: 201 +limit_is_are_opt (473) + on left: 211 212 213, on right: 202 +footing_opt (474) + on left: 214 215, on right: 202 +last_detail_opt (475) + on left: 216 217, on right: 202 +first_detail_opt (476) + on left: 218 219, on right: 202 +final_opt (477) + on left: 220 221, on right: 201 +report_break_list (478) + on left: 222 223, on right: 201 223 +report_description (479) + on left: 224 225, on right: 194 225 +report_item (480) + on left: 227, on right: 224 225 +$@18 (481) + on left: 226, on right: 227 +report_clauses (482) + on left: 228 229, on right: 227 229 +report_clause (483) + on left: 230 231 232 233 234 235 236 237 238 239 240, on right: + 228 229 +report_clause_type (484) + on left: 241, on right: 232 +report_clause_type2 (485) + on left: 242 243 245 246 248 249 250 251 252 254 255 257 258 259, + on right: 241 +$@19 (486) + on left: 244, on right: 245 +$@20 (487) + on left: 247, on right: 248 +$@21 (488) + on left: 253, on right: 254 +$@22 (489) + on left: 256, on right: 257 +report_clause_sign_is (490) + on left: 260 261, on right: 235 +report_clause_picture (491) + on left: 263, on right: 234 +$@23 (492) + on left: 262, on right: 263 +report_clause_usage_display (493) + on left: 264 265, on right: 233 +report_clause_justified (494) + on left: 266, on right: 236 +report_clause_next_group (495) + on left: 267, on right: 231 +report_clause_line (496) + on left: 268 269 270 271, on right: 230 +report_clause_line_is (497) + on left: 272 273 274 275, on right: 268 269 270 271 +report_clause_column (498) + on left: 276, on right: 238 +report_clause_column_is (499) + on left: 277 278 279 280, on right: 276 +report_clause_column_orientation (500) + on left: 281 282 283 284, on right: 277 278 279 280 +is_are_opt (501) + on left: 285 286 287, on right: 272 277 +report_clause_svs (502) + on left: 289 290 293, on right: 239 +$@24 (503) + on left: 288, on right: 289 +$@25 (504) + on left: 291, on right: 293 +$@26 (505) + on left: 292, on right: 293 +gname_page_counter (506) + on left: 294 295, on right: 289 +report_clause_group_indicate (507) + on left: 296 297, on right: 240 +report_clause_blank_zero (508) + on left: 298, on right: 237 +indicate_opt (509) + on left: 299 300, on right: 297 +upon_opt (510) + on left: 301 302, on right: 293 +reset_opt (511) + on left: 303 304 305, on right: 293 +number_opt (512) + on left: 306 307, on right: 857 858 +leading_trailing (513) + on left: 308 309, on right: 260 261 +right_opt (514) + on left: 310 311, on right: 266 +name_final_opt (515) + on left: 312 313, on right: 245 248 254 257 +integer_on_next_page (516) + on left: 314 315 316, on right: 267 +of_opt (517) + on left: 317 318, on right: 1025 +screen_section_opt (518) + on left: 320 321, on right: 176 +$@27 (519) + on left: 319, on right: 320 +screen_section (520) + on left: 322 323, on right: 320 322 +screen_item (521) + on left: 325, on right: 322 +$@28 (522) + on left: 324, on right: 325 +screen_clauses (523) + on left: 327 329 330 332 334 336 337 338 339 341 342, on right: + 325 327 329 330 332 334 336 337 338 339 341 +$@29 (524) + on left: 326, on right: 327 +$@30 (525) + on left: 328, on right: 329 +$@31 (526) + on left: 331, on right: 332 +$@32 (527) + on left: 333, on right: 334 +$@33 (528) + on left: 335, on right: 336 +$@34 (529) + on left: 340, on right: 341 +screen_source_destination (530) + on left: 344 346 348, on right: 337 +$@35 (531) + on left: 343, on right: 344 +$@36 (532) + on left: 345, on right: 346 +$@37 (533) + on left: 347, on right: 348 +screen_to_name (534) + on left: 349 350, on right: 346 +screen_attrib (535) + on left: 351 352 353 354 355 356 357 358 359 360 361 362 363 364 + 365 366 367 368 369 370 371 372 373 374, on right: 330 +screen_attribx (536) + on left: 375 376 377 378 379 380 381 382 383 384 385 386 387 388 + 389 390 391 392 393 394 395 396 397 398 399 400, on right: 864 +sign_clause (537) + on left: 401 402, on right: 357 381 440 +separate_opt (538) + on left: 403 404, on right: 401 402 +character_opt (539) + on left: 405 406, on right: 260 261 403 +sign_is_opt (540) + on left: 407 408, on right: 401 402 +plus_minus_opt (541) + on left: 409 410 411 412 413, on right: 327 329 +number_is_opt (542) + on left: 414 415, on right: 327 329 +file_section (543) + on left: 419 423 424 425, on right: 179 419 423 +$@38 (544) + on left: 416, on right: 419 +$@39 (545) + on left: 417, on right: 419 +$@40 (546) + on left: 418, on right: 419 +$@41 (547) + on left: 420, on right: 423 +$@42 (548) + on left: 421, on right: 423 +$@43 (549) + on left: 422, on right: 423 +file_description (550) + on left: 426 427, on right: 419 423 427 +field_description (551) + on left: 429, on right: 426 427 553 556 +$@44 (552) + on left: 428, on right: 429 +data_clauses (553) + on left: 430 431 432, on right: 429 431 432 +redefines_clause (554) + on left: 434, on right: 432 +$@45 (555) + on left: 433, on right: 434 +redefines_var (556) + on left: 435 436, on right: 434 +data_clause (557) + on left: 437 438 439 440 441 442 443 444 445 446 448, on right: + 431 +$@46 (558) + on left: 447, on right: 448 +sync_options (559) + on left: 449 450 451, on right: 442 443 +thru_gname_opt (560) + on left: 452 453, on right: 448 +array_options (561) + on left: 455 458, on right: 437 +$@47 (562) + on left: 454, on right: 455 +$@48 (563) + on left: 456, on right: 458 +$@49 (564) + on left: 457, on right: 458 +key_is_opt (565) + on left: 459 460, on right: 461 +indexed_by_opt (566) + on left: 461 462, on right: 455 458 +index_name_list (567) + on left: 463 464, on right: 461 464 +usage_option (568) + on left: 465, on right: 439 +usage (569) + on left: 466 467 468, on right: 465 +value_option (570) + on left: 469, on right: 441 +value_is_are (571) + on left: 470 471, on right: 338 469 +value_list (572) + on left: 472 473, on right: 469 473 +value (573) + on left: 474 475, on right: 472 473 +pictures (574) + on left: 477, on right: 339 438 +$@50 (575) + on left: 476, on right: 477 +picture (576) + on left: 478 479, on right: 263 477 479 +pic_elem (577) + on left: 480, on right: 479 +multiplier_opt (578) + on left: 481 482, on right: 480 +file_description_fd_clauses (579) + on left: 483 484, on right: 419 484 +file_description_sd_clauses (580) + on left: 485 486, on right: 423 486 +file_description_fd_clause (581) + on left: 487 488 489 490 491 492 493 494 495 496, on right: 484 +file_description_sd_clause (582) + on left: 497 498, on right: 486 +file_description_clause_block (583) + on left: 499, on right: 489 +file_description_clause_record (584) + on left: 500 501, on right: 490 497 +file_description_clause_label (585) + on left: 502, on right: 491 +file_description_clause_value (586) + on left: 503, on right: 492 +file_description_clause_data (587) + on left: 504, on right: 493 498 +file_description_clause_report (588) + on left: 505, on right: 494 +file_description_clause_code_set (589) + on left: 506, on right: 496 +file_description_clause_linage (590) + on left: 507, on right: 495 +file_description_clause_linage_footing (591) + on left: 508 509, on right: 507 +file_description_clause_linage_top (592) + on left: 510 511, on right: 507 +file_description_clause_linage_bottom (593) + on left: 512 513, on right: 507 +lines_at_opt (594) + on left: 514 515 516 517, on right: 511 513 +report_is_are (595) + on left: 518 519, on right: 505 +var_strings (596) + on left: 520 521, on right: 504 521 +chars_or_recs_opt (597) + on left: 522 523 524, on right: 499 +to_integer_opt (598) + on left: 525 526, on right: 499 +depend_rec_varying (599) + on left: 527 528, on right: 501 +from_rec_varying (600) + on left: 529 530, on right: 501 +from_opt (601) + on left: 531 532, on right: 530 +to_rec_varying (602) + on left: 533 534, on right: 500 501 +record_is_are (603) + on left: 535 536, on right: 502 504 +std_or_omitt (604) + on left: 537 538, on right: 502 +usage_opt (605) + on left: 539 540, on right: 465 +times_opt (606) + on left: 541 542, on right: 455 458 +when_opt (607) + on left: 543 544, on right: 298 369 393 446 +contains_opt (608) + on left: 545 546, on right: 157 499 500 +character_opts (609) + on left: 547 548, on right: 500 501 +order_opt (610) + on left: 549 550, on right: 761 +data_opt (611) + on left: 551 552, on right: 780 +working_storage_section (612) + on left: 553 554, on right: 182 553 +linkage_section (613) + on left: 555 556, on right: 185 556 +procedure_division_opt (614) + on left: 559 560, on right: 11 +$@51 (615) + on left: 557, on right: 559 +$@52 (616) + on left: 558, on right: 559 +procedure_division (617) + on left: 561 562, on right: 559 562 +procedure_decl (618) + on left: 563 564 566 568 569, on right: 562 +$@53 (619) + on left: 565, on right: 566 +$@54 (620) + on left: 567, on right: 568 +declaratives_opt (621) + on left: 571 572, on right: 559 +$@55 (622) + on left: 570, on right: 571 +declaratives_division (623) + on left: 573 574, on right: 571 574 +declaratives_decl (624) + on left: 575 576 578 580, on right: 574 +$@56 (625) + on left: 577, on right: 578 +$@57 (626) + on left: 579, on right: 580 +declaratives_procedure (627) + on left: 582 583, on right: 571 575 +$@58 (628) + on left: 581, on right: 582 +use_phrase (629) + on left: 584 585, on right: 582 +use_phrase_exception_error (630) + on left: 586 587 588 589, on right: 584 +use_phrase_option (631) + on left: 590 591, on right: 584 +procedure_section (632) + on left: 592, on right: 563 582 +paragraph (633) + on left: 593, on right: 564 576 +dot_or_eos (634) + on left: 594 595, on right: 593 +statement_list (635) + on left: 596, on right: 686 705 711 719 836 918 923 925 1003 1048 + 1053 1056 1059 1066 1068 1177 +statements (636) + on left: 597 598, on right: 566 578 596 598 +statement (637) + on left: 599 600 601 602 603 604 605 606 607 608 609 610 611 612 + 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 + 629 630 631 632 633 634 635 636 637 638 639 640 641, on right: + 597 598 +perform_statement (638) + on left: 642, on right: 617 +if_statement (639) + on left: 644 647, on right: 638 +$@59 (640) + on left: 643, on right: 644 +@60 (641) + on left: 645, on right: 647 +$@61 (642) + on left: 646, on right: 647 +search_statement (643) + on left: 648 649, on right: 640 +evaluate_statement (644) + on left: 652, on right: 639 +@62 (645) + on left: 650, on right: 652 +$@63 (646) + on left: 651, on right: 652 +end_evaluate_or_eos (647) + on left: 653 654, on right: 652 +selection_subject_set (648) + on left: 656 658, on right: 652 658 +@64 (649) + on left: 655, on right: 656 +@65 (650) + on left: 657, on right: 658 +selection_subject (651) + on left: 659 660 661 662, on right: 656 658 +when_case_list (652) + on left: 665 669, on right: 652 669 +@66 (653) + on left: 663, on right: 665 +@67 (654) + on left: 664, on right: 665 +@68 (655) + on left: 666, on right: 669 +@69 (656) + on left: 667, on right: 669 +$@70 (657) + on left: 668, on right: 669 +when_case (658) + on left: 671 673 674, on right: 665 669 673 +@71 (659) + on left: 670, on right: 671 +@72 (660) + on left: 672, on right: 673 +selection_object (661) + on left: 675 676 677 678 679 680, on right: 671 673 +sentence_or_nothing (662) + on left: 681 682, on right: 665 669 +if_part (663) + on left: 684, on right: 644 647 +@73 (664) + on left: 683, on right: 684 +conditional_statement (665) + on left: 686 688, on right: 647 682 684 +$@74 (666) + on left: 685, on right: 686 +$@75 (667) + on left: 687, on right: 688 +not_opt (668) + on left: 689 690, on right: 678 679 680 +end_if_opt (669) + on left: 691 692, on right: 644 647 +end_then_opt (670) + on left: 693 694, on right: 684 +search (671) + on left: 698, on right: 648 +@76 (672) + on left: 695, on right: 698 +@77 (673) + on left: 696, on right: 698 +@78 (674) + on left: 697, on right: 698 +search_all (675) + on left: 701, on right: 649 +@79 (676) + on left: 699, on right: 701 +$@80 (677) + on left: 700, on right: 701 +search_varying_opt (678) + on left: 702 703, on right: 698 +search_at_end (679) + on left: 705 706, on right: 698 701 +@81 (680) + on left: 704, on right: 705 +search_when_list (681) + on left: 707 708, on right: 698 708 +search_when (682) + on left: 710, on right: 707 708 +@82 (683) + on left: 709, on right: 710 +search_when_statement (684) + on left: 711 712, on right: 710 +search_when_conditional (685) + on left: 713, on right: 710 +search_all_when_list (686) + on left: 714 715, on right: 701 715 +search_all_when (687) + on left: 718, on right: 714 715 +$@83 (688) + on left: 716, on right: 718 +@84 (689) + on left: 717, on right: 718 +search_all_when_statement (690) + on left: 719 720, on right: 718 +search_all_when_conditional (691) + on left: 721 722 724, on right: 718 724 +@85 (692) + on left: 723, on right: 724 +end_search_opt (693) + on left: 725 726, on right: 648 649 +unlock_statement (694) + on left: 727, on right: 637 +proto_statement (695) + on left: 728 729, on right: 633 +trace_statement (696) + on left: 730 731, on right: 634 +initiate_statement (697) + on left: 732, on right: 630 +generate_statement (698) + on left: 733, on right: 631 +terminate_statement (699) + on left: 734, on right: 632 +cancel_statement (700) + on left: 735 736, on right: 636 +merge_statement (701) + on left: 740, on right: 626 +$@86 (702) + on left: 737, on right: 740 +$@87 (703) + on left: 738, on right: 740 +$@88 (704) + on left: 739, on right: 740 +merge_using (705) + on left: 741, on right: 740 +sort_statement (706) + on left: 742 743, on right: 625 +sort_file (707) + on left: 747, on right: 742 +$@89 (708) + on left: 744, on right: 747 +$@90 (709) + on left: 745, on right: 747 +$@91 (710) + on left: 746, on right: 747 +sort_variable_indexed (711) + on left: 749, on right: 743 +$@92 (712) + on left: 748, on right: 749 +sort_keys (713) + on left: 750 751, on right: 740 747 751 +sort_keys_idx (714) + on left: 752 753, on right: 749 753 +sort_key (715) + on left: 754, on right: 750 751 +sort_key_idx (716) + on left: 755, on right: 752 753 +sort_keys_names (717) + on left: 756 757, on right: 754 757 +sort_keys_names_idx (718) + on left: 758 759, on right: 755 759 +sort_duplicates_opt (719) + on left: 760 761, on right: 747 749 +sort_collating_opt (720) + on left: 762 763, on right: 740 747 749 +sort_input (721) + on left: 764 765, on right: 747 +sort_output (722) + on left: 766 767, on right: 740 747 +sort_file_list (723) + on left: 768 769, on right: 741 765 767 769 +move_statement (724) + on left: 770 771 772 773, on right: 599 +initialize_statement (725) + on left: 774 775, on right: 600 +initialize_replacing_opt (726) + on left: 776 777, on right: 774 +initialize_replacing_lists (727) + on left: 778 779, on right: 777 779 +initialize_replacing_list (728) + on left: 780, on right: 778 779 +initialize_type_list (729) + on left: 781 782 783 784 785, on right: 780 +compute_statement (730) + on left: 786 787, on right: 601 +compute_body (731) + on left: 788, on right: 786 +end_compute_opt (732) + on left: 789 790, on right: 786 +add_statement (733) + on left: 791 792, on right: 602 +add_body (734) + on left: 793 794 795, on right: 791 +add_to_opt (735) + on left: 796 797, on right: 794 +end_add_opt (736) + on left: 798 799, on right: 791 +subtract_statement (737) + on left: 800 801, on right: 603 +subtract_body (738) + on left: 802 803 804, on right: 800 +end_subtract_opt (739) + on left: 805 806, on right: 800 +multiply_statement (740) + on left: 807 808, on right: 604 +multiply_body (741) + on left: 809 810, on right: 807 +end_multiply_opt (742) + on left: 811 812, on right: 807 +divide_statement (743) + on left: 813 814, on right: 605 +divide_body (744) + on left: 815 816 817 818 819, on right: 813 +end_divide_opt (745) + on left: 820 821, on right: 813 +accept_statement (746) + on left: 822 823 824 825, on right: 606 +accept_hardware (747) + on left: 826 827 828 829 830, on right: 822 +accept_chronological (748) + on left: 831, on right: 823 +accept_screen (749) + on left: 832 836, on right: 824 +$@93 (750) + on left: 833, on right: 836 +@94 (751) + on left: 834, on right: 836 +$@95 (752) + on left: 835, on right: 836 +end_accept_opt (753) + on left: 837 838, on right: 826 827 828 829 830 831 832 836 +display_statement (754) + on left: 839 840 841, on right: 607 +display_line (755) + on left: 842, on right: 839 +display_screen (756) + on left: 843, on right: 840 +display_varlist (757) + on left: 844 845, on right: 842 843 845 +display_upon (758) + on left: 846 847 848, on right: 842 +display_line_options (759) + on left: 849 850 851 852 853 854, on right: 842 850 851 852 853 + 854 +end_display_opt (760) + on left: 855 856, on right: 842 843 +scr_line (761) + on left: 857, on right: 865 +scr_position (762) + on left: 858 859, on right: 866 +scr_line_position (763) + on left: 860 861, on right: 867 +accept_display_options (764) + on left: 862 863, on right: 832 836 843 863 +accept_display_option (765) + on left: 864 865 866 867, on right: 863 +open_statement (766) + on left: 868 869, on right: 608 +open_options (767) + on left: 870 871, on right: 868 871 +open_mode (768) + on left: 872 873 874 875 876, on right: 591 870 871 +open_varlist (769) + on left: 877 878, on right: 870 871 878 +close_statement (770) + on left: 879 880, on right: 609 +close_files (771) + on left: 881 882, on right: 879 882 +close_file (772) + on left: 883, on right: 881 882 +close_options_opt (773) + on left: 884 885, on right: 883 +close_options (774) + on left: 886 887 888 889 890, on right: 884 +with_lock_opt (775) + on left: 891 892 893, on right: 885 900 901 902 +return_statement (776) + on left: 894 895, on right: 611 +return_body (777) + on left: 896 897, on right: 894 +read_statement (778) + on left: 898 899, on right: 610 +read_body (779) + on left: 900 901 902, on right: 898 +read_next_opt (780) + on left: 903 904 905, on right: 900 901 902 +read_into_opt (781) + on left: 906 907, on right: 896 897 900 901 902 +read_key_opt (782) + on left: 908 909, on right: 900 901 902 +read_at_end_opt (783) + on left: 910 911 912 914 916, on right: 897 901 +$@96 (784) + on left: 913, on right: 914 +$@97 (785) + on left: 915, on right: 916 +on_end (786) + on left: 918, on right: 910 911 912 914 916 +@98 (787) + on left: 917, on right: 918 +read_invalid_key_opt (788) + on left: 919 920 921, on right: 902 +read_invalid_key (789) + on left: 923, on right: 919 921 +@99 (790) + on left: 922, on right: 923 +read_not_invalid_key (791) + on left: 925, on right: 920 921 +@100 (792) + on left: 924, on right: 925 +end_read_opt (793) + on left: 926 927, on right: 898 +end_return_opt (794) + on left: 928 929, on right: 894 +release_statement (795) + on left: 930, on right: 612 +release_from_opt (796) + on left: 931 932, on right: 930 +write_statement (797) + on left: 934, on right: 613 +$@101 (798) + on left: 933, on right: 934 +write_from_opt (799) + on left: 935 936, on right: 934 943 +write_options (800) + on left: 937 938 939, on right: 934 +end_write_opt (801) + on left: 940 941, on right: 934 +rewrite_statement (802) + on left: 943, on right: 614 +$@102 (803) + on left: 942, on right: 943 +end_rewrite_opt (804) + on left: 944 945, on right: 943 +delete_statement (805) + on left: 947, on right: 615 +$@103 (806) + on left: 946, on right: 947 +end_delete_opt (807) + on left: 948 949, on right: 947 +start_statement (808) + on left: 951, on right: 616 +$@104 (809) + on left: 950, on right: 951 +start_body (810) + on left: 952 953, on right: 951 +end_start_opt (811) + on left: 954 955, on right: 951 +goto_statement (812) + on left: 956 957, on right: 618 +goto_label (813) + on left: 958, on right: 956 +goto_label_list (814) + on left: 959 960 961, on right: 957 960 961 +call_statement (815) + on left: 967 968, on right: 621 +$@105 (816) + on left: 962, on right: 967 +@106 (817) + on left: 963, on right: 967 +@107 (818) + on left: 964, on right: 967 +@108 (819) + on left: 965, on right: 967 +$@109 (820) + on left: 966, on right: 967 +call_convention_opt (821) + on left: 969 970 971, on right: 967 +call_loadlib_statement (822) + on left: 973 974, on right: 622 +$@110 (823) + on left: 972, on right: 973 +end_call_loadlib_opt (824) + on left: 975 976, on right: 973 +chain_statement (825) + on left: 981 982, on right: 623 +$@111 (826) + on left: 977, on right: 981 +@112 (827) + on left: 978, on right: 981 +@113 (828) + on left: 979, on right: 981 +$@114 (829) + on left: 980, on right: 981 +exit_statement (830) + on left: 983 984 985, on right: 619 +stop_statement (831) + on left: 986 987, on right: 620 +stop_literal (832) + on left: 988 989, on right: 987 +goback_statement (833) + on left: 990, on right: 635 +var_list_name (834) + on left: 991 992, on right: 788 793 794 795 802 803 804 809 810 + 815 818 819 992 +var_list_gname (835) + on left: 993 994, on right: 793 794 795 802 803 804 994 +rounded_opt (836) + on left: 995 996, on right: 795 804 816 817 991 992 +on_size_error_opt (837) + on left: 997 998 999 1001, on right: 788 793 794 795 802 803 804 + 809 810 815 816 817 818 819 +$@115 (838) + on left: 1000, on right: 1001 +on_size_error (839) + on left: 1003, on right: 998 999 1001 +@116 (840) + on left: 1002, on right: 1003 +size_opt (841) + on left: 1004 1005, on right: 501 +end_call_opt (842) + on left: 1006 1007, on right: 967 +end_chain_opt (843) + on left: 1008 1009, on right: 981 +set_statement (844) + on left: 1010, on right: 624 +set_list (845) + on left: 1011 1012 1013 1014, on right: 1010 +set_target (846) + on left: 1015 1016, on right: 1011 1012 1013 +set_variable (847) + on left: 1017 1018, on right: 1014 +set_variable_or_nlit (848) + on left: 1019 1020 1021 1022 1023, on right: 1011 +address_of_opt (849) + on left: 1024 1025, on right: 1011 1014 +string_statement (850) + on left: 1027, on right: 628 +$@117 (851) + on left: 1026, on right: 1027 +unstring_statement (852) + on left: 1029, on right: 629 +$@118 (853) + on left: 1028, on right: 1029 +unstring_delimited (854) + on left: 1030 1031, on right: 1029 +unstring_delimited_vars (855) + on left: 1032 1033, on right: 1030 1033 +unstring_destinations (856) + on left: 1034 1035, on right: 1029 1035 +unstring_dest_var (857) + on left: 1036, on right: 1034 1035 +unstring_delim_opt (858) + on left: 1037 1038, on right: 1036 +unstring_count_opt (859) + on left: 1039 1040, on right: 1036 +unstring_tallying (860) + on left: 1041 1042, on right: 1029 +all_opt (861) + on left: 1043 1044, on right: 1032 1033 +on_overflow_opt (862) + on left: 1046, on right: 1027 1029 +$@119 (863) + on left: 1045, on right: 1046 +on_exception_or_overflow (864) + on left: 1048 1049, on right: 967 981 +@120 (865) + on left: 1047, on right: 1048 +exception_or_overflow (866) + on left: 1050 1051, on right: 1048 +on_not_exception (867) + on left: 1053 1054, on right: 967 +@121 (868) + on left: 1052, on right: 1053 +on_overflow (869) + on left: 1056 1057, on right: 1046 +@122 (870) + on left: 1055, on right: 1056 +on_not_overflow (871) + on left: 1059 1060, on right: 1046 +@123 (872) + on left: 1058, on right: 1059 +invalid_key_opt (873) + on left: 1061 1062 1063 1064, on right: 934 943 947 951 +invalid_key_sentence (874) + on left: 1066, on right: 1061 1063 +@124 (875) + on left: 1065, on right: 1066 +not_invalid_key_sentence (876) + on left: 1068, on right: 1062 1063 +@125 (877) + on left: 1067, on right: 1068 +not_excep (878) + on left: 1069 1070, on right: 1059 1068 +string_with_pointer (879) + on left: 1071 1072, on right: 1027 1029 +string_from_list (880) + on left: 1073 1074 1075, on right: 1027 1074 +string_from (881) + on left: 1076 1077, on right: 1073 1074 +delimited_by (882) + on left: 1078 1079 1080, on right: 1077 +end_stringcmd_opt (883) + on left: 1081 1082, on right: 1027 +end_unstring_opt (884) + on left: 1083 1084, on right: 1029 +inspect_statement (885) + on left: 1086 1087, on right: 627 +$@126 (886) + on left: 1085, on right: 1086 +converting_clause (887) + on left: 1088, on right: 1087 +tallying_clause (888) + on left: 1089 1090, on right: 1086 +tallying_list (889) + on left: 1091 1092, on right: 1089 1091 +tallying_for_list (890) + on left: 1093 1094 1095 1096, on right: 1091 1093 1094 1095 +replacing_clause (891) + on left: 1097 1098, on right: 1086 +replacing_list (892) + on left: 1099 1100 1101, on right: 1097 1099 1100 +replacing_by_list (893) + on left: 1102 1103, on right: 1100 1102 +replacing_kind (894) + on left: 1104 1105 1106 1107, on right: 1100 +inspect_before_after (895) + on left: 1108 1109 1110, on right: 1088 1093 1094 1095 1099 1102 + 1108 1109 +initial_opt (896) + on left: 1111 1112, on right: 1108 1109 +expr (897) + on left: 1113 1114 1115 1116 1117 1118 1119, on right: 659 678 + 679 788 857 858 859 1114 1115 1116 1117 1118 1119 1121 1181 1190 + 1191 +expr_opt (898) + on left: 1120 1121, on right: 1181 +using_options (899) + on left: 1122 1125, on right: 967 981 +@127 (900) + on left: 1123, on right: 1125 +@128 (901) + on left: 1124, on right: 1125 +returning_options (902) + on left: 1126 1127 1128, on right: 967 +dummy (903) + on left: 1129, on right: 1125 +using_parameters (904) + on left: 1130 1131 1132, on right: 559 +parm_list (905) + on left: 1133 1134, on right: 1125 1133 +parameter (906) + on left: 1135 1136, on right: 1133 1134 +parm_type (907) + on left: 1137 1138 1139, on right: 1136 +intrinsic_parm_list (908) + on left: 1140 1141, on right: 1140 1248 +intrinsic_parm (909) + on left: 1142, on right: 1140 1141 +perform_range (910) + on left: 1143, on right: 764 766 +perform_options (911) + on left: 1144 1147 1151 1155 1156 1158 1159 1162, on right: 642 +@129 (912) + on left: 1145, on right: 1147 +$@130 (913) + on left: 1146, on right: 1147 +@131 (914) + on left: 1148, on right: 1151 +@132 (915) + on left: 1149, on right: 1151 +$@133 (916) + on left: 1150, on right: 1151 +@134 (917) + on left: 1152, on right: 1155 +@135 (918) + on left: 1153, on right: 1155 +$@136 (919) + on left: 1154, on right: 1155 +@137 (920) + on left: 1157, on right: 1158 +@138 (921) + on left: 1160, on right: 1162 +@139 (922) + on left: 1161, on right: 1162 +perform_thru_opt (923) + on left: 1163 1164, on right: 1143 1156 1158 1159 1162 +with_test_opt (924) + on left: 1165 1166, on right: 1151 1155 1158 1162 +perform_after_opt (925) + on left: 1167 1168 1169 1170 1171 1172 1173, on right: 1155 1162 +perform_after (926) + on left: 1175, on right: 1168 1169 1170 1171 1172 1173 +@140 (927) + on left: 1174, on right: 1175 +perform_statements (928) + on left: 1177, on right: 1144 1147 1151 1155 +$@141 (929) + on left: 1176, on right: 1177 +before_after (930) + on left: 1178 1179, on right: 938 939 1166 +condition (931) + on left: 1181 1182 1184 1186 1187 1188, on right: 660 684 1151 + 1155 1158 1162 1175 1182 1184 1186 1187 1189 +$@142 (932) + on left: 1180, on right: 1181 +@143 (933) + on left: 1183, on right: 1184 +@144 (934) + on left: 1185, on right: 1186 +implied_op_condition (935) + on left: 1189 1190 1191, on right: 1184 1186 +sign_condition (936) + on left: 1192 1193 1194, on right: 1207 +class_condition (937) + on left: 1195 1196 1197 1198, on right: 1206 +extended_cond_op (938) + on left: 1199 1200 1201 1202 1203 1204, on right: 713 1181 +ext_cond (939) + on left: 1205 1206 1207, on right: 1199 1200 1201 1202 1203 1204 +cond_op (940) + on left: 1208 1209 1210, on right: 953 1190 +conditional (941) + on left: 1211, on right: 1205 1208 1209 1210 +comma_opt (942) + on left: 1212 1213, on right: 473 1297 +sep_opt (943) + on left: 1214 1215, on right: 845 878 882 991 992 993 994 1035 + 1074 1133 1140 1242 1244 +key_opt (944) + on left: 1216 1217, on right: 110 111 112 459 754 755 923 925 1066 + 1068 +advancing_opt (945) + on left: 1218 1219, on right: 938 939 +than_to_opt (946) + on left: 1220 1221 1222, on right: 1211 +record_opt (947) + on left: 1223 1224, on right: 896 897 900 901 902 947 +at_opt (948) + on left: 1225 1226, on right: 509 705 910 914 916 +in_opt (949) + on left: 1227 1228, on right: 501 761 1038 1040 1042 +in_of (950) + on left: 1229 1230, on right: 1293 1302 1305 1306 +by_opt (951) + on left: 1231 1232, on right: 461 1030 1077 1136 1155 1162 1175 +with_opt (952) + on left: 1233 1234, on right: 46 124 330 332 334 336 356 370 371 + 372 380 394 395 396 509 761 850 851 852 853 854 864 886 891 892 + 1071 1166 +on_opt (953) + on left: 1235 1236, on right: 458 528 584 754 755 836 957 998 999 + 1001 1048 1053 1056 1059 +gname_opt (954) + on left: 1237 1238, on right: 1285 +to_opt (955) + on left: 1239 1240, on right: 107 721 722 956 957 +name_var_list (956) + on left: 1241 1242, on right: 770 1242 +gname_list (957) + on left: 1243 1244, on right: 293 302 590 774 1131 1132 1244 +gname (958) + on left: 1245 1246 1248 1249, on right: 294 304 312 458 728 729 + 735 770 772 773 780 797 803 809 810 815 816 817 818 819 844 845 + 932 936 938 967 973 981 993 994 1032 1033 1076 1077 1078 1113 1135 + 1136 1142 1147 1155 1159 1162 1175 1237 1243 1244 1285 1288 1298 + 1299 1300 +@145 (959) + on left: 1247, on right: 1248 +name_or_lit (960) + on left: 1250 1251, on right: 327 329 332 334 336 341 344 346 713 + 1019 +noallname (961) + on left: 1252 1253, on right: 1088 1094 1095 1099 1102 1108 1109 +gliteral (962) + on left: 1254 1255, on right: 198 338 474 475 1246 +without_all_literal (963) + on left: 1256 1257, on right: 88 89 90 91 92 1253 1254 +all_literal (964) + on left: 1258 1259, on right: 1255 +special_literal (965) + on left: 1260 1261 1262 1263 1264, on right: 1257 1259 +var_or_nliteral (966) + on left: 1265 1266, on right: 1012 1013 +nliteral (967) + on left: 1267, on right: 530 534 1266 +literal (968) + on left: 1268 1269, on right: 290 722 1251 1256 1258 1278 1280 +signed_nliteral (969) + on left: 1270 1271 1272, on right: 1267 1268 1301 +def_name_opt (970) + on left: 1273 1274, on right: 227 325 429 +def_name (971) + on left: 1275 1276, on right: 103 463 464 1273 +variable_indexed (972) + on left: 1277, on right: 698 701 749 758 759 +filename (973) + on left: 1278 1279, on right: 120 121 122 503 +data_name (974) + on left: 1280 1281, on right: 507 509 511 513 +cond_name (975) + on left: 1283 1284, on right: 680 1016 1188 +$@146 (976) + on left: 1282, on right: 1283 +name (977) + on left: 1285 1286 1287, on right: 223 348 350 727 732 733 734 + 740 747 756 757 768 769 816 817 826 827 828 829 830 831 832 836 + 877 878 883 896 897 900 901 902 907 909 930 934 943 947 952 953 + 991 992 1027 1029 1036 1038 1040 1042 1071 1086 1087 1091 1155 + 1162 1175 1245 1250 1252 +name_var (978) + on left: 1288, on right: 771 772 1241 1242 +variable (979) + on left: 1289 1291, on right: 172 173 448 453 702 721 722 836 861 + 957 1014 1017 1127 1128 1265 1285 1286 +$@147 (980) + on left: 1290, on right: 1291 +qualified_var (981) + on left: 1292 1293, on right: 1289 1291 1293 +unqualified_var (982) + on left: 1294 1295, on right: 1292 1293 +subscripts (983) + on left: 1296 1297, on right: 1283 1291 1297 +subscript (984) + on left: 1298 1299 1300, on right: 1296 1297 1299 1300 +integer (985) + on left: 1301, on right: 162 202 204 215 217 219 227 268 269 270 + 271 276 314 315 325 399 400 429 455 458 499 500 526 +label (986) + on left: 1302 1303 1304 1305 1306, on right: 958 959 960 961 1143 + 1156 1158 1159 1162 1164 +anystring (987) + on left: 1307 1308, on right: 141 145 + + +state 0 + + 0 $accept: . root_ $end + + IDENTIFICATION shift, and go to state 1 + + root_ go to state 2 + program_sequences go to state 3 + program_sequence go to state 4 + program go to state 5 + identification_division go to state 6 + + +state 1 + + 15 identification_division: IDENTIFICATION . DIVISION PERIOD_TOK PROGRAM_ID PERIOD_TOK $@3 IDSTRING $@4 programid_opts_opt PERIOD_TOK $@5 identification_division_options_opt + + DIVISION shift, and go to state 7 + + +state 2 + + 0 $accept: root_ . $end + + $end shift, and go to state 8 + + +state 3 + + 1 root_: program_sequences . + + $default reduce using rule 1 (root_) + + +state 4 + + 3 program_sequences: program_sequence . + 4 | program_sequence . program + 8 program_sequence: program_sequence . program end_program + + IDENTIFICATION shift, and go to state 1 + + $default reduce using rule 3 (program_sequences) + + program go to state 9 + identification_division go to state 6 + + +state 5 + + 2 program_sequences: program . + 5 program_sequence: program . end_program + 7 | program . $@1 program_sequence end_program + + END shift, and go to state 10 + + IDENTIFICATION reduce using rule 6 ($@1) + $default reduce using rule 2 (program_sequences) + + $@1 go to state 11 + end_program go to state 12 + + +state 6 + + 11 program: identification_division . environment_division_opt data_division_opt procedure_division_opt + + ENVIRONMENT shift, and go to state 13 + + $default reduce using rule 30 (environment_division_opt) + + environment_division_opt go to state 14 + + +state 7 + + 15 identification_division: IDENTIFICATION DIVISION . PERIOD_TOK PROGRAM_ID PERIOD_TOK $@3 IDSTRING $@4 programid_opts_opt PERIOD_TOK $@5 identification_division_options_opt + + PERIOD_TOK shift, and go to state 15 + + +state 8 + + 0 $accept: root_ $end . + + $default accept + + +state 9 + + 4 program_sequences: program_sequence program . + 8 program_sequence: program_sequence program . end_program + + END shift, and go to state 10 + + $default reduce using rule 4 (program_sequences) + + end_program go to state 16 + + +state 10 + + 10 end_program: END . PROGRAM $@2 IDSTRING + + PROGRAM shift, and go to state 17 + + +state 11 + + 7 program_sequence: program $@1 . program_sequence end_program + + IDENTIFICATION shift, and go to state 1 + + program_sequence go to state 18 + program go to state 19 + identification_division go to state 6 + + +state 12 + + 5 program_sequence: program end_program . + + $default reduce using rule 5 (program_sequence) + + +state 13 + + 29 environment_division_opt: ENVIRONMENT . DIVISION PERIOD_TOK $@6 configuration_opt input_output_opt + + DIVISION shift, and go to state 20 + + +state 14 + + 11 program: identification_division environment_division_opt . data_division_opt procedure_division_opt + + DATA shift, and go to state 21 + + $default reduce using rule 177 (data_division_opt) + + data_division_opt go to state 22 + + +state 15 + + 15 identification_division: IDENTIFICATION DIVISION PERIOD_TOK . PROGRAM_ID PERIOD_TOK $@3 IDSTRING $@4 programid_opts_opt PERIOD_TOK $@5 identification_division_options_opt + + PROGRAM_ID shift, and go to state 23 + + +state 16 + + 8 program_sequence: program_sequence program end_program . + + $default reduce using rule 8 (program_sequence) + + +state 17 + + 10 end_program: END PROGRAM . $@2 IDSTRING + + $default reduce using rule 9 ($@2) + + $@2 go to state 24 + + +state 18 + + 7 program_sequence: program $@1 program_sequence . end_program + 8 | program_sequence . program end_program + + END shift, and go to state 10 + IDENTIFICATION shift, and go to state 1 + + end_program go to state 25 + program go to state 26 + identification_division go to state 6 + + +state 19 + + 5 program_sequence: program . end_program + 7 | program . $@1 program_sequence end_program + + END shift, and go to state 10 + + $default reduce using rule 6 ($@1) + + $@1 go to state 11 + end_program go to state 12 + + +state 20 + + 29 environment_division_opt: ENVIRONMENT DIVISION . PERIOD_TOK $@6 configuration_opt input_output_opt + + PERIOD_TOK shift, and go to state 27 + + +state 21 + + 176 data_division_opt: DATA . DIVISION PERIOD_TOK $@11 file_section_opt working_storage_opt linkage_section_opt report_section_opt screen_section_opt + + DIVISION shift, and go to state 28 + + +state 22 + + 11 program: identification_division environment_division_opt data_division_opt . procedure_division_opt + + PROCEDURE shift, and go to state 29 + + $default reduce using rule 560 (procedure_division_opt) + + procedure_division_opt go to state 30 + + +state 23 + + 15 identification_division: IDENTIFICATION DIVISION PERIOD_TOK PROGRAM_ID . PERIOD_TOK $@3 IDSTRING $@4 programid_opts_opt PERIOD_TOK $@5 identification_division_options_opt + + PERIOD_TOK shift, and go to state 31 + + +state 24 + + 10 end_program: END PROGRAM $@2 . IDSTRING + + IDSTRING shift, and go to state 32 + + +state 25 + + 7 program_sequence: program $@1 program_sequence end_program . + + $default reduce using rule 7 (program_sequence) + + +state 26 + + 8 program_sequence: program_sequence program . end_program + + END shift, and go to state 10 + + end_program go to state 16 + + +state 27 + + 29 environment_division_opt: ENVIRONMENT DIVISION PERIOD_TOK . $@6 configuration_opt input_output_opt + + $default reduce using rule 28 ($@6) + + $@6 go to state 33 + + +state 28 + + 176 data_division_opt: DATA DIVISION . PERIOD_TOK $@11 file_section_opt working_storage_opt linkage_section_opt report_section_opt screen_section_opt + + PERIOD_TOK shift, and go to state 34 + + +state 29 + + 559 procedure_division_opt: PROCEDURE . DIVISION $@51 using_parameters PERIOD_TOK $@52 declaratives_opt procedure_division + + DIVISION shift, and go to state 35 + + +state 30 + + 11 program: identification_division environment_division_opt data_division_opt procedure_division_opt . + + $default reduce using rule 11 (program) + + +state 31 + + 15 identification_division: IDENTIFICATION DIVISION PERIOD_TOK PROGRAM_ID PERIOD_TOK . $@3 IDSTRING $@4 programid_opts_opt PERIOD_TOK $@5 identification_division_options_opt + + $default reduce using rule 12 ($@3) + + $@3 go to state 36 + + +state 32 + + 10 end_program: END PROGRAM $@2 IDSTRING . + + $default reduce using rule 10 (end_program) + + +state 33 + + 29 environment_division_opt: ENVIRONMENT DIVISION PERIOD_TOK $@6 . configuration_opt input_output_opt + + CONFIGURATION shift, and go to state 37 + + $default reduce using rule 32 (configuration_opt) + + configuration_opt go to state 38 + + +state 34 + + 176 data_division_opt: DATA DIVISION PERIOD_TOK . $@11 file_section_opt working_storage_opt linkage_section_opt report_section_opt screen_section_opt + + $default reduce using rule 175 ($@11) + + $@11 go to state 39 + + +state 35 + + 559 procedure_division_opt: PROCEDURE DIVISION . $@51 using_parameters PERIOD_TOK $@52 declaratives_opt procedure_division + + $default reduce using rule 557 ($@51) + + $@51 go to state 40 + + +state 36 + + 15 identification_division: IDENTIFICATION DIVISION PERIOD_TOK PROGRAM_ID PERIOD_TOK $@3 . IDSTRING $@4 programid_opts_opt PERIOD_TOK $@5 identification_division_options_opt + + IDSTRING shift, and go to state 41 + + +state 37 + + 31 configuration_opt: CONFIGURATION . SECTION PERIOD_TOK configuration_section + + SECTION shift, and go to state 42 + + +state 38 + + 29 environment_division_opt: ENVIRONMENT DIVISION PERIOD_TOK $@6 configuration_opt . input_output_opt + + INPUT_OUTPUT shift, and go to state 43 + + $default reduce using rule 94 (input_output_opt) + + input_output_opt go to state 44 + + +state 39 + + 176 data_division_opt: DATA DIVISION PERIOD_TOK $@11 . file_section_opt working_storage_opt linkage_section_opt report_section_opt screen_section_opt + + FILE_TOK shift, and go to state 45 + + $default reduce using rule 180 (file_section_opt) + + file_section_opt go to state 46 + + +state 40 + + 559 procedure_division_opt: PROCEDURE DIVISION $@51 . using_parameters PERIOD_TOK $@52 declaratives_opt procedure_division + + CHAINING shift, and go to state 47 + USING shift, and go to state 48 + + $default reduce using rule 1130 (using_parameters) + + using_parameters go to state 49 + + +state 41 + + 15 identification_division: IDENTIFICATION DIVISION PERIOD_TOK PROGRAM_ID PERIOD_TOK $@3 IDSTRING . $@4 programid_opts_opt PERIOD_TOK $@5 identification_division_options_opt + + $default reduce using rule 13 ($@4) + + $@4 go to state 50 + + +state 42 + + 31 configuration_opt: CONFIGURATION SECTION . PERIOD_TOK configuration_section + + PERIOD_TOK shift, and go to state 51 + + +state 43 + + 93 input_output_opt: INPUT_OUTPUT . SECTION PERIOD_TOK input_output_section + + SECTION shift, and go to state 52 + + +state 44 + + 29 environment_division_opt: ENVIRONMENT DIVISION PERIOD_TOK $@6 configuration_opt input_output_opt . + + $default reduce using rule 29 (environment_division_opt) + + +state 45 + + 179 file_section_opt: FILE_TOK . SECTION PERIOD_TOK $@12 file_section + + SECTION shift, and go to state 53 + + +state 46 + + 176 data_division_opt: DATA DIVISION PERIOD_TOK $@11 file_section_opt . working_storage_opt linkage_section_opt report_section_opt screen_section_opt + + WORKING_STORAGE shift, and go to state 54 + + $default reduce using rule 183 (working_storage_opt) + + working_storage_opt go to state 55 + + +state 47 + + 1132 using_parameters: CHAINING . gname_list + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gname_list go to state 70 + gname go to state 71 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 48 + + 1131 using_parameters: USING . gname_list + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gname_list go to state 82 + gname go to state 71 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 49 + + 559 procedure_division_opt: PROCEDURE DIVISION $@51 using_parameters . PERIOD_TOK $@52 declaratives_opt procedure_division + + PERIOD_TOK shift, and go to state 83 + + +state 50 + + 15 identification_division: IDENTIFICATION DIVISION PERIOD_TOK PROGRAM_ID PERIOD_TOK $@3 IDSTRING $@4 . programid_opts_opt PERIOD_TOK $@5 identification_division_options_opt + + IS shift, and go to state 84 + + PERIOD_TOK reduce using rule 16 (programid_opts_opt) + $default reduce using rule 132 (is_opt) + + programid_opts_opt go to state 85 + is_opt go to state 86 + + +state 51 + + 31 configuration_opt: CONFIGURATION SECTION PERIOD_TOK . configuration_section + + $default reduce using rule 34 (configuration_section) + + configuration_section go to state 87 + + +state 52 + + 93 input_output_opt: INPUT_OUTPUT SECTION . PERIOD_TOK input_output_section + + PERIOD_TOK shift, and go to state 88 + + +state 53 + + 179 file_section_opt: FILE_TOK SECTION . PERIOD_TOK $@12 file_section + + PERIOD_TOK shift, and go to state 89 + + +state 54 + + 182 working_storage_opt: WORKING_STORAGE . SECTION PERIOD_TOK $@13 working_storage_section + + SECTION shift, and go to state 90 + + +state 55 + + 176 data_division_opt: DATA DIVISION PERIOD_TOK $@11 file_section_opt working_storage_opt . linkage_section_opt report_section_opt screen_section_opt + + LINKAGE shift, and go to state 91 + + $default reduce using rule 186 (linkage_section_opt) + + linkage_section_opt go to state 92 + + +state 56 + + 1294 unqualified_var: VARIABLE . + + $default reduce using rule 1294 (unqualified_var) + + +state 57 + + 1295 unqualified_var: SUBSCVAR . + + $default reduce using rule 1295 (unqualified_var) + + +state 58 + + 1287 name: LABELSTR . + + $default reduce using rule 1287 (name) + + +state 59 + + 1270 signed_nliteral: NLITERAL . + + $default reduce using rule 1270 (signed_nliteral) + + +state 60 + + 1269 literal: CLITERAL . + + $default reduce using rule 1269 (literal) + + +state 61 + + 1271 signed_nliteral: '+' . NLITERAL + + NLITERAL shift, and go to state 93 + + +state 62 + + 1272 signed_nliteral: '-' . NLITERAL + + NLITERAL shift, and go to state 94 + + +state 63 + + 1258 all_literal: ALL . literal + 1259 | ALL . special_literal + + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + special_literal go to state 95 + literal go to state 96 + signed_nliteral go to state 77 + + +state 64 + + 1248 gname: FUNCTION . LABELSTR '(' @145 intrinsic_parm_list ')' + 1249 | FUNCTION . LABELSTR + + LABELSTR shift, and go to state 97 + + +state 65 + + 1263 special_literal: HIGHVALUES . + + $default reduce using rule 1263 (special_literal) + + +state 66 + + 1264 special_literal: LOWVALUES . + + $default reduce using rule 1264 (special_literal) + + +state 67 + + 1262 special_literal: QUOTES . + + $default reduce using rule 1262 (special_literal) + + +state 68 + + 1260 special_literal: SPACES . + + $default reduce using rule 1260 (special_literal) + + +state 69 + + 1261 special_literal: ZERO . + + $default reduce using rule 1261 (special_literal) + + +state 70 + + 1132 using_parameters: CHAINING gname_list . + 1244 gname_list: gname_list . sep_opt gname + + LISTSEP shift, and go to state 98 + + PERIOD_TOK reduce using rule 1132 (using_parameters) + $default reduce using rule 1214 (sep_opt) + + sep_opt go to state 99 + + +state 71 + + 1243 gname_list: gname . + + $default reduce using rule 1243 (gname_list) + + +state 72 + + 1246 gname: gliteral . + + $default reduce using rule 1246 (gname) + + +state 73 + + 1254 gliteral: without_all_literal . + + $default reduce using rule 1254 (gliteral) + + +state 74 + + 1255 gliteral: all_literal . + + $default reduce using rule 1255 (gliteral) + + +state 75 + + 1257 without_all_literal: special_literal . + + $default reduce using rule 1257 (without_all_literal) + + +state 76 + + 1256 without_all_literal: literal . + + $default reduce using rule 1256 (without_all_literal) + + +state 77 + + 1268 literal: signed_nliteral . + + $default reduce using rule 1268 (literal) + + +state 78 + + 1245 gname: name . + + $default reduce using rule 1245 (gname) + + +state 79 + + 1285 name: variable . '(' gname ':' gname_opt ')' + 1286 | variable . + + '(' shift, and go to state 100 + + $default reduce using rule 1286 (name) + + +state 80 + + 1289 variable: qualified_var . + 1291 | qualified_var . LPAR $@147 subscripts ')' + + LPAR shift, and go to state 101 + + $default reduce using rule 1289 (variable) + + +state 81 + + 1292 qualified_var: unqualified_var . + 1293 | unqualified_var . in_of qualified_var + + IN shift, and go to state 102 + OF shift, and go to state 103 + + $default reduce using rule 1292 (qualified_var) + + in_of go to state 104 + + +state 82 + + 1131 using_parameters: USING gname_list . + 1244 gname_list: gname_list . sep_opt gname + + LISTSEP shift, and go to state 98 + + PERIOD_TOK reduce using rule 1131 (using_parameters) + $default reduce using rule 1214 (sep_opt) + + sep_opt go to state 99 + + +state 83 + + 559 procedure_division_opt: PROCEDURE DIVISION $@51 using_parameters PERIOD_TOK . $@52 declaratives_opt procedure_division + + $default reduce using rule 558 ($@52) + + $@52 go to state 105 + + +state 84 + + 131 is_opt: IS . + + $default reduce using rule 131 (is_opt) + + +state 85 + + 15 identification_division: IDENTIFICATION DIVISION PERIOD_TOK PROGRAM_ID PERIOD_TOK $@3 IDSTRING $@4 programid_opts_opt . PERIOD_TOK $@5 identification_division_options_opt + + PERIOD_TOK shift, and go to state 106 + + +state 86 + + 17 programid_opts_opt: is_opt . INITIAL_TOK programid_program_opt + 18 | is_opt . COMMON programid_program_opt + + COMMON shift, and go to state 107 + INITIAL_TOK shift, and go to state 108 + + +state 87 + + 31 configuration_opt: CONFIGURATION SECTION PERIOD_TOK configuration_section . + 33 configuration_section: configuration_section . configuration_option + + error shift, and go to state 109 + OBJECT_COMPUTER shift, and go to state 110 + SOURCE_COMPUTER shift, and go to state 111 + SPECIAL_NAMES shift, and go to state 112 + + $end reduce using rule 31 (configuration_opt) + INPUT_OUTPUT reduce using rule 31 (configuration_opt) + DATA reduce using rule 31 (configuration_opt) + END reduce using rule 31 (configuration_opt) + IDENTIFICATION reduce using rule 31 (configuration_opt) + PROCEDURE reduce using rule 31 (configuration_opt) + + configuration_option go to state 113 + + +state 88 + + 93 input_output_opt: INPUT_OUTPUT SECTION PERIOD_TOK . input_output_section + + error shift, and go to state 114 + FILE_CONTROL shift, and go to state 115 + + input_output_section go to state 116 + file_control_paragraph go to state 117 + + +state 89 + + 179 file_section_opt: FILE_TOK SECTION PERIOD_TOK . $@12 file_section + + $default reduce using rule 178 ($@12) + + $@12 go to state 118 + + +state 90 + + 182 working_storage_opt: WORKING_STORAGE SECTION . PERIOD_TOK $@13 working_storage_section + + PERIOD_TOK shift, and go to state 119 + + +state 91 + + 185 linkage_section_opt: LINKAGE . SECTION PERIOD_TOK $@14 linkage_section + + SECTION shift, and go to state 120 + + +state 92 + + 176 data_division_opt: DATA DIVISION PERIOD_TOK $@11 file_section_opt working_storage_opt linkage_section_opt . report_section_opt screen_section_opt + + REPORT shift, and go to state 121 + + $default reduce using rule 188 (report_section_opt) + + report_section_opt go to state 122 + + +state 93 + + 1271 signed_nliteral: '+' NLITERAL . + + $default reduce using rule 1271 (signed_nliteral) + + +state 94 + + 1272 signed_nliteral: '-' NLITERAL . + + $default reduce using rule 1272 (signed_nliteral) + + +state 95 + + 1259 all_literal: ALL special_literal . + + $default reduce using rule 1259 (all_literal) + + +state 96 + + 1258 all_literal: ALL literal . + + $default reduce using rule 1258 (all_literal) + + +state 97 + + 1248 gname: FUNCTION LABELSTR . '(' @145 intrinsic_parm_list ')' + 1249 | FUNCTION LABELSTR . + + '(' shift, and go to state 123 + + $default reduce using rule 1249 (gname) + + +state 98 + + 1215 sep_opt: LISTSEP . + + $default reduce using rule 1215 (sep_opt) + + +state 99 + + 1244 gname_list: gname_list sep_opt . gname + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gname go to state 124 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 100 + + 1285 name: variable '(' . gname ':' gname_opt ')' + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gname go to state 125 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 101 + + 1291 variable: qualified_var LPAR . $@147 subscripts ')' + + $default reduce using rule 1290 ($@147) + + $@147 go to state 126 + + +state 102 + + 1229 in_of: IN . + + $default reduce using rule 1229 (in_of) + + +state 103 + + 1230 in_of: OF . + + $default reduce using rule 1230 (in_of) + + +state 104 + + 1293 qualified_var: unqualified_var in_of . qualified_var + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + + qualified_var go to state 127 + unqualified_var go to state 81 + + +state 105 + + 559 procedure_division_opt: PROCEDURE DIVISION $@51 using_parameters PERIOD_TOK $@52 . declaratives_opt procedure_division + + DECLARATIVES shift, and go to state 128 + + $default reduce using rule 572 (declaratives_opt) + + declaratives_opt go to state 129 + + +state 106 + + 15 identification_division: IDENTIFICATION DIVISION PERIOD_TOK PROGRAM_ID PERIOD_TOK $@3 IDSTRING $@4 programid_opts_opt PERIOD_TOK . $@5 identification_division_options_opt + + $default reduce using rule 14 ($@5) + + $@5 go to state 130 + + +state 107 + + 18 programid_opts_opt: is_opt COMMON . programid_program_opt + + PROGRAM shift, and go to state 131 + + $default reduce using rule 19 (programid_program_opt) + + programid_program_opt go to state 132 + + +state 108 + + 17 programid_opts_opt: is_opt INITIAL_TOK . programid_program_opt + + PROGRAM shift, and go to state 131 + + $default reduce using rule 19 (programid_program_opt) + + programid_program_opt go to state 133 + + +state 109 + + 40 configuration_option: error . + + $default reduce using rule 40 (configuration_option) + + +state 110 + + 38 configuration_option: OBJECT_COMPUTER . PERIOD_TOK $@8 STRING program_collating_opt PERIOD_TOK + + PERIOD_TOK shift, and go to state 134 + + +state 111 + + 36 configuration_option: SOURCE_COMPUTER . PERIOD_TOK $@7 STRING debug_mode_opt PERIOD_TOK + + PERIOD_TOK shift, and go to state 135 + + +state 112 + + 39 configuration_option: SPECIAL_NAMES . PERIOD_TOK special_names_opt + + PERIOD_TOK shift, and go to state 136 + + +state 113 + + 33 configuration_section: configuration_section configuration_option . + + $default reduce using rule 33 (configuration_section) + + +state 114 + + 96 input_output_section: error . + + $default reduce using rule 96 (input_output_section) + + +state 115 + + 97 file_control_paragraph: FILE_CONTROL . PERIOD_TOK file_control + + PERIOD_TOK shift, and go to state 137 + + +state 116 + + 93 input_output_opt: INPUT_OUTPUT SECTION PERIOD_TOK input_output_section . + + $default reduce using rule 93 (input_output_opt) + + +state 117 + + 95 input_output_section: file_control_paragraph . i_o_control_paragraph + + I_O_CONTROL shift, and go to state 138 + + $default reduce using rule 98 (i_o_control_paragraph) + + i_o_control_paragraph go to state 139 + + +state 118 + + 179 file_section_opt: FILE_TOK SECTION PERIOD_TOK $@12 . file_section + + error shift, and go to state 140 + + $end reduce using rule 425 (file_section) + END reduce using rule 425 (file_section) + FD reduce using rule 425 (file_section) + IDENTIFICATION reduce using rule 425 (file_section) + LINKAGE reduce using rule 425 (file_section) + PROCEDURE reduce using rule 425 (file_section) + REPORT reduce using rule 425 (file_section) + SCREEN reduce using rule 425 (file_section) + SD reduce using rule 425 (file_section) + WORKING_STORAGE reduce using rule 425 (file_section) + + file_section go to state 141 + + +state 119 + + 182 working_storage_opt: WORKING_STORAGE SECTION PERIOD_TOK . $@13 working_storage_section + + $default reduce using rule 181 ($@13) + + $@13 go to state 142 + + +state 120 + + 185 linkage_section_opt: LINKAGE SECTION . PERIOD_TOK $@14 linkage_section + + PERIOD_TOK shift, and go to state 143 + + +state 121 + + 187 report_section_opt: REPORT . SECTION PERIOD_TOK report_sections + + SECTION shift, and go to state 144 + + +state 122 + + 176 data_division_opt: DATA DIVISION PERIOD_TOK $@11 file_section_opt working_storage_opt linkage_section_opt report_section_opt . screen_section_opt + + SCREEN shift, and go to state 145 + + $default reduce using rule 321 (screen_section_opt) + + screen_section_opt go to state 146 + + +state 123 + + 1248 gname: FUNCTION LABELSTR '(' . @145 intrinsic_parm_list ')' + + $default reduce using rule 1247 (@145) + + @145 go to state 147 + + +state 124 + + 1244 gname_list: gname_list sep_opt gname . + + $default reduce using rule 1244 (gname_list) + + +state 125 + + 1285 name: variable '(' gname . ':' gname_opt ')' + + ':' shift, and go to state 148 + + +state 126 + + 1291 variable: qualified_var LPAR $@147 . subscripts ')' + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gname go to state 149 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + subscripts go to state 150 + subscript go to state 151 + + +state 127 + + 1293 qualified_var: unqualified_var in_of qualified_var . + + $default reduce using rule 1293 (qualified_var) + + +state 128 + + 571 declaratives_opt: DECLARATIVES . PERIOD_TOK $@55 declaratives_procedure declaratives_division END DECLARATIVES PERIOD_TOK + + PERIOD_TOK shift, and go to state 152 + + +state 129 + + 559 procedure_division_opt: PROCEDURE DIVISION $@51 using_parameters PERIOD_TOK $@52 declaratives_opt . procedure_division + + $default reduce using rule 561 (procedure_division) + + procedure_division go to state 153 + + +state 130 + + 15 identification_division: IDENTIFICATION DIVISION PERIOD_TOK PROGRAM_ID PERIOD_TOK $@3 IDSTRING $@4 programid_opts_opt PERIOD_TOK $@5 . identification_division_options_opt + + $default reduce using rule 21 (identification_division_options_opt) + + identification_division_options_opt go to state 154 + + +state 131 + + 20 programid_program_opt: PROGRAM . + + $default reduce using rule 20 (programid_program_opt) + + +state 132 + + 18 programid_opts_opt: is_opt COMMON programid_program_opt . + + $default reduce using rule 18 (programid_opts_opt) + + +state 133 + + 17 programid_opts_opt: is_opt INITIAL_TOK programid_program_opt . + + $default reduce using rule 17 (programid_opts_opt) + + +state 134 + + 38 configuration_option: OBJECT_COMPUTER PERIOD_TOK . $@8 STRING program_collating_opt PERIOD_TOK + + $default reduce using rule 37 ($@8) + + $@8 go to state 155 + + +state 135 + + 36 configuration_option: SOURCE_COMPUTER PERIOD_TOK . $@7 STRING debug_mode_opt PERIOD_TOK + + $default reduce using rule 35 ($@7) + + $@7 go to state 156 + + +state 136 + + 39 configuration_option: SPECIAL_NAMES PERIOD_TOK . special_names_opt + + error shift, and go to state 157 + ALPHABET shift, and go to state 158 + CLASS shift, and go to state 159 + CURRENCY shift, and go to state 160 + CURSOR shift, and go to state 161 + DECIMAL_POINT shift, and go to state 162 + DISPLAY_SCREEN shift, and go to state 163 + + $end reduce using rule 48 (special_names_opt) + error [reduce using rule 48 (special_names_opt)] + STRING reduce using rule 71 (switches_details_list) + INPUT_OUTPUT reduce using rule 48 (special_names_opt) + ALPHABET [reduce using rule 71 (switches_details_list)] + CLASS [reduce using rule 71 (switches_details_list)] + CURRENCY [reduce using rule 71 (switches_details_list)] + CURSOR [reduce using rule 71 (switches_details_list)] + DATA reduce using rule 48 (special_names_opt) + DECIMAL_POINT [reduce using rule 71 (switches_details_list)] + DISPLAY_SCREEN [reduce using rule 71 (switches_details_list)] + END reduce using rule 48 (special_names_opt) + IDENTIFICATION reduce using rule 48 (special_names_opt) + OBJECT_COMPUTER reduce using rule 48 (special_names_opt) + PROCEDURE reduce using rule 48 (special_names_opt) + SOURCE_COMPUTER reduce using rule 48 (special_names_opt) + SPECIAL_NAMES reduce using rule 48 (special_names_opt) + PERIOD_TOK reduce using rule 71 (switches_details_list) + + special_names_opt go to state 164 + special_names go to state 165 + special_name go to state 166 + currency_details go to state 167 + special_name_class go to state 168 + decimal_point_details go to state 169 + screen_status_details go to state 170 + cursor_details go to state 171 + switches_details_list go to state 172 + alphabet_details go to state 173 + + +state 137 + + 97 file_control_paragraph: FILE_CONTROL PERIOD_TOK . file_control + + SELECT shift, and go to state 174 + + file_control go to state 175 + file_select go to state 176 + + +state 138 + + 99 i_o_control_paragraph: I_O_CONTROL . PERIOD_TOK i_o_control_opt + + PERIOD_TOK shift, and go to state 177 + + +state 139 + + 95 input_output_section: file_control_paragraph i_o_control_paragraph . + + $default reduce using rule 95 (input_output_section) + + +state 140 + + 424 file_section: error . + + $default reduce using rule 424 (file_section) + + +state 141 + + 179 file_section_opt: FILE_TOK SECTION PERIOD_TOK $@12 file_section . + 419 file_section: file_section . FD $@38 STRING $@39 file_description_fd_clauses PERIOD_TOK $@40 file_description + 423 | file_section . SD $@41 STRING $@42 file_description_sd_clauses PERIOD_TOK $@43 file_description + + FD shift, and go to state 178 + SD shift, and go to state 179 + + $default reduce using rule 179 (file_section_opt) + + +state 142 + + 182 working_storage_opt: WORKING_STORAGE SECTION PERIOD_TOK $@13 . working_storage_section + + $default reduce using rule 554 (working_storage_section) + + working_storage_section go to state 180 + + +state 143 + + 185 linkage_section_opt: LINKAGE SECTION PERIOD_TOK . $@14 linkage_section + + $default reduce using rule 184 ($@14) + + $@14 go to state 181 + + +state 144 + + 187 report_section_opt: REPORT SECTION . PERIOD_TOK report_sections + + PERIOD_TOK shift, and go to state 182 + + +state 145 + + 320 screen_section_opt: SCREEN . SECTION PERIOD_TOK $@27 screen_section + + SECTION shift, and go to state 183 + + +state 146 + + 176 data_division_opt: DATA DIVISION PERIOD_TOK $@11 file_section_opt working_storage_opt linkage_section_opt report_section_opt screen_section_opt . + + $default reduce using rule 176 (data_division_opt) + + +state 147 + + 1248 gname: FUNCTION LABELSTR '(' @145 . intrinsic_parm_list ')' + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + intrinsic_parm_list go to state 184 + intrinsic_parm go to state 185 + gname go to state 186 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 148 + + 1285 name: variable '(' gname ':' . gname_opt ')' + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + $default reduce using rule 1238 (gname_opt) + + gname_opt go to state 187 + gname go to state 188 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 149 + + 1298 subscript: gname . + + $default reduce using rule 1298 (subscript) + + +state 150 + + 1291 variable: qualified_var LPAR $@147 subscripts . ')' + 1297 subscripts: subscripts . comma_opt subscript + + ')' shift, and go to state 189 + ',' shift, and go to state 190 + + $default reduce using rule 1212 (comma_opt) + + comma_opt go to state 191 + + +state 151 + + 1296 subscripts: subscript . + 1299 subscript: subscript . '+' gname + 1300 | subscript . '-' gname + + '+' shift, and go to state 192 + '-' shift, and go to state 193 + + '+' [reduce using rule 1296 (subscripts)] + '-' [reduce using rule 1296 (subscripts)] + $default reduce using rule 1296 (subscripts) + + +state 152 + + 571 declaratives_opt: DECLARATIVES PERIOD_TOK . $@55 declaratives_procedure declaratives_division END DECLARATIVES PERIOD_TOK + + $default reduce using rule 570 ($@55) + + $@55 go to state 194 + + +state 153 + + 559 procedure_division_opt: PROCEDURE DIVISION $@51 using_parameters PERIOD_TOK $@52 declaratives_opt procedure_division . + 562 procedure_division: procedure_division . procedure_decl + + error shift, and go to state 195 + LABELSTR shift, and go to state 196 + PERIOD_TOK shift, and go to state 197 + + $end reduce using rule 559 (procedure_division_opt) + READ reduce using rule 565 ($@53) + WRITE reduce using rule 565 ($@53) + RELEASE reduce using rule 565 ($@53) + ACCEPT reduce using rule 565 ($@53) + ADD reduce using rule 565 ($@53) + CALL reduce using rule 565 ($@53) + CALL_LOADLIB reduce using rule 565 ($@53) + CANCEL reduce using rule 565 ($@53) + CHAIN reduce using rule 565 ($@53) + CLOSE reduce using rule 565 ($@53) + COMPUTE reduce using rule 565 ($@53) + CONTINUE reduce using rule 565 ($@53) + DELETE reduce using rule 565 ($@53) + DISPLAY reduce using rule 565 ($@53) + DIVIDE reduce using rule 565 ($@53) + END reduce using rule 559 (procedure_division_opt) + EVALUATE reduce using rule 565 ($@53) + EXIT reduce using rule 565 ($@53) + GENERATE reduce using rule 565 ($@53) + GO reduce using rule 565 ($@53) + GOBACK reduce using rule 565 ($@53) + IDENTIFICATION reduce using rule 559 (procedure_division_opt) + IF reduce using rule 565 ($@53) + INITIALIZE reduce using rule 565 ($@53) + INITIATE reduce using rule 565 ($@53) + INSPECT reduce using rule 565 ($@53) + MERGE reduce using rule 565 ($@53) + MOVE reduce using rule 565 ($@53) + MULTIPLY reduce using rule 565 ($@53) + OPEN reduce using rule 565 ($@53) + PERFORM reduce using rule 565 ($@53) + READY reduce using rule 565 ($@53) + RESET reduce using rule 565 ($@53) + RETURN reduce using rule 565 ($@53) + REWRITE reduce using rule 565 ($@53) + SEARCH reduce using rule 565 ($@53) + SET reduce using rule 565 ($@53) + SORT reduce using rule 565 ($@53) + START reduce using rule 565 ($@53) + STOP reduce using rule 565 ($@53) + STRINGCMD reduce using rule 565 ($@53) + SUBTRACT reduce using rule 565 ($@53) + TCOBPROTO1 reduce using rule 565 ($@53) + TCOBPROTO2 reduce using rule 565 ($@53) + TERMINATE reduce using rule 565 ($@53) + UNLOCK reduce using rule 565 ($@53) + UNSTRING reduce using rule 565 ($@53) + + procedure_decl go to state 198 + $@53 go to state 199 + procedure_section go to state 200 + paragraph go to state 201 + + +state 154 + + 15 identification_division: IDENTIFICATION DIVISION PERIOD_TOK PROGRAM_ID PERIOD_TOK $@3 IDSTRING $@4 programid_opts_opt PERIOD_TOK $@5 identification_division_options_opt . + 22 identification_division_options_opt: identification_division_options_opt . identification_division_option + + AUTHOR shift, and go to state 202 + DATE_COMPILED shift, and go to state 203 + DATE_WRITTEN shift, and go to state 204 + INSTALLATION shift, and go to state 205 + SECURITY shift, and go to state 206 + + $default reduce using rule 15 (identification_division) + + identification_division_option go to state 207 + + +state 155 + + 38 configuration_option: OBJECT_COMPUTER PERIOD_TOK $@8 . STRING program_collating_opt PERIOD_TOK + + STRING shift, and go to state 208 + + +state 156 + + 36 configuration_option: SOURCE_COMPUTER PERIOD_TOK $@7 . STRING debug_mode_opt PERIOD_TOK + + STRING shift, and go to state 209 + + +state 157 + + 50 special_names_opt: error . + + $default reduce using rule 50 (special_names_opt) + + +state 158 + + 81 alphabet_details: ALPHABET . STRING is_opt alphabet_type + + STRING shift, and go to state 210 + + +state 159 + + 63 special_name_class: CLASS . STRING is_opt special_name_class_item_list + + STRING shift, and go to state 211 + + +state 160 + + 60 currency_details: CURRENCY . sign_opt is_opt CLITERAL + + SIGN shift, and go to state 212 + + $default reduce using rule 62 (sign_opt) + + sign_opt go to state 213 + + +state 161 + + 70 cursor_details: CURSOR . is_opt STRING + + IS shift, and go to state 84 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 214 + + +state 162 + + 68 decimal_point_details: DECIMAL_POINT . is_opt COMMA + + IS shift, and go to state 84 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 215 + + +state 163 + + 69 screen_status_details: DISPLAY_SCREEN . STATUS is_opt STRING + + STATUS shift, and go to state 216 + + +state 164 + + 39 configuration_option: SPECIAL_NAMES PERIOD_TOK special_names_opt . + + $default reduce using rule 39 (configuration_option) + + +state 165 + + 49 special_names_opt: special_names . PERIOD_TOK + 52 special_names: special_names . special_name + + ALPHABET shift, and go to state 158 + CLASS shift, and go to state 159 + CURRENCY shift, and go to state 160 + CURSOR shift, and go to state 161 + DECIMAL_POINT shift, and go to state 162 + DISPLAY_SCREEN shift, and go to state 163 + PERIOD_TOK shift, and go to state 217 + + ALPHABET [reduce using rule 71 (switches_details_list)] + CLASS [reduce using rule 71 (switches_details_list)] + CURRENCY [reduce using rule 71 (switches_details_list)] + CURSOR [reduce using rule 71 (switches_details_list)] + DECIMAL_POINT [reduce using rule 71 (switches_details_list)] + DISPLAY_SCREEN [reduce using rule 71 (switches_details_list)] + PERIOD_TOK [reduce using rule 71 (switches_details_list)] + $default reduce using rule 71 (switches_details_list) + + special_name go to state 218 + currency_details go to state 167 + special_name_class go to state 168 + decimal_point_details go to state 169 + screen_status_details go to state 170 + cursor_details go to state 171 + switches_details_list go to state 172 + alphabet_details go to state 173 + + +state 166 + + 51 special_names: special_name . + + $default reduce using rule 51 (special_names) + + +state 167 + + 55 special_name: currency_details . + + $default reduce using rule 55 (special_name) + + +state 168 + + 59 special_name: special_name_class . + + $default reduce using rule 59 (special_name) + + +state 169 + + 56 special_name: decimal_point_details . + + $default reduce using rule 56 (special_name) + + +state 170 + + 57 special_name: screen_status_details . + + $default reduce using rule 57 (special_name) + + +state 171 + + 58 special_name: cursor_details . + + $default reduce using rule 58 (special_name) + + +state 172 + + 53 special_name: switches_details_list . + 72 switches_details_list: switches_details_list . switches_details + + STRING shift, and go to state 219 + + STRING [reduce using rule 53 (special_name)] + $default reduce using rule 53 (special_name) + + switches_details go to state 220 + + +state 173 + + 54 special_name: alphabet_details . + + $default reduce using rule 54 (special_name) + + +state 174 + + 103 file_select: SELECT . optional_opt def_name $@10 select_clauses PERIOD_TOK + + OPTIONAL shift, and go to state 221 + + $default reduce using rule 127 (optional_opt) + + optional_opt go to state 222 + + +state 175 + + 97 file_control_paragraph: FILE_CONTROL PERIOD_TOK file_control . + 101 file_control: file_control . file_select + + SELECT shift, and go to state 174 + + $default reduce using rule 97 (file_control_paragraph) + + file_select go to state 223 + + +state 176 + + 100 file_control: file_select . + + $default reduce using rule 100 (file_control) + + +state 177 + + 99 i_o_control_paragraph: I_O_CONTROL PERIOD_TOK . i_o_control_opt + + MULTIPLE shift, and go to state 224 + SAME shift, and go to state 225 + + $default reduce using rule 146 (i_o_control_opt) + + i_o_control_opt go to state 226 + i_o_control_list go to state 227 + i_o_control_clause go to state 228 + i_o_control_same_clause go to state 229 + i_o_control_multiple_file_tape_clause go to state 230 + + +state 178 + + 419 file_section: file_section FD . $@38 STRING $@39 file_description_fd_clauses PERIOD_TOK $@40 file_description + + $default reduce using rule 416 ($@38) + + $@38 go to state 231 + + +state 179 + + 423 file_section: file_section SD . $@41 STRING $@42 file_description_sd_clauses PERIOD_TOK $@43 file_description + + $default reduce using rule 420 ($@41) + + $@41 go to state 232 + + +state 180 + + 182 working_storage_opt: WORKING_STORAGE SECTION PERIOD_TOK $@13 working_storage_section . + 553 working_storage_section: working_storage_section . field_description + + NLITERAL shift, and go to state 59 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + $default reduce using rule 182 (working_storage_opt) + + field_description go to state 233 + signed_nliteral go to state 234 + integer go to state 235 + + +state 181 + + 185 linkage_section_opt: LINKAGE SECTION PERIOD_TOK $@14 . linkage_section + + $default reduce using rule 555 (linkage_section) + + linkage_section go to state 236 + + +state 182 + + 187 report_section_opt: REPORT SECTION PERIOD_TOK . report_sections + + $default reduce using rule 190 (report_sections) + + report_sections go to state 237 + + +state 183 + + 320 screen_section_opt: SCREEN SECTION . PERIOD_TOK $@27 screen_section + + PERIOD_TOK shift, and go to state 238 + + +state 184 + + 1140 intrinsic_parm_list: intrinsic_parm_list . sep_opt intrinsic_parm + 1248 gname: FUNCTION LABELSTR '(' @145 intrinsic_parm_list . ')' + + LISTSEP shift, and go to state 98 + ')' shift, and go to state 239 + + $default reduce using rule 1214 (sep_opt) + + sep_opt go to state 240 + + +state 185 + + 1141 intrinsic_parm_list: intrinsic_parm . + + $default reduce using rule 1141 (intrinsic_parm_list) + + +state 186 + + 1142 intrinsic_parm: gname . + + $default reduce using rule 1142 (intrinsic_parm) + + +state 187 + + 1285 name: variable '(' gname ':' gname_opt . ')' + + ')' shift, and go to state 241 + + +state 188 + + 1237 gname_opt: gname . + + $default reduce using rule 1237 (gname_opt) + + +state 189 + + 1291 variable: qualified_var LPAR $@147 subscripts ')' . + + $default reduce using rule 1291 (variable) + + +state 190 + + 1213 comma_opt: ',' . + + $default reduce using rule 1213 (comma_opt) + + +state 191 + + 1297 subscripts: subscripts comma_opt . subscript + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gname go to state 149 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + subscript go to state 242 + + +state 192 + + 1299 subscript: subscript '+' . gname + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gname go to state 243 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 193 + + 1300 subscript: subscript '-' . gname + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gname go to state 244 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 194 + + 571 declaratives_opt: DECLARATIVES PERIOD_TOK $@55 . declaratives_procedure declaratives_division END DECLARATIVES PERIOD_TOK + + error shift, and go to state 245 + LABELSTR shift, and go to state 246 + + declaratives_procedure go to state 247 + procedure_section go to state 248 + + +state 195 + + 568 procedure_decl: error . $@54 PERIOD_TOK + + $default reduce using rule 567 ($@54) + + $@54 go to state 249 + + +state 196 + + 592 procedure_section: LABELSTR . SECTION PERIOD_TOK + 593 paragraph: LABELSTR . dot_or_eos + + SECTION shift, and go to state 250 + PERIOD_TOK shift, and go to state 251 + '.' shift, and go to state 252 + + dot_or_eos go to state 253 + + +state 197 + + 569 procedure_decl: PERIOD_TOK . + + $default reduce using rule 569 (procedure_decl) + + +state 198 + + 562 procedure_division: procedure_division procedure_decl . + + $default reduce using rule 562 (procedure_division) + + +state 199 + + 566 procedure_decl: $@53 . statements PERIOD_TOK + + READ shift, and go to state 254 + WRITE shift, and go to state 255 + RELEASE shift, and go to state 256 + ACCEPT shift, and go to state 257 + ADD shift, and go to state 258 + CALL shift, and go to state 259 + CALL_LOADLIB shift, and go to state 260 + CANCEL shift, and go to state 261 + CHAIN shift, and go to state 262 + CLOSE shift, and go to state 263 + COMPUTE shift, and go to state 264 + CONTINUE shift, and go to state 265 + DELETE shift, and go to state 266 + DISPLAY shift, and go to state 267 + DIVIDE shift, and go to state 268 + EVALUATE shift, and go to state 269 + EXIT shift, and go to state 270 + GENERATE shift, and go to state 271 + GO shift, and go to state 272 + GOBACK shift, and go to state 273 + IF shift, and go to state 274 + INITIALIZE shift, and go to state 275 + INITIATE shift, and go to state 276 + INSPECT shift, and go to state 277 + MERGE shift, and go to state 278 + MOVE shift, and go to state 279 + MULTIPLY shift, and go to state 280 + OPEN shift, and go to state 281 + PERFORM shift, and go to state 282 + READY shift, and go to state 283 + RESET shift, and go to state 284 + RETURN shift, and go to state 285 + REWRITE shift, and go to state 286 + SEARCH shift, and go to state 287 + SET shift, and go to state 288 + SORT shift, and go to state 289 + START shift, and go to state 290 + STOP shift, and go to state 291 + STRINGCMD shift, and go to state 292 + SUBTRACT shift, and go to state 293 + TCOBPROTO1 shift, and go to state 294 + TCOBPROTO2 shift, and go to state 295 + TERMINATE shift, and go to state 296 + UNLOCK shift, and go to state 297 + UNSTRING shift, and go to state 298 + + statements go to state 299 + statement go to state 300 + perform_statement go to state 301 + if_statement go to state 302 + search_statement go to state 303 + evaluate_statement go to state 304 + if_part go to state 305 + unlock_statement go to state 306 + proto_statement go to state 307 + trace_statement go to state 308 + initiate_statement go to state 309 + generate_statement go to state 310 + terminate_statement go to state 311 + cancel_statement go to state 312 + merge_statement go to state 313 + sort_statement go to state 314 + sort_file go to state 315 + sort_variable_indexed go to state 316 + move_statement go to state 317 + initialize_statement go to state 318 + compute_statement go to state 319 + add_statement go to state 320 + subtract_statement go to state 321 + multiply_statement go to state 322 + divide_statement go to state 323 + accept_statement go to state 324 + accept_hardware go to state 325 + accept_chronological go to state 326 + accept_screen go to state 327 + display_statement go to state 328 + display_line go to state 329 + display_screen go to state 330 + open_statement go to state 331 + close_statement go to state 332 + return_statement go to state 333 + read_statement go to state 334 + release_statement go to state 335 + write_statement go to state 336 + rewrite_statement go to state 337 + delete_statement go to state 338 + start_statement go to state 339 + goto_statement go to state 340 + call_statement go to state 341 + call_loadlib_statement go to state 342 + chain_statement go to state 343 + exit_statement go to state 344 + stop_statement go to state 345 + goback_statement go to state 346 + set_statement go to state 347 + string_statement go to state 348 + unstring_statement go to state 349 + inspect_statement go to state 350 + + +state 200 + + 563 procedure_decl: procedure_section . + + $default reduce using rule 563 (procedure_decl) + + +state 201 + + 564 procedure_decl: paragraph . + + $default reduce using rule 564 (procedure_decl) + + +state 202 + + 23 identification_division_option: AUTHOR . PERIOD_TOK + + PERIOD_TOK shift, and go to state 351 + + +state 203 + + 25 identification_division_option: DATE_COMPILED . PERIOD_TOK + + PERIOD_TOK shift, and go to state 352 + + +state 204 + + 24 identification_division_option: DATE_WRITTEN . PERIOD_TOK + + PERIOD_TOK shift, and go to state 353 + + +state 205 + + 26 identification_division_option: INSTALLATION . PERIOD_TOK + + PERIOD_TOK shift, and go to state 354 + + +state 206 + + 27 identification_division_option: SECURITY . PERIOD_TOK + + PERIOD_TOK shift, and go to state 355 + + +state 207 + + 22 identification_division_options_opt: identification_division_options_opt identification_division_option . + + $default reduce using rule 22 (identification_division_options_opt) + + +state 208 + + 38 configuration_option: OBJECT_COMPUTER PERIOD_TOK $@8 STRING . program_collating_opt PERIOD_TOK + + PROGRAM shift, and go to state 356 + + $default reduce using rule 42 (program_collating_opt) + + program_collating_opt go to state 357 + + +state 209 + + 36 configuration_option: SOURCE_COMPUTER PERIOD_TOK $@7 STRING . debug_mode_opt PERIOD_TOK + + WITH shift, and go to state 358 + + DEBUGGING reduce using rule 1233 (with_opt) + $default reduce using rule 47 (debug_mode_opt) + + debug_mode_opt go to state 359 + with_opt go to state 360 + + +state 210 + + 81 alphabet_details: ALPHABET STRING . is_opt alphabet_type + + IS shift, and go to state 84 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 361 + + +state 211 + + 63 special_name_class: CLASS STRING . is_opt special_name_class_item_list + + IS shift, and go to state 84 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 362 + + +state 212 + + 61 sign_opt: SIGN . + + $default reduce using rule 61 (sign_opt) + + +state 213 + + 60 currency_details: CURRENCY sign_opt . is_opt CLITERAL + + IS shift, and go to state 84 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 363 + + +state 214 + + 70 cursor_details: CURSOR is_opt . STRING + + STRING shift, and go to state 364 + + +state 215 + + 68 decimal_point_details: DECIMAL_POINT is_opt . COMMA + + COMMA shift, and go to state 365 + + +state 216 + + 69 screen_status_details: DISPLAY_SCREEN STATUS . is_opt STRING + + IS shift, and go to state 84 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 366 + + +state 217 + + 49 special_names_opt: special_names PERIOD_TOK . + + $default reduce using rule 49 (special_names_opt) + + +state 218 + + 52 special_names: special_names special_name . + + $default reduce using rule 52 (special_names) + + +state 219 + + 74 switches_details: STRING . is_opt STRING $@9 switch_on_opt switch_off_opt + + IS shift, and go to state 84 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 367 + + +state 220 + + 72 switches_details_list: switches_details_list switches_details . + + $default reduce using rule 72 (switches_details_list) + + +state 221 + + 126 optional_opt: OPTIONAL . + + $default reduce using rule 126 (optional_opt) + + +state 222 + + 103 file_select: SELECT optional_opt . def_name $@10 select_clauses PERIOD_TOK + + STRING shift, and go to state 368 + FILLER shift, and go to state 369 + + def_name go to state 370 + + +state 223 + + 101 file_control: file_control file_select . + + $default reduce using rule 101 (file_control) + + +state 224 + + 157 i_o_control_multiple_file_tape_clause: MULTIPLE . FILE_TOK tape_opt contains_opt i_o_control_multiple_file_list + + FILE_TOK shift, and go to state 371 + + +state 225 + + 152 i_o_control_same_clause: SAME . same_clause_options are_opta for_opt string_list + + RECORD shift, and go to state 372 + SORT shift, and go to state 373 + SORT_MERGE shift, and go to state 374 + + $default reduce using rule 153 (same_clause_options) + + same_clause_options go to state 375 + + +state 226 + + 99 i_o_control_paragraph: I_O_CONTROL PERIOD_TOK i_o_control_opt . + + $default reduce using rule 99 (i_o_control_paragraph) + + +state 227 + + 147 i_o_control_opt: i_o_control_list . PERIOD_TOK + 149 i_o_control_list: i_o_control_list . i_o_control_clause + + MULTIPLE shift, and go to state 224 + SAME shift, and go to state 225 + PERIOD_TOK shift, and go to state 376 + + i_o_control_clause go to state 377 + i_o_control_same_clause go to state 229 + i_o_control_multiple_file_tape_clause go to state 230 + + +state 228 + + 148 i_o_control_list: i_o_control_clause . + + $default reduce using rule 148 (i_o_control_list) + + +state 229 + + 150 i_o_control_clause: i_o_control_same_clause . + + $default reduce using rule 150 (i_o_control_clause) + + +state 230 + + 151 i_o_control_clause: i_o_control_multiple_file_tape_clause . + + $default reduce using rule 151 (i_o_control_clause) + + +state 231 + + 419 file_section: file_section FD $@38 . STRING $@39 file_description_fd_clauses PERIOD_TOK $@40 file_description + + STRING shift, and go to state 378 + + +state 232 + + 423 file_section: file_section SD $@41 . STRING $@42 file_description_sd_clauses PERIOD_TOK $@43 file_description + + STRING shift, and go to state 379 + + +state 233 + + 553 working_storage_section: working_storage_section field_description . + + $default reduce using rule 553 (working_storage_section) + + +state 234 + + 1301 integer: signed_nliteral . + + $default reduce using rule 1301 (integer) + + +state 235 + + 429 field_description: integer . def_name_opt $@44 data_clauses PERIOD_TOK + + STRING shift, and go to state 368 + FILLER shift, and go to state 369 + + $default reduce using rule 1274 (def_name_opt) + + def_name_opt go to state 380 + def_name go to state 381 + + +state 236 + + 185 linkage_section_opt: LINKAGE SECTION PERIOD_TOK $@14 linkage_section . + 556 linkage_section: linkage_section . field_description + + NLITERAL shift, and go to state 59 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + $default reduce using rule 185 (linkage_section_opt) + + field_description go to state 382 + signed_nliteral go to state 234 + integer go to state 235 + + +state 237 + + 187 report_section_opt: REPORT SECTION PERIOD_TOK report_sections . + 189 report_sections: report_sections . report_section + + RD shift, and go to state 383 + + $default reduce using rule 187 (report_section_opt) + + report_section go to state 384 + + +state 238 + + 320 screen_section_opt: SCREEN SECTION PERIOD_TOK . $@27 screen_section + + $default reduce using rule 319 ($@27) + + $@27 go to state 385 + + +state 239 + + 1248 gname: FUNCTION LABELSTR '(' @145 intrinsic_parm_list ')' . + + $default reduce using rule 1248 (gname) + + +state 240 + + 1140 intrinsic_parm_list: intrinsic_parm_list sep_opt . intrinsic_parm + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + intrinsic_parm go to state 386 + gname go to state 186 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 241 + + 1285 name: variable '(' gname ':' gname_opt ')' . + + $default reduce using rule 1285 (name) + + +state 242 + + 1297 subscripts: subscripts comma_opt subscript . + 1299 subscript: subscript . '+' gname + 1300 | subscript . '-' gname + + '+' shift, and go to state 192 + '-' shift, and go to state 193 + + '+' [reduce using rule 1297 (subscripts)] + '-' [reduce using rule 1297 (subscripts)] + $default reduce using rule 1297 (subscripts) + + +state 243 + + 1299 subscript: subscript '+' gname . + + $default reduce using rule 1299 (subscript) + + +state 244 + + 1300 subscript: subscript '-' gname . + + $default reduce using rule 1300 (subscript) + + +state 245 + + 583 declaratives_procedure: error . + + $default reduce using rule 583 (declaratives_procedure) + + +state 246 + + 592 procedure_section: LABELSTR . SECTION PERIOD_TOK + + SECTION shift, and go to state 250 + + +state 247 + + 571 declaratives_opt: DECLARATIVES PERIOD_TOK $@55 declaratives_procedure . declaratives_division END DECLARATIVES PERIOD_TOK + + $default reduce using rule 573 (declaratives_division) + + declaratives_division go to state 387 + + +state 248 + + 582 declaratives_procedure: procedure_section . $@58 use_phrase + + $default reduce using rule 581 ($@58) + + $@58 go to state 388 + + +state 249 + + 568 procedure_decl: error $@54 . PERIOD_TOK + + PERIOD_TOK shift, and go to state 389 + + +state 250 + + 592 procedure_section: LABELSTR SECTION . PERIOD_TOK + + PERIOD_TOK shift, and go to state 390 + + +state 251 + + 595 dot_or_eos: PERIOD_TOK . + + $default reduce using rule 595 (dot_or_eos) + + +state 252 + + 594 dot_or_eos: '.' . + + $default reduce using rule 594 (dot_or_eos) + + +state 253 + + 593 paragraph: LABELSTR dot_or_eos . + + $default reduce using rule 593 (paragraph) + + +state 254 + + 898 read_statement: READ . read_body end_read_opt + 899 | READ . + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + $default reduce using rule 899 (read_statement) + + read_body go to state 391 + name go to state 392 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 255 + + 934 write_statement: WRITE . name write_from_opt write_options $@101 invalid_key_opt end_write_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + name go to state 393 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 256 + + 930 release_statement: RELEASE . name release_from_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + name go to state 394 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 257 + + 825 accept_statement: ACCEPT . + 826 accept_hardware: ACCEPT . name FROM INKEY end_accept_opt + 827 | ACCEPT . name FROM INPUT STATUS end_accept_opt + 828 | ACCEPT . name FROM CMD_LINE end_accept_opt + 829 | ACCEPT . name FROM ESCKEY end_accept_opt + 830 | ACCEPT . name FROM ENVIRONMENT_VARIABLE CLITERAL end_accept_opt + 831 accept_chronological: ACCEPT . name FROM DATE_TIME end_accept_opt + 832 accept_screen: ACCEPT . name accept_display_options end_accept_opt + 836 | ACCEPT . name accept_display_options on_opt EXCEPTION $@93 variable @94 statement_list $@95 end_accept_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + $default reduce using rule 825 (accept_statement) + + name go to state 395 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 258 + + 791 add_statement: ADD . add_body end_add_opt + 792 | ADD . + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + CORRESPONDING shift, and go to state 396 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + $default reduce using rule 792 (add_statement) + + add_body go to state 397 + var_list_gname go to state 398 + gname go to state 399 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 259 + + 967 call_statement: CALL . $@105 call_convention_opt gname using_options returning_options @106 @107 @108 on_exception_or_overflow on_not_exception $@109 end_call_opt + 968 | CALL . + + VARIABLE reduce using rule 962 ($@105) + SUBSCVAR reduce using rule 962 ($@105) + LABELSTR reduce using rule 962 ($@105) + NLITERAL reduce using rule 962 ($@105) + CLITERAL reduce using rule 962 ($@105) + '+' reduce using rule 962 ($@105) + '-' reduce using rule 962 ($@105) + ALL reduce using rule 962 ($@105) + CALL_CONV_C reduce using rule 962 ($@105) + CALL_CONV_STDCALL reduce using rule 962 ($@105) + FUNCTION reduce using rule 962 ($@105) + HIGHVALUES reduce using rule 962 ($@105) + LOWVALUES reduce using rule 962 ($@105) + QUOTES reduce using rule 962 ($@105) + SPACES reduce using rule 962 ($@105) + ZERO reduce using rule 962 ($@105) + $default reduce using rule 968 (call_statement) + + $@105 go to state 400 + + +state 260 + + 973 call_loadlib_statement: CALL_LOADLIB . gname $@110 end_call_loadlib_opt + 974 | CALL_LOADLIB . + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + $default reduce using rule 974 (call_loadlib_statement) + + gname go to state 401 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 261 + + 735 cancel_statement: CANCEL . gname + 736 | CANCEL . ALL + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 402 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gname go to state 403 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 262 + + 981 chain_statement: CHAIN . $@111 gname using_options @112 @113 on_exception_or_overflow $@114 end_chain_opt + 982 | CHAIN . + + VARIABLE reduce using rule 977 ($@111) + SUBSCVAR reduce using rule 977 ($@111) + LABELSTR reduce using rule 977 ($@111) + NLITERAL reduce using rule 977 ($@111) + CLITERAL reduce using rule 977 ($@111) + '+' reduce using rule 977 ($@111) + '-' reduce using rule 977 ($@111) + ALL reduce using rule 977 ($@111) + FUNCTION reduce using rule 977 ($@111) + HIGHVALUES reduce using rule 977 ($@111) + LOWVALUES reduce using rule 977 ($@111) + QUOTES reduce using rule 977 ($@111) + SPACES reduce using rule 977 ($@111) + ZERO reduce using rule 977 ($@111) + $default reduce using rule 982 (chain_statement) + + $@111 go to state 404 + + +state 263 + + 879 close_statement: CLOSE . close_files + 880 | CLOSE . + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + $default reduce using rule 880 (close_statement) + + close_files go to state 405 + close_file go to state 406 + name go to state 407 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 264 + + 786 compute_statement: COMPUTE . compute_body end_compute_opt + 787 | COMPUTE . + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + $default reduce using rule 787 (compute_statement) + + compute_body go to state 408 + var_list_name go to state 409 + name go to state 410 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 265 + + 641 statement: CONTINUE . + + $default reduce using rule 641 (statement) + + +state 266 + + 947 delete_statement: DELETE . name record_opt $@103 invalid_key_opt end_delete_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + name go to state 411 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 267 + + 841 display_statement: DISPLAY . + 842 display_line: DISPLAY . display_varlist display_upon display_line_options end_display_opt + 843 display_screen: DISPLAY . display_varlist accept_display_options end_display_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + $default reduce using rule 841 (display_statement) + + display_varlist go to state 412 + gname go to state 413 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 268 + + 813 divide_statement: DIVIDE . divide_body end_divide_opt + 814 | DIVIDE . + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + $default reduce using rule 814 (divide_statement) + + divide_body go to state 414 + gname go to state 415 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 269 + + 652 evaluate_statement: EVALUATE . @62 selection_subject_set $@63 when_case_list end_evaluate_or_eos + + $default reduce using rule 650 (@62) + + @62 go to state 416 + + +state 270 + + 983 exit_statement: EXIT . + 984 | EXIT . PARAGRAPH + 985 | EXIT . PROGRAM + + PARAGRAPH shift, and go to state 417 + PROGRAM shift, and go to state 418 + + $default reduce using rule 983 (exit_statement) + + +state 271 + + 733 generate_statement: GENERATE . name + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + name go to state 419 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 272 + + 956 goto_statement: GO . to_opt goto_label + 957 | GO . to_opt goto_label_list DEPENDING on_opt variable + + TO shift, and go to state 420 + + $default reduce using rule 1239 (to_opt) + + to_opt go to state 421 + + +state 273 + + 990 goback_statement: GOBACK . + + $default reduce using rule 990 (goback_statement) + + +state 274 + + 684 if_part: IF . condition @73 end_then_opt conditional_statement + + VARIABLE shift, and go to state 56 + VARCOND shift, and go to state 422 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + NOT shift, and go to state 423 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + '(' shift, and go to state 424 + + expr go to state 425 + condition go to state 426 + gname go to state 427 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + cond_name go to state 428 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 275 + + 774 initialize_statement: INITIALIZE . gname_list initialize_replacing_opt + 775 | INITIALIZE . + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + $default reduce using rule 775 (initialize_statement) + + gname_list go to state 429 + gname go to state 71 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 276 + + 732 initiate_statement: INITIATE . name + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + name go to state 430 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 277 + + 1086 inspect_statement: INSPECT . name tallying_clause $@126 replacing_clause + 1087 | INSPECT . name converting_clause + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + name go to state 431 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 278 + + 740 merge_statement: MERGE . name sort_keys $@86 sort_collating_opt $@87 merge_using $@88 sort_output + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + name go to state 432 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 279 + + 770 move_statement: MOVE . gname TO name_var_list + 771 | MOVE . CORRESPONDING name_var TO name_var + 772 | MOVE . LENGTH OF gname TO name_var + 773 | MOVE . gname TO + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + CORRESPONDING shift, and go to state 433 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LENGTH shift, and go to state 434 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gname go to state 435 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 280 + + 807 multiply_statement: MULTIPLY . multiply_body end_multiply_opt + 808 | MULTIPLY . + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + $default reduce using rule 808 (multiply_statement) + + multiply_body go to state 436 + gname go to state 437 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 281 + + 868 open_statement: OPEN . open_options + 869 | OPEN . + + error shift, and go to state 438 + EXTEND shift, and go to state 439 + INPUT shift, and go to state 440 + I_O shift, and go to state 441 + OUTPUT shift, and go to state 442 + + READ reduce using rule 869 (open_statement) + WRITE reduce using rule 869 (open_statement) + RELEASE reduce using rule 869 (open_statement) + NOT reduce using rule 869 (open_statement) + ACCEPT reduce using rule 869 (open_statement) + ADD reduce using rule 869 (open_statement) + CALL reduce using rule 869 (open_statement) + CALL_LOADLIB reduce using rule 869 (open_statement) + CANCEL reduce using rule 869 (open_statement) + CHAIN reduce using rule 869 (open_statement) + CLOSE reduce using rule 869 (open_statement) + COMPUTE reduce using rule 869 (open_statement) + CONTINUE reduce using rule 869 (open_statement) + DELETE reduce using rule 869 (open_statement) + DISPLAY reduce using rule 869 (open_statement) + DIVIDE reduce using rule 869 (open_statement) + ELSE reduce using rule 869 (open_statement) + END_ACCEPT reduce using rule 869 (open_statement) + END_ADD reduce using rule 869 (open_statement) + END_CALL reduce using rule 869 (open_statement) + END_CHAIN reduce using rule 869 (open_statement) + END_COMPUTE reduce using rule 869 (open_statement) + END_DELETE reduce using rule 869 (open_statement) + END_DIVIDE reduce using rule 869 (open_statement) + END_EVALUATE reduce using rule 869 (open_statement) + END_IF reduce using rule 869 (open_statement) + END_MULTIPLY reduce using rule 869 (open_statement) + END_PERFORM reduce using rule 869 (open_statement) + END_READ reduce using rule 869 (open_statement) + END_RETURN reduce using rule 869 (open_statement) + END_REWRITE reduce using rule 869 (open_statement) + END_SEARCH reduce using rule 869 (open_statement) + END_START reduce using rule 869 (open_statement) + END_STRINGCMD reduce using rule 869 (open_statement) + END_SUBTRACT reduce using rule 869 (open_statement) + END_UNSTRING reduce using rule 869 (open_statement) + END_WRITE reduce using rule 869 (open_statement) + EVALUATE reduce using rule 869 (open_statement) + EXIT reduce using rule 869 (open_statement) + GENERATE reduce using rule 869 (open_statement) + GO reduce using rule 869 (open_statement) + GOBACK reduce using rule 869 (open_statement) + IF reduce using rule 869 (open_statement) + INITIALIZE reduce using rule 869 (open_statement) + INITIATE reduce using rule 869 (open_statement) + INSPECT reduce using rule 869 (open_statement) + MERGE reduce using rule 869 (open_statement) + MOVE reduce using rule 869 (open_statement) + MULTIPLY reduce using rule 869 (open_statement) + NOTEXCEP reduce using rule 869 (open_statement) + OPEN reduce using rule 869 (open_statement) + PERFORM reduce using rule 869 (open_statement) + READY reduce using rule 869 (open_statement) + RESET reduce using rule 869 (open_statement) + RETURN reduce using rule 869 (open_statement) + REWRITE reduce using rule 869 (open_statement) + SEARCH reduce using rule 869 (open_statement) + SET reduce using rule 869 (open_statement) + SORT reduce using rule 869 (open_statement) + START reduce using rule 869 (open_statement) + STOP reduce using rule 869 (open_statement) + STRINGCMD reduce using rule 869 (open_statement) + SUBTRACT reduce using rule 869 (open_statement) + TCOBPROTO1 reduce using rule 869 (open_statement) + TCOBPROTO2 reduce using rule 869 (open_statement) + TERMINATE reduce using rule 869 (open_statement) + UNLOCK reduce using rule 869 (open_statement) + UNSTRING reduce using rule 869 (open_statement) + WHEN reduce using rule 869 (open_statement) + PERIOD_TOK reduce using rule 869 (open_statement) + + open_options go to state 443 + open_mode go to state 444 + + +state 282 + + 642 perform_statement: PERFORM . perform_options + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 445 + NLITERAL shift, and go to state 446 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + WITH shift, and go to state 358 + ZERO shift, and go to state 69 + + TEST reduce using rule 1233 (with_opt) + UNTIL reduce using rule 1165 (with_test_opt) + VARYING reduce using rule 1165 (with_test_opt) + $default reduce using rule 1176 ($@141) + + perform_options go to state 447 + with_test_opt go to state 448 + perform_statements go to state 449 + $@141 go to state 450 + with_opt go to state 451 + gname go to state 452 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + label go to state 453 + + +state 283 + + 730 trace_statement: READY . TRACE + + TRACE shift, and go to state 454 + + +state 284 + + 731 trace_statement: RESET . TRACE + + TRACE shift, and go to state 455 + + +state 285 + + 894 return_statement: RETURN . return_body end_return_opt + 895 | RETURN . + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + $default reduce using rule 895 (return_statement) + + return_body go to state 456 + name go to state 457 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 286 + + 943 rewrite_statement: REWRITE . name write_from_opt $@102 invalid_key_opt end_rewrite_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + name go to state 458 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 287 + + 648 search_statement: SEARCH . search end_search_opt + 649 | SEARCH . ALL search_all end_search_opt + + SUBSCVAR shift, and go to state 459 + ALL shift, and go to state 460 + + search go to state 461 + variable_indexed go to state 462 + + +state 288 + + 1010 set_statement: SET . set_list + + error shift, and go to state 463 + VARIABLE shift, and go to state 56 + VARCOND shift, and go to state 422 + SUBSCVAR shift, and go to state 57 + ADDRESS shift, and go to state 464 + + VARIABLE [reduce using rule 1024 (address_of_opt)] + SUBSCVAR [reduce using rule 1024 (address_of_opt)] + + name_list go to state 465 + set_list go to state 466 + set_target go to state 467 + address_of_opt go to state 468 + cond_name go to state 469 + variable go to state 470 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 289 + + 747 sort_file: SORT . name sort_keys $@89 sort_duplicates_opt sort_collating_opt $@90 sort_input $@91 sort_output + 749 sort_variable_indexed: SORT . variable_indexed sort_keys_idx $@92 sort_duplicates_opt sort_collating_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 471 + LABELSTR shift, and go to state 58 + + variable_indexed go to state 472 + name go to state 473 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 290 + + 951 start_statement: START . start_body invalid_key_opt $@104 end_start_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + start_body go to state 474 + name go to state 475 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 291 + + 986 stop_statement: STOP . RUN + 987 | STOP . stop_literal + + NLITERAL shift, and go to state 476 + CLITERAL shift, and go to state 477 + RUN shift, and go to state 478 + + stop_literal go to state 479 + + +state 292 + + 1027 string_statement: STRINGCMD . string_from_list INTO name string_with_pointer $@117 on_overflow_opt end_stringcmd_opt + + error shift, and go to state 480 + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + string_from_list go to state 481 + string_from go to state 482 + gname go to state 483 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 293 + + 800 subtract_statement: SUBTRACT . subtract_body end_subtract_opt + 801 | SUBTRACT . + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + CORRESPONDING shift, and go to state 484 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + $default reduce using rule 801 (subtract_statement) + + subtract_body go to state 485 + var_list_gname go to state 486 + gname go to state 399 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 294 + + 728 proto_statement: TCOBPROTO1 . gname + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gname go to state 487 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 295 + + 729 proto_statement: TCOBPROTO2 . gname gname + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gname go to state 488 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 296 + + 734 terminate_statement: TERMINATE . name + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + name go to state 489 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 297 + + 727 unlock_statement: UNLOCK . name + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + name go to state 490 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 298 + + 1029 unstring_statement: UNSTRING . name unstring_delimited INTO unstring_destinations string_with_pointer unstring_tallying $@118 on_overflow_opt end_unstring_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + name go to state 491 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 299 + + 566 procedure_decl: $@53 statements . PERIOD_TOK + 598 statements: statements . statement + + READ shift, and go to state 254 + WRITE shift, and go to state 255 + RELEASE shift, and go to state 256 + ACCEPT shift, and go to state 257 + ADD shift, and go to state 258 + CALL shift, and go to state 259 + CALL_LOADLIB shift, and go to state 260 + CANCEL shift, and go to state 261 + CHAIN shift, and go to state 262 + CLOSE shift, and go to state 263 + COMPUTE shift, and go to state 264 + CONTINUE shift, and go to state 265 + DELETE shift, and go to state 266 + DISPLAY shift, and go to state 267 + DIVIDE shift, and go to state 268 + EVALUATE shift, and go to state 269 + EXIT shift, and go to state 270 + GENERATE shift, and go to state 271 + GO shift, and go to state 272 + GOBACK shift, and go to state 273 + IF shift, and go to state 274 + INITIALIZE shift, and go to state 275 + INITIATE shift, and go to state 276 + INSPECT shift, and go to state 277 + MERGE shift, and go to state 278 + MOVE shift, and go to state 279 + MULTIPLY shift, and go to state 280 + OPEN shift, and go to state 281 + PERFORM shift, and go to state 282 + READY shift, and go to state 283 + RESET shift, and go to state 284 + RETURN shift, and go to state 285 + REWRITE shift, and go to state 286 + SEARCH shift, and go to state 287 + SET shift, and go to state 288 + SORT shift, and go to state 289 + START shift, and go to state 290 + STOP shift, and go to state 291 + STRINGCMD shift, and go to state 292 + SUBTRACT shift, and go to state 293 + TCOBPROTO1 shift, and go to state 294 + TCOBPROTO2 shift, and go to state 295 + TERMINATE shift, and go to state 296 + UNLOCK shift, and go to state 297 + UNSTRING shift, and go to state 298 + PERIOD_TOK shift, and go to state 492 + + statement go to state 493 + perform_statement go to state 301 + if_statement go to state 302 + search_statement go to state 303 + evaluate_statement go to state 304 + if_part go to state 305 + unlock_statement go to state 306 + proto_statement go to state 307 + trace_statement go to state 308 + initiate_statement go to state 309 + generate_statement go to state 310 + terminate_statement go to state 311 + cancel_statement go to state 312 + merge_statement go to state 313 + sort_statement go to state 314 + sort_file go to state 315 + sort_variable_indexed go to state 316 + move_statement go to state 317 + initialize_statement go to state 318 + compute_statement go to state 319 + add_statement go to state 320 + subtract_statement go to state 321 + multiply_statement go to state 322 + divide_statement go to state 323 + accept_statement go to state 324 + accept_hardware go to state 325 + accept_chronological go to state 326 + accept_screen go to state 327 + display_statement go to state 328 + display_line go to state 329 + display_screen go to state 330 + open_statement go to state 331 + close_statement go to state 332 + return_statement go to state 333 + read_statement go to state 334 + release_statement go to state 335 + write_statement go to state 336 + rewrite_statement go to state 337 + delete_statement go to state 338 + start_statement go to state 339 + goto_statement go to state 340 + call_statement go to state 341 + call_loadlib_statement go to state 342 + chain_statement go to state 343 + exit_statement go to state 344 + stop_statement go to state 345 + goback_statement go to state 346 + set_statement go to state 347 + string_statement go to state 348 + unstring_statement go to state 349 + inspect_statement go to state 350 + + +state 300 + + 597 statements: statement . + + $default reduce using rule 597 (statements) + + +state 301 + + 617 statement: perform_statement . + + $default reduce using rule 617 (statement) + + +state 302 + + 638 statement: if_statement . + + $default reduce using rule 638 (statement) + + +state 303 + + 640 statement: search_statement . + + $default reduce using rule 640 (statement) + + +state 304 + + 639 statement: evaluate_statement . + + $default reduce using rule 639 (statement) + + +state 305 + + 644 if_statement: if_part . $@59 end_if_opt + 647 | if_part . ELSE @60 conditional_statement $@61 end_if_opt + + ELSE shift, and go to state 494 + + ELSE [reduce using rule 643 ($@59)] + $default reduce using rule 643 ($@59) + + $@59 go to state 495 + + +state 306 + + 637 statement: unlock_statement . + + $default reduce using rule 637 (statement) + + +state 307 + + 633 statement: proto_statement . + + $default reduce using rule 633 (statement) + + +state 308 + + 634 statement: trace_statement . + + $default reduce using rule 634 (statement) + + +state 309 + + 630 statement: initiate_statement . + + $default reduce using rule 630 (statement) + + +state 310 + + 631 statement: generate_statement . + + $default reduce using rule 631 (statement) + + +state 311 + + 632 statement: terminate_statement . + + $default reduce using rule 632 (statement) + + +state 312 + + 636 statement: cancel_statement . + + $default reduce using rule 636 (statement) + + +state 313 + + 626 statement: merge_statement . + + $default reduce using rule 626 (statement) + + +state 314 + + 625 statement: sort_statement . + + $default reduce using rule 625 (statement) + + +state 315 + + 742 sort_statement: sort_file . + + $default reduce using rule 742 (sort_statement) + + +state 316 + + 743 sort_statement: sort_variable_indexed . + + $default reduce using rule 743 (sort_statement) + + +state 317 + + 599 statement: move_statement . + + $default reduce using rule 599 (statement) + + +state 318 + + 600 statement: initialize_statement . + + $default reduce using rule 600 (statement) + + +state 319 + + 601 statement: compute_statement . + + $default reduce using rule 601 (statement) + + +state 320 + + 602 statement: add_statement . + + $default reduce using rule 602 (statement) + + +state 321 + + 603 statement: subtract_statement . + + $default reduce using rule 603 (statement) + + +state 322 + + 604 statement: multiply_statement . + + $default reduce using rule 604 (statement) + + +state 323 + + 605 statement: divide_statement . + + $default reduce using rule 605 (statement) + + +state 324 + + 606 statement: accept_statement . + + $default reduce using rule 606 (statement) + + +state 325 + + 822 accept_statement: accept_hardware . + + $default reduce using rule 822 (accept_statement) + + +state 326 + + 823 accept_statement: accept_chronological . + + $default reduce using rule 823 (accept_statement) + + +state 327 + + 824 accept_statement: accept_screen . + + $default reduce using rule 824 (accept_statement) + + +state 328 + + 607 statement: display_statement . + + $default reduce using rule 607 (statement) + + +state 329 + + 839 display_statement: display_line . + + $default reduce using rule 839 (display_statement) + + +state 330 + + 840 display_statement: display_screen . + + $default reduce using rule 840 (display_statement) + + +state 331 + + 608 statement: open_statement . + + $default reduce using rule 608 (statement) + + +state 332 + + 609 statement: close_statement . + + $default reduce using rule 609 (statement) + + +state 333 + + 611 statement: return_statement . + + $default reduce using rule 611 (statement) + + +state 334 + + 610 statement: read_statement . + + $default reduce using rule 610 (statement) + + +state 335 + + 612 statement: release_statement . + + $default reduce using rule 612 (statement) + + +state 336 + + 613 statement: write_statement . + + $default reduce using rule 613 (statement) + + +state 337 + + 614 statement: rewrite_statement . + + $default reduce using rule 614 (statement) + + +state 338 + + 615 statement: delete_statement . + + $default reduce using rule 615 (statement) + + +state 339 + + 616 statement: start_statement . + + $default reduce using rule 616 (statement) + + +state 340 + + 618 statement: goto_statement . + + $default reduce using rule 618 (statement) + + +state 341 + + 621 statement: call_statement . + + $default reduce using rule 621 (statement) + + +state 342 + + 622 statement: call_loadlib_statement . + + $default reduce using rule 622 (statement) + + +state 343 + + 623 statement: chain_statement . + + $default reduce using rule 623 (statement) + + +state 344 + + 619 statement: exit_statement . + + $default reduce using rule 619 (statement) + + +state 345 + + 620 statement: stop_statement . + + $default reduce using rule 620 (statement) + + +state 346 + + 635 statement: goback_statement . + + $default reduce using rule 635 (statement) + + +state 347 + + 624 statement: set_statement . + + $default reduce using rule 624 (statement) + + +state 348 + + 628 statement: string_statement . + + $default reduce using rule 628 (statement) + + +state 349 + + 629 statement: unstring_statement . + + $default reduce using rule 629 (statement) + + +state 350 + + 627 statement: inspect_statement . + + $default reduce using rule 627 (statement) + + +state 351 + + 23 identification_division_option: AUTHOR PERIOD_TOK . + + $default reduce using rule 23 (identification_division_option) + + +state 352 + + 25 identification_division_option: DATE_COMPILED PERIOD_TOK . + + $default reduce using rule 25 (identification_division_option) + + +state 353 + + 24 identification_division_option: DATE_WRITTEN PERIOD_TOK . + + $default reduce using rule 24 (identification_division_option) + + +state 354 + + 26 identification_division_option: INSTALLATION PERIOD_TOK . + + $default reduce using rule 26 (identification_division_option) + + +state 355 + + 27 identification_division_option: SECURITY PERIOD_TOK . + + $default reduce using rule 27 (identification_division_option) + + +state 356 + + 41 program_collating_opt: PROGRAM . collating_sequence + + COLLATING shift, and go to state 496 + + $default reduce using rule 45 (collating_opt) + + collating_sequence go to state 497 + collating_opt go to state 498 + + +state 357 + + 38 configuration_option: OBJECT_COMPUTER PERIOD_TOK $@8 STRING program_collating_opt . PERIOD_TOK + + PERIOD_TOK shift, and go to state 499 + + +state 358 + + 1234 with_opt: WITH . + + $default reduce using rule 1234 (with_opt) + + +state 359 + + 36 configuration_option: SOURCE_COMPUTER PERIOD_TOK $@7 STRING debug_mode_opt . PERIOD_TOK + + PERIOD_TOK shift, and go to state 500 + + +state 360 + + 46 debug_mode_opt: with_opt . DEBUGGING MODE + + DEBUGGING shift, and go to state 501 + + +state 361 + + 81 alphabet_details: ALPHABET STRING is_opt . alphabet_type + + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + NATIVE shift, and go to state 502 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + STANDARD_1 shift, and go to state 503 + STANDARD_2 shift, and go to state 504 + ZERO shift, and go to state 69 + + alphabet_type go to state 505 + alphabet_literal_list go to state 506 + alphabet_literal_item go to state 507 + without_all_literal go to state 508 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + + +state 362 + + 63 special_name_class: CLASS STRING is_opt . special_name_class_item_list + + CLITERAL shift, and go to state 509 + + special_name_class_item_list go to state 510 + special_name_class_item go to state 511 + + +state 363 + + 60 currency_details: CURRENCY sign_opt is_opt . CLITERAL + + CLITERAL shift, and go to state 512 + + +state 364 + + 70 cursor_details: CURSOR is_opt STRING . + + $default reduce using rule 70 (cursor_details) + + +state 365 + + 68 decimal_point_details: DECIMAL_POINT is_opt COMMA . + + $default reduce using rule 68 (decimal_point_details) + + +state 366 + + 69 screen_status_details: DISPLAY_SCREEN STATUS is_opt . STRING + + STRING shift, and go to state 513 + + +state 367 + + 74 switches_details: STRING is_opt . STRING $@9 switch_on_opt switch_off_opt + + STRING shift, and go to state 514 + + +state 368 + + 1275 def_name: STRING . + + $default reduce using rule 1275 (def_name) + + +state 369 + + 1276 def_name: FILLER . + + $default reduce using rule 1276 (def_name) + + +state 370 + + 103 file_select: SELECT optional_opt def_name . $@10 select_clauses PERIOD_TOK + + $default reduce using rule 102 ($@10) + + $@10 go to state 515 + + +state 371 + + 157 i_o_control_multiple_file_tape_clause: MULTIPLE FILE_TOK . tape_opt contains_opt i_o_control_multiple_file_list + + TAPE shift, and go to state 516 + + $default reduce using rule 164 (tape_opt) + + tape_opt go to state 517 + + +state 372 + + 154 same_clause_options: RECORD . + + $default reduce using rule 154 (same_clause_options) + + +state 373 + + 155 same_clause_options: SORT . + + $default reduce using rule 155 (same_clause_options) + + +state 374 + + 156 same_clause_options: SORT_MERGE . + + $default reduce using rule 156 (same_clause_options) + + +state 375 + + 152 i_o_control_same_clause: SAME same_clause_options . are_opta for_opt string_list + + AREA shift, and go to state 518 + + $default reduce using rule 166 (are_opta) + + are_opta go to state 519 + + +state 376 + + 147 i_o_control_opt: i_o_control_list PERIOD_TOK . + + $default reduce using rule 147 (i_o_control_opt) + + +state 377 + + 149 i_o_control_list: i_o_control_list i_o_control_clause . + + $default reduce using rule 149 (i_o_control_list) + + +state 378 + + 419 file_section: file_section FD $@38 STRING . $@39 file_description_fd_clauses PERIOD_TOK $@40 file_description + + $default reduce using rule 417 ($@39) + + $@39 go to state 520 + + +state 379 + + 423 file_section: file_section SD $@41 STRING . $@42 file_description_sd_clauses PERIOD_TOK $@43 file_description + + $default reduce using rule 421 ($@42) + + $@42 go to state 521 + + +state 380 + + 429 field_description: integer def_name_opt . $@44 data_clauses PERIOD_TOK + + $default reduce using rule 428 ($@44) + + $@44 go to state 522 + + +state 381 + + 1273 def_name_opt: def_name . + + $default reduce using rule 1273 (def_name_opt) + + +state 382 + + 556 linkage_section: linkage_section field_description . + + $default reduce using rule 556 (linkage_section) + + +state 383 + + 194 report_section: RD . $@15 STRING $@16 report_controls PERIOD_TOK $@17 report_description + + $default reduce using rule 191 ($@15) + + $@15 go to state 523 + + +state 384 + + 189 report_sections: report_sections report_section . + + $default reduce using rule 189 (report_sections) + + +state 385 + + 320 screen_section_opt: SCREEN SECTION PERIOD_TOK $@27 . screen_section + + $default reduce using rule 323 (screen_section) + + screen_section go to state 524 + + +state 386 + + 1140 intrinsic_parm_list: intrinsic_parm_list sep_opt intrinsic_parm . + + $default reduce using rule 1140 (intrinsic_parm_list) + + +state 387 + + 571 declaratives_opt: DECLARATIVES PERIOD_TOK $@55 declaratives_procedure declaratives_division . END DECLARATIVES PERIOD_TOK + 574 declaratives_division: declaratives_division . declaratives_decl + + error shift, and go to state 525 + LABELSTR shift, and go to state 196 + END shift, and go to state 526 + + READ reduce using rule 577 ($@56) + WRITE reduce using rule 577 ($@56) + RELEASE reduce using rule 577 ($@56) + ACCEPT reduce using rule 577 ($@56) + ADD reduce using rule 577 ($@56) + CALL reduce using rule 577 ($@56) + CALL_LOADLIB reduce using rule 577 ($@56) + CANCEL reduce using rule 577 ($@56) + CHAIN reduce using rule 577 ($@56) + CLOSE reduce using rule 577 ($@56) + COMPUTE reduce using rule 577 ($@56) + CONTINUE reduce using rule 577 ($@56) + DELETE reduce using rule 577 ($@56) + DISPLAY reduce using rule 577 ($@56) + DIVIDE reduce using rule 577 ($@56) + EVALUATE reduce using rule 577 ($@56) + EXIT reduce using rule 577 ($@56) + GENERATE reduce using rule 577 ($@56) + GO reduce using rule 577 ($@56) + GOBACK reduce using rule 577 ($@56) + IF reduce using rule 577 ($@56) + INITIALIZE reduce using rule 577 ($@56) + INITIATE reduce using rule 577 ($@56) + INSPECT reduce using rule 577 ($@56) + MERGE reduce using rule 577 ($@56) + MOVE reduce using rule 577 ($@56) + MULTIPLY reduce using rule 577 ($@56) + OPEN reduce using rule 577 ($@56) + PERFORM reduce using rule 577 ($@56) + READY reduce using rule 577 ($@56) + RESET reduce using rule 577 ($@56) + RETURN reduce using rule 577 ($@56) + REWRITE reduce using rule 577 ($@56) + SEARCH reduce using rule 577 ($@56) + SET reduce using rule 577 ($@56) + SORT reduce using rule 577 ($@56) + START reduce using rule 577 ($@56) + STOP reduce using rule 577 ($@56) + STRINGCMD reduce using rule 577 ($@56) + SUBTRACT reduce using rule 577 ($@56) + TCOBPROTO1 reduce using rule 577 ($@56) + TCOBPROTO2 reduce using rule 577 ($@56) + TERMINATE reduce using rule 577 ($@56) + UNLOCK reduce using rule 577 ($@56) + UNSTRING reduce using rule 577 ($@56) + + declaratives_decl go to state 527 + $@56 go to state 528 + declaratives_procedure go to state 529 + procedure_section go to state 248 + paragraph go to state 530 + + +state 388 + + 582 declaratives_procedure: procedure_section $@58 . use_phrase + + error shift, and go to state 531 + USE shift, and go to state 532 + + use_phrase go to state 533 + + +state 389 + + 568 procedure_decl: error $@54 PERIOD_TOK . + + $default reduce using rule 568 (procedure_decl) + + +state 390 + + 592 procedure_section: LABELSTR SECTION PERIOD_TOK . + + $default reduce using rule 592 (procedure_section) + + +state 391 + + 898 read_statement: READ read_body . end_read_opt + + END_READ shift, and go to state 534 + + END_READ [reduce using rule 926 (end_read_opt)] + $default reduce using rule 926 (end_read_opt) + + end_read_opt go to state 535 + + +state 392 + + 900 read_body: name . read_next_opt record_opt read_into_opt with_lock_opt read_key_opt + 901 | name . read_next_opt record_opt read_into_opt with_lock_opt read_key_opt read_at_end_opt + 902 | name . read_next_opt record_opt read_into_opt with_lock_opt read_key_opt read_invalid_key_opt + + NEXT shift, and go to state 536 + PREVIOUS shift, and go to state 537 + + $default reduce using rule 903 (read_next_opt) + + read_next_opt go to state 538 + + +state 393 + + 934 write_statement: WRITE name . write_from_opt write_options $@101 invalid_key_opt end_write_opt + + FROM shift, and go to state 539 + + $default reduce using rule 935 (write_from_opt) + + write_from_opt go to state 540 + + +state 394 + + 930 release_statement: RELEASE name . release_from_opt + + FROM shift, and go to state 541 + + $default reduce using rule 931 (release_from_opt) + + release_from_opt go to state 542 + + +state 395 + + 826 accept_hardware: ACCEPT name . FROM INKEY end_accept_opt + 827 | ACCEPT name . FROM INPUT STATUS end_accept_opt + 828 | ACCEPT name . FROM CMD_LINE end_accept_opt + 829 | ACCEPT name . FROM ESCKEY end_accept_opt + 830 | ACCEPT name . FROM ENVIRONMENT_VARIABLE CLITERAL end_accept_opt + 831 accept_chronological: ACCEPT name . FROM DATE_TIME end_accept_opt + 832 accept_screen: ACCEPT name . accept_display_options end_accept_opt + 836 | ACCEPT name . accept_display_options on_opt EXCEPTION $@93 variable @94 statement_list $@95 end_accept_opt + + FROM shift, and go to state 543 + + $default reduce using rule 862 (accept_display_options) + + accept_display_options go to state 544 + + +state 396 + + 795 add_body: CORRESPONDING . var_list_gname TO var_list_name rounded_opt on_size_error_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + var_list_gname go to state 545 + gname go to state 399 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 397 + + 791 add_statement: ADD add_body . end_add_opt + + END_ADD shift, and go to state 546 + + END_ADD [reduce using rule 798 (end_add_opt)] + $default reduce using rule 798 (end_add_opt) + + end_add_opt go to state 547 + + +state 398 + + 793 add_body: var_list_gname . TO var_list_name on_size_error_opt + 794 | var_list_gname . add_to_opt GIVING var_list_name on_size_error_opt + 994 var_list_gname: var_list_gname . gname sep_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + TO shift, and go to state 548 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + $default reduce using rule 796 (add_to_opt) + + add_to_opt go to state 549 + gname go to state 550 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 399 + + 993 var_list_gname: gname . sep_opt + + LISTSEP shift, and go to state 98 + + $default reduce using rule 1214 (sep_opt) + + sep_opt go to state 551 + + +state 400 + + 967 call_statement: CALL $@105 . call_convention_opt gname using_options returning_options @106 @107 @108 on_exception_or_overflow on_not_exception $@109 end_call_opt + + CALL_CONV_C shift, and go to state 552 + CALL_CONV_STDCALL shift, and go to state 553 + + $default reduce using rule 969 (call_convention_opt) + + call_convention_opt go to state 554 + + +state 401 + + 973 call_loadlib_statement: CALL_LOADLIB gname . $@110 end_call_loadlib_opt + + $default reduce using rule 972 ($@110) + + $@110 go to state 555 + + +state 402 + + 736 cancel_statement: CANCEL ALL . + 1258 all_literal: ALL . literal + 1259 | ALL . special_literal + + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + $default reduce using rule 736 (cancel_statement) + + special_literal go to state 95 + literal go to state 96 + signed_nliteral go to state 77 + + +state 403 + + 735 cancel_statement: CANCEL gname . + + $default reduce using rule 735 (cancel_statement) + + +state 404 + + 981 chain_statement: CHAIN $@111 . gname using_options @112 @113 on_exception_or_overflow $@114 end_chain_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gname go to state 556 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 405 + + 879 close_statement: CLOSE close_files . + 882 close_files: close_files . sep_opt close_file + + LISTSEP shift, and go to state 98 + + VARIABLE reduce using rule 1214 (sep_opt) + SUBSCVAR reduce using rule 1214 (sep_opt) + LABELSTR reduce using rule 1214 (sep_opt) + $default reduce using rule 879 (close_statement) + + sep_opt go to state 557 + + +state 406 + + 881 close_files: close_file . + + $default reduce using rule 881 (close_files) + + +state 407 + + 883 close_file: name . close_options_opt + + REEL shift, and go to state 558 + UNIT shift, and go to state 559 + WITH shift, and go to state 358 + + NO reduce using rule 1233 (with_opt) + IGNORE reduce using rule 1233 (with_opt) + LOCK reduce using rule 1233 (with_opt) + $default reduce using rule 893 (with_lock_opt) + + close_options_opt go to state 560 + close_options go to state 561 + with_lock_opt go to state 562 + with_opt go to state 563 + + +state 408 + + 786 compute_statement: COMPUTE compute_body . end_compute_opt + + END_COMPUTE shift, and go to state 564 + + END_COMPUTE [reduce using rule 789 (end_compute_opt)] + $default reduce using rule 789 (end_compute_opt) + + end_compute_opt go to state 565 + + +state 409 + + 788 compute_body: var_list_name . CONDITIONAL expr on_size_error_opt + 992 var_list_name: var_list_name . name rounded_opt sep_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + CONDITIONAL shift, and go to state 566 + + name go to state 567 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 410 + + 991 var_list_name: name . rounded_opt sep_opt + + ROUNDED shift, and go to state 568 + + ROUNDED [reduce using rule 995 (rounded_opt)] + $default reduce using rule 995 (rounded_opt) + + rounded_opt go to state 569 + + +state 411 + + 947 delete_statement: DELETE name . record_opt $@103 invalid_key_opt end_delete_opt + + RECORD shift, and go to state 570 + + $default reduce using rule 1223 (record_opt) + + record_opt go to state 571 + + +state 412 + + 842 display_line: DISPLAY display_varlist . display_upon display_line_options end_display_opt + 843 display_screen: DISPLAY display_varlist . accept_display_options end_display_opt + 845 display_varlist: display_varlist . sep_opt gname + + LISTSEP shift, and go to state 98 + UPON shift, and go to state 572 + + VARIABLE reduce using rule 1214 (sep_opt) + SUBSCVAR reduce using rule 1214 (sep_opt) + LABELSTR reduce using rule 1214 (sep_opt) + NLITERAL reduce using rule 1214 (sep_opt) + CLITERAL reduce using rule 1214 (sep_opt) + '+' reduce using rule 1214 (sep_opt) + '-' reduce using rule 1214 (sep_opt) + ALL reduce using rule 1214 (sep_opt) + FUNCTION reduce using rule 1214 (sep_opt) + HIGHVALUES reduce using rule 1214 (sep_opt) + LOWVALUES reduce using rule 1214 (sep_opt) + QUOTES reduce using rule 1214 (sep_opt) + SPACES reduce using rule 1214 (sep_opt) + ZERO reduce using rule 1214 (sep_opt) + $default reduce using rule 862 (accept_display_options) + + display_upon go to state 573 + accept_display_options go to state 574 + sep_opt go to state 575 + + +state 413 + + 844 display_varlist: gname . + + $default reduce using rule 844 (display_varlist) + + +state 414 + + 813 divide_statement: DIVIDE divide_body . end_divide_opt + + END_DIVIDE shift, and go to state 576 + + END_DIVIDE [reduce using rule 820 (end_divide_opt)] + $default reduce using rule 820 (end_divide_opt) + + end_divide_opt go to state 577 + + +state 415 + + 815 divide_body: gname . BY gname GIVING var_list_name on_size_error_opt + 816 | gname . BY gname GIVING name rounded_opt REMAINDER name on_size_error_opt + 817 | gname . INTO gname GIVING name rounded_opt REMAINDER name on_size_error_opt + 818 | gname . INTO gname GIVING var_list_name on_size_error_opt + 819 | gname . INTO var_list_name on_size_error_opt + + BY shift, and go to state 578 + INTO shift, and go to state 579 + + +state 416 + + 652 evaluate_statement: EVALUATE @62 . selection_subject_set $@63 when_case_list end_evaluate_or_eos + + $default reduce using rule 655 (@64) + + selection_subject_set go to state 580 + @64 go to state 581 + + +state 417 + + 984 exit_statement: EXIT PARAGRAPH . + + $default reduce using rule 984 (exit_statement) + + +state 418 + + 985 exit_statement: EXIT PROGRAM . + + $default reduce using rule 985 (exit_statement) + + +state 419 + + 733 generate_statement: GENERATE name . + + $default reduce using rule 733 (generate_statement) + + +state 420 + + 1240 to_opt: TO . + + $default reduce using rule 1240 (to_opt) + + +state 421 + + 956 goto_statement: GO to_opt . goto_label + 957 | GO to_opt . goto_label_list DEPENDING on_opt variable + + LABELSTR shift, and go to state 582 + NLITERAL shift, and go to state 583 + + goto_label go to state 584 + goto_label_list go to state 585 + label go to state 586 + + +state 422 + + 1283 cond_name: VARCOND . '(' $@146 subscripts ')' + 1284 | VARCOND . + + '(' shift, and go to state 587 + + $default reduce using rule 1284 (cond_name) + + +state 423 + + 1182 condition: NOT . condition + + VARIABLE shift, and go to state 56 + VARCOND shift, and go to state 422 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + NOT shift, and go to state 423 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + '(' shift, and go to state 424 + + expr go to state 425 + condition go to state 588 + gname go to state 427 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + cond_name go to state 428 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 424 + + 1119 expr: '(' . expr ')' + 1187 condition: '(' . condition ')' + + VARIABLE shift, and go to state 56 + VARCOND shift, and go to state 422 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + NOT shift, and go to state 423 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + '(' shift, and go to state 424 + + expr go to state 589 + condition go to state 590 + gname go to state 427 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + cond_name go to state 428 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 425 + + 1114 expr: expr . '*' expr + 1115 | expr . '/' expr + 1116 | expr . '+' expr + 1117 | expr . '-' expr + 1118 | expr . POW_OP expr + 1181 condition: expr . extended_cond_op $@142 expr_opt + + CONDITIONAL shift, and go to state 591 + IS shift, and go to state 592 + '+' shift, and go to state 593 + '-' shift, and go to state 594 + '*' shift, and go to state 595 + '/' shift, and go to state 596 + POW_OP shift, and go to state 597 + NOT shift, and go to state 598 + ALPHABETIC shift, and go to state 599 + ALPHABETIC_LOWER shift, and go to state 600 + ALPHABETIC_UPPER shift, and go to state 601 + NEGATIVE shift, and go to state 602 + NUMERIC shift, and go to state 603 + POSITIVE shift, and go to state 604 + ZERO shift, and go to state 605 + + sign_condition go to state 606 + class_condition go to state 607 + extended_cond_op go to state 608 + ext_cond go to state 609 + conditional go to state 610 + + +state 426 + + 684 if_part: IF condition . @73 end_then_opt conditional_statement + 1184 condition: condition . AND @143 implied_op_condition + 1186 | condition . OR @144 implied_op_condition + + OR shift, and go to state 611 + AND shift, and go to state 612 + + $default reduce using rule 683 (@73) + + @73 go to state 613 + + +state 427 + + 1113 expr: gname . + + $default reduce using rule 1113 (expr) + + +state 428 + + 1188 condition: cond_name . + + $default reduce using rule 1188 (condition) + + +state 429 + + 774 initialize_statement: INITIALIZE gname_list . initialize_replacing_opt + 1244 gname_list: gname_list . sep_opt gname + + LISTSEP shift, and go to state 98 + REPLACING shift, and go to state 614 + + VARIABLE reduce using rule 1214 (sep_opt) + SUBSCVAR reduce using rule 1214 (sep_opt) + LABELSTR reduce using rule 1214 (sep_opt) + NLITERAL reduce using rule 1214 (sep_opt) + CLITERAL reduce using rule 1214 (sep_opt) + '+' reduce using rule 1214 (sep_opt) + '-' reduce using rule 1214 (sep_opt) + ALL reduce using rule 1214 (sep_opt) + FUNCTION reduce using rule 1214 (sep_opt) + HIGHVALUES reduce using rule 1214 (sep_opt) + LOWVALUES reduce using rule 1214 (sep_opt) + QUOTES reduce using rule 1214 (sep_opt) + SPACES reduce using rule 1214 (sep_opt) + ZERO reduce using rule 1214 (sep_opt) + $default reduce using rule 776 (initialize_replacing_opt) + + initialize_replacing_opt go to state 615 + sep_opt go to state 99 + + +state 430 + + 732 initiate_statement: INITIATE name . + + $default reduce using rule 732 (initiate_statement) + + +state 431 + + 1086 inspect_statement: INSPECT name . tallying_clause $@126 replacing_clause + 1087 | INSPECT name . converting_clause + + CONVERTING shift, and go to state 616 + TALLYING shift, and go to state 617 + + $default reduce using rule 1090 (tallying_clause) + + converting_clause go to state 618 + tallying_clause go to state 619 + + +state 432 + + 740 merge_statement: MERGE name . sort_keys $@86 sort_collating_opt $@87 merge_using $@88 sort_output + + ON shift, and go to state 620 + + $default reduce using rule 1235 (on_opt) + + sort_keys go to state 621 + sort_key go to state 622 + on_opt go to state 623 + + +state 433 + + 771 move_statement: MOVE CORRESPONDING . name_var TO name_var + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gname go to state 624 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + name_var go to state 625 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 434 + + 772 move_statement: MOVE LENGTH . OF gname TO name_var + + OF shift, and go to state 626 + + +state 435 + + 770 move_statement: MOVE gname . TO name_var_list + 773 | MOVE gname . TO + + TO shift, and go to state 627 + + +state 436 + + 807 multiply_statement: MULTIPLY multiply_body . end_multiply_opt + + END_MULTIPLY shift, and go to state 628 + + END_MULTIPLY [reduce using rule 811 (end_multiply_opt)] + $default reduce using rule 811 (end_multiply_opt) + + end_multiply_opt go to state 629 + + +state 437 + + 809 multiply_body: gname . BY gname GIVING var_list_name on_size_error_opt + 810 | gname . BY var_list_name on_size_error_opt + + BY shift, and go to state 630 + + +state 438 + + 876 open_mode: error . + + $default reduce using rule 876 (open_mode) + + +state 439 + + 875 open_mode: EXTEND . + + $default reduce using rule 875 (open_mode) + + +state 440 + + 872 open_mode: INPUT . + + $default reduce using rule 872 (open_mode) + + +state 441 + + 873 open_mode: I_O . + + $default reduce using rule 873 (open_mode) + + +state 442 + + 874 open_mode: OUTPUT . + + $default reduce using rule 874 (open_mode) + + +state 443 + + 868 open_statement: OPEN open_options . + 871 open_options: open_options . open_mode open_varlist + + error shift, and go to state 438 + EXTEND shift, and go to state 439 + INPUT shift, and go to state 440 + I_O shift, and go to state 441 + OUTPUT shift, and go to state 442 + + READ reduce using rule 868 (open_statement) + WRITE reduce using rule 868 (open_statement) + RELEASE reduce using rule 868 (open_statement) + NOT reduce using rule 868 (open_statement) + ACCEPT reduce using rule 868 (open_statement) + ADD reduce using rule 868 (open_statement) + CALL reduce using rule 868 (open_statement) + CALL_LOADLIB reduce using rule 868 (open_statement) + CANCEL reduce using rule 868 (open_statement) + CHAIN reduce using rule 868 (open_statement) + CLOSE reduce using rule 868 (open_statement) + COMPUTE reduce using rule 868 (open_statement) + CONTINUE reduce using rule 868 (open_statement) + DELETE reduce using rule 868 (open_statement) + DISPLAY reduce using rule 868 (open_statement) + DIVIDE reduce using rule 868 (open_statement) + ELSE reduce using rule 868 (open_statement) + END_ACCEPT reduce using rule 868 (open_statement) + END_ADD reduce using rule 868 (open_statement) + END_CALL reduce using rule 868 (open_statement) + END_CHAIN reduce using rule 868 (open_statement) + END_COMPUTE reduce using rule 868 (open_statement) + END_DELETE reduce using rule 868 (open_statement) + END_DIVIDE reduce using rule 868 (open_statement) + END_EVALUATE reduce using rule 868 (open_statement) + END_IF reduce using rule 868 (open_statement) + END_MULTIPLY reduce using rule 868 (open_statement) + END_PERFORM reduce using rule 868 (open_statement) + END_READ reduce using rule 868 (open_statement) + END_RETURN reduce using rule 868 (open_statement) + END_REWRITE reduce using rule 868 (open_statement) + END_SEARCH reduce using rule 868 (open_statement) + END_START reduce using rule 868 (open_statement) + END_STRINGCMD reduce using rule 868 (open_statement) + END_SUBTRACT reduce using rule 868 (open_statement) + END_UNSTRING reduce using rule 868 (open_statement) + END_WRITE reduce using rule 868 (open_statement) + EVALUATE reduce using rule 868 (open_statement) + EXIT reduce using rule 868 (open_statement) + GENERATE reduce using rule 868 (open_statement) + GO reduce using rule 868 (open_statement) + GOBACK reduce using rule 868 (open_statement) + IF reduce using rule 868 (open_statement) + INITIALIZE reduce using rule 868 (open_statement) + INITIATE reduce using rule 868 (open_statement) + INSPECT reduce using rule 868 (open_statement) + MERGE reduce using rule 868 (open_statement) + MOVE reduce using rule 868 (open_statement) + MULTIPLY reduce using rule 868 (open_statement) + NOTEXCEP reduce using rule 868 (open_statement) + OPEN reduce using rule 868 (open_statement) + PERFORM reduce using rule 868 (open_statement) + READY reduce using rule 868 (open_statement) + RESET reduce using rule 868 (open_statement) + RETURN reduce using rule 868 (open_statement) + REWRITE reduce using rule 868 (open_statement) + SEARCH reduce using rule 868 (open_statement) + SET reduce using rule 868 (open_statement) + SORT reduce using rule 868 (open_statement) + START reduce using rule 868 (open_statement) + STOP reduce using rule 868 (open_statement) + STRINGCMD reduce using rule 868 (open_statement) + SUBTRACT reduce using rule 868 (open_statement) + TCOBPROTO1 reduce using rule 868 (open_statement) + TCOBPROTO2 reduce using rule 868 (open_statement) + TERMINATE reduce using rule 868 (open_statement) + UNLOCK reduce using rule 868 (open_statement) + UNSTRING reduce using rule 868 (open_statement) + WHEN reduce using rule 868 (open_statement) + PERIOD_TOK reduce using rule 868 (open_statement) + + open_mode go to state 631 + + +state 444 + + 870 open_options: open_mode . open_varlist + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + open_varlist go to state 632 + name go to state 633 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 445 + + 1287 name: LABELSTR . + 1302 label: LABELSTR . in_of LABELSTR + 1303 | LABELSTR . + + IN shift, and go to state 102 + OF shift, and go to state 103 + + TIMES reduce using rule 1287 (name) + $default reduce using rule 1303 (label) + + in_of go to state 634 + + +state 446 + + 1270 signed_nliteral: NLITERAL . + 1304 label: NLITERAL . + 1305 | NLITERAL . in_of NLITERAL + 1306 | NLITERAL . in_of LABELSTR + + IN shift, and go to state 102 + OF shift, and go to state 103 + + TIMES reduce using rule 1270 (signed_nliteral) + $default reduce using rule 1304 (label) + + in_of go to state 635 + + +state 447 + + 642 perform_statement: PERFORM perform_options . + + $default reduce using rule 642 (perform_statement) + + +state 448 + + 1151 perform_options: with_test_opt . UNTIL @131 condition @132 perform_statements $@133 END_PERFORM + 1155 | with_test_opt . VARYING name FROM gname by_opt gname UNTIL @134 condition @135 perform_after_opt perform_statements $@136 END_PERFORM + + UNTIL shift, and go to state 636 + VARYING shift, and go to state 637 + + +state 449 + + 1144 perform_options: perform_statements . END_PERFORM + + END_PERFORM shift, and go to state 638 + + +state 450 + + 1177 perform_statements: $@141 . statement_list + + READ shift, and go to state 254 + WRITE shift, and go to state 255 + RELEASE shift, and go to state 256 + ACCEPT shift, and go to state 257 + ADD shift, and go to state 258 + CALL shift, and go to state 259 + CALL_LOADLIB shift, and go to state 260 + CANCEL shift, and go to state 261 + CHAIN shift, and go to state 262 + CLOSE shift, and go to state 263 + COMPUTE shift, and go to state 264 + CONTINUE shift, and go to state 265 + DELETE shift, and go to state 266 + DISPLAY shift, and go to state 267 + DIVIDE shift, and go to state 268 + EVALUATE shift, and go to state 269 + EXIT shift, and go to state 270 + GENERATE shift, and go to state 271 + GO shift, and go to state 272 + GOBACK shift, and go to state 273 + IF shift, and go to state 274 + INITIALIZE shift, and go to state 275 + INITIATE shift, and go to state 276 + INSPECT shift, and go to state 277 + MERGE shift, and go to state 278 + MOVE shift, and go to state 279 + MULTIPLY shift, and go to state 280 + OPEN shift, and go to state 281 + PERFORM shift, and go to state 282 + READY shift, and go to state 283 + RESET shift, and go to state 284 + RETURN shift, and go to state 285 + REWRITE shift, and go to state 286 + SEARCH shift, and go to state 287 + SET shift, and go to state 288 + SORT shift, and go to state 289 + START shift, and go to state 290 + STOP shift, and go to state 291 + STRINGCMD shift, and go to state 292 + SUBTRACT shift, and go to state 293 + TCOBPROTO1 shift, and go to state 294 + TCOBPROTO2 shift, and go to state 295 + TERMINATE shift, and go to state 296 + UNLOCK shift, and go to state 297 + UNSTRING shift, and go to state 298 + + statement_list go to state 639 + statements go to state 640 + statement go to state 300 + perform_statement go to state 301 + if_statement go to state 302 + search_statement go to state 303 + evaluate_statement go to state 304 + if_part go to state 305 + unlock_statement go to state 306 + proto_statement go to state 307 + trace_statement go to state 308 + initiate_statement go to state 309 + generate_statement go to state 310 + terminate_statement go to state 311 + cancel_statement go to state 312 + merge_statement go to state 313 + sort_statement go to state 314 + sort_file go to state 315 + sort_variable_indexed go to state 316 + move_statement go to state 317 + initialize_statement go to state 318 + compute_statement go to state 319 + add_statement go to state 320 + subtract_statement go to state 321 + multiply_statement go to state 322 + divide_statement go to state 323 + accept_statement go to state 324 + accept_hardware go to state 325 + accept_chronological go to state 326 + accept_screen go to state 327 + display_statement go to state 328 + display_line go to state 329 + display_screen go to state 330 + open_statement go to state 331 + close_statement go to state 332 + return_statement go to state 333 + read_statement go to state 334 + release_statement go to state 335 + write_statement go to state 336 + rewrite_statement go to state 337 + delete_statement go to state 338 + start_statement go to state 339 + goto_statement go to state 340 + call_statement go to state 341 + call_loadlib_statement go to state 342 + chain_statement go to state 343 + exit_statement go to state 344 + stop_statement go to state 345 + goback_statement go to state 346 + set_statement go to state 347 + string_statement go to state 348 + unstring_statement go to state 349 + inspect_statement go to state 350 + + +state 451 + + 1166 with_test_opt: with_opt . TEST before_after + + TEST shift, and go to state 641 + + +state 452 + + 1147 perform_options: gname . TIMES @129 perform_statements $@130 END_PERFORM + + TIMES shift, and go to state 642 + + +state 453 + + 1156 perform_options: label . perform_thru_opt + 1158 | label . perform_thru_opt with_test_opt UNTIL @137 condition + 1159 | label . perform_thru_opt gname TIMES + 1162 | label . perform_thru_opt with_test_opt VARYING name FROM gname by_opt gname UNTIL @138 condition @139 perform_after_opt + + THRU shift, and go to state 643 + + $default reduce using rule 1163 (perform_thru_opt) + + perform_thru_opt go to state 644 + + +state 454 + + 730 trace_statement: READY TRACE . + + $default reduce using rule 730 (trace_statement) + + +state 455 + + 731 trace_statement: RESET TRACE . + + $default reduce using rule 731 (trace_statement) + + +state 456 + + 894 return_statement: RETURN return_body . end_return_opt + + END_RETURN shift, and go to state 645 + + END_RETURN [reduce using rule 928 (end_return_opt)] + $default reduce using rule 928 (end_return_opt) + + end_return_opt go to state 646 + + +state 457 + + 896 return_body: name . record_opt read_into_opt + 897 | name . record_opt read_into_opt read_at_end_opt + + RECORD shift, and go to state 570 + + $default reduce using rule 1223 (record_opt) + + record_opt go to state 647 + + +state 458 + + 943 rewrite_statement: REWRITE name . write_from_opt $@102 invalid_key_opt end_rewrite_opt + + FROM shift, and go to state 539 + + $default reduce using rule 935 (write_from_opt) + + write_from_opt go to state 648 + + +state 459 + + 1277 variable_indexed: SUBSCVAR . + + $default reduce using rule 1277 (variable_indexed) + + +state 460 + + 649 search_statement: SEARCH ALL . search_all end_search_opt + + SUBSCVAR shift, and go to state 459 + + search_all go to state 649 + variable_indexed go to state 650 + + +state 461 + + 648 search_statement: SEARCH search . end_search_opt + + END_SEARCH shift, and go to state 651 + + END_SEARCH [reduce using rule 725 (end_search_opt)] + $default reduce using rule 725 (end_search_opt) + + end_search_opt go to state 652 + + +state 462 + + 698 search: variable_indexed . @76 search_varying_opt @77 search_at_end @78 search_when_list + + $default reduce using rule 695 (@76) + + @76 go to state 653 + + +state 463 + + 174 name_list: error . + + $default reduce using rule 174 (name_list) + + +state 464 + + 1025 address_of_opt: ADDRESS . of_opt + + OF shift, and go to state 654 + + $default reduce using rule 318 (of_opt) + + of_opt go to state 655 + + +state 465 + + 173 name_list: name_list . variable + 1015 set_target: name_list . + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + + $default reduce using rule 1015 (set_target) + + variable go to state 656 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 466 + + 1010 set_statement: SET set_list . + + $default reduce using rule 1010 (set_statement) + + +state 467 + + 1011 set_list: set_target . TO address_of_opt set_variable_or_nlit + 1012 | set_target . UP BY var_or_nliteral + 1013 | set_target . DOWN BY var_or_nliteral + + TO shift, and go to state 657 + DOWN shift, and go to state 658 + UP shift, and go to state 659 + + +state 468 + + 1014 set_list: address_of_opt . variable TO address_of_opt set_variable + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + + variable go to state 660 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 469 + + 1016 set_target: cond_name . + + $default reduce using rule 1016 (set_target) + + +state 470 + + 172 name_list: variable . + + $default reduce using rule 172 (name_list) + + +state 471 + + 1277 variable_indexed: SUBSCVAR . + 1295 unqualified_var: SUBSCVAR . + + DIRECTION reduce using rule 1277 (variable_indexed) + DIRECTION [reduce using rule 1295 (unqualified_var)] + ON reduce using rule 1277 (variable_indexed) + ON [reduce using rule 1295 (unqualified_var)] + $default reduce using rule 1295 (unqualified_var) + + +state 472 + + 749 sort_variable_indexed: SORT variable_indexed . sort_keys_idx $@92 sort_duplicates_opt sort_collating_opt + + ON shift, and go to state 620 + + $default reduce using rule 1235 (on_opt) + + sort_keys_idx go to state 661 + sort_key_idx go to state 662 + on_opt go to state 663 + + +state 473 + + 747 sort_file: SORT name . sort_keys $@89 sort_duplicates_opt sort_collating_opt $@90 sort_input $@91 sort_output + + ON shift, and go to state 620 + + $default reduce using rule 1235 (on_opt) + + sort_keys go to state 664 + sort_key go to state 622 + on_opt go to state 623 + + +state 474 + + 951 start_statement: START start_body . invalid_key_opt $@104 end_start_opt + + NOT shift, and go to state 665 + INVALID shift, and go to state 666 + NOTEXCEP shift, and go to state 667 + + NOT [reduce using rule 1064 (invalid_key_opt)] + NOTEXCEP [reduce using rule 1064 (invalid_key_opt)] + $default reduce using rule 1064 (invalid_key_opt) + + invalid_key_opt go to state 668 + invalid_key_sentence go to state 669 + not_invalid_key_sentence go to state 670 + not_excep go to state 671 + + +state 475 + + 952 start_body: name . + 953 | name . KEY is_opt cond_op name + + KEY shift, and go to state 672 + + $default reduce using rule 952 (start_body) + + +state 476 + + 989 stop_literal: NLITERAL . + + $default reduce using rule 989 (stop_literal) + + +state 477 + + 988 stop_literal: CLITERAL . + + $default reduce using rule 988 (stop_literal) + + +state 478 + + 986 stop_statement: STOP RUN . + + $default reduce using rule 986 (stop_statement) + + +state 479 + + 987 stop_statement: STOP stop_literal . + + $default reduce using rule 987 (stop_statement) + + +state 480 + + 1075 string_from_list: error . + + $default reduce using rule 1075 (string_from_list) + + +state 481 + + 1027 string_statement: STRINGCMD string_from_list . INTO name string_with_pointer $@117 on_overflow_opt end_stringcmd_opt + 1074 string_from_list: string_from_list . sep_opt string_from + + INTO shift, and go to state 673 + LISTSEP shift, and go to state 98 + + $default reduce using rule 1214 (sep_opt) + + sep_opt go to state 674 + + +state 482 + + 1073 string_from_list: string_from . + + $default reduce using rule 1073 (string_from_list) + + +state 483 + + 1076 string_from: gname . + 1077 | gname . DELIMITED by_opt delimited_by + + DELIMITED shift, and go to state 675 + + $default reduce using rule 1076 (string_from) + + +state 484 + + 804 subtract_body: CORRESPONDING . var_list_gname FROM var_list_name rounded_opt on_size_error_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + var_list_gname go to state 676 + gname go to state 399 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 485 + + 800 subtract_statement: SUBTRACT subtract_body . end_subtract_opt + + END_SUBTRACT shift, and go to state 677 + + END_SUBTRACT [reduce using rule 805 (end_subtract_opt)] + $default reduce using rule 805 (end_subtract_opt) + + end_subtract_opt go to state 678 + + +state 486 + + 802 subtract_body: var_list_gname . FROM var_list_name on_size_error_opt + 803 | var_list_gname . FROM gname GIVING var_list_name on_size_error_opt + 994 var_list_gname: var_list_gname . gname sep_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FROM shift, and go to state 679 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gname go to state 550 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 487 + + 728 proto_statement: TCOBPROTO1 gname . + + $default reduce using rule 728 (proto_statement) + + +state 488 + + 729 proto_statement: TCOBPROTO2 gname . gname + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gname go to state 680 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 489 + + 734 terminate_statement: TERMINATE name . + + $default reduce using rule 734 (terminate_statement) + + +state 490 + + 727 unlock_statement: UNLOCK name . + + $default reduce using rule 727 (unlock_statement) + + +state 491 + + 1029 unstring_statement: UNSTRING name . unstring_delimited INTO unstring_destinations string_with_pointer unstring_tallying $@118 on_overflow_opt end_unstring_opt + + DELIMITED shift, and go to state 681 + + $default reduce using rule 1031 (unstring_delimited) + + unstring_delimited go to state 682 + + +state 492 + + 566 procedure_decl: $@53 statements PERIOD_TOK . + + $default reduce using rule 566 (procedure_decl) + + +state 493 + + 598 statements: statements statement . + + $default reduce using rule 598 (statements) + + +state 494 + + 647 if_statement: if_part ELSE . @60 conditional_statement $@61 end_if_opt + + $default reduce using rule 645 (@60) + + @60 go to state 683 + + +state 495 + + 644 if_statement: if_part $@59 . end_if_opt + + END_IF shift, and go to state 684 + + END_IF [reduce using rule 691 (end_if_opt)] + $default reduce using rule 691 (end_if_opt) + + end_if_opt go to state 685 + + +state 496 + + 44 collating_opt: COLLATING . + + $default reduce using rule 44 (collating_opt) + + +state 497 + + 41 program_collating_opt: PROGRAM collating_sequence . + + $default reduce using rule 41 (program_collating_opt) + + +state 498 + + 43 collating_sequence: collating_opt . SEQUENCE is_opt STRING + + SEQUENCE shift, and go to state 686 + + +state 499 + + 38 configuration_option: OBJECT_COMPUTER PERIOD_TOK $@8 STRING program_collating_opt PERIOD_TOK . + + $default reduce using rule 38 (configuration_option) + + +state 500 + + 36 configuration_option: SOURCE_COMPUTER PERIOD_TOK $@7 STRING debug_mode_opt PERIOD_TOK . + + $default reduce using rule 36 (configuration_option) + + +state 501 + + 46 debug_mode_opt: with_opt DEBUGGING . MODE + + MODE shift, and go to state 687 + + +state 502 + + 82 alphabet_type: NATIVE . + + $default reduce using rule 82 (alphabet_type) + + +state 503 + + 83 alphabet_type: STANDARD_1 . + + $default reduce using rule 83 (alphabet_type) + + +state 504 + + 84 alphabet_type: STANDARD_2 . + + $default reduce using rule 84 (alphabet_type) + + +state 505 + + 81 alphabet_details: ALPHABET STRING is_opt alphabet_type . + + $default reduce using rule 81 (alphabet_details) + + +state 506 + + 85 alphabet_type: alphabet_literal_list . + 87 alphabet_literal_list: alphabet_literal_list . alphabet_literal_item + + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + $default reduce using rule 85 (alphabet_type) + + alphabet_literal_item go to state 688 + without_all_literal go to state 508 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + + +state 507 + + 86 alphabet_literal_list: alphabet_literal_item . + + $default reduce using rule 86 (alphabet_literal_list) + + +state 508 + + 88 alphabet_literal_item: without_all_literal . + 89 | without_all_literal . THRU without_all_literal + 90 | without_all_literal . alphabet_also_list + + THRU shift, and go to state 689 + ALSO shift, and go to state 690 + + $default reduce using rule 88 (alphabet_literal_item) + + alphabet_also_list go to state 691 + + +state 509 + + 66 special_name_class_item: CLITERAL . + 67 | CLITERAL . THRU CLITERAL + + THRU shift, and go to state 692 + + $default reduce using rule 66 (special_name_class_item) + + +state 510 + + 63 special_name_class: CLASS STRING is_opt special_name_class_item_list . + 65 special_name_class_item_list: special_name_class_item_list . special_name_class_item + + CLITERAL shift, and go to state 509 + + $default reduce using rule 63 (special_name_class) + + special_name_class_item go to state 693 + + +state 511 + + 64 special_name_class_item_list: special_name_class_item . + + $default reduce using rule 64 (special_name_class_item_list) + + +state 512 + + 60 currency_details: CURRENCY sign_opt is_opt CLITERAL . + + $default reduce using rule 60 (currency_details) + + +state 513 + + 69 screen_status_details: DISPLAY_SCREEN STATUS is_opt STRING . + + $default reduce using rule 69 (screen_status_details) + + +state 514 + + 74 switches_details: STRING is_opt STRING . $@9 switch_on_opt switch_off_opt + + $default reduce using rule 73 ($@9) + + $@9 go to state 694 + + +state 515 + + 103 file_select: SELECT optional_opt def_name $@10 . select_clauses PERIOD_TOK + + $default reduce using rule 105 (select_clauses) + + select_clauses go to state 695 + + +state 516 + + 163 tape_opt: TAPE . + + $default reduce using rule 163 (tape_opt) + + +state 517 + + 157 i_o_control_multiple_file_tape_clause: MULTIPLE FILE_TOK tape_opt . contains_opt i_o_control_multiple_file_list + + CONTAINS shift, and go to state 696 + + $default reduce using rule 545 (contains_opt) + + contains_opt go to state 697 + + +state 518 + + 165 are_opta: AREA . + + $default reduce using rule 165 (are_opta) + + +state 519 + + 152 i_o_control_same_clause: SAME same_clause_options are_opta . for_opt string_list + + FOR shift, and go to state 698 + + $default reduce using rule 168 (for_opt) + + for_opt go to state 699 + + +state 520 + + 419 file_section: file_section FD $@38 STRING $@39 . file_description_fd_clauses PERIOD_TOK $@40 file_description + + $default reduce using rule 483 (file_description_fd_clauses) + + file_description_fd_clauses go to state 700 + + +state 521 + + 423 file_section: file_section SD $@41 STRING $@42 . file_description_sd_clauses PERIOD_TOK $@43 file_description + + $default reduce using rule 485 (file_description_sd_clauses) + + file_description_sd_clauses go to state 701 + + +state 522 + + 429 field_description: integer def_name_opt $@44 . data_clauses PERIOD_TOK + + $default reduce using rule 430 (data_clauses) + + data_clauses go to state 702 + + +state 523 + + 194 report_section: RD $@15 . STRING $@16 report_controls PERIOD_TOK $@17 report_description + + STRING shift, and go to state 703 + + +state 524 + + 320 screen_section_opt: SCREEN SECTION PERIOD_TOK $@27 screen_section . + 322 screen_section: screen_section . screen_item + + NLITERAL shift, and go to state 59 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + $default reduce using rule 320 (screen_section_opt) + + screen_item go to state 704 + signed_nliteral go to state 234 + integer go to state 705 + + +state 525 + + 580 declaratives_decl: error . $@57 PERIOD_TOK + 583 declaratives_procedure: error . + + PERIOD_TOK reduce using rule 579 ($@57) + $default reduce using rule 583 (declaratives_procedure) + + $@57 go to state 706 + + +state 526 + + 571 declaratives_opt: DECLARATIVES PERIOD_TOK $@55 declaratives_procedure declaratives_division END . DECLARATIVES PERIOD_TOK + + DECLARATIVES shift, and go to state 707 + + +state 527 + + 574 declaratives_division: declaratives_division declaratives_decl . + + $default reduce using rule 574 (declaratives_division) + + +state 528 + + 578 declaratives_decl: $@56 . statements PERIOD_TOK + + READ shift, and go to state 254 + WRITE shift, and go to state 255 + RELEASE shift, and go to state 256 + ACCEPT shift, and go to state 257 + ADD shift, and go to state 258 + CALL shift, and go to state 259 + CALL_LOADLIB shift, and go to state 260 + CANCEL shift, and go to state 261 + CHAIN shift, and go to state 262 + CLOSE shift, and go to state 263 + COMPUTE shift, and go to state 264 + CONTINUE shift, and go to state 265 + DELETE shift, and go to state 266 + DISPLAY shift, and go to state 267 + DIVIDE shift, and go to state 268 + EVALUATE shift, and go to state 269 + EXIT shift, and go to state 270 + GENERATE shift, and go to state 271 + GO shift, and go to state 272 + GOBACK shift, and go to state 273 + IF shift, and go to state 274 + INITIALIZE shift, and go to state 275 + INITIATE shift, and go to state 276 + INSPECT shift, and go to state 277 + MERGE shift, and go to state 278 + MOVE shift, and go to state 279 + MULTIPLY shift, and go to state 280 + OPEN shift, and go to state 281 + PERFORM shift, and go to state 282 + READY shift, and go to state 283 + RESET shift, and go to state 284 + RETURN shift, and go to state 285 + REWRITE shift, and go to state 286 + SEARCH shift, and go to state 287 + SET shift, and go to state 288 + SORT shift, and go to state 289 + START shift, and go to state 290 + STOP shift, and go to state 291 + STRINGCMD shift, and go to state 292 + SUBTRACT shift, and go to state 293 + TCOBPROTO1 shift, and go to state 294 + TCOBPROTO2 shift, and go to state 295 + TERMINATE shift, and go to state 296 + UNLOCK shift, and go to state 297 + UNSTRING shift, and go to state 298 + + statements go to state 708 + statement go to state 300 + perform_statement go to state 301 + if_statement go to state 302 + search_statement go to state 303 + evaluate_statement go to state 304 + if_part go to state 305 + unlock_statement go to state 306 + proto_statement go to state 307 + trace_statement go to state 308 + initiate_statement go to state 309 + generate_statement go to state 310 + terminate_statement go to state 311 + cancel_statement go to state 312 + merge_statement go to state 313 + sort_statement go to state 314 + sort_file go to state 315 + sort_variable_indexed go to state 316 + move_statement go to state 317 + initialize_statement go to state 318 + compute_statement go to state 319 + add_statement go to state 320 + subtract_statement go to state 321 + multiply_statement go to state 322 + divide_statement go to state 323 + accept_statement go to state 324 + accept_hardware go to state 325 + accept_chronological go to state 326 + accept_screen go to state 327 + display_statement go to state 328 + display_line go to state 329 + display_screen go to state 330 + open_statement go to state 331 + close_statement go to state 332 + return_statement go to state 333 + read_statement go to state 334 + release_statement go to state 335 + write_statement go to state 336 + rewrite_statement go to state 337 + delete_statement go to state 338 + start_statement go to state 339 + goto_statement go to state 340 + call_statement go to state 341 + call_loadlib_statement go to state 342 + chain_statement go to state 343 + exit_statement go to state 344 + stop_statement go to state 345 + goback_statement go to state 346 + set_statement go to state 347 + string_statement go to state 348 + unstring_statement go to state 349 + inspect_statement go to state 350 + + +state 529 + + 575 declaratives_decl: declaratives_procedure . + + $default reduce using rule 575 (declaratives_decl) + + +state 530 + + 576 declaratives_decl: paragraph . + + $default reduce using rule 576 (declaratives_decl) + + +state 531 + + 585 use_phrase: error . + + $default reduce using rule 585 (use_phrase) + + +state 532 + + 584 use_phrase: USE . AFTER use_phrase_exception_error PROCEDURE on_opt use_phrase_option PERIOD_TOK + + AFTER shift, and go to state 709 + + +state 533 + + 582 declaratives_procedure: procedure_section $@58 use_phrase . + + $default reduce using rule 582 (declaratives_procedure) + + +state 534 + + 927 end_read_opt: END_READ . + + $default reduce using rule 927 (end_read_opt) + + +state 535 + + 898 read_statement: READ read_body end_read_opt . + + $default reduce using rule 898 (read_statement) + + +state 536 + + 904 read_next_opt: NEXT . + + $default reduce using rule 904 (read_next_opt) + + +state 537 + + 905 read_next_opt: PREVIOUS . + + $default reduce using rule 905 (read_next_opt) + + +state 538 + + 900 read_body: name read_next_opt . record_opt read_into_opt with_lock_opt read_key_opt + 901 | name read_next_opt . record_opt read_into_opt with_lock_opt read_key_opt read_at_end_opt + 902 | name read_next_opt . record_opt read_into_opt with_lock_opt read_key_opt read_invalid_key_opt + + RECORD shift, and go to state 570 + + $default reduce using rule 1223 (record_opt) + + record_opt go to state 710 + + +state 539 + + 936 write_from_opt: FROM . gname + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gname go to state 711 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 540 + + 934 write_statement: WRITE name write_from_opt . write_options $@101 invalid_key_opt end_write_opt + + AFTER shift, and go to state 712 + BEFORE shift, and go to state 713 + + $default reduce using rule 937 (write_options) + + write_options go to state 714 + before_after go to state 715 + + +state 541 + + 932 release_from_opt: FROM . gname + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gname go to state 716 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 542 + + 930 release_statement: RELEASE name release_from_opt . + + $default reduce using rule 930 (release_statement) + + +state 543 + + 826 accept_hardware: ACCEPT name FROM . INKEY end_accept_opt + 827 | ACCEPT name FROM . INPUT STATUS end_accept_opt + 828 | ACCEPT name FROM . CMD_LINE end_accept_opt + 829 | ACCEPT name FROM . ESCKEY end_accept_opt + 830 | ACCEPT name FROM . ENVIRONMENT_VARIABLE CLITERAL end_accept_opt + 831 accept_chronological: ACCEPT name FROM . DATE_TIME end_accept_opt + + CMD_LINE shift, and go to state 717 + ENVIRONMENT_VARIABLE shift, and go to state 718 + INKEY shift, and go to state 719 + ESCKEY shift, and go to state 720 + DATE_TIME shift, and go to state 721 + INPUT shift, and go to state 722 + + +state 544 + + 832 accept_screen: ACCEPT name accept_display_options . end_accept_opt + 836 | ACCEPT name accept_display_options . on_opt EXCEPTION $@93 variable @94 statement_list $@95 end_accept_opt + 863 accept_display_options: accept_display_options . accept_display_option + + AT shift, and go to state 723 + COLUMN shift, and go to state 724 + END_ACCEPT shift, and go to state 725 + LINE shift, and go to state 726 + ON shift, and go to state 620 + POSITION shift, and go to state 727 + WITH shift, and go to state 358 + + IS reduce using rule 1233 (with_opt) + NO reduce using rule 1233 (with_opt) + AUTO reduce using rule 1233 (with_opt) + BACKGROUNDCOLOR reduce using rule 1233 (with_opt) + BELL reduce using rule 1233 (with_opt) + BLANK reduce using rule 1233 (with_opt) + BLINK reduce using rule 1233 (with_opt) + END_ACCEPT [reduce using rule 837 (end_accept_opt)] + ERASE reduce using rule 1233 (with_opt) + EXCEPTION reduce using rule 1235 (on_opt) + FOREGROUNDCOLOR reduce using rule 1233 (with_opt) + FULL reduce using rule 1233 (with_opt) + HIGHLIGHT reduce using rule 1233 (with_opt) + JUSTIFIED reduce using rule 1233 (with_opt) + LEADING reduce using rule 1233 (with_opt) + LOWER reduce using rule 1233 (with_opt) + LOWLIGHT reduce using rule 1233 (with_opt) + NOECHO reduce using rule 1233 (with_opt) + REQUIRED reduce using rule 1233 (with_opt) + REVERSEVIDEO reduce using rule 1233 (with_opt) + SECURE reduce using rule 1233 (with_opt) + SIGN reduce using rule 1233 (with_opt) + TRAILING reduce using rule 1233 (with_opt) + UNDERLINE reduce using rule 1233 (with_opt) + UPDATE reduce using rule 1233 (with_opt) + UPPER reduce using rule 1233 (with_opt) + WITH [reduce using rule 1233 (with_opt)] + $default reduce using rule 837 (end_accept_opt) + + end_accept_opt go to state 728 + scr_line go to state 729 + scr_position go to state 730 + scr_line_position go to state 731 + accept_display_option go to state 732 + with_opt go to state 733 + on_opt go to state 734 + + +state 545 + + 795 add_body: CORRESPONDING var_list_gname . TO var_list_name rounded_opt on_size_error_opt + 994 var_list_gname: var_list_gname . gname sep_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + TO shift, and go to state 735 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gname go to state 550 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 546 + + 799 end_add_opt: END_ADD . + + $default reduce using rule 799 (end_add_opt) + + +state 547 + + 791 add_statement: ADD add_body end_add_opt . + + $default reduce using rule 791 (add_statement) + + +state 548 + + 793 add_body: var_list_gname TO . var_list_name on_size_error_opt + 797 add_to_opt: TO . gname + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + var_list_name go to state 736 + gname go to state 737 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 738 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 549 + + 794 add_body: var_list_gname add_to_opt . GIVING var_list_name on_size_error_opt + + GIVING shift, and go to state 739 + + +state 550 + + 994 var_list_gname: var_list_gname gname . sep_opt + + LISTSEP shift, and go to state 98 + + $default reduce using rule 1214 (sep_opt) + + sep_opt go to state 740 + + +state 551 + + 993 var_list_gname: gname sep_opt . + + $default reduce using rule 993 (var_list_gname) + + +state 552 + + 970 call_convention_opt: CALL_CONV_C . + + $default reduce using rule 970 (call_convention_opt) + + +state 553 + + 971 call_convention_opt: CALL_CONV_STDCALL . + + $default reduce using rule 971 (call_convention_opt) + + +state 554 + + 967 call_statement: CALL $@105 call_convention_opt . gname using_options returning_options @106 @107 @108 on_exception_or_overflow on_not_exception $@109 end_call_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gname go to state 741 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 555 + + 973 call_loadlib_statement: CALL_LOADLIB gname $@110 . end_call_loadlib_opt + + END_CALL_LOADLIB shift, and go to state 742 + + $default reduce using rule 976 (end_call_loadlib_opt) + + end_call_loadlib_opt go to state 743 + + +state 556 + + 981 chain_statement: CHAIN $@111 gname . using_options @112 @113 on_exception_or_overflow $@114 end_chain_opt + + USING shift, and go to state 744 + + $default reduce using rule 1122 (using_options) + + using_options go to state 745 + + +state 557 + + 882 close_files: close_files sep_opt . close_file + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + close_file go to state 746 + name go to state 407 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 558 + + 887 close_options: REEL . + 889 | REEL . for_opt REMOVAL + + FOR shift, and go to state 698 + + REMOVAL reduce using rule 168 (for_opt) + $default reduce using rule 887 (close_options) + + for_opt go to state 747 + + +state 559 + + 888 close_options: UNIT . + 890 | UNIT . for_opt REMOVAL + + FOR shift, and go to state 698 + + REMOVAL reduce using rule 168 (for_opt) + $default reduce using rule 888 (close_options) + + for_opt go to state 748 + + +state 560 + + 883 close_file: name close_options_opt . + + $default reduce using rule 883 (close_file) + + +state 561 + + 884 close_options_opt: close_options . + + $default reduce using rule 884 (close_options_opt) + + +state 562 + + 885 close_options_opt: with_lock_opt . + + $default reduce using rule 885 (close_options_opt) + + +state 563 + + 886 close_options: with_opt . NO REWIND + 891 with_lock_opt: with_opt . LOCK + 892 | with_opt . IGNORE LOCK + + NO shift, and go to state 749 + IGNORE shift, and go to state 750 + LOCK shift, and go to state 751 + + +state 564 + + 790 end_compute_opt: END_COMPUTE . + + $default reduce using rule 790 (end_compute_opt) + + +state 565 + + 786 compute_statement: COMPUTE compute_body end_compute_opt . + + $default reduce using rule 786 (compute_statement) + + +state 566 + + 788 compute_body: var_list_name CONDITIONAL . expr on_size_error_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + '(' shift, and go to state 752 + + expr go to state 753 + gname go to state 427 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 567 + + 992 var_list_name: var_list_name name . rounded_opt sep_opt + + ROUNDED shift, and go to state 568 + + ROUNDED [reduce using rule 995 (rounded_opt)] + $default reduce using rule 995 (rounded_opt) + + rounded_opt go to state 754 + + +state 568 + + 996 rounded_opt: ROUNDED . + + $default reduce using rule 996 (rounded_opt) + + +state 569 + + 991 var_list_name: name rounded_opt . sep_opt + + LISTSEP shift, and go to state 98 + + $default reduce using rule 1214 (sep_opt) + + sep_opt go to state 755 + + +state 570 + + 1224 record_opt: RECORD . + + $default reduce using rule 1224 (record_opt) + + +state 571 + + 947 delete_statement: DELETE name record_opt . $@103 invalid_key_opt end_delete_opt + + $default reduce using rule 946 ($@103) + + $@103 go to state 756 + + +state 572 + + 846 display_upon: UPON . CONSOLE + 847 | UPON . STD_OUTPUT + 848 | UPON . STD_ERROR + + CONSOLE shift, and go to state 757 + STD_ERROR shift, and go to state 758 + STD_OUTPUT shift, and go to state 759 + + +state 573 + + 842 display_line: DISPLAY display_varlist display_upon . display_line_options end_display_opt + + $default reduce using rule 849 (display_line_options) + + display_line_options go to state 760 + + +state 574 + + 843 display_screen: DISPLAY display_varlist accept_display_options . end_display_opt + 863 accept_display_options: accept_display_options . accept_display_option + + AT shift, and go to state 723 + COLUMN shift, and go to state 724 + END_DISPLAY shift, and go to state 761 + LINE shift, and go to state 726 + POSITION shift, and go to state 727 + WITH shift, and go to state 358 + + IS reduce using rule 1233 (with_opt) + NO reduce using rule 1233 (with_opt) + AUTO reduce using rule 1233 (with_opt) + BACKGROUNDCOLOR reduce using rule 1233 (with_opt) + BELL reduce using rule 1233 (with_opt) + BLANK reduce using rule 1233 (with_opt) + BLINK reduce using rule 1233 (with_opt) + ERASE reduce using rule 1233 (with_opt) + FOREGROUNDCOLOR reduce using rule 1233 (with_opt) + FULL reduce using rule 1233 (with_opt) + HIGHLIGHT reduce using rule 1233 (with_opt) + JUSTIFIED reduce using rule 1233 (with_opt) + LEADING reduce using rule 1233 (with_opt) + LOWER reduce using rule 1233 (with_opt) + LOWLIGHT reduce using rule 1233 (with_opt) + NOECHO reduce using rule 1233 (with_opt) + REQUIRED reduce using rule 1233 (with_opt) + REVERSEVIDEO reduce using rule 1233 (with_opt) + SECURE reduce using rule 1233 (with_opt) + SIGN reduce using rule 1233 (with_opt) + TRAILING reduce using rule 1233 (with_opt) + UNDERLINE reduce using rule 1233 (with_opt) + UPDATE reduce using rule 1233 (with_opt) + UPPER reduce using rule 1233 (with_opt) + WITH [reduce using rule 1233 (with_opt)] + $default reduce using rule 855 (end_display_opt) + + end_display_opt go to state 762 + scr_line go to state 729 + scr_position go to state 730 + scr_line_position go to state 731 + accept_display_option go to state 732 + with_opt go to state 733 + + +state 575 + + 845 display_varlist: display_varlist sep_opt . gname + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gname go to state 763 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 576 + + 821 end_divide_opt: END_DIVIDE . + + $default reduce using rule 821 (end_divide_opt) + + +state 577 + + 813 divide_statement: DIVIDE divide_body end_divide_opt . + + $default reduce using rule 813 (divide_statement) + + +state 578 + + 815 divide_body: gname BY . gname GIVING var_list_name on_size_error_opt + 816 | gname BY . gname GIVING name rounded_opt REMAINDER name on_size_error_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gname go to state 764 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 579 + + 817 divide_body: gname INTO . gname GIVING name rounded_opt REMAINDER name on_size_error_opt + 818 | gname INTO . gname GIVING var_list_name on_size_error_opt + 819 | gname INTO . var_list_name on_size_error_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + var_list_name go to state 765 + gname go to state 766 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 738 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 580 + + 652 evaluate_statement: EVALUATE @62 selection_subject_set . $@63 when_case_list end_evaluate_or_eos + 658 selection_subject_set: selection_subject_set . ALSO @65 selection_subject + + ALSO shift, and go to state 767 + + $default reduce using rule 651 ($@63) + + $@63 go to state 768 + + +state 581 + + 656 selection_subject_set: @64 . selection_subject + + VARIABLE shift, and go to state 56 + VARCOND shift, and go to state 422 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + NOT shift, and go to state 423 + ALL shift, and go to state 63 + FALSE_TOK shift, and go to state 769 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + TRUE_TOK shift, and go to state 770 + ZERO shift, and go to state 69 + '(' shift, and go to state 424 + + selection_subject go to state 771 + expr go to state 772 + condition go to state 773 + gname go to state 427 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + cond_name go to state 428 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 582 + + 1302 label: LABELSTR . in_of LABELSTR + 1303 | LABELSTR . + + IN shift, and go to state 102 + OF shift, and go to state 103 + + $default reduce using rule 1303 (label) + + in_of go to state 634 + + +state 583 + + 1304 label: NLITERAL . + 1305 | NLITERAL . in_of NLITERAL + 1306 | NLITERAL . in_of LABELSTR + + IN shift, and go to state 102 + OF shift, and go to state 103 + + $default reduce using rule 1304 (label) + + in_of go to state 635 + + +state 584 + + 956 goto_statement: GO to_opt goto_label . + + $default reduce using rule 956 (goto_statement) + + +state 585 + + 957 goto_statement: GO to_opt goto_label_list . DEPENDING on_opt variable + 960 goto_label_list: goto_label_list . label + 961 | goto_label_list . LISTSEP label + + LABELSTR shift, and go to state 582 + NLITERAL shift, and go to state 583 + DEPENDING shift, and go to state 774 + LISTSEP shift, and go to state 775 + + label go to state 776 + + +state 586 + + 958 goto_label: label . + 959 goto_label_list: label . + + LABELSTR reduce using rule 959 (goto_label_list) + NLITERAL reduce using rule 959 (goto_label_list) + DEPENDING reduce using rule 959 (goto_label_list) + LISTSEP reduce using rule 959 (goto_label_list) + $default reduce using rule 958 (goto_label) + + +state 587 + + 1283 cond_name: VARCOND '(' . $@146 subscripts ')' + + $default reduce using rule 1282 ($@146) + + $@146 go to state 777 + + +state 588 + + 1182 condition: NOT condition . + 1184 | condition . AND @143 implied_op_condition + 1186 | condition . OR @144 implied_op_condition + + $default reduce using rule 1182 (condition) + + +state 589 + + 1114 expr: expr . '*' expr + 1115 | expr . '/' expr + 1116 | expr . '+' expr + 1117 | expr . '-' expr + 1118 | expr . POW_OP expr + 1119 | '(' expr . ')' + 1181 condition: expr . extended_cond_op $@142 expr_opt + + CONDITIONAL shift, and go to state 591 + IS shift, and go to state 592 + '+' shift, and go to state 593 + '-' shift, and go to state 594 + '*' shift, and go to state 595 + '/' shift, and go to state 596 + POW_OP shift, and go to state 597 + NOT shift, and go to state 598 + ALPHABETIC shift, and go to state 599 + ALPHABETIC_LOWER shift, and go to state 600 + ALPHABETIC_UPPER shift, and go to state 601 + NEGATIVE shift, and go to state 602 + NUMERIC shift, and go to state 603 + POSITIVE shift, and go to state 604 + ZERO shift, and go to state 605 + ')' shift, and go to state 778 + + sign_condition go to state 606 + class_condition go to state 607 + extended_cond_op go to state 608 + ext_cond go to state 609 + conditional go to state 610 + + +state 590 + + 1184 condition: condition . AND @143 implied_op_condition + 1186 | condition . OR @144 implied_op_condition + 1187 | '(' condition . ')' + + OR shift, and go to state 611 + AND shift, and go to state 612 + ')' shift, and go to state 779 + + +state 591 + + 1211 conditional: CONDITIONAL . than_to_opt + + TO shift, and go to state 780 + THAN shift, and go to state 781 + + $default reduce using rule 1220 (than_to_opt) + + than_to_opt go to state 782 + + +state 592 + + 1199 extended_cond_op: IS . ext_cond + 1200 | IS . NOT ext_cond + 1201 | IS . ext_cond OR ext_cond + + CONDITIONAL shift, and go to state 591 + NOT shift, and go to state 783 + ALPHABETIC shift, and go to state 599 + ALPHABETIC_LOWER shift, and go to state 600 + ALPHABETIC_UPPER shift, and go to state 601 + NEGATIVE shift, and go to state 602 + NUMERIC shift, and go to state 603 + POSITIVE shift, and go to state 604 + ZERO shift, and go to state 605 + + sign_condition go to state 606 + class_condition go to state 607 + ext_cond go to state 784 + conditional go to state 610 + + +state 593 + + 1116 expr: expr '+' . expr + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + '(' shift, and go to state 752 + + expr go to state 785 + gname go to state 427 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 594 + + 1117 expr: expr '-' . expr + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + '(' shift, and go to state 752 + + expr go to state 786 + gname go to state 427 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 595 + + 1114 expr: expr '*' . expr + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + '(' shift, and go to state 752 + + expr go to state 787 + gname go to state 427 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 596 + + 1115 expr: expr '/' . expr + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + '(' shift, and go to state 752 + + expr go to state 788 + gname go to state 427 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 597 + + 1118 expr: expr POW_OP . expr + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + '(' shift, and go to state 752 + + expr go to state 789 + gname go to state 427 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 598 + + 1203 extended_cond_op: NOT . is_opt ext_cond + + IS shift, and go to state 84 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 790 + + +state 599 + + 1196 class_condition: ALPHABETIC . + + $default reduce using rule 1196 (class_condition) + + +state 600 + + 1197 class_condition: ALPHABETIC_LOWER . + + $default reduce using rule 1197 (class_condition) + + +state 601 + + 1198 class_condition: ALPHABETIC_UPPER . + + $default reduce using rule 1198 (class_condition) + + +state 602 + + 1193 sign_condition: NEGATIVE . + + $default reduce using rule 1193 (sign_condition) + + +state 603 + + 1195 class_condition: NUMERIC . + + $default reduce using rule 1195 (class_condition) + + +state 604 + + 1192 sign_condition: POSITIVE . + + $default reduce using rule 1192 (sign_condition) + + +state 605 + + 1194 sign_condition: ZERO . + + $default reduce using rule 1194 (sign_condition) + + +state 606 + + 1207 ext_cond: sign_condition . + + $default reduce using rule 1207 (ext_cond) + + +state 607 + + 1206 ext_cond: class_condition . + + $default reduce using rule 1206 (ext_cond) + + +state 608 + + 1181 condition: expr extended_cond_op . $@142 expr_opt + + $default reduce using rule 1180 ($@142) + + $@142 go to state 791 + + +state 609 + + 1202 extended_cond_op: ext_cond . + 1204 | ext_cond . OR ext_cond + + OR shift, and go to state 792 + + OR [reduce using rule 1202 (extended_cond_op)] + $default reduce using rule 1202 (extended_cond_op) + + +state 610 + + 1205 ext_cond: conditional . + + $default reduce using rule 1205 (ext_cond) + + +state 611 + + 1186 condition: condition OR . @144 implied_op_condition + + $default reduce using rule 1185 (@144) + + @144 go to state 793 + + +state 612 + + 1184 condition: condition AND . @143 implied_op_condition + + $default reduce using rule 1183 (@143) + + @143 go to state 794 + + +state 613 + + 684 if_part: IF condition @73 . end_then_opt conditional_statement + + THEN shift, and go to state 795 + + $default reduce using rule 693 (end_then_opt) + + end_then_opt go to state 796 + + +state 614 + + 777 initialize_replacing_opt: REPLACING . initialize_replacing_lists + + ALPHABETIC shift, and go to state 797 + ALPHANUMERIC shift, and go to state 798 + ALPHANUMERIC_EDITED shift, and go to state 799 + NUMERIC shift, and go to state 800 + NUMERIC_EDITED shift, and go to state 801 + + initialize_replacing_lists go to state 802 + initialize_replacing_list go to state 803 + initialize_type_list go to state 804 + + +state 615 + + 774 initialize_statement: INITIALIZE gname_list initialize_replacing_opt . + + $default reduce using rule 774 (initialize_statement) + + +state 616 + + 1088 converting_clause: CONVERTING . noallname TO noallname inspect_before_after + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + noallname go to state 805 + without_all_literal go to state 806 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 807 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 617 + + 1089 tallying_clause: TALLYING . tallying_list + + $default reduce using rule 1092 (tallying_list) + + tallying_list go to state 808 + + +state 618 + + 1087 inspect_statement: INSPECT name converting_clause . + + $default reduce using rule 1087 (inspect_statement) + + +state 619 + + 1086 inspect_statement: INSPECT name tallying_clause . $@126 replacing_clause + + $default reduce using rule 1085 ($@126) + + $@126 go to state 809 + + +state 620 + + 1236 on_opt: ON . + + $default reduce using rule 1236 (on_opt) + + +state 621 + + 740 merge_statement: MERGE name sort_keys . $@86 sort_collating_opt $@87 merge_using $@88 sort_output + 751 sort_keys: sort_keys . sort_key + + ON shift, and go to state 620 + + DIRECTION reduce using rule 1235 (on_opt) + $default reduce using rule 737 ($@86) + + $@86 go to state 810 + sort_key go to state 811 + on_opt go to state 623 + + +state 622 + + 750 sort_keys: sort_key . + + $default reduce using rule 750 (sort_keys) + + +state 623 + + 754 sort_key: on_opt . DIRECTION key_opt sort_keys_names + + DIRECTION shift, and go to state 812 + + +state 624 + + 1288 name_var: gname . + + $default reduce using rule 1288 (name_var) + + +state 625 + + 771 move_statement: MOVE CORRESPONDING name_var . TO name_var + + TO shift, and go to state 813 + + +state 626 + + 772 move_statement: MOVE LENGTH OF . gname TO name_var + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gname go to state 814 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 627 + + 770 move_statement: MOVE gname TO . name_var_list + 773 | MOVE gname TO . + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + $default reduce using rule 773 (move_statement) + + name_var_list go to state 815 + gname go to state 624 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + name_var go to state 816 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 628 + + 812 end_multiply_opt: END_MULTIPLY . + + $default reduce using rule 812 (end_multiply_opt) + + +state 629 + + 807 multiply_statement: MULTIPLY multiply_body end_multiply_opt . + + $default reduce using rule 807 (multiply_statement) + + +state 630 + + 809 multiply_body: gname BY . gname GIVING var_list_name on_size_error_opt + 810 | gname BY . var_list_name on_size_error_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + var_list_name go to state 817 + gname go to state 818 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 738 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 631 + + 871 open_options: open_options open_mode . open_varlist + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + open_varlist go to state 819 + name go to state 633 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 632 + + 870 open_options: open_mode open_varlist . + 878 open_varlist: open_varlist . sep_opt name + + LISTSEP shift, and go to state 98 + + VARIABLE reduce using rule 1214 (sep_opt) + SUBSCVAR reduce using rule 1214 (sep_opt) + LABELSTR reduce using rule 1214 (sep_opt) + $default reduce using rule 870 (open_options) + + sep_opt go to state 820 + + +state 633 + + 877 open_varlist: name . + + $default reduce using rule 877 (open_varlist) + + +state 634 + + 1302 label: LABELSTR in_of . LABELSTR + + LABELSTR shift, and go to state 821 + + +state 635 + + 1305 label: NLITERAL in_of . NLITERAL + 1306 | NLITERAL in_of . LABELSTR + + LABELSTR shift, and go to state 822 + NLITERAL shift, and go to state 823 + + +state 636 + + 1151 perform_options: with_test_opt UNTIL . @131 condition @132 perform_statements $@133 END_PERFORM + + $default reduce using rule 1148 (@131) + + @131 go to state 824 + + +state 637 + + 1155 perform_options: with_test_opt VARYING . name FROM gname by_opt gname UNTIL @134 condition @135 perform_after_opt perform_statements $@136 END_PERFORM + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + name go to state 825 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 638 + + 1144 perform_options: perform_statements END_PERFORM . + + $default reduce using rule 1144 (perform_options) + + +state 639 + + 1177 perform_statements: $@141 statement_list . + + $default reduce using rule 1177 (perform_statements) + + +state 640 + + 596 statement_list: statements . + 598 statements: statements . statement + + READ shift, and go to state 254 + WRITE shift, and go to state 255 + RELEASE shift, and go to state 256 + ACCEPT shift, and go to state 257 + ADD shift, and go to state 258 + CALL shift, and go to state 259 + CALL_LOADLIB shift, and go to state 260 + CANCEL shift, and go to state 261 + CHAIN shift, and go to state 262 + CLOSE shift, and go to state 263 + COMPUTE shift, and go to state 264 + CONTINUE shift, and go to state 265 + DELETE shift, and go to state 266 + DISPLAY shift, and go to state 267 + DIVIDE shift, and go to state 268 + EVALUATE shift, and go to state 269 + EXIT shift, and go to state 270 + GENERATE shift, and go to state 271 + GO shift, and go to state 272 + GOBACK shift, and go to state 273 + IF shift, and go to state 274 + INITIALIZE shift, and go to state 275 + INITIATE shift, and go to state 276 + INSPECT shift, and go to state 277 + MERGE shift, and go to state 278 + MOVE shift, and go to state 279 + MULTIPLY shift, and go to state 280 + OPEN shift, and go to state 281 + PERFORM shift, and go to state 282 + READY shift, and go to state 283 + RESET shift, and go to state 284 + RETURN shift, and go to state 285 + REWRITE shift, and go to state 286 + SEARCH shift, and go to state 287 + SET shift, and go to state 288 + SORT shift, and go to state 289 + START shift, and go to state 290 + STOP shift, and go to state 291 + STRINGCMD shift, and go to state 292 + SUBTRACT shift, and go to state 293 + TCOBPROTO1 shift, and go to state 294 + TCOBPROTO2 shift, and go to state 295 + TERMINATE shift, and go to state 296 + UNLOCK shift, and go to state 297 + UNSTRING shift, and go to state 298 + + READ [reduce using rule 596 (statement_list)] + WRITE [reduce using rule 596 (statement_list)] + RELEASE [reduce using rule 596 (statement_list)] + ACCEPT [reduce using rule 596 (statement_list)] + ADD [reduce using rule 596 (statement_list)] + CALL [reduce using rule 596 (statement_list)] + CALL_LOADLIB [reduce using rule 596 (statement_list)] + CANCEL [reduce using rule 596 (statement_list)] + CHAIN [reduce using rule 596 (statement_list)] + CLOSE [reduce using rule 596 (statement_list)] + COMPUTE [reduce using rule 596 (statement_list)] + CONTINUE [reduce using rule 596 (statement_list)] + DELETE [reduce using rule 596 (statement_list)] + DISPLAY [reduce using rule 596 (statement_list)] + DIVIDE [reduce using rule 596 (statement_list)] + EVALUATE [reduce using rule 596 (statement_list)] + EXIT [reduce using rule 596 (statement_list)] + GENERATE [reduce using rule 596 (statement_list)] + GO [reduce using rule 596 (statement_list)] + GOBACK [reduce using rule 596 (statement_list)] + IF [reduce using rule 596 (statement_list)] + INITIALIZE [reduce using rule 596 (statement_list)] + INITIATE [reduce using rule 596 (statement_list)] + INSPECT [reduce using rule 596 (statement_list)] + MERGE [reduce using rule 596 (statement_list)] + MOVE [reduce using rule 596 (statement_list)] + MULTIPLY [reduce using rule 596 (statement_list)] + OPEN [reduce using rule 596 (statement_list)] + PERFORM [reduce using rule 596 (statement_list)] + READY [reduce using rule 596 (statement_list)] + RESET [reduce using rule 596 (statement_list)] + RETURN [reduce using rule 596 (statement_list)] + REWRITE [reduce using rule 596 (statement_list)] + SEARCH [reduce using rule 596 (statement_list)] + SET [reduce using rule 596 (statement_list)] + SORT [reduce using rule 596 (statement_list)] + START [reduce using rule 596 (statement_list)] + STOP [reduce using rule 596 (statement_list)] + STRINGCMD [reduce using rule 596 (statement_list)] + SUBTRACT [reduce using rule 596 (statement_list)] + TCOBPROTO1 [reduce using rule 596 (statement_list)] + TCOBPROTO2 [reduce using rule 596 (statement_list)] + TERMINATE [reduce using rule 596 (statement_list)] + UNLOCK [reduce using rule 596 (statement_list)] + UNSTRING [reduce using rule 596 (statement_list)] + $default reduce using rule 596 (statement_list) + + statement go to state 493 + perform_statement go to state 301 + if_statement go to state 302 + search_statement go to state 303 + evaluate_statement go to state 304 + if_part go to state 305 + unlock_statement go to state 306 + proto_statement go to state 307 + trace_statement go to state 308 + initiate_statement go to state 309 + generate_statement go to state 310 + terminate_statement go to state 311 + cancel_statement go to state 312 + merge_statement go to state 313 + sort_statement go to state 314 + sort_file go to state 315 + sort_variable_indexed go to state 316 + move_statement go to state 317 + initialize_statement go to state 318 + compute_statement go to state 319 + add_statement go to state 320 + subtract_statement go to state 321 + multiply_statement go to state 322 + divide_statement go to state 323 + accept_statement go to state 324 + accept_hardware go to state 325 + accept_chronological go to state 326 + accept_screen go to state 327 + display_statement go to state 328 + display_line go to state 329 + display_screen go to state 330 + open_statement go to state 331 + close_statement go to state 332 + return_statement go to state 333 + read_statement go to state 334 + release_statement go to state 335 + write_statement go to state 336 + rewrite_statement go to state 337 + delete_statement go to state 338 + start_statement go to state 339 + goto_statement go to state 340 + call_statement go to state 341 + call_loadlib_statement go to state 342 + chain_statement go to state 343 + exit_statement go to state 344 + stop_statement go to state 345 + goback_statement go to state 346 + set_statement go to state 347 + string_statement go to state 348 + unstring_statement go to state 349 + inspect_statement go to state 350 + + +state 641 + + 1166 with_test_opt: with_opt TEST . before_after + + AFTER shift, and go to state 712 + BEFORE shift, and go to state 713 + + before_after go to state 826 + + +state 642 + + 1147 perform_options: gname TIMES . @129 perform_statements $@130 END_PERFORM + + $default reduce using rule 1145 (@129) + + @129 go to state 827 + + +state 643 + + 1164 perform_thru_opt: THRU . label + + LABELSTR shift, and go to state 582 + NLITERAL shift, and go to state 583 + + label go to state 828 + + +state 644 + + 1156 perform_options: label perform_thru_opt . + 1158 | label perform_thru_opt . with_test_opt UNTIL @137 condition + 1159 | label perform_thru_opt . gname TIMES + 1162 | label perform_thru_opt . with_test_opt VARYING name FROM gname by_opt gname UNTIL @138 condition @139 perform_after_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + WITH shift, and go to state 358 + ZERO shift, and go to state 69 + + TEST reduce using rule 1233 (with_opt) + UNTIL reduce using rule 1165 (with_test_opt) + VARYING reduce using rule 1165 (with_test_opt) + $default reduce using rule 1156 (perform_options) + + with_test_opt go to state 829 + with_opt go to state 451 + gname go to state 830 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 645 + + 929 end_return_opt: END_RETURN . + + $default reduce using rule 929 (end_return_opt) + + +state 646 + + 894 return_statement: RETURN return_body end_return_opt . + + $default reduce using rule 894 (return_statement) + + +state 647 + + 896 return_body: name record_opt . read_into_opt + 897 | name record_opt . read_into_opt read_at_end_opt + + INTO shift, and go to state 831 + + $default reduce using rule 906 (read_into_opt) + + read_into_opt go to state 832 + + +state 648 + + 943 rewrite_statement: REWRITE name write_from_opt . $@102 invalid_key_opt end_rewrite_opt + + $default reduce using rule 942 ($@102) + + $@102 go to state 833 + + +state 649 + + 649 search_statement: SEARCH ALL search_all . end_search_opt + + END_SEARCH shift, and go to state 651 + + END_SEARCH [reduce using rule 725 (end_search_opt)] + $default reduce using rule 725 (end_search_opt) + + end_search_opt go to state 834 + + +state 650 + + 701 search_all: variable_indexed . @79 search_at_end $@80 search_all_when_list + + $default reduce using rule 699 (@79) + + @79 go to state 835 + + +state 651 + + 726 end_search_opt: END_SEARCH . + + $default reduce using rule 726 (end_search_opt) + + +state 652 + + 648 search_statement: SEARCH search end_search_opt . + + $default reduce using rule 648 (search_statement) + + +state 653 + + 698 search: variable_indexed @76 . search_varying_opt @77 search_at_end @78 search_when_list + + VARYING shift, and go to state 836 + + $default reduce using rule 703 (search_varying_opt) + + search_varying_opt go to state 837 + + +state 654 + + 317 of_opt: OF . + + $default reduce using rule 317 (of_opt) + + +state 655 + + 1025 address_of_opt: ADDRESS of_opt . + + $default reduce using rule 1025 (address_of_opt) + + +state 656 + + 173 name_list: name_list variable . + + $default reduce using rule 173 (name_list) + + +state 657 + + 1011 set_list: set_target TO . address_of_opt set_variable_or_nlit + + ADDRESS shift, and go to state 464 + + $default reduce using rule 1024 (address_of_opt) + + address_of_opt go to state 838 + + +state 658 + + 1013 set_list: set_target DOWN . BY var_or_nliteral + + BY shift, and go to state 839 + + +state 659 + + 1012 set_list: set_target UP . BY var_or_nliteral + + BY shift, and go to state 840 + + +state 660 + + 1014 set_list: address_of_opt variable . TO address_of_opt set_variable + + TO shift, and go to state 841 + + +state 661 + + 749 sort_variable_indexed: SORT variable_indexed sort_keys_idx . $@92 sort_duplicates_opt sort_collating_opt + 753 sort_keys_idx: sort_keys_idx . sort_key_idx + + ON shift, and go to state 620 + + DIRECTION reduce using rule 1235 (on_opt) + $default reduce using rule 748 ($@92) + + $@92 go to state 842 + sort_key_idx go to state 843 + on_opt go to state 663 + + +state 662 + + 752 sort_keys_idx: sort_key_idx . + + $default reduce using rule 752 (sort_keys_idx) + + +state 663 + + 755 sort_key_idx: on_opt . DIRECTION key_opt sort_keys_names_idx + + DIRECTION shift, and go to state 844 + + +state 664 + + 747 sort_file: SORT name sort_keys . $@89 sort_duplicates_opt sort_collating_opt $@90 sort_input $@91 sort_output + 751 sort_keys: sort_keys . sort_key + + ON shift, and go to state 620 + + DIRECTION reduce using rule 1235 (on_opt) + $default reduce using rule 744 ($@89) + + $@89 go to state 845 + sort_key go to state 811 + on_opt go to state 623 + + +state 665 + + 1070 not_excep: NOT . + + $default reduce using rule 1070 (not_excep) + + +state 666 + + 1066 invalid_key_sentence: INVALID . key_opt @124 statement_list + + KEY shift, and go to state 846 + + $default reduce using rule 1216 (key_opt) + + key_opt go to state 847 + + +state 667 + + 1069 not_excep: NOTEXCEP . + + $default reduce using rule 1069 (not_excep) + + +state 668 + + 951 start_statement: START start_body invalid_key_opt . $@104 end_start_opt + + $default reduce using rule 950 ($@104) + + $@104 go to state 848 + + +state 669 + + 1061 invalid_key_opt: invalid_key_sentence . + 1063 | invalid_key_sentence . not_invalid_key_sentence + + NOT shift, and go to state 665 + NOTEXCEP shift, and go to state 667 + + NOT [reduce using rule 1061 (invalid_key_opt)] + NOTEXCEP [reduce using rule 1061 (invalid_key_opt)] + $default reduce using rule 1061 (invalid_key_opt) + + not_invalid_key_sentence go to state 849 + not_excep go to state 671 + + +state 670 + + 1062 invalid_key_opt: not_invalid_key_sentence . + + $default reduce using rule 1062 (invalid_key_opt) + + +state 671 + + 1068 not_invalid_key_sentence: not_excep . INVALID key_opt @125 statement_list + + INVALID shift, and go to state 850 + + +state 672 + + 953 start_body: name KEY . is_opt cond_op name + + IS shift, and go to state 84 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 851 + + +state 673 + + 1027 string_statement: STRINGCMD string_from_list INTO . name string_with_pointer $@117 on_overflow_opt end_stringcmd_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + name go to state 852 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 674 + + 1074 string_from_list: string_from_list sep_opt . string_from + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + string_from go to state 853 + gname go to state 483 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 675 + + 1077 string_from: gname DELIMITED . by_opt delimited_by + + BY shift, and go to state 854 + + $default reduce using rule 1231 (by_opt) + + by_opt go to state 855 + + +state 676 + + 804 subtract_body: CORRESPONDING var_list_gname . FROM var_list_name rounded_opt on_size_error_opt + 994 var_list_gname: var_list_gname . gname sep_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FROM shift, and go to state 856 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gname go to state 550 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 677 + + 806 end_subtract_opt: END_SUBTRACT . + + $default reduce using rule 806 (end_subtract_opt) + + +state 678 + + 800 subtract_statement: SUBTRACT subtract_body end_subtract_opt . + + $default reduce using rule 800 (subtract_statement) + + +state 679 + + 802 subtract_body: var_list_gname FROM . var_list_name on_size_error_opt + 803 | var_list_gname FROM . gname GIVING var_list_name on_size_error_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + var_list_name go to state 857 + gname go to state 858 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 738 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 680 + + 729 proto_statement: TCOBPROTO2 gname gname . + + $default reduce using rule 729 (proto_statement) + + +state 681 + + 1030 unstring_delimited: DELIMITED . by_opt unstring_delimited_vars + + BY shift, and go to state 854 + + $default reduce using rule 1231 (by_opt) + + by_opt go to state 859 + + +state 682 + + 1029 unstring_statement: UNSTRING name unstring_delimited . INTO unstring_destinations string_with_pointer unstring_tallying $@118 on_overflow_opt end_unstring_opt + + INTO shift, and go to state 860 + + +state 683 + + 647 if_statement: if_part ELSE @60 . conditional_statement $@61 end_if_opt + + NEXT reduce using rule 687 ($@75) + $default reduce using rule 685 ($@74) + + conditional_statement go to state 861 + $@74 go to state 862 + $@75 go to state 863 + + +state 684 + + 692 end_if_opt: END_IF . + + $default reduce using rule 692 (end_if_opt) + + +state 685 + + 644 if_statement: if_part $@59 end_if_opt . + + $default reduce using rule 644 (if_statement) + + +state 686 + + 43 collating_sequence: collating_opt SEQUENCE . is_opt STRING + + IS shift, and go to state 84 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 864 + + +state 687 + + 46 debug_mode_opt: with_opt DEBUGGING MODE . + + $default reduce using rule 46 (debug_mode_opt) + + +state 688 + + 87 alphabet_literal_list: alphabet_literal_list alphabet_literal_item . + + $default reduce using rule 87 (alphabet_literal_list) + + +state 689 + + 89 alphabet_literal_item: without_all_literal THRU . without_all_literal + + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + without_all_literal go to state 865 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + + +state 690 + + 91 alphabet_also_list: ALSO . without_all_literal + + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + without_all_literal go to state 866 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + + +state 691 + + 90 alphabet_literal_item: without_all_literal alphabet_also_list . + 92 alphabet_also_list: alphabet_also_list . ALSO without_all_literal + + ALSO shift, and go to state 867 + + $default reduce using rule 90 (alphabet_literal_item) + + +state 692 + + 67 special_name_class_item: CLITERAL THRU . CLITERAL + + CLITERAL shift, and go to state 868 + + +state 693 + + 65 special_name_class_item_list: special_name_class_item_list special_name_class_item . + + $default reduce using rule 65 (special_name_class_item_list) + + +state 694 + + 74 switches_details: STRING is_opt STRING $@9 . switch_on_opt switch_off_opt + + ON shift, and go to state 869 + + $default reduce using rule 76 (switch_on_opt) + + switch_on_opt go to state 870 + + +state 695 + + 103 file_select: SELECT optional_opt def_name $@10 select_clauses . PERIOD_TOK + 104 select_clauses: select_clauses . select_clause + + error shift, and go to state 871 + ACCESS shift, and go to state 872 + ALTERNATE shift, and go to state 873 + ASSIGN shift, and go to state 874 + FILE_TOK shift, and go to state 875 + ORGANIZATION shift, and go to state 876 + RECORD shift, and go to state 877 + RELATIVE shift, and go to state 878 + RESERVE shift, and go to state 879 + PERIOD_TOK shift, and go to state 880 + + STRING reduce using rule 118 (organization_opt) + LABELSTR reduce using rule 118 (organization_opt) + IS reduce using rule 118 (organization_opt) + INDEXED reduce using rule 118 (organization_opt) + LINE reduce using rule 118 (organization_opt) + RELATIVE [reduce using rule 118 (organization_opt)] + SEQUENTIAL reduce using rule 118 (organization_opt) + STATUS reduce using rule 116 (file_opt) + + select_clause go to state 881 + file_opt go to state 882 + organization_opt go to state 883 + + +state 696 + + 546 contains_opt: CONTAINS . + + $default reduce using rule 546 (contains_opt) + + +state 697 + + 157 i_o_control_multiple_file_tape_clause: MULTIPLE FILE_TOK tape_opt contains_opt . i_o_control_multiple_file_list + + STRING shift, and go to state 884 + + i_o_control_multiple_file_list go to state 885 + i_o_control_multiple_file go to state 886 + + +state 698 + + 167 for_opt: FOR . + + $default reduce using rule 167 (for_opt) + + +state 699 + + 152 i_o_control_same_clause: SAME same_clause_options are_opta for_opt . string_list + + error shift, and go to state 887 + STRING shift, and go to state 888 + + string_list go to state 889 + + +state 700 + + 419 file_section: file_section FD $@38 STRING $@39 file_description_fd_clauses . PERIOD_TOK $@40 file_description + 484 file_description_fd_clauses: file_description_fd_clauses . file_description_fd_clause + + IS shift, and go to state 84 + BLOCK shift, and go to state 890 + CODE_SET shift, and go to state 891 + DATA shift, and go to state 892 + LABEL shift, and go to state 893 + LINAGE shift, and go to state 894 + RECORD shift, and go to state 895 + REPORT shift, and go to state 896 + REPORTS shift, and go to state 897 + VALUE shift, and go to state 898 + PERIOD_TOK shift, and go to state 899 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 900 + file_description_fd_clause go to state 901 + file_description_clause_block go to state 902 + file_description_clause_record go to state 903 + file_description_clause_label go to state 904 + file_description_clause_value go to state 905 + file_description_clause_data go to state 906 + file_description_clause_report go to state 907 + file_description_clause_code_set go to state 908 + file_description_clause_linage go to state 909 + report_is_are go to state 910 + + +state 701 + + 423 file_section: file_section SD $@41 STRING $@42 file_description_sd_clauses . PERIOD_TOK $@43 file_description + 486 file_description_sd_clauses: file_description_sd_clauses . file_description_sd_clause + + DATA shift, and go to state 892 + RECORD shift, and go to state 895 + PERIOD_TOK shift, and go to state 911 + + file_description_sd_clause go to state 912 + file_description_clause_record go to state 913 + file_description_clause_data go to state 914 + + +state 702 + + 429 field_description: integer def_name_opt $@44 data_clauses . PERIOD_TOK + 431 data_clauses: data_clauses . data_clause + 432 | data_clauses . redefines_clause + + IS shift, and go to state 84 + BLANK shift, and go to state 915 + JUSTIFIED shift, and go to state 916 + OCCURS shift, and go to state 917 + PICTURE shift, and go to state 918 + REDEFINES shift, and go to state 919 + RENAMES shift, and go to state 920 + SIGN shift, and go to state 921 + SYNCHRONIZED shift, and go to state 922 + USAGE shift, and go to state 923 + VALUE shift, and go to state 924 + VALUES shift, and go to state 925 + PERIOD_TOK shift, and go to state 926 + + USAGENUM reduce using rule 539 (usage_opt) + IS [reduce using rule 539 (usage_opt)] + DISPLAY reduce using rule 539 (usage_opt) + POINTER reduce using rule 539 (usage_opt) + $default reduce using rule 132 (is_opt) + + is_opt go to state 927 + sign_clause go to state 928 + sign_is_opt go to state 929 + redefines_clause go to state 930 + data_clause go to state 931 + array_options go to state 932 + usage_option go to state 933 + value_option go to state 934 + value_is_are go to state 935 + pictures go to state 936 + usage_opt go to state 937 + + +state 703 + + 194 report_section: RD $@15 STRING . $@16 report_controls PERIOD_TOK $@17 report_description + + $default reduce using rule 192 ($@16) + + $@16 go to state 938 + + +state 704 + + 322 screen_section: screen_section screen_item . + + $default reduce using rule 322 (screen_section) + + +state 705 + + 325 screen_item: integer . def_name_opt $@28 screen_clauses PERIOD_TOK + + STRING shift, and go to state 368 + FILLER shift, and go to state 369 + + $default reduce using rule 1274 (def_name_opt) + + def_name_opt go to state 939 + def_name go to state 381 + + +state 706 + + 580 declaratives_decl: error $@57 . PERIOD_TOK + + PERIOD_TOK shift, and go to state 940 + + +state 707 + + 571 declaratives_opt: DECLARATIVES PERIOD_TOK $@55 declaratives_procedure declaratives_division END DECLARATIVES . PERIOD_TOK + + PERIOD_TOK shift, and go to state 941 + + +state 708 + + 578 declaratives_decl: $@56 statements . PERIOD_TOK + 598 statements: statements . statement + + READ shift, and go to state 254 + WRITE shift, and go to state 255 + RELEASE shift, and go to state 256 + ACCEPT shift, and go to state 257 + ADD shift, and go to state 258 + CALL shift, and go to state 259 + CALL_LOADLIB shift, and go to state 260 + CANCEL shift, and go to state 261 + CHAIN shift, and go to state 262 + CLOSE shift, and go to state 263 + COMPUTE shift, and go to state 264 + CONTINUE shift, and go to state 265 + DELETE shift, and go to state 266 + DISPLAY shift, and go to state 267 + DIVIDE shift, and go to state 268 + EVALUATE shift, and go to state 269 + EXIT shift, and go to state 270 + GENERATE shift, and go to state 271 + GO shift, and go to state 272 + GOBACK shift, and go to state 273 + IF shift, and go to state 274 + INITIALIZE shift, and go to state 275 + INITIATE shift, and go to state 276 + INSPECT shift, and go to state 277 + MERGE shift, and go to state 278 + MOVE shift, and go to state 279 + MULTIPLY shift, and go to state 280 + OPEN shift, and go to state 281 + PERFORM shift, and go to state 282 + READY shift, and go to state 283 + RESET shift, and go to state 284 + RETURN shift, and go to state 285 + REWRITE shift, and go to state 286 + SEARCH shift, and go to state 287 + SET shift, and go to state 288 + SORT shift, and go to state 289 + START shift, and go to state 290 + STOP shift, and go to state 291 + STRINGCMD shift, and go to state 292 + SUBTRACT shift, and go to state 293 + TCOBPROTO1 shift, and go to state 294 + TCOBPROTO2 shift, and go to state 295 + TERMINATE shift, and go to state 296 + UNLOCK shift, and go to state 297 + UNSTRING shift, and go to state 298 + PERIOD_TOK shift, and go to state 942 + + statement go to state 493 + perform_statement go to state 301 + if_statement go to state 302 + search_statement go to state 303 + evaluate_statement go to state 304 + if_part go to state 305 + unlock_statement go to state 306 + proto_statement go to state 307 + trace_statement go to state 308 + initiate_statement go to state 309 + generate_statement go to state 310 + terminate_statement go to state 311 + cancel_statement go to state 312 + merge_statement go to state 313 + sort_statement go to state 314 + sort_file go to state 315 + sort_variable_indexed go to state 316 + move_statement go to state 317 + initialize_statement go to state 318 + compute_statement go to state 319 + add_statement go to state 320 + subtract_statement go to state 321 + multiply_statement go to state 322 + divide_statement go to state 323 + accept_statement go to state 324 + accept_hardware go to state 325 + accept_chronological go to state 326 + accept_screen go to state 327 + display_statement go to state 328 + display_line go to state 329 + display_screen go to state 330 + open_statement go to state 331 + close_statement go to state 332 + return_statement go to state 333 + read_statement go to state 334 + release_statement go to state 335 + write_statement go to state 336 + rewrite_statement go to state 337 + delete_statement go to state 338 + start_statement go to state 339 + goto_statement go to state 340 + call_statement go to state 341 + call_loadlib_statement go to state 342 + chain_statement go to state 343 + exit_statement go to state 344 + stop_statement go to state 345 + goback_statement go to state 346 + set_statement go to state 347 + string_statement go to state 348 + unstring_statement go to state 349 + inspect_statement go to state 350 + + +state 709 + + 584 use_phrase: USE AFTER . use_phrase_exception_error PROCEDURE on_opt use_phrase_option PERIOD_TOK + + ERROR_TOK shift, and go to state 943 + EXCEPTION shift, and go to state 944 + STANDARD shift, and go to state 945 + + use_phrase_exception_error go to state 946 + + +state 710 + + 900 read_body: name read_next_opt record_opt . read_into_opt with_lock_opt read_key_opt + 901 | name read_next_opt record_opt . read_into_opt with_lock_opt read_key_opt read_at_end_opt + 902 | name read_next_opt record_opt . read_into_opt with_lock_opt read_key_opt read_invalid_key_opt + + INTO shift, and go to state 831 + + $default reduce using rule 906 (read_into_opt) + + read_into_opt go to state 947 + + +state 711 + + 936 write_from_opt: FROM gname . + + $default reduce using rule 936 (write_from_opt) + + +state 712 + + 1179 before_after: AFTER . + + $default reduce using rule 1179 (before_after) + + +state 713 + + 1178 before_after: BEFORE . + + $default reduce using rule 1178 (before_after) + + +state 714 + + 934 write_statement: WRITE name write_from_opt write_options . $@101 invalid_key_opt end_write_opt + + $default reduce using rule 933 ($@101) + + $@101 go to state 948 + + +state 715 + + 938 write_options: before_after . advancing_opt gname line_lines_opt + 939 | before_after . advancing_opt PAGE + + ADVANCING shift, and go to state 949 + + $default reduce using rule 1218 (advancing_opt) + + advancing_opt go to state 950 + + +state 716 + + 932 release_from_opt: FROM gname . + + $default reduce using rule 932 (release_from_opt) + + +state 717 + + 828 accept_hardware: ACCEPT name FROM CMD_LINE . end_accept_opt + + END_ACCEPT shift, and go to state 725 + + END_ACCEPT [reduce using rule 837 (end_accept_opt)] + $default reduce using rule 837 (end_accept_opt) + + end_accept_opt go to state 951 + + +state 718 + + 830 accept_hardware: ACCEPT name FROM ENVIRONMENT_VARIABLE . CLITERAL end_accept_opt + + CLITERAL shift, and go to state 952 + + +state 719 + + 826 accept_hardware: ACCEPT name FROM INKEY . end_accept_opt + + END_ACCEPT shift, and go to state 725 + + END_ACCEPT [reduce using rule 837 (end_accept_opt)] + $default reduce using rule 837 (end_accept_opt) + + end_accept_opt go to state 953 + + +state 720 + + 829 accept_hardware: ACCEPT name FROM ESCKEY . end_accept_opt + + END_ACCEPT shift, and go to state 725 + + END_ACCEPT [reduce using rule 837 (end_accept_opt)] + $default reduce using rule 837 (end_accept_opt) + + end_accept_opt go to state 954 + + +state 721 + + 831 accept_chronological: ACCEPT name FROM DATE_TIME . end_accept_opt + + END_ACCEPT shift, and go to state 725 + + END_ACCEPT [reduce using rule 837 (end_accept_opt)] + $default reduce using rule 837 (end_accept_opt) + + end_accept_opt go to state 955 + + +state 722 + + 827 accept_hardware: ACCEPT name FROM INPUT . STATUS end_accept_opt + + STATUS shift, and go to state 956 + + +state 723 + + 860 scr_line_position: AT . NLITERAL + 861 | AT . variable + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + NLITERAL shift, and go to state 957 + + variable go to state 958 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 724 + + 858 scr_position: COLUMN . number_opt expr + + NUMBER shift, and go to state 959 + + $default reduce using rule 306 (number_opt) + + number_opt go to state 960 + + +state 725 + + 838 end_accept_opt: END_ACCEPT . + + $default reduce using rule 838 (end_accept_opt) + + +state 726 + + 857 scr_line: LINE . number_opt expr + + NUMBER shift, and go to state 959 + + $default reduce using rule 306 (number_opt) + + number_opt go to state 961 + + +state 727 + + 859 scr_position: POSITION . expr + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + '(' shift, and go to state 752 + + expr go to state 962 + gname go to state 427 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 728 + + 832 accept_screen: ACCEPT name accept_display_options end_accept_opt . + + $default reduce using rule 832 (accept_screen) + + +state 729 + + 865 accept_display_option: scr_line . + + $default reduce using rule 865 (accept_display_option) + + +state 730 + + 866 accept_display_option: scr_position . + + $default reduce using rule 866 (accept_display_option) + + +state 731 + + 867 accept_display_option: scr_line_position . + + $default reduce using rule 867 (accept_display_option) + + +state 732 + + 863 accept_display_options: accept_display_options accept_display_option . + + $default reduce using rule 863 (accept_display_options) + + +state 733 + + 864 accept_display_option: with_opt . screen_attribx + + IS shift, and go to state 84 + AUTO shift, and go to state 963 + BACKGROUNDCOLOR shift, and go to state 964 + BLANK shift, and go to state 965 + BLINK shift, and go to state 966 + ERASE shift, and go to state 967 + FOREGROUNDCOLOR shift, and go to state 968 + FULL shift, and go to state 969 + HIGHLIGHT shift, and go to state 970 + JUSTIFIED shift, and go to state 971 + LOWER shift, and go to state 972 + LOWLIGHT shift, and go to state 973 + REQUIRED shift, and go to state 974 + REVERSEVIDEO shift, and go to state 975 + SECURE shift, and go to state 976 + SIGN shift, and go to state 921 + UNDERLINE shift, and go to state 977 + UPPER shift, and go to state 978 + WITH shift, and go to state 358 + + LEADING reduce using rule 132 (is_opt) + TRAILING reduce using rule 132 (is_opt) + $default reduce using rule 1233 (with_opt) + + is_opt go to state 979 + screen_attribx go to state 980 + sign_clause go to state 981 + sign_is_opt go to state 929 + with_opt go to state 982 + + +state 734 + + 836 accept_screen: ACCEPT name accept_display_options on_opt . EXCEPTION $@93 variable @94 statement_list $@95 end_accept_opt + + EXCEPTION shift, and go to state 983 + + +state 735 + + 795 add_body: CORRESPONDING var_list_gname TO . var_list_name rounded_opt on_size_error_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + var_list_name go to state 984 + name go to state 410 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 736 + + 793 add_body: var_list_gname TO var_list_name . on_size_error_opt + 992 var_list_name: var_list_name . name rounded_opt sep_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NOT shift, and go to state 985 + ON shift, and go to state 620 + + NOT [reduce using rule 997 (on_size_error_opt)] + SIZE reduce using rule 1235 (on_opt) + $default reduce using rule 997 (on_size_error_opt) + + on_size_error_opt go to state 986 + on_opt go to state 987 + name go to state 567 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 737 + + 797 add_to_opt: TO gname . + + $default reduce using rule 797 (add_to_opt) + + +state 738 + + 991 var_list_name: name . rounded_opt sep_opt + 1245 gname: name . + + ROUNDED shift, and go to state 568 + + GIVING reduce using rule 1245 (gname) + $default reduce using rule 995 (rounded_opt) + + rounded_opt go to state 569 + + +state 739 + + 794 add_body: var_list_gname add_to_opt GIVING . var_list_name on_size_error_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + var_list_name go to state 988 + name go to state 410 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 740 + + 994 var_list_gname: var_list_gname gname sep_opt . + + $default reduce using rule 994 (var_list_gname) + + +state 741 + + 967 call_statement: CALL $@105 call_convention_opt gname . using_options returning_options @106 @107 @108 on_exception_or_overflow on_not_exception $@109 end_call_opt + + USING shift, and go to state 744 + + $default reduce using rule 1122 (using_options) + + using_options go to state 989 + + +state 742 + + 975 end_call_loadlib_opt: END_CALL_LOADLIB . + + $default reduce using rule 975 (end_call_loadlib_opt) + + +state 743 + + 973 call_loadlib_statement: CALL_LOADLIB gname $@110 end_call_loadlib_opt . + + $default reduce using rule 973 (call_loadlib_statement) + + +state 744 + + 1125 using_options: USING . @127 dummy @128 parm_list + + $default reduce using rule 1123 (@127) + + @127 go to state 990 + + +state 745 + + 981 chain_statement: CHAIN $@111 gname using_options . @112 @113 on_exception_or_overflow $@114 end_chain_opt + + $default reduce using rule 978 (@112) + + @112 go to state 991 + + +state 746 + + 882 close_files: close_files sep_opt close_file . + + $default reduce using rule 882 (close_files) + + +state 747 + + 889 close_options: REEL for_opt . REMOVAL + + REMOVAL shift, and go to state 992 + + +state 748 + + 890 close_options: UNIT for_opt . REMOVAL + + REMOVAL shift, and go to state 993 + + +state 749 + + 886 close_options: with_opt NO . REWIND + + REWIND shift, and go to state 994 + + +state 750 + + 892 with_lock_opt: with_opt IGNORE . LOCK + + LOCK shift, and go to state 995 + + +state 751 + + 891 with_lock_opt: with_opt LOCK . + + $default reduce using rule 891 (with_lock_opt) + + +state 752 + + 1119 expr: '(' . expr ')' + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + '(' shift, and go to state 752 + + expr go to state 996 + gname go to state 427 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 753 + + 788 compute_body: var_list_name CONDITIONAL expr . on_size_error_opt + 1114 expr: expr . '*' expr + 1115 | expr . '/' expr + 1116 | expr . '+' expr + 1117 | expr . '-' expr + 1118 | expr . POW_OP expr + + '+' shift, and go to state 593 + '-' shift, and go to state 594 + '*' shift, and go to state 595 + '/' shift, and go to state 596 + POW_OP shift, and go to state 597 + NOT shift, and go to state 985 + ON shift, and go to state 620 + + NOT [reduce using rule 997 (on_size_error_opt)] + SIZE reduce using rule 1235 (on_opt) + $default reduce using rule 997 (on_size_error_opt) + + on_size_error_opt go to state 997 + on_opt go to state 987 + + +state 754 + + 992 var_list_name: var_list_name name rounded_opt . sep_opt + + LISTSEP shift, and go to state 98 + + $default reduce using rule 1214 (sep_opt) + + sep_opt go to state 998 + + +state 755 + + 991 var_list_name: name rounded_opt sep_opt . + + $default reduce using rule 991 (var_list_name) + + +state 756 + + 947 delete_statement: DELETE name record_opt $@103 . invalid_key_opt end_delete_opt + + NOT shift, and go to state 665 + INVALID shift, and go to state 666 + NOTEXCEP shift, and go to state 667 + + NOT [reduce using rule 1064 (invalid_key_opt)] + NOTEXCEP [reduce using rule 1064 (invalid_key_opt)] + $default reduce using rule 1064 (invalid_key_opt) + + invalid_key_opt go to state 999 + invalid_key_sentence go to state 669 + not_invalid_key_sentence go to state 670 + not_excep go to state 671 + + +state 757 + + 846 display_upon: UPON CONSOLE . + + $default reduce using rule 846 (display_upon) + + +state 758 + + 848 display_upon: UPON STD_ERROR . + + $default reduce using rule 848 (display_upon) + + +state 759 + + 847 display_upon: UPON STD_OUTPUT . + + $default reduce using rule 847 (display_upon) + + +state 760 + + 842 display_line: DISPLAY display_varlist display_upon display_line_options . end_display_opt + 850 display_line_options: display_line_options . with_opt NO ADVANCING + 851 | display_line_options . with_opt ERASE + 852 | display_line_options . with_opt ERASE EOS + 853 | display_line_options . with_opt ERASE EOL + 854 | display_line_options . with_opt ERASE SCREEN + + END_DISPLAY shift, and go to state 761 + WITH shift, and go to state 358 + + NO reduce using rule 1233 (with_opt) + ERASE reduce using rule 1233 (with_opt) + $default reduce using rule 855 (end_display_opt) + + end_display_opt go to state 1000 + with_opt go to state 1001 + + +state 761 + + 856 end_display_opt: END_DISPLAY . + + $default reduce using rule 856 (end_display_opt) + + +state 762 + + 843 display_screen: DISPLAY display_varlist accept_display_options end_display_opt . + + $default reduce using rule 843 (display_screen) + + +state 763 + + 845 display_varlist: display_varlist sep_opt gname . + + $default reduce using rule 845 (display_varlist) + + +state 764 + + 815 divide_body: gname BY gname . GIVING var_list_name on_size_error_opt + 816 | gname BY gname . GIVING name rounded_opt REMAINDER name on_size_error_opt + + GIVING shift, and go to state 1002 + + +state 765 + + 819 divide_body: gname INTO var_list_name . on_size_error_opt + 992 var_list_name: var_list_name . name rounded_opt sep_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NOT shift, and go to state 985 + ON shift, and go to state 620 + + NOT [reduce using rule 997 (on_size_error_opt)] + SIZE reduce using rule 1235 (on_opt) + $default reduce using rule 997 (on_size_error_opt) + + on_size_error_opt go to state 1003 + on_opt go to state 987 + name go to state 567 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 766 + + 817 divide_body: gname INTO gname . GIVING name rounded_opt REMAINDER name on_size_error_opt + 818 | gname INTO gname . GIVING var_list_name on_size_error_opt + + GIVING shift, and go to state 1004 + + +state 767 + + 658 selection_subject_set: selection_subject_set ALSO . @65 selection_subject + + $default reduce using rule 657 (@65) + + @65 go to state 1005 + + +state 768 + + 652 evaluate_statement: EVALUATE @62 selection_subject_set $@63 . when_case_list end_evaluate_or_eos + + WHEN shift, and go to state 1006 + + when_case_list go to state 1007 + + +state 769 + + 662 selection_subject: FALSE_TOK . + + $default reduce using rule 662 (selection_subject) + + +state 770 + + 661 selection_subject: TRUE_TOK . + + $default reduce using rule 661 (selection_subject) + + +state 771 + + 656 selection_subject_set: @64 selection_subject . + + $default reduce using rule 656 (selection_subject_set) + + +state 772 + + 659 selection_subject: expr . + 1114 expr: expr . '*' expr + 1115 | expr . '/' expr + 1116 | expr . '+' expr + 1117 | expr . '-' expr + 1118 | expr . POW_OP expr + 1181 condition: expr . extended_cond_op $@142 expr_opt + + CONDITIONAL shift, and go to state 591 + IS shift, and go to state 592 + '+' shift, and go to state 593 + '-' shift, and go to state 594 + '*' shift, and go to state 595 + '/' shift, and go to state 596 + POW_OP shift, and go to state 597 + NOT shift, and go to state 598 + ALPHABETIC shift, and go to state 599 + ALPHABETIC_LOWER shift, and go to state 600 + ALPHABETIC_UPPER shift, and go to state 601 + NEGATIVE shift, and go to state 602 + NUMERIC shift, and go to state 603 + POSITIVE shift, and go to state 604 + ZERO shift, and go to state 605 + + $default reduce using rule 659 (selection_subject) + + sign_condition go to state 606 + class_condition go to state 607 + extended_cond_op go to state 608 + ext_cond go to state 609 + conditional go to state 610 + + +state 773 + + 660 selection_subject: condition . + 1184 condition: condition . AND @143 implied_op_condition + 1186 | condition . OR @144 implied_op_condition + + OR shift, and go to state 611 + AND shift, and go to state 612 + + $default reduce using rule 660 (selection_subject) + + +state 774 + + 957 goto_statement: GO to_opt goto_label_list DEPENDING . on_opt variable + + ON shift, and go to state 620 + + $default reduce using rule 1235 (on_opt) + + on_opt go to state 1008 + + +state 775 + + 961 goto_label_list: goto_label_list LISTSEP . label + + LABELSTR shift, and go to state 582 + NLITERAL shift, and go to state 583 + + label go to state 1009 + + +state 776 + + 960 goto_label_list: goto_label_list label . + + $default reduce using rule 960 (goto_label_list) + + +state 777 + + 1283 cond_name: VARCOND '(' $@146 . subscripts ')' + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gname go to state 149 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + subscripts go to state 1010 + subscript go to state 151 + + +state 778 + + 1119 expr: '(' expr ')' . + + $default reduce using rule 1119 (expr) + + +state 779 + + 1187 condition: '(' condition ')' . + + $default reduce using rule 1187 (condition) + + +state 780 + + 1221 than_to_opt: TO . + + $default reduce using rule 1221 (than_to_opt) + + +state 781 + + 1222 than_to_opt: THAN . + + $default reduce using rule 1222 (than_to_opt) + + +state 782 + + 1211 conditional: CONDITIONAL than_to_opt . + + $default reduce using rule 1211 (conditional) + + +state 783 + + 1200 extended_cond_op: IS NOT . ext_cond + + CONDITIONAL shift, and go to state 591 + ALPHABETIC shift, and go to state 599 + ALPHABETIC_LOWER shift, and go to state 600 + ALPHABETIC_UPPER shift, and go to state 601 + NEGATIVE shift, and go to state 602 + NUMERIC shift, and go to state 603 + POSITIVE shift, and go to state 604 + ZERO shift, and go to state 605 + + sign_condition go to state 606 + class_condition go to state 607 + ext_cond go to state 1011 + conditional go to state 610 + + +state 784 + + 1199 extended_cond_op: IS ext_cond . + 1201 | IS ext_cond . OR ext_cond + + OR shift, and go to state 1012 + + OR [reduce using rule 1199 (extended_cond_op)] + $default reduce using rule 1199 (extended_cond_op) + + +state 785 + + 1114 expr: expr . '*' expr + 1115 | expr . '/' expr + 1116 | expr . '+' expr + 1116 | expr '+' expr . + 1117 | expr . '-' expr + 1118 | expr . POW_OP expr + + '*' shift, and go to state 595 + '/' shift, and go to state 596 + POW_OP shift, and go to state 597 + + $default reduce using rule 1116 (expr) + + +state 786 + + 1114 expr: expr . '*' expr + 1115 | expr . '/' expr + 1116 | expr . '+' expr + 1117 | expr . '-' expr + 1117 | expr '-' expr . + 1118 | expr . POW_OP expr + + '*' shift, and go to state 595 + '/' shift, and go to state 596 + POW_OP shift, and go to state 597 + + $default reduce using rule 1117 (expr) + + +state 787 + + 1114 expr: expr . '*' expr + 1114 | expr '*' expr . + 1115 | expr . '/' expr + 1116 | expr . '+' expr + 1117 | expr . '-' expr + 1118 | expr . POW_OP expr + + POW_OP shift, and go to state 597 + + $default reduce using rule 1114 (expr) + + +state 788 + + 1114 expr: expr . '*' expr + 1115 | expr . '/' expr + 1115 | expr '/' expr . + 1116 | expr . '+' expr + 1117 | expr . '-' expr + 1118 | expr . POW_OP expr + + POW_OP shift, and go to state 597 + + $default reduce using rule 1115 (expr) + + +state 789 + + 1114 expr: expr . '*' expr + 1115 | expr . '/' expr + 1116 | expr . '+' expr + 1117 | expr . '-' expr + 1118 | expr . POW_OP expr + 1118 | expr POW_OP expr . + + $default reduce using rule 1118 (expr) + + +state 790 + + 1203 extended_cond_op: NOT is_opt . ext_cond + + CONDITIONAL shift, and go to state 591 + ALPHABETIC shift, and go to state 599 + ALPHABETIC_LOWER shift, and go to state 600 + ALPHABETIC_UPPER shift, and go to state 601 + NEGATIVE shift, and go to state 602 + NUMERIC shift, and go to state 603 + POSITIVE shift, and go to state 604 + ZERO shift, and go to state 605 + + sign_condition go to state 606 + class_condition go to state 607 + ext_cond go to state 1013 + conditional go to state 610 + + +state 791 + + 1181 condition: expr extended_cond_op $@142 . expr_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + '(' shift, and go to state 752 + + $default reduce using rule 1120 (expr_opt) + + expr go to state 1014 + expr_opt go to state 1015 + gname go to state 427 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 792 + + 1204 extended_cond_op: ext_cond OR . ext_cond + + CONDITIONAL shift, and go to state 591 + ALPHABETIC shift, and go to state 599 + ALPHABETIC_LOWER shift, and go to state 600 + ALPHABETIC_UPPER shift, and go to state 601 + NEGATIVE shift, and go to state 602 + NUMERIC shift, and go to state 603 + POSITIVE shift, and go to state 604 + ZERO shift, and go to state 605 + + sign_condition go to state 606 + class_condition go to state 607 + ext_cond go to state 1016 + conditional go to state 610 + + +state 793 + + 1186 condition: condition OR @144 . implied_op_condition + + VARIABLE shift, and go to state 56 + VARCOND shift, and go to state 422 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + CONDITIONAL shift, and go to state 591 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + NOT shift, and go to state 1017 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + '(' shift, and go to state 424 + + expr go to state 1018 + condition go to state 1019 + implied_op_condition go to state 1020 + cond_op go to state 1021 + conditional go to state 1022 + gname go to state 427 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + cond_name go to state 428 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 794 + + 1184 condition: condition AND @143 . implied_op_condition + + VARIABLE shift, and go to state 56 + VARCOND shift, and go to state 422 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + CONDITIONAL shift, and go to state 591 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + NOT shift, and go to state 1017 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + '(' shift, and go to state 424 + + expr go to state 1018 + condition go to state 1019 + implied_op_condition go to state 1023 + cond_op go to state 1021 + conditional go to state 1022 + gname go to state 427 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + cond_name go to state 428 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 795 + + 694 end_then_opt: THEN . + + $default reduce using rule 694 (end_then_opt) + + +state 796 + + 684 if_part: IF condition @73 end_then_opt . conditional_statement + + NEXT reduce using rule 687 ($@75) + $default reduce using rule 685 ($@74) + + conditional_statement go to state 1024 + $@74 go to state 862 + $@75 go to state 863 + + +state 797 + + 781 initialize_type_list: ALPHABETIC . + + $default reduce using rule 781 (initialize_type_list) + + +state 798 + + 782 initialize_type_list: ALPHANUMERIC . + + $default reduce using rule 782 (initialize_type_list) + + +state 799 + + 784 initialize_type_list: ALPHANUMERIC_EDITED . + + $default reduce using rule 784 (initialize_type_list) + + +state 800 + + 783 initialize_type_list: NUMERIC . + + $default reduce using rule 783 (initialize_type_list) + + +state 801 + + 785 initialize_type_list: NUMERIC_EDITED . + + $default reduce using rule 785 (initialize_type_list) + + +state 802 + + 777 initialize_replacing_opt: REPLACING initialize_replacing_lists . + 779 initialize_replacing_lists: initialize_replacing_lists . initialize_replacing_list + + ALPHABETIC shift, and go to state 797 + ALPHANUMERIC shift, and go to state 798 + ALPHANUMERIC_EDITED shift, and go to state 799 + NUMERIC shift, and go to state 800 + NUMERIC_EDITED shift, and go to state 801 + + $default reduce using rule 777 (initialize_replacing_opt) + + initialize_replacing_list go to state 1025 + initialize_type_list go to state 804 + + +state 803 + + 778 initialize_replacing_lists: initialize_replacing_list . + + $default reduce using rule 778 (initialize_replacing_lists) + + +state 804 + + 780 initialize_replacing_list: initialize_type_list . data_opt BY gname + + DATA shift, and go to state 1026 + + $default reduce using rule 551 (data_opt) + + data_opt go to state 1027 + + +state 805 + + 1088 converting_clause: CONVERTING noallname . TO noallname inspect_before_after + + TO shift, and go to state 1028 + + +state 806 + + 1253 noallname: without_all_literal . + + $default reduce using rule 1253 (noallname) + + +state 807 + + 1252 noallname: name . + + $default reduce using rule 1252 (noallname) + + +state 808 + + 1089 tallying_clause: TALLYING tallying_list . + 1091 tallying_list: tallying_list . name FOR tallying_for_list + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + $default reduce using rule 1089 (tallying_clause) + + name go to state 1029 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 809 + + 1086 inspect_statement: INSPECT name tallying_clause $@126 . replacing_clause + + REPLACING shift, and go to state 1030 + + $default reduce using rule 1098 (replacing_clause) + + replacing_clause go to state 1031 + + +state 810 + + 740 merge_statement: MERGE name sort_keys $@86 . sort_collating_opt $@87 merge_using $@88 sort_output + + COLLATING shift, and go to state 496 + + USING reduce using rule 762 (sort_collating_opt) + $default reduce using rule 45 (collating_opt) + + collating_sequence go to state 1032 + collating_opt go to state 498 + sort_collating_opt go to state 1033 + + +state 811 + + 751 sort_keys: sort_keys sort_key . + + $default reduce using rule 751 (sort_keys) + + +state 812 + + 754 sort_key: on_opt DIRECTION . key_opt sort_keys_names + + KEY shift, and go to state 846 + + $default reduce using rule 1216 (key_opt) + + key_opt go to state 1034 + + +state 813 + + 771 move_statement: MOVE CORRESPONDING name_var TO . name_var + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gname go to state 624 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + name_var go to state 1035 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 814 + + 772 move_statement: MOVE LENGTH OF gname . TO name_var + + TO shift, and go to state 1036 + + +state 815 + + 770 move_statement: MOVE gname TO name_var_list . + 1242 name_var_list: name_var_list . sep_opt name_var + + LISTSEP shift, and go to state 98 + + VARIABLE reduce using rule 1214 (sep_opt) + SUBSCVAR reduce using rule 1214 (sep_opt) + LABELSTR reduce using rule 1214 (sep_opt) + NLITERAL reduce using rule 1214 (sep_opt) + CLITERAL reduce using rule 1214 (sep_opt) + '+' reduce using rule 1214 (sep_opt) + '-' reduce using rule 1214 (sep_opt) + ALL reduce using rule 1214 (sep_opt) + FUNCTION reduce using rule 1214 (sep_opt) + HIGHVALUES reduce using rule 1214 (sep_opt) + LOWVALUES reduce using rule 1214 (sep_opt) + QUOTES reduce using rule 1214 (sep_opt) + SPACES reduce using rule 1214 (sep_opt) + ZERO reduce using rule 1214 (sep_opt) + $default reduce using rule 770 (move_statement) + + sep_opt go to state 1037 + + +state 816 + + 1241 name_var_list: name_var . + + $default reduce using rule 1241 (name_var_list) + + +state 817 + + 810 multiply_body: gname BY var_list_name . on_size_error_opt + 992 var_list_name: var_list_name . name rounded_opt sep_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NOT shift, and go to state 985 + ON shift, and go to state 620 + + NOT [reduce using rule 997 (on_size_error_opt)] + SIZE reduce using rule 1235 (on_opt) + $default reduce using rule 997 (on_size_error_opt) + + on_size_error_opt go to state 1038 + on_opt go to state 987 + name go to state 567 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 818 + + 809 multiply_body: gname BY gname . GIVING var_list_name on_size_error_opt + + GIVING shift, and go to state 1039 + + +state 819 + + 871 open_options: open_options open_mode open_varlist . + 878 open_varlist: open_varlist . sep_opt name + + LISTSEP shift, and go to state 98 + + VARIABLE reduce using rule 1214 (sep_opt) + SUBSCVAR reduce using rule 1214 (sep_opt) + LABELSTR reduce using rule 1214 (sep_opt) + $default reduce using rule 871 (open_options) + + sep_opt go to state 820 + + +state 820 + + 878 open_varlist: open_varlist sep_opt . name + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + name go to state 1040 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 821 + + 1302 label: LABELSTR in_of LABELSTR . + + $default reduce using rule 1302 (label) + + +state 822 + + 1306 label: NLITERAL in_of LABELSTR . + + $default reduce using rule 1306 (label) + + +state 823 + + 1305 label: NLITERAL in_of NLITERAL . + + $default reduce using rule 1305 (label) + + +state 824 + + 1151 perform_options: with_test_opt UNTIL @131 . condition @132 perform_statements $@133 END_PERFORM + + VARIABLE shift, and go to state 56 + VARCOND shift, and go to state 422 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + NOT shift, and go to state 423 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + '(' shift, and go to state 424 + + expr go to state 425 + condition go to state 1041 + gname go to state 427 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + cond_name go to state 428 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 825 + + 1155 perform_options: with_test_opt VARYING name . FROM gname by_opt gname UNTIL @134 condition @135 perform_after_opt perform_statements $@136 END_PERFORM + + FROM shift, and go to state 1042 + + +state 826 + + 1166 with_test_opt: with_opt TEST before_after . + + $default reduce using rule 1166 (with_test_opt) + + +state 827 + + 1147 perform_options: gname TIMES @129 . perform_statements $@130 END_PERFORM + + $default reduce using rule 1176 ($@141) + + perform_statements go to state 1043 + $@141 go to state 450 + + +state 828 + + 1164 perform_thru_opt: THRU label . + + $default reduce using rule 1164 (perform_thru_opt) + + +state 829 + + 1158 perform_options: label perform_thru_opt with_test_opt . UNTIL @137 condition + 1162 | label perform_thru_opt with_test_opt . VARYING name FROM gname by_opt gname UNTIL @138 condition @139 perform_after_opt + + UNTIL shift, and go to state 1044 + VARYING shift, and go to state 1045 + + +state 830 + + 1159 perform_options: label perform_thru_opt gname . TIMES + + TIMES shift, and go to state 1046 + + +state 831 + + 907 read_into_opt: INTO . name + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + name go to state 1047 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 832 + + 896 return_body: name record_opt read_into_opt . + 897 | name record_opt read_into_opt . read_at_end_opt + + NOT shift, and go to state 1048 + AT shift, and go to state 1049 + END shift, and go to state 1050 + + NOT [reduce using rule 896 (return_body)] + $default reduce using rule 896 (return_body) + + read_at_end_opt go to state 1051 + on_end go to state 1052 + + +state 833 + + 943 rewrite_statement: REWRITE name write_from_opt $@102 . invalid_key_opt end_rewrite_opt + + NOT shift, and go to state 665 + INVALID shift, and go to state 666 + NOTEXCEP shift, and go to state 667 + + NOT [reduce using rule 1064 (invalid_key_opt)] + NOTEXCEP [reduce using rule 1064 (invalid_key_opt)] + $default reduce using rule 1064 (invalid_key_opt) + + invalid_key_opt go to state 1053 + invalid_key_sentence go to state 669 + not_invalid_key_sentence go to state 670 + not_excep go to state 671 + + +state 834 + + 649 search_statement: SEARCH ALL search_all end_search_opt . + + $default reduce using rule 649 (search_statement) + + +state 835 + + 701 search_all: variable_indexed @79 . search_at_end $@80 search_all_when_list + + AT shift, and go to state 1054 + + END reduce using rule 1225 (at_opt) + $default reduce using rule 706 (search_at_end) + + search_at_end go to state 1055 + at_opt go to state 1056 + + +state 836 + + 702 search_varying_opt: VARYING . variable + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + + variable go to state 1057 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 837 + + 698 search: variable_indexed @76 search_varying_opt . @77 search_at_end @78 search_when_list + + $default reduce using rule 696 (@77) + + @77 go to state 1058 + + +state 838 + + 1011 set_list: set_target TO address_of_opt . set_variable_or_nlit + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + NULL_TOK shift, and go to state 1059 + OFF shift, and go to state 1060 + ON shift, and go to state 1061 + TRUE_TOK shift, and go to state 1062 + + set_variable_or_nlit go to state 1063 + name_or_lit go to state 1064 + literal go to state 1065 + signed_nliteral go to state 77 + name go to state 1066 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 839 + + 1013 set_list: set_target DOWN BY . var_or_nliteral + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + NLITERAL shift, and go to state 59 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + var_or_nliteral go to state 1067 + nliteral go to state 1068 + signed_nliteral go to state 1069 + variable go to state 1070 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 840 + + 1012 set_list: set_target UP BY . var_or_nliteral + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + NLITERAL shift, and go to state 59 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + var_or_nliteral go to state 1071 + nliteral go to state 1068 + signed_nliteral go to state 1069 + variable go to state 1070 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 841 + + 1014 set_list: address_of_opt variable TO . address_of_opt set_variable + + ADDRESS shift, and go to state 464 + + $default reduce using rule 1024 (address_of_opt) + + address_of_opt go to state 1072 + + +state 842 + + 749 sort_variable_indexed: SORT variable_indexed sort_keys_idx $@92 . sort_duplicates_opt sort_collating_opt + + WITH shift, and go to state 358 + + DUPLICATES reduce using rule 1233 (with_opt) + $default reduce using rule 760 (sort_duplicates_opt) + + sort_duplicates_opt go to state 1073 + with_opt go to state 1074 + + +state 843 + + 753 sort_keys_idx: sort_keys_idx sort_key_idx . + + $default reduce using rule 753 (sort_keys_idx) + + +state 844 + + 755 sort_key_idx: on_opt DIRECTION . key_opt sort_keys_names_idx + + KEY shift, and go to state 846 + + $default reduce using rule 1216 (key_opt) + + key_opt go to state 1075 + + +state 845 + + 747 sort_file: SORT name sort_keys $@89 . sort_duplicates_opt sort_collating_opt $@90 sort_input $@91 sort_output + + WITH shift, and go to state 358 + + DUPLICATES reduce using rule 1233 (with_opt) + $default reduce using rule 760 (sort_duplicates_opt) + + sort_duplicates_opt go to state 1076 + with_opt go to state 1074 + + +state 846 + + 1217 key_opt: KEY . + + $default reduce using rule 1217 (key_opt) + + +state 847 + + 1066 invalid_key_sentence: INVALID key_opt . @124 statement_list + + $default reduce using rule 1065 (@124) + + @124 go to state 1077 + + +state 848 + + 951 start_statement: START start_body invalid_key_opt $@104 . end_start_opt + + END_START shift, and go to state 1078 + + END_START [reduce using rule 954 (end_start_opt)] + $default reduce using rule 954 (end_start_opt) + + end_start_opt go to state 1079 + + +state 849 + + 1063 invalid_key_opt: invalid_key_sentence not_invalid_key_sentence . + + $default reduce using rule 1063 (invalid_key_opt) + + +state 850 + + 1068 not_invalid_key_sentence: not_excep INVALID . key_opt @125 statement_list + + KEY shift, and go to state 846 + + $default reduce using rule 1216 (key_opt) + + key_opt go to state 1080 + + +state 851 + + 953 start_body: name KEY is_opt . cond_op name + + CONDITIONAL shift, and go to state 591 + NOT shift, and go to state 1081 + + cond_op go to state 1082 + conditional go to state 1022 + + +state 852 + + 1027 string_statement: STRINGCMD string_from_list INTO name . string_with_pointer $@117 on_overflow_opt end_stringcmd_opt + + WITH shift, and go to state 358 + + POINTER reduce using rule 1233 (with_opt) + $default reduce using rule 1072 (string_with_pointer) + + string_with_pointer go to state 1083 + with_opt go to state 1084 + + +state 853 + + 1074 string_from_list: string_from_list sep_opt string_from . + + $default reduce using rule 1074 (string_from_list) + + +state 854 + + 1232 by_opt: BY . + + $default reduce using rule 1232 (by_opt) + + +state 855 + + 1077 string_from: gname DELIMITED by_opt . delimited_by + + error shift, and go to state 1085 + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SIZE shift, and go to state 1086 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + delimited_by go to state 1087 + gname go to state 1088 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 856 + + 804 subtract_body: CORRESPONDING var_list_gname FROM . var_list_name rounded_opt on_size_error_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + var_list_name go to state 1089 + name go to state 410 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 857 + + 802 subtract_body: var_list_gname FROM var_list_name . on_size_error_opt + 992 var_list_name: var_list_name . name rounded_opt sep_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NOT shift, and go to state 985 + ON shift, and go to state 620 + + NOT [reduce using rule 997 (on_size_error_opt)] + SIZE reduce using rule 1235 (on_opt) + $default reduce using rule 997 (on_size_error_opt) + + on_size_error_opt go to state 1090 + on_opt go to state 987 + name go to state 567 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 858 + + 803 subtract_body: var_list_gname FROM gname . GIVING var_list_name on_size_error_opt + + GIVING shift, and go to state 1091 + + +state 859 + + 1030 unstring_delimited: DELIMITED by_opt . unstring_delimited_vars + + ALL shift, and go to state 1092 + + ALL [reduce using rule 1043 (all_opt)] + $default reduce using rule 1043 (all_opt) + + unstring_delimited_vars go to state 1093 + all_opt go to state 1094 + + +state 860 + + 1029 unstring_statement: UNSTRING name unstring_delimited INTO . unstring_destinations string_with_pointer unstring_tallying $@118 on_overflow_opt end_unstring_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + unstring_destinations go to state 1095 + unstring_dest_var go to state 1096 + name go to state 1097 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 861 + + 647 if_statement: if_part ELSE @60 conditional_statement . $@61 end_if_opt + + $default reduce using rule 646 ($@61) + + $@61 go to state 1098 + + +state 862 + + 686 conditional_statement: $@74 . statement_list + + READ shift, and go to state 254 + WRITE shift, and go to state 255 + RELEASE shift, and go to state 256 + ACCEPT shift, and go to state 257 + ADD shift, and go to state 258 + CALL shift, and go to state 259 + CALL_LOADLIB shift, and go to state 260 + CANCEL shift, and go to state 261 + CHAIN shift, and go to state 262 + CLOSE shift, and go to state 263 + COMPUTE shift, and go to state 264 + CONTINUE shift, and go to state 265 + DELETE shift, and go to state 266 + DISPLAY shift, and go to state 267 + DIVIDE shift, and go to state 268 + EVALUATE shift, and go to state 269 + EXIT shift, and go to state 270 + GENERATE shift, and go to state 271 + GO shift, and go to state 272 + GOBACK shift, and go to state 273 + IF shift, and go to state 274 + INITIALIZE shift, and go to state 275 + INITIATE shift, and go to state 276 + INSPECT shift, and go to state 277 + MERGE shift, and go to state 278 + MOVE shift, and go to state 279 + MULTIPLY shift, and go to state 280 + OPEN shift, and go to state 281 + PERFORM shift, and go to state 282 + READY shift, and go to state 283 + RESET shift, and go to state 284 + RETURN shift, and go to state 285 + REWRITE shift, and go to state 286 + SEARCH shift, and go to state 287 + SET shift, and go to state 288 + SORT shift, and go to state 289 + START shift, and go to state 290 + STOP shift, and go to state 291 + STRINGCMD shift, and go to state 292 + SUBTRACT shift, and go to state 293 + TCOBPROTO1 shift, and go to state 294 + TCOBPROTO2 shift, and go to state 295 + TERMINATE shift, and go to state 296 + UNLOCK shift, and go to state 297 + UNSTRING shift, and go to state 298 + + statement_list go to state 1099 + statements go to state 640 + statement go to state 300 + perform_statement go to state 301 + if_statement go to state 302 + search_statement go to state 303 + evaluate_statement go to state 304 + if_part go to state 305 + unlock_statement go to state 306 + proto_statement go to state 307 + trace_statement go to state 308 + initiate_statement go to state 309 + generate_statement go to state 310 + terminate_statement go to state 311 + cancel_statement go to state 312 + merge_statement go to state 313 + sort_statement go to state 314 + sort_file go to state 315 + sort_variable_indexed go to state 316 + move_statement go to state 317 + initialize_statement go to state 318 + compute_statement go to state 319 + add_statement go to state 320 + subtract_statement go to state 321 + multiply_statement go to state 322 + divide_statement go to state 323 + accept_statement go to state 324 + accept_hardware go to state 325 + accept_chronological go to state 326 + accept_screen go to state 327 + display_statement go to state 328 + display_line go to state 329 + display_screen go to state 330 + open_statement go to state 331 + close_statement go to state 332 + return_statement go to state 333 + read_statement go to state 334 + release_statement go to state 335 + write_statement go to state 336 + rewrite_statement go to state 337 + delete_statement go to state 338 + start_statement go to state 339 + goto_statement go to state 340 + call_statement go to state 341 + call_loadlib_statement go to state 342 + chain_statement go to state 343 + exit_statement go to state 344 + stop_statement go to state 345 + goback_statement go to state 346 + set_statement go to state 347 + string_statement go to state 348 + unstring_statement go to state 349 + inspect_statement go to state 350 + + +state 863 + + 688 conditional_statement: $@75 . NEXT SENTENCE + + NEXT shift, and go to state 1100 + + +state 864 + + 43 collating_sequence: collating_opt SEQUENCE is_opt . STRING + + STRING shift, and go to state 1101 + + +state 865 + + 89 alphabet_literal_item: without_all_literal THRU without_all_literal . + + $default reduce using rule 89 (alphabet_literal_item) + + +state 866 + + 91 alphabet_also_list: ALSO without_all_literal . + + $default reduce using rule 91 (alphabet_also_list) + + +state 867 + + 92 alphabet_also_list: alphabet_also_list ALSO . without_all_literal + + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + without_all_literal go to state 1102 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + + +state 868 + + 67 special_name_class_item: CLITERAL THRU CLITERAL . + + $default reduce using rule 67 (special_name_class_item) + + +state 869 + + 75 switch_on_opt: ON . status_opt is_opt STRING + + STATUS shift, and go to state 1103 + + $default reduce using rule 80 (status_opt) + + status_opt go to state 1104 + + +state 870 + + 74 switches_details: STRING is_opt STRING $@9 switch_on_opt . switch_off_opt + + OFF shift, and go to state 1105 + + $default reduce using rule 78 (switch_off_opt) + + switch_off_opt go to state 1106 + + +state 871 + + 114 select_clause: error . + + $default reduce using rule 114 (select_clause) + + +state 872 + + 108 select_clause: ACCESS . mode_opt is_opt access_options + + MODE shift, and go to state 1107 + + $default reduce using rule 136 (mode_opt) + + mode_opt go to state 1108 + + +state 873 + + 112 select_clause: ALTERNATE . RECORD key_opt is_opt STRING with_duplicates + + RECORD shift, and go to state 1109 + + +state 874 + + 107 select_clause: ASSIGN . to_opt assign_clause + + TO shift, and go to state 420 + + $default reduce using rule 1239 (to_opt) + + to_opt go to state 1110 + + +state 875 + + 115 file_opt: FILE_TOK . + + $default reduce using rule 115 (file_opt) + + +state 876 + + 117 organization_opt: ORGANIZATION . + + $default reduce using rule 117 (organization_opt) + + +state 877 + + 110 select_clause: RECORD . key_opt is_opt STRING + + KEY shift, and go to state 846 + + $default reduce using rule 1216 (key_opt) + + key_opt go to state 1111 + + +state 878 + + 111 select_clause: RELATIVE . key_opt is_opt STRING + + KEY shift, and go to state 846 + + $default reduce using rule 1216 (key_opt) + + key_opt go to state 1112 + + +state 879 + + 113 select_clause: RESERVE . NLITERAL areas_opt + + NLITERAL shift, and go to state 1113 + + +state 880 + + 103 file_select: SELECT optional_opt def_name $@10 select_clauses PERIOD_TOK . + + $default reduce using rule 103 (file_select) + + +state 881 + + 104 select_clauses: select_clauses select_clause . + + $default reduce using rule 104 (select_clauses) + + +state 882 + + 109 select_clause: file_opt . STATUS is_opt STRING + + STATUS shift, and go to state 1114 + + +state 883 + + 106 select_clause: organization_opt . is_opt organization_options + + IS shift, and go to state 84 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 1115 + + +state 884 + + 160 i_o_control_multiple_file: STRING . i_o_control_multiple_file_position_opt + + POSITION shift, and go to state 1116 + + $default reduce using rule 161 (i_o_control_multiple_file_position_opt) + + i_o_control_multiple_file_position_opt go to state 1117 + + +state 885 + + 157 i_o_control_multiple_file_tape_clause: MULTIPLE FILE_TOK tape_opt contains_opt i_o_control_multiple_file_list . + 159 i_o_control_multiple_file_list: i_o_control_multiple_file_list . i_o_control_multiple_file + + STRING shift, and go to state 884 + + $default reduce using rule 157 (i_o_control_multiple_file_tape_clause) + + i_o_control_multiple_file go to state 1118 + + +state 886 + + 158 i_o_control_multiple_file_list: i_o_control_multiple_file . + + $default reduce using rule 158 (i_o_control_multiple_file_list) + + +state 887 + + 171 string_list: error . + + $default reduce using rule 171 (string_list) + + +state 888 + + 169 string_list: STRING . + + $default reduce using rule 169 (string_list) + + +state 889 + + 152 i_o_control_same_clause: SAME same_clause_options are_opta for_opt string_list . + 170 string_list: string_list . STRING + + STRING shift, and go to state 1119 + + $default reduce using rule 152 (i_o_control_same_clause) + + +state 890 + + 499 file_description_clause_block: BLOCK . contains_opt integer to_integer_opt chars_or_recs_opt + + CONTAINS shift, and go to state 696 + + $default reduce using rule 545 (contains_opt) + + contains_opt go to state 1120 + + +state 891 + + 506 file_description_clause_code_set: CODE_SET . is_opt STRING + + IS shift, and go to state 84 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 1121 + + +state 892 + + 504 file_description_clause_data: DATA . record_is_are var_strings + + RECORD shift, and go to state 1122 + RECORDS shift, and go to state 1123 + + record_is_are go to state 1124 + + +state 893 + + 502 file_description_clause_label: LABEL . record_is_are std_or_omitt + + RECORD shift, and go to state 1122 + RECORDS shift, and go to state 1123 + + record_is_are go to state 1125 + + +state 894 + + 507 file_description_clause_linage: LINAGE . is_opt data_name lines_opt file_description_clause_linage_footing file_description_clause_linage_top file_description_clause_linage_bottom + + IS shift, and go to state 84 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 1126 + + +state 895 + + 500 file_description_clause_record: RECORD . contains_opt integer to_rec_varying character_opts + 501 | RECORD . is_opt VARYING in_opt size_opt from_rec_varying to_rec_varying character_opts depend_rec_varying + + IS shift, and go to state 84 + CONTAINS shift, and go to state 696 + + VARYING reduce using rule 132 (is_opt) + $default reduce using rule 545 (contains_opt) + + is_opt go to state 1127 + contains_opt go to state 1128 + + +state 896 + + 518 report_is_are: REPORT . is_opt + + IS shift, and go to state 84 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 1129 + + +state 897 + + 519 report_is_are: REPORTS . are_opt + + ARE shift, and go to state 1130 + + $default reduce using rule 134 (are_opt) + + are_opt go to state 1131 + + +state 898 + + 503 file_description_clause_value: VALUE . OF FILE_ID is_opt filename + + OF shift, and go to state 1132 + + +state 899 + + 419 file_section: file_section FD $@38 STRING $@39 file_description_fd_clauses PERIOD_TOK . $@40 file_description + + $default reduce using rule 418 ($@40) + + $@40 go to state 1133 + + +state 900 + + 487 file_description_fd_clause: is_opt . EXTERNAL + 488 | is_opt . GLOBAL + + EXTERNAL shift, and go to state 1134 + GLOBAL shift, and go to state 1135 + + +state 901 + + 484 file_description_fd_clauses: file_description_fd_clauses file_description_fd_clause . + + $default reduce using rule 484 (file_description_fd_clauses) + + +state 902 + + 489 file_description_fd_clause: file_description_clause_block . + + $default reduce using rule 489 (file_description_fd_clause) + + +state 903 + + 490 file_description_fd_clause: file_description_clause_record . + + $default reduce using rule 490 (file_description_fd_clause) + + +state 904 + + 491 file_description_fd_clause: file_description_clause_label . + + $default reduce using rule 491 (file_description_fd_clause) + + +state 905 + + 492 file_description_fd_clause: file_description_clause_value . + + $default reduce using rule 492 (file_description_fd_clause) + + +state 906 + + 493 file_description_fd_clause: file_description_clause_data . + + $default reduce using rule 493 (file_description_fd_clause) + + +state 907 + + 494 file_description_fd_clause: file_description_clause_report . + + $default reduce using rule 494 (file_description_fd_clause) + + +state 908 + + 496 file_description_fd_clause: file_description_clause_code_set . + + $default reduce using rule 496 (file_description_fd_clause) + + +state 909 + + 495 file_description_fd_clause: file_description_clause_linage . + + $default reduce using rule 495 (file_description_fd_clause) + + +state 910 + + 505 file_description_clause_report: report_is_are . STRING + + STRING shift, and go to state 1136 + + +state 911 + + 423 file_section: file_section SD $@41 STRING $@42 file_description_sd_clauses PERIOD_TOK . $@43 file_description + + $default reduce using rule 422 ($@43) + + $@43 go to state 1137 + + +state 912 + + 486 file_description_sd_clauses: file_description_sd_clauses file_description_sd_clause . + + $default reduce using rule 486 (file_description_sd_clauses) + + +state 913 + + 497 file_description_sd_clause: file_description_clause_record . + + $default reduce using rule 497 (file_description_sd_clause) + + +state 914 + + 498 file_description_sd_clause: file_description_clause_data . + + $default reduce using rule 498 (file_description_sd_clause) + + +state 915 + + 446 data_clause: BLANK . when_opt ZERO + + WHEN shift, and go to state 1138 + + $default reduce using rule 543 (when_opt) + + when_opt go to state 1139 + + +state 916 + + 443 data_clause: JUSTIFIED . sync_options + + LEFT shift, and go to state 1140 + RIGHT shift, and go to state 1141 + + $default reduce using rule 449 (sync_options) + + sync_options go to state 1142 + + +state 917 + + 455 array_options: OCCURS . integer times_opt $@47 indexed_by_opt + 458 | OCCURS . integer TO integer times_opt DEPENDING $@48 on_opt gname $@49 indexed_by_opt + + NLITERAL shift, and go to state 59 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + signed_nliteral go to state 234 + integer go to state 1143 + + +state 918 + + 477 pictures: PICTURE . $@50 is_opt picture + + $default reduce using rule 476 ($@50) + + $@50 go to state 1144 + + +state 919 + + 434 redefines_clause: REDEFINES . $@45 redefines_var + + $default reduce using rule 433 ($@45) + + $@45 go to state 1145 + + +state 920 + + 448 data_clause: RENAMES . $@46 variable thru_gname_opt + + $default reduce using rule 447 ($@46) + + $@46 go to state 1146 + + +state 921 + + 407 sign_is_opt: SIGN . is_opt + + IS shift, and go to state 84 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 1147 + + +state 922 + + 442 data_clause: SYNCHRONIZED . sync_options + + LEFT shift, and go to state 1140 + RIGHT shift, and go to state 1141 + + $default reduce using rule 449 (sync_options) + + sync_options go to state 1148 + + +state 923 + + 540 usage_opt: USAGE . + + $default reduce using rule 540 (usage_opt) + + +state 924 + + 470 value_is_are: VALUE . is_opt + + IS shift, and go to state 84 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 1149 + + +state 925 + + 471 value_is_are: VALUES . are_opt + + ARE shift, and go to state 1130 + + $default reduce using rule 134 (are_opt) + + are_opt go to state 1150 + + +state 926 + + 429 field_description: integer def_name_opt $@44 data_clauses PERIOD_TOK . + + $default reduce using rule 429 (field_description) + + +state 927 + + 408 sign_is_opt: is_opt . + 444 data_clause: is_opt . EXTERNAL + 445 | is_opt . GLOBAL + + EXTERNAL shift, and go to state 1151 + GLOBAL shift, and go to state 1152 + + $default reduce using rule 408 (sign_is_opt) + + +state 928 + + 440 data_clause: sign_clause . + + $default reduce using rule 440 (data_clause) + + +state 929 + + 401 sign_clause: sign_is_opt . LEADING separate_opt + 402 | sign_is_opt . TRAILING separate_opt + + LEADING shift, and go to state 1153 + TRAILING shift, and go to state 1154 + + +state 930 + + 432 data_clauses: data_clauses redefines_clause . + + $default reduce using rule 432 (data_clauses) + + +state 931 + + 431 data_clauses: data_clauses data_clause . + + $default reduce using rule 431 (data_clauses) + + +state 932 + + 437 data_clause: array_options . + + $default reduce using rule 437 (data_clause) + + +state 933 + + 439 data_clause: usage_option . + + $default reduce using rule 439 (data_clause) + + +state 934 + + 441 data_clause: value_option . + + $default reduce using rule 441 (data_clause) + + +state 935 + + 469 value_option: value_is_are . value_list + + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + value_list go to state 1155 + value go to state 1156 + gliteral go to state 1157 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + + +state 936 + + 438 data_clause: pictures . + + $default reduce using rule 438 (data_clause) + + +state 937 + + 465 usage_option: usage_opt . is_opt usage + + IS shift, and go to state 84 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 1158 + + +state 938 + + 194 report_section: RD $@15 STRING $@16 . report_controls PERIOD_TOK $@17 report_description + + $default reduce using rule 195 (report_controls) + + report_controls go to state 1159 + + +state 939 + + 325 screen_item: integer def_name_opt . $@28 screen_clauses PERIOD_TOK + + $default reduce using rule 324 ($@28) + + $@28 go to state 1160 + + +state 940 + + 580 declaratives_decl: error $@57 PERIOD_TOK . + + $default reduce using rule 580 (declaratives_decl) + + +state 941 + + 571 declaratives_opt: DECLARATIVES PERIOD_TOK $@55 declaratives_procedure declaratives_division END DECLARATIVES PERIOD_TOK . + + $default reduce using rule 571 (declaratives_opt) + + +state 942 + + 578 declaratives_decl: $@56 statements PERIOD_TOK . + + $default reduce using rule 578 (declaratives_decl) + + +state 943 + + 587 use_phrase_exception_error: ERROR_TOK . + + $default reduce using rule 587 (use_phrase_exception_error) + + +state 944 + + 586 use_phrase_exception_error: EXCEPTION . + + $default reduce using rule 586 (use_phrase_exception_error) + + +state 945 + + 588 use_phrase_exception_error: STANDARD . EXCEPTION + 589 | STANDARD . ERROR_TOK + + ERROR_TOK shift, and go to state 1161 + EXCEPTION shift, and go to state 1162 + + +state 946 + + 584 use_phrase: USE AFTER use_phrase_exception_error . PROCEDURE on_opt use_phrase_option PERIOD_TOK + + PROCEDURE shift, and go to state 1163 + + +state 947 + + 900 read_body: name read_next_opt record_opt read_into_opt . with_lock_opt read_key_opt + 901 | name read_next_opt record_opt read_into_opt . with_lock_opt read_key_opt read_at_end_opt + 902 | name read_next_opt record_opt read_into_opt . with_lock_opt read_key_opt read_invalid_key_opt + + WITH shift, and go to state 358 + + IGNORE reduce using rule 1233 (with_opt) + LOCK reduce using rule 1233 (with_opt) + $default reduce using rule 893 (with_lock_opt) + + with_lock_opt go to state 1164 + with_opt go to state 1165 + + +state 948 + + 934 write_statement: WRITE name write_from_opt write_options $@101 . invalid_key_opt end_write_opt + + NOT shift, and go to state 665 + INVALID shift, and go to state 666 + NOTEXCEP shift, and go to state 667 + + NOT [reduce using rule 1064 (invalid_key_opt)] + NOTEXCEP [reduce using rule 1064 (invalid_key_opt)] + $default reduce using rule 1064 (invalid_key_opt) + + invalid_key_opt go to state 1166 + invalid_key_sentence go to state 669 + not_invalid_key_sentence go to state 670 + not_excep go to state 671 + + +state 949 + + 1219 advancing_opt: ADVANCING . + + $default reduce using rule 1219 (advancing_opt) + + +state 950 + + 938 write_options: before_after advancing_opt . gname line_lines_opt + 939 | before_after advancing_opt . PAGE + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + PAGE shift, and go to state 1167 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gname go to state 1168 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 951 + + 828 accept_hardware: ACCEPT name FROM CMD_LINE end_accept_opt . + + $default reduce using rule 828 (accept_hardware) + + +state 952 + + 830 accept_hardware: ACCEPT name FROM ENVIRONMENT_VARIABLE CLITERAL . end_accept_opt + + END_ACCEPT shift, and go to state 725 + + END_ACCEPT [reduce using rule 837 (end_accept_opt)] + $default reduce using rule 837 (end_accept_opt) + + end_accept_opt go to state 1169 + + +state 953 + + 826 accept_hardware: ACCEPT name FROM INKEY end_accept_opt . + + $default reduce using rule 826 (accept_hardware) + + +state 954 + + 829 accept_hardware: ACCEPT name FROM ESCKEY end_accept_opt . + + $default reduce using rule 829 (accept_hardware) + + +state 955 + + 831 accept_chronological: ACCEPT name FROM DATE_TIME end_accept_opt . + + $default reduce using rule 831 (accept_chronological) + + +state 956 + + 827 accept_hardware: ACCEPT name FROM INPUT STATUS . end_accept_opt + + END_ACCEPT shift, and go to state 725 + + END_ACCEPT [reduce using rule 837 (end_accept_opt)] + $default reduce using rule 837 (end_accept_opt) + + end_accept_opt go to state 1170 + + +state 957 + + 860 scr_line_position: AT NLITERAL . + + $default reduce using rule 860 (scr_line_position) + + +state 958 + + 861 scr_line_position: AT variable . + + $default reduce using rule 861 (scr_line_position) + + +state 959 + + 307 number_opt: NUMBER . + + $default reduce using rule 307 (number_opt) + + +state 960 + + 858 scr_position: COLUMN number_opt . expr + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + '(' shift, and go to state 752 + + expr go to state 1171 + gname go to state 427 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 961 + + 857 scr_line: LINE number_opt . expr + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + '(' shift, and go to state 752 + + expr go to state 1172 + gname go to state 427 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 962 + + 859 scr_position: POSITION expr . + 1114 expr: expr . '*' expr + 1115 | expr . '/' expr + 1116 | expr . '+' expr + 1117 | expr . '-' expr + 1118 | expr . POW_OP expr + + '+' shift, and go to state 593 + '-' shift, and go to state 594 + '*' shift, and go to state 595 + '/' shift, and go to state 596 + POW_OP shift, and go to state 597 + + $default reduce using rule 859 (scr_position) + + +state 963 + + 385 screen_attribx: AUTO . + + $default reduce using rule 385 (screen_attribx) + + +state 964 + + 400 screen_attribx: BACKGROUNDCOLOR . integer + + NLITERAL shift, and go to state 59 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + signed_nliteral go to state 234 + integer go to state 1173 + + +state 965 + + 375 screen_attribx: BLANK . SCREEN + 376 | BLANK . LINE + 393 | BLANK . when_opt ZERO + + LINE shift, and go to state 1174 + SCREEN shift, and go to state 1175 + WHEN shift, and go to state 1138 + + $default reduce using rule 543 (when_opt) + + when_opt go to state 1176 + + +state 966 + + 388 screen_attribx: BLINK . + + $default reduce using rule 388 (screen_attribx) + + +state 967 + + 377 screen_attribx: ERASE . EOL + 378 | ERASE . EOS + 379 | ERASE . + + EOL shift, and go to state 1177 + EOS shift, and go to state 1178 + + $default reduce using rule 379 (screen_attribx) + + +state 968 + + 399 screen_attribx: FOREGROUNDCOLOR . integer + + NLITERAL shift, and go to state 59 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + signed_nliteral go to state 234 + integer go to state 1179 + + +state 969 + + 382 screen_attribx: FULL . + + $default reduce using rule 382 (screen_attribx) + + +state 970 + + 392 screen_attribx: HIGHLIGHT . + + $default reduce using rule 392 (screen_attribx) + + +state 971 + + 386 screen_attribx: JUSTIFIED . RIGHT + 387 | JUSTIFIED . LEFT + + LEFT shift, and go to state 1180 + RIGHT shift, and go to state 1181 + + +state 972 + + 398 screen_attribx: LOWER . + + $default reduce using rule 398 (screen_attribx) + + +state 973 + + 391 screen_attribx: LOWLIGHT . + + $default reduce using rule 391 (screen_attribx) + + +state 974 + + 383 screen_attribx: REQUIRED . + + $default reduce using rule 383 (screen_attribx) + + +state 975 + + 389 screen_attribx: REVERSEVIDEO . + + $default reduce using rule 389 (screen_attribx) + + +state 976 + + 384 screen_attribx: SECURE . + + $default reduce using rule 384 (screen_attribx) + + +state 977 + + 390 screen_attribx: UNDERLINE . + + $default reduce using rule 390 (screen_attribx) + + +state 978 + + 397 screen_attribx: UPPER . + + $default reduce using rule 397 (screen_attribx) + + +state 979 + + 408 sign_is_opt: is_opt . + + $default reduce using rule 408 (sign_is_opt) + + +state 980 + + 864 accept_display_option: with_opt screen_attribx . + + $default reduce using rule 864 (accept_display_option) + + +state 981 + + 381 screen_attribx: sign_clause . + + $default reduce using rule 381 (screen_attribx) + + +state 982 + + 380 screen_attribx: with_opt . BELL + 394 | with_opt . NOECHO + 395 | with_opt . UPDATE + 396 | with_opt . NO ADVANCING + + NO shift, and go to state 1182 + BELL shift, and go to state 1183 + NOECHO shift, and go to state 1184 + UPDATE shift, and go to state 1185 + + +state 983 + + 836 accept_screen: ACCEPT name accept_display_options on_opt EXCEPTION . $@93 variable @94 statement_list $@95 end_accept_opt + + $default reduce using rule 833 ($@93) + + $@93 go to state 1186 + + +state 984 + + 795 add_body: CORRESPONDING var_list_gname TO var_list_name . rounded_opt on_size_error_opt + 992 var_list_name: var_list_name . name rounded_opt sep_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + ROUNDED shift, and go to state 568 + + $default reduce using rule 995 (rounded_opt) + + rounded_opt go to state 1187 + name go to state 567 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 985 + + 998 on_size_error_opt: NOT . on_opt SIZE on_size_error + + ON shift, and go to state 620 + + $default reduce using rule 1235 (on_opt) + + on_opt go to state 1188 + + +state 986 + + 793 add_body: var_list_gname TO var_list_name on_size_error_opt . + + $default reduce using rule 793 (add_body) + + +state 987 + + 999 on_size_error_opt: on_opt . SIZE on_size_error + 1001 | on_opt . SIZE on_size_error NOT on_opt SIZE $@115 on_size_error + + SIZE shift, and go to state 1189 + + +state 988 + + 794 add_body: var_list_gname add_to_opt GIVING var_list_name . on_size_error_opt + 992 var_list_name: var_list_name . name rounded_opt sep_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NOT shift, and go to state 985 + ON shift, and go to state 620 + + NOT [reduce using rule 997 (on_size_error_opt)] + SIZE reduce using rule 1235 (on_opt) + $default reduce using rule 997 (on_size_error_opt) + + on_size_error_opt go to state 1190 + on_opt go to state 987 + name go to state 567 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 989 + + 967 call_statement: CALL $@105 call_convention_opt gname using_options . returning_options @106 @107 @108 on_exception_or_overflow on_not_exception $@109 end_call_opt + + GIVING shift, and go to state 1191 + RETURNING shift, and go to state 1192 + + $default reduce using rule 1126 (returning_options) + + returning_options go to state 1193 + + +state 990 + + 1125 using_options: USING @127 . dummy @128 parm_list + + $default reduce using rule 1129 (dummy) + + dummy go to state 1194 + + +state 991 + + 981 chain_statement: CHAIN $@111 gname using_options @112 . @113 on_exception_or_overflow $@114 end_chain_opt + + $default reduce using rule 979 (@113) + + @113 go to state 1195 + + +state 992 + + 889 close_options: REEL for_opt REMOVAL . + + $default reduce using rule 889 (close_options) + + +state 993 + + 890 close_options: UNIT for_opt REMOVAL . + + $default reduce using rule 890 (close_options) + + +state 994 + + 886 close_options: with_opt NO REWIND . + + $default reduce using rule 886 (close_options) + + +state 995 + + 892 with_lock_opt: with_opt IGNORE LOCK . + + $default reduce using rule 892 (with_lock_opt) + + +state 996 + + 1114 expr: expr . '*' expr + 1115 | expr . '/' expr + 1116 | expr . '+' expr + 1117 | expr . '-' expr + 1118 | expr . POW_OP expr + 1119 | '(' expr . ')' + + '+' shift, and go to state 593 + '-' shift, and go to state 594 + '*' shift, and go to state 595 + '/' shift, and go to state 596 + POW_OP shift, and go to state 597 + ')' shift, and go to state 778 + + +state 997 + + 788 compute_body: var_list_name CONDITIONAL expr on_size_error_opt . + + $default reduce using rule 788 (compute_body) + + +state 998 + + 992 var_list_name: var_list_name name rounded_opt sep_opt . + + $default reduce using rule 992 (var_list_name) + + +state 999 + + 947 delete_statement: DELETE name record_opt $@103 invalid_key_opt . end_delete_opt + + END_DELETE shift, and go to state 1196 + + END_DELETE [reduce using rule 948 (end_delete_opt)] + $default reduce using rule 948 (end_delete_opt) + + end_delete_opt go to state 1197 + + +state 1000 + + 842 display_line: DISPLAY display_varlist display_upon display_line_options end_display_opt . + + $default reduce using rule 842 (display_line) + + +state 1001 + + 850 display_line_options: display_line_options with_opt . NO ADVANCING + 851 | display_line_options with_opt . ERASE + 852 | display_line_options with_opt . ERASE EOS + 853 | display_line_options with_opt . ERASE EOL + 854 | display_line_options with_opt . ERASE SCREEN + + NO shift, and go to state 1198 + ERASE shift, and go to state 1199 + + +state 1002 + + 815 divide_body: gname BY gname GIVING . var_list_name on_size_error_opt + 816 | gname BY gname GIVING . name rounded_opt REMAINDER name on_size_error_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + var_list_name go to state 1200 + name go to state 1201 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1003 + + 819 divide_body: gname INTO var_list_name on_size_error_opt . + + $default reduce using rule 819 (divide_body) + + +state 1004 + + 817 divide_body: gname INTO gname GIVING . name rounded_opt REMAINDER name on_size_error_opt + 818 | gname INTO gname GIVING . var_list_name on_size_error_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + var_list_name go to state 1202 + name go to state 1203 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1005 + + 658 selection_subject_set: selection_subject_set ALSO @65 . selection_subject + + VARIABLE shift, and go to state 56 + VARCOND shift, and go to state 422 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + NOT shift, and go to state 423 + ALL shift, and go to state 63 + FALSE_TOK shift, and go to state 769 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + TRUE_TOK shift, and go to state 770 + ZERO shift, and go to state 69 + '(' shift, and go to state 424 + + selection_subject go to state 1204 + expr go to state 772 + condition go to state 773 + gname go to state 427 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + cond_name go to state 428 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1006 + + 665 when_case_list: WHEN . @66 @67 when_case sentence_or_nothing + + $default reduce using rule 663 (@66) + + @66 go to state 1205 + + +state 1007 + + 652 evaluate_statement: EVALUATE @62 selection_subject_set $@63 when_case_list . end_evaluate_or_eos + 669 when_case_list: when_case_list . WHEN @68 @69 when_case $@70 sentence_or_nothing + + END_EVALUATE shift, and go to state 1206 + WHEN shift, and go to state 1207 + PERIOD_TOK shift, and go to state 1208 + + end_evaluate_or_eos go to state 1209 + + +state 1008 + + 957 goto_statement: GO to_opt goto_label_list DEPENDING on_opt . variable + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + + variable go to state 1210 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1009 + + 961 goto_label_list: goto_label_list LISTSEP label . + + $default reduce using rule 961 (goto_label_list) + + +state 1010 + + 1283 cond_name: VARCOND '(' $@146 subscripts . ')' + 1297 subscripts: subscripts . comma_opt subscript + + ')' shift, and go to state 1211 + ',' shift, and go to state 190 + + $default reduce using rule 1212 (comma_opt) + + comma_opt go to state 191 + + +state 1011 + + 1200 extended_cond_op: IS NOT ext_cond . + + $default reduce using rule 1200 (extended_cond_op) + + +state 1012 + + 1201 extended_cond_op: IS ext_cond OR . ext_cond + + CONDITIONAL shift, and go to state 591 + ALPHABETIC shift, and go to state 599 + ALPHABETIC_LOWER shift, and go to state 600 + ALPHABETIC_UPPER shift, and go to state 601 + NEGATIVE shift, and go to state 602 + NUMERIC shift, and go to state 603 + POSITIVE shift, and go to state 604 + ZERO shift, and go to state 605 + + sign_condition go to state 606 + class_condition go to state 607 + ext_cond go to state 1212 + conditional go to state 610 + + +state 1013 + + 1203 extended_cond_op: NOT is_opt ext_cond . + + $default reduce using rule 1203 (extended_cond_op) + + +state 1014 + + 1114 expr: expr . '*' expr + 1115 | expr . '/' expr + 1116 | expr . '+' expr + 1117 | expr . '-' expr + 1118 | expr . POW_OP expr + 1121 expr_opt: expr . + + '+' shift, and go to state 593 + '-' shift, and go to state 594 + '*' shift, and go to state 595 + '/' shift, and go to state 596 + POW_OP shift, and go to state 597 + + $default reduce using rule 1121 (expr_opt) + + +state 1015 + + 1181 condition: expr extended_cond_op $@142 expr_opt . + + $default reduce using rule 1181 (condition) + + +state 1016 + + 1204 extended_cond_op: ext_cond OR ext_cond . + + $default reduce using rule 1204 (extended_cond_op) + + +state 1017 + + 1182 condition: NOT . condition + 1209 cond_op: NOT . conditional + + VARIABLE shift, and go to state 56 + VARCOND shift, and go to state 422 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + CONDITIONAL shift, and go to state 591 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + NOT shift, and go to state 423 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + '(' shift, and go to state 424 + + expr go to state 425 + condition go to state 588 + conditional go to state 1213 + gname go to state 427 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + cond_name go to state 428 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1018 + + 1114 expr: expr . '*' expr + 1115 | expr . '/' expr + 1116 | expr . '+' expr + 1117 | expr . '-' expr + 1118 | expr . POW_OP expr + 1181 condition: expr . extended_cond_op $@142 expr_opt + 1191 implied_op_condition: expr . + + CONDITIONAL shift, and go to state 591 + IS shift, and go to state 592 + '+' shift, and go to state 593 + '-' shift, and go to state 594 + '*' shift, and go to state 595 + '/' shift, and go to state 596 + POW_OP shift, and go to state 597 + NOT shift, and go to state 598 + ALPHABETIC shift, and go to state 599 + ALPHABETIC_LOWER shift, and go to state 600 + ALPHABETIC_UPPER shift, and go to state 601 + NEGATIVE shift, and go to state 602 + NUMERIC shift, and go to state 603 + POSITIVE shift, and go to state 604 + ZERO shift, and go to state 605 + + NOT [reduce using rule 1191 (implied_op_condition)] + $default reduce using rule 1191 (implied_op_condition) + + sign_condition go to state 606 + class_condition go to state 607 + extended_cond_op go to state 608 + ext_cond go to state 609 + conditional go to state 610 + + +state 1019 + + 1184 condition: condition . AND @143 implied_op_condition + 1186 | condition . OR @144 implied_op_condition + 1189 implied_op_condition: condition . + + OR shift, and go to state 611 + AND shift, and go to state 612 + + OR [reduce using rule 1189 (implied_op_condition)] + AND [reduce using rule 1189 (implied_op_condition)] + $default reduce using rule 1189 (implied_op_condition) + + +state 1020 + + 1186 condition: condition OR @144 implied_op_condition . + + $default reduce using rule 1186 (condition) + + +state 1021 + + 1190 implied_op_condition: cond_op . expr + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + '(' shift, and go to state 752 + + expr go to state 1214 + gname go to state 427 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1022 + + 1208 cond_op: conditional . + 1210 | conditional . OR conditional + + OR shift, and go to state 1215 + + $default reduce using rule 1208 (cond_op) + + +state 1023 + + 1184 condition: condition AND @143 implied_op_condition . + + $default reduce using rule 1184 (condition) + + +state 1024 + + 684 if_part: IF condition @73 end_then_opt conditional_statement . + + $default reduce using rule 684 (if_part) + + +state 1025 + + 779 initialize_replacing_lists: initialize_replacing_lists initialize_replacing_list . + + $default reduce using rule 779 (initialize_replacing_lists) + + +state 1026 + + 552 data_opt: DATA . + + $default reduce using rule 552 (data_opt) + + +state 1027 + + 780 initialize_replacing_list: initialize_type_list data_opt . BY gname + + BY shift, and go to state 1216 + + +state 1028 + + 1088 converting_clause: CONVERTING noallname TO . noallname inspect_before_after + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + noallname go to state 1217 + without_all_literal go to state 806 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 807 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1029 + + 1091 tallying_list: tallying_list name . FOR tallying_for_list + + FOR shift, and go to state 1218 + + +state 1030 + + 1097 replacing_clause: REPLACING . replacing_list + + $default reduce using rule 1101 (replacing_list) + + replacing_list go to state 1219 + + +state 1031 + + 1086 inspect_statement: INSPECT name tallying_clause $@126 replacing_clause . + + $default reduce using rule 1086 (inspect_statement) + + +state 1032 + + 763 sort_collating_opt: collating_sequence . + + $default reduce using rule 763 (sort_collating_opt) + + +state 1033 + + 740 merge_statement: MERGE name sort_keys $@86 sort_collating_opt . $@87 merge_using $@88 sort_output + + $default reduce using rule 738 ($@87) + + $@87 go to state 1220 + + +state 1034 + + 754 sort_key: on_opt DIRECTION key_opt . sort_keys_names + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + sort_keys_names go to state 1221 + name go to state 1222 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1035 + + 771 move_statement: MOVE CORRESPONDING name_var TO name_var . + + $default reduce using rule 771 (move_statement) + + +state 1036 + + 772 move_statement: MOVE LENGTH OF gname TO . name_var + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gname go to state 624 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + name_var go to state 1223 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1037 + + 1242 name_var_list: name_var_list sep_opt . name_var + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gname go to state 624 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + name_var go to state 1224 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1038 + + 810 multiply_body: gname BY var_list_name on_size_error_opt . + + $default reduce using rule 810 (multiply_body) + + +state 1039 + + 809 multiply_body: gname BY gname GIVING . var_list_name on_size_error_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + var_list_name go to state 1225 + name go to state 410 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1040 + + 878 open_varlist: open_varlist sep_opt name . + + $default reduce using rule 878 (open_varlist) + + +state 1041 + + 1151 perform_options: with_test_opt UNTIL @131 condition . @132 perform_statements $@133 END_PERFORM + 1184 condition: condition . AND @143 implied_op_condition + 1186 | condition . OR @144 implied_op_condition + + OR shift, and go to state 611 + AND shift, and go to state 612 + + $default reduce using rule 1149 (@132) + + @132 go to state 1226 + + +state 1042 + + 1155 perform_options: with_test_opt VARYING name FROM . gname by_opt gname UNTIL @134 condition @135 perform_after_opt perform_statements $@136 END_PERFORM + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gname go to state 1227 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1043 + + 1147 perform_options: gname TIMES @129 perform_statements . $@130 END_PERFORM + + $default reduce using rule 1146 ($@130) + + $@130 go to state 1228 + + +state 1044 + + 1158 perform_options: label perform_thru_opt with_test_opt UNTIL . @137 condition + + $default reduce using rule 1157 (@137) + + @137 go to state 1229 + + +state 1045 + + 1162 perform_options: label perform_thru_opt with_test_opt VARYING . name FROM gname by_opt gname UNTIL @138 condition @139 perform_after_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + name go to state 1230 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1046 + + 1159 perform_options: label perform_thru_opt gname TIMES . + + $default reduce using rule 1159 (perform_options) + + +state 1047 + + 907 read_into_opt: INTO name . + + $default reduce using rule 907 (read_into_opt) + + +state 1048 + + 910 read_at_end_opt: NOT . at_opt on_end + + AT shift, and go to state 1054 + + $default reduce using rule 1225 (at_opt) + + at_opt go to state 1231 + + +state 1049 + + 911 read_at_end_opt: AT . on_end + 914 | AT . on_end NOT at_opt $@96 on_end + + END shift, and go to state 1050 + + on_end go to state 1232 + + +state 1050 + + 918 on_end: END . @98 statement_list + + $default reduce using rule 917 (@98) + + @98 go to state 1233 + + +state 1051 + + 897 return_body: name record_opt read_into_opt read_at_end_opt . + + $default reduce using rule 897 (return_body) + + +state 1052 + + 912 read_at_end_opt: on_end . + 916 | on_end . NOT at_opt $@97 on_end + + NOT shift, and go to state 1234 + + NOT [reduce using rule 912 (read_at_end_opt)] + $default reduce using rule 912 (read_at_end_opt) + + +state 1053 + + 943 rewrite_statement: REWRITE name write_from_opt $@102 invalid_key_opt . end_rewrite_opt + + END_REWRITE shift, and go to state 1235 + + END_REWRITE [reduce using rule 944 (end_rewrite_opt)] + $default reduce using rule 944 (end_rewrite_opt) + + end_rewrite_opt go to state 1236 + + +state 1054 + + 1226 at_opt: AT . + + $default reduce using rule 1226 (at_opt) + + +state 1055 + + 701 search_all: variable_indexed @79 search_at_end . $@80 search_all_when_list + + $default reduce using rule 700 ($@80) + + $@80 go to state 1237 + + +state 1056 + + 705 search_at_end: at_opt . END @81 statement_list + + END shift, and go to state 1238 + + +state 1057 + + 702 search_varying_opt: VARYING variable . + + $default reduce using rule 702 (search_varying_opt) + + +state 1058 + + 698 search: variable_indexed @76 search_varying_opt @77 . search_at_end @78 search_when_list + + AT shift, and go to state 1054 + + END reduce using rule 1225 (at_opt) + $default reduce using rule 706 (search_at_end) + + search_at_end go to state 1239 + at_opt go to state 1056 + + +state 1059 + + 1022 set_variable_or_nlit: NULL_TOK . + + $default reduce using rule 1022 (set_variable_or_nlit) + + +state 1060 + + 1021 set_variable_or_nlit: OFF . + + $default reduce using rule 1021 (set_variable_or_nlit) + + +state 1061 + + 1020 set_variable_or_nlit: ON . + + $default reduce using rule 1020 (set_variable_or_nlit) + + +state 1062 + + 1023 set_variable_or_nlit: TRUE_TOK . + + $default reduce using rule 1023 (set_variable_or_nlit) + + +state 1063 + + 1011 set_list: set_target TO address_of_opt set_variable_or_nlit . + + $default reduce using rule 1011 (set_list) + + +state 1064 + + 1019 set_variable_or_nlit: name_or_lit . + + $default reduce using rule 1019 (set_variable_or_nlit) + + +state 1065 + + 1251 name_or_lit: literal . + + $default reduce using rule 1251 (name_or_lit) + + +state 1066 + + 1250 name_or_lit: name . + + $default reduce using rule 1250 (name_or_lit) + + +state 1067 + + 1013 set_list: set_target DOWN BY var_or_nliteral . + + $default reduce using rule 1013 (set_list) + + +state 1068 + + 1266 var_or_nliteral: nliteral . + + $default reduce using rule 1266 (var_or_nliteral) + + +state 1069 + + 1267 nliteral: signed_nliteral . + + $default reduce using rule 1267 (nliteral) + + +state 1070 + + 1265 var_or_nliteral: variable . + + $default reduce using rule 1265 (var_or_nliteral) + + +state 1071 + + 1012 set_list: set_target UP BY var_or_nliteral . + + $default reduce using rule 1012 (set_list) + + +state 1072 + + 1014 set_list: address_of_opt variable TO address_of_opt . set_variable + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + NULL_TOK shift, and go to state 1240 + + set_variable go to state 1241 + variable go to state 1242 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1073 + + 749 sort_variable_indexed: SORT variable_indexed sort_keys_idx $@92 sort_duplicates_opt . sort_collating_opt + + COLLATING shift, and go to state 496 + + SEQUENCE reduce using rule 45 (collating_opt) + $default reduce using rule 762 (sort_collating_opt) + + collating_sequence go to state 1032 + collating_opt go to state 498 + sort_collating_opt go to state 1243 + + +state 1074 + + 761 sort_duplicates_opt: with_opt . DUPLICATES in_opt order_opt + + DUPLICATES shift, and go to state 1244 + + +state 1075 + + 755 sort_key_idx: on_opt DIRECTION key_opt . sort_keys_names_idx + + SUBSCVAR shift, and go to state 459 + + sort_keys_names_idx go to state 1245 + variable_indexed go to state 1246 + + +state 1076 + + 747 sort_file: SORT name sort_keys $@89 sort_duplicates_opt . sort_collating_opt $@90 sort_input $@91 sort_output + + COLLATING shift, and go to state 496 + + SEQUENCE reduce using rule 45 (collating_opt) + $default reduce using rule 762 (sort_collating_opt) + + collating_sequence go to state 1032 + collating_opt go to state 498 + sort_collating_opt go to state 1247 + + +state 1077 + + 1066 invalid_key_sentence: INVALID key_opt @124 . statement_list + + READ shift, and go to state 254 + WRITE shift, and go to state 255 + RELEASE shift, and go to state 256 + ACCEPT shift, and go to state 257 + ADD shift, and go to state 258 + CALL shift, and go to state 259 + CALL_LOADLIB shift, and go to state 260 + CANCEL shift, and go to state 261 + CHAIN shift, and go to state 262 + CLOSE shift, and go to state 263 + COMPUTE shift, and go to state 264 + CONTINUE shift, and go to state 265 + DELETE shift, and go to state 266 + DISPLAY shift, and go to state 267 + DIVIDE shift, and go to state 268 + EVALUATE shift, and go to state 269 + EXIT shift, and go to state 270 + GENERATE shift, and go to state 271 + GO shift, and go to state 272 + GOBACK shift, and go to state 273 + IF shift, and go to state 274 + INITIALIZE shift, and go to state 275 + INITIATE shift, and go to state 276 + INSPECT shift, and go to state 277 + MERGE shift, and go to state 278 + MOVE shift, and go to state 279 + MULTIPLY shift, and go to state 280 + OPEN shift, and go to state 281 + PERFORM shift, and go to state 282 + READY shift, and go to state 283 + RESET shift, and go to state 284 + RETURN shift, and go to state 285 + REWRITE shift, and go to state 286 + SEARCH shift, and go to state 287 + SET shift, and go to state 288 + SORT shift, and go to state 289 + START shift, and go to state 290 + STOP shift, and go to state 291 + STRINGCMD shift, and go to state 292 + SUBTRACT shift, and go to state 293 + TCOBPROTO1 shift, and go to state 294 + TCOBPROTO2 shift, and go to state 295 + TERMINATE shift, and go to state 296 + UNLOCK shift, and go to state 297 + UNSTRING shift, and go to state 298 + + statement_list go to state 1248 + statements go to state 640 + statement go to state 300 + perform_statement go to state 301 + if_statement go to state 302 + search_statement go to state 303 + evaluate_statement go to state 304 + if_part go to state 305 + unlock_statement go to state 306 + proto_statement go to state 307 + trace_statement go to state 308 + initiate_statement go to state 309 + generate_statement go to state 310 + terminate_statement go to state 311 + cancel_statement go to state 312 + merge_statement go to state 313 + sort_statement go to state 314 + sort_file go to state 315 + sort_variable_indexed go to state 316 + move_statement go to state 317 + initialize_statement go to state 318 + compute_statement go to state 319 + add_statement go to state 320 + subtract_statement go to state 321 + multiply_statement go to state 322 + divide_statement go to state 323 + accept_statement go to state 324 + accept_hardware go to state 325 + accept_chronological go to state 326 + accept_screen go to state 327 + display_statement go to state 328 + display_line go to state 329 + display_screen go to state 330 + open_statement go to state 331 + close_statement go to state 332 + return_statement go to state 333 + read_statement go to state 334 + release_statement go to state 335 + write_statement go to state 336 + rewrite_statement go to state 337 + delete_statement go to state 338 + start_statement go to state 339 + goto_statement go to state 340 + call_statement go to state 341 + call_loadlib_statement go to state 342 + chain_statement go to state 343 + exit_statement go to state 344 + stop_statement go to state 345 + goback_statement go to state 346 + set_statement go to state 347 + string_statement go to state 348 + unstring_statement go to state 349 + inspect_statement go to state 350 + + +state 1078 + + 955 end_start_opt: END_START . + + $default reduce using rule 955 (end_start_opt) + + +state 1079 + + 951 start_statement: START start_body invalid_key_opt $@104 end_start_opt . + + $default reduce using rule 951 (start_statement) + + +state 1080 + + 1068 not_invalid_key_sentence: not_excep INVALID key_opt . @125 statement_list + + $default reduce using rule 1067 (@125) + + @125 go to state 1249 + + +state 1081 + + 1209 cond_op: NOT . conditional + + CONDITIONAL shift, and go to state 591 + + conditional go to state 1213 + + +state 1082 + + 953 start_body: name KEY is_opt cond_op . name + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + name go to state 1250 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1083 + + 1027 string_statement: STRINGCMD string_from_list INTO name string_with_pointer . $@117 on_overflow_opt end_stringcmd_opt + + $default reduce using rule 1026 ($@117) + + $@117 go to state 1251 + + +state 1084 + + 1071 string_with_pointer: with_opt . POINTER name + + POINTER shift, and go to state 1252 + + +state 1085 + + 1080 delimited_by: error . + + $default reduce using rule 1080 (delimited_by) + + +state 1086 + + 1079 delimited_by: SIZE . + + $default reduce using rule 1079 (delimited_by) + + +state 1087 + + 1077 string_from: gname DELIMITED by_opt delimited_by . + + $default reduce using rule 1077 (string_from) + + +state 1088 + + 1078 delimited_by: gname . + + $default reduce using rule 1078 (delimited_by) + + +state 1089 + + 804 subtract_body: CORRESPONDING var_list_gname FROM var_list_name . rounded_opt on_size_error_opt + 992 var_list_name: var_list_name . name rounded_opt sep_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + ROUNDED shift, and go to state 568 + + $default reduce using rule 995 (rounded_opt) + + rounded_opt go to state 1253 + name go to state 567 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1090 + + 802 subtract_body: var_list_gname FROM var_list_name on_size_error_opt . + + $default reduce using rule 802 (subtract_body) + + +state 1091 + + 803 subtract_body: var_list_gname FROM gname GIVING . var_list_name on_size_error_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + var_list_name go to state 1254 + name go to state 410 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1092 + + 1044 all_opt: ALL . + + $default reduce using rule 1044 (all_opt) + + +state 1093 + + 1030 unstring_delimited: DELIMITED by_opt unstring_delimited_vars . + 1033 unstring_delimited_vars: unstring_delimited_vars . OR all_opt gname + + OR shift, and go to state 1255 + + $default reduce using rule 1030 (unstring_delimited) + + +state 1094 + + 1032 unstring_delimited_vars: all_opt . gname + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gname go to state 1256 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1095 + + 1029 unstring_statement: UNSTRING name unstring_delimited INTO unstring_destinations . string_with_pointer unstring_tallying $@118 on_overflow_opt end_unstring_opt + 1035 unstring_destinations: unstring_destinations . sep_opt unstring_dest_var + + LISTSEP shift, and go to state 98 + WITH shift, and go to state 358 + + VARIABLE reduce using rule 1214 (sep_opt) + SUBSCVAR reduce using rule 1214 (sep_opt) + LABELSTR reduce using rule 1214 (sep_opt) + POINTER reduce using rule 1233 (with_opt) + $default reduce using rule 1072 (string_with_pointer) + + string_with_pointer go to state 1257 + sep_opt go to state 1258 + with_opt go to state 1084 + + +state 1096 + + 1034 unstring_destinations: unstring_dest_var . + + $default reduce using rule 1034 (unstring_destinations) + + +state 1097 + + 1036 unstring_dest_var: name . unstring_delim_opt unstring_count_opt + + DELIMITER shift, and go to state 1259 + + $default reduce using rule 1037 (unstring_delim_opt) + + unstring_delim_opt go to state 1260 + + +state 1098 + + 647 if_statement: if_part ELSE @60 conditional_statement $@61 . end_if_opt + + END_IF shift, and go to state 684 + + END_IF [reduce using rule 691 (end_if_opt)] + $default reduce using rule 691 (end_if_opt) + + end_if_opt go to state 1261 + + +state 1099 + + 686 conditional_statement: $@74 statement_list . + + $default reduce using rule 686 (conditional_statement) + + +state 1100 + + 688 conditional_statement: $@75 NEXT . SENTENCE + + SENTENCE shift, and go to state 1262 + + +state 1101 + + 43 collating_sequence: collating_opt SEQUENCE is_opt STRING . + + $default reduce using rule 43 (collating_sequence) + + +state 1102 + + 92 alphabet_also_list: alphabet_also_list ALSO without_all_literal . + + $default reduce using rule 92 (alphabet_also_list) + + +state 1103 + + 79 status_opt: STATUS . + + $default reduce using rule 79 (status_opt) + + +state 1104 + + 75 switch_on_opt: ON status_opt . is_opt STRING + + IS shift, and go to state 84 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 1263 + + +state 1105 + + 77 switch_off_opt: OFF . status_opt is_opt STRING + + STATUS shift, and go to state 1103 + + $default reduce using rule 80 (status_opt) + + status_opt go to state 1264 + + +state 1106 + + 74 switches_details: STRING is_opt STRING $@9 switch_on_opt switch_off_opt . + + $default reduce using rule 74 (switches_details) + + +state 1107 + + 135 mode_opt: MODE . + + $default reduce using rule 135 (mode_opt) + + +state 1108 + + 108 select_clause: ACCESS mode_opt . is_opt access_options + + IS shift, and go to state 84 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 1265 + + +state 1109 + + 112 select_clause: ALTERNATE RECORD . key_opt is_opt STRING with_duplicates + + KEY shift, and go to state 846 + + $default reduce using rule 1216 (key_opt) + + key_opt go to state 1266 + + +state 1110 + + 107 select_clause: ASSIGN to_opt . assign_clause + + error shift, and go to state 1267 + STRING shift, and go to state 1268 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + PORTNUM shift, and go to state 1269 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + EXTERNAL shift, and go to state 1270 + + assign_clause go to state 1271 + literal go to state 1272 + signed_nliteral go to state 77 + filename go to state 1273 + + +state 1111 + + 110 select_clause: RECORD key_opt . is_opt STRING + + IS shift, and go to state 84 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 1274 + + +state 1112 + + 111 select_clause: RELATIVE key_opt . is_opt STRING + + IS shift, and go to state 84 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 1275 + + +state 1113 + + 113 select_clause: RESERVE NLITERAL . areas_opt + + AREA shift, and go to state 1276 + AREAS shift, and go to state 1277 + + $default reduce using rule 130 (areas_opt) + + areas_opt go to state 1278 + + +state 1114 + + 109 select_clause: file_opt STATUS . is_opt STRING + + IS shift, and go to state 84 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 1279 + + +state 1115 + + 106 select_clause: organization_opt is_opt . organization_options + + STRING shift, and go to state 1280 + LABELSTR shift, and go to state 1281 + INDEXED shift, and go to state 1282 + LINE shift, and go to state 1283 + RELATIVE shift, and go to state 1284 + SEQUENTIAL shift, and go to state 1285 + + organization_options go to state 1286 + anystring go to state 1287 + + +state 1116 + + 162 i_o_control_multiple_file_position_opt: POSITION . integer + + NLITERAL shift, and go to state 59 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + signed_nliteral go to state 234 + integer go to state 1288 + + +state 1117 + + 160 i_o_control_multiple_file: STRING i_o_control_multiple_file_position_opt . + + $default reduce using rule 160 (i_o_control_multiple_file) + + +state 1118 + + 159 i_o_control_multiple_file_list: i_o_control_multiple_file_list i_o_control_multiple_file . + + $default reduce using rule 159 (i_o_control_multiple_file_list) + + +state 1119 + + 170 string_list: string_list STRING . + + $default reduce using rule 170 (string_list) + + +state 1120 + + 499 file_description_clause_block: BLOCK contains_opt . integer to_integer_opt chars_or_recs_opt + + NLITERAL shift, and go to state 59 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + signed_nliteral go to state 234 + integer go to state 1289 + + +state 1121 + + 506 file_description_clause_code_set: CODE_SET is_opt . STRING + + STRING shift, and go to state 1290 + + +state 1122 + + 535 record_is_are: RECORD . is_opt + + IS shift, and go to state 84 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 1291 + + +state 1123 + + 536 record_is_are: RECORDS . are_opt + + ARE shift, and go to state 1130 + + $default reduce using rule 134 (are_opt) + + are_opt go to state 1292 + + +state 1124 + + 504 file_description_clause_data: DATA record_is_are . var_strings + + STRING shift, and go to state 1293 + + var_strings go to state 1294 + + +state 1125 + + 502 file_description_clause_label: LABEL record_is_are . std_or_omitt + + OMITTED shift, and go to state 1295 + STANDARD shift, and go to state 1296 + + std_or_omitt go to state 1297 + + +state 1126 + + 507 file_description_clause_linage: LINAGE is_opt . data_name lines_opt file_description_clause_linage_footing file_description_clause_linage_top file_description_clause_linage_bottom + + STRING shift, and go to state 1298 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + literal go to state 1299 + signed_nliteral go to state 77 + data_name go to state 1300 + + +state 1127 + + 501 file_description_clause_record: RECORD is_opt . VARYING in_opt size_opt from_rec_varying to_rec_varying character_opts depend_rec_varying + + VARYING shift, and go to state 1301 + + +state 1128 + + 500 file_description_clause_record: RECORD contains_opt . integer to_rec_varying character_opts + + NLITERAL shift, and go to state 59 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + signed_nliteral go to state 234 + integer go to state 1302 + + +state 1129 + + 518 report_is_are: REPORT is_opt . + + $default reduce using rule 518 (report_is_are) + + +state 1130 + + 133 are_opt: ARE . + + $default reduce using rule 133 (are_opt) + + +state 1131 + + 519 report_is_are: REPORTS are_opt . + + $default reduce using rule 519 (report_is_are) + + +state 1132 + + 503 file_description_clause_value: VALUE OF . FILE_ID is_opt filename + + FILE_ID shift, and go to state 1303 + + +state 1133 + + 419 file_section: file_section FD $@38 STRING $@39 file_description_fd_clauses PERIOD_TOK $@40 . file_description + + NLITERAL shift, and go to state 59 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + file_description go to state 1304 + field_description go to state 1305 + signed_nliteral go to state 234 + integer go to state 235 + + +state 1134 + + 487 file_description_fd_clause: is_opt EXTERNAL . + + $default reduce using rule 487 (file_description_fd_clause) + + +state 1135 + + 488 file_description_fd_clause: is_opt GLOBAL . + + $default reduce using rule 488 (file_description_fd_clause) + + +state 1136 + + 505 file_description_clause_report: report_is_are STRING . + + $default reduce using rule 505 (file_description_clause_report) + + +state 1137 + + 423 file_section: file_section SD $@41 STRING $@42 file_description_sd_clauses PERIOD_TOK $@43 . file_description + + NLITERAL shift, and go to state 59 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + file_description go to state 1306 + field_description go to state 1305 + signed_nliteral go to state 234 + integer go to state 235 + + +state 1138 + + 544 when_opt: WHEN . + + $default reduce using rule 544 (when_opt) + + +state 1139 + + 446 data_clause: BLANK when_opt . ZERO + + ZERO shift, and go to state 1307 + + +state 1140 + + 450 sync_options: LEFT . + + $default reduce using rule 450 (sync_options) + + +state 1141 + + 451 sync_options: RIGHT . + + $default reduce using rule 451 (sync_options) + + +state 1142 + + 443 data_clause: JUSTIFIED sync_options . + + $default reduce using rule 443 (data_clause) + + +state 1143 + + 455 array_options: OCCURS integer . times_opt $@47 indexed_by_opt + 458 | OCCURS integer . TO integer times_opt DEPENDING $@48 on_opt gname $@49 indexed_by_opt + + TO shift, and go to state 1308 + TIMES shift, and go to state 1309 + + $default reduce using rule 541 (times_opt) + + times_opt go to state 1310 + + +state 1144 + + 477 pictures: PICTURE $@50 . is_opt picture + + IS shift, and go to state 84 + + IS [reduce using rule 132 (is_opt)] + $default reduce using rule 132 (is_opt) + + is_opt go to state 1311 + + +state 1145 + + 434 redefines_clause: REDEFINES $@45 . redefines_var + + VARIABLE shift, and go to state 1312 + SUBSCVAR shift, and go to state 1313 + + redefines_var go to state 1314 + + +state 1146 + + 448 data_clause: RENAMES $@46 . variable thru_gname_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + + variable go to state 1315 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1147 + + 407 sign_is_opt: SIGN is_opt . + + $default reduce using rule 407 (sign_is_opt) + + +state 1148 + + 442 data_clause: SYNCHRONIZED sync_options . + + $default reduce using rule 442 (data_clause) + + +state 1149 + + 470 value_is_are: VALUE is_opt . + + $default reduce using rule 470 (value_is_are) + + +state 1150 + + 471 value_is_are: VALUES are_opt . + + $default reduce using rule 471 (value_is_are) + + +state 1151 + + 444 data_clause: is_opt EXTERNAL . + + $default reduce using rule 444 (data_clause) + + +state 1152 + + 445 data_clause: is_opt GLOBAL . + + $default reduce using rule 445 (data_clause) + + +state 1153 + + 401 sign_clause: sign_is_opt LEADING . separate_opt + + SEPARATE shift, and go to state 1316 + + $default reduce using rule 404 (separate_opt) + + separate_opt go to state 1317 + + +state 1154 + + 402 sign_clause: sign_is_opt TRAILING . separate_opt + + SEPARATE shift, and go to state 1316 + + $default reduce using rule 404 (separate_opt) + + separate_opt go to state 1318 + + +state 1155 + + 469 value_option: value_is_are value_list . + 473 value_list: value_list . comma_opt value + + ',' shift, and go to state 190 + + NLITERAL reduce using rule 1212 (comma_opt) + CLITERAL reduce using rule 1212 (comma_opt) + '+' reduce using rule 1212 (comma_opt) + '-' reduce using rule 1212 (comma_opt) + ALL reduce using rule 1212 (comma_opt) + HIGHVALUES reduce using rule 1212 (comma_opt) + LOWVALUES reduce using rule 1212 (comma_opt) + QUOTES reduce using rule 1212 (comma_opt) + SPACES reduce using rule 1212 (comma_opt) + ZERO reduce using rule 1212 (comma_opt) + $default reduce using rule 469 (value_option) + + comma_opt go to state 1319 + + +state 1156 + + 472 value_list: value . + + $default reduce using rule 472 (value_list) + + +state 1157 + + 474 value: gliteral . + 475 | gliteral . THRU gliteral + + THRU shift, and go to state 1320 + + $default reduce using rule 474 (value) + + +state 1158 + + 465 usage_option: usage_opt is_opt . usage + + USAGENUM shift, and go to state 1321 + DISPLAY shift, and go to state 1322 + POINTER shift, and go to state 1323 + + usage go to state 1324 + + +state 1159 + + 194 report_section: RD $@15 STRING $@16 report_controls . PERIOD_TOK $@17 report_description + 196 report_controls: report_controls . report_control + + IS shift, and go to state 84 + CODE shift, and go to state 1325 + CONTROL shift, and go to state 1326 + CONTROLS shift, and go to state 1327 + PAGE shift, and go to state 1328 + PERIOD_TOK shift, and go to state 1329 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 1330 + report_control go to state 1331 + report_controls_control go to state 1332 + report_controls_page go to state 1333 + control_is_are go to state 1334 + + +state 1160 + + 325 screen_item: integer def_name_opt $@28 . screen_clauses PERIOD_TOK + + $default reduce using rule 342 (screen_clauses) + + screen_clauses go to state 1335 + + +state 1161 + + 589 use_phrase_exception_error: STANDARD ERROR_TOK . + + $default reduce using rule 589 (use_phrase_exception_error) + + +state 1162 + + 588 use_phrase_exception_error: STANDARD EXCEPTION . + + $default reduce using rule 588 (use_phrase_exception_error) + + +state 1163 + + 584 use_phrase: USE AFTER use_phrase_exception_error PROCEDURE . on_opt use_phrase_option PERIOD_TOK + + ON shift, and go to state 620 + + $default reduce using rule 1235 (on_opt) + + on_opt go to state 1336 + + +state 1164 + + 900 read_body: name read_next_opt record_opt read_into_opt with_lock_opt . read_key_opt + 901 | name read_next_opt record_opt read_into_opt with_lock_opt . read_key_opt read_at_end_opt + 902 | name read_next_opt record_opt read_into_opt with_lock_opt . read_key_opt read_invalid_key_opt + + KEY shift, and go to state 1337 + + $default reduce using rule 908 (read_key_opt) + + read_key_opt go to state 1338 + + +state 1165 + + 891 with_lock_opt: with_opt . LOCK + 892 | with_opt . IGNORE LOCK + + IGNORE shift, and go to state 750 + LOCK shift, and go to state 751 + + +state 1166 + + 934 write_statement: WRITE name write_from_opt write_options $@101 invalid_key_opt . end_write_opt + + END_WRITE shift, and go to state 1339 + + END_WRITE [reduce using rule 940 (end_write_opt)] + $default reduce using rule 940 (end_write_opt) + + end_write_opt go to state 1340 + + +state 1167 + + 939 write_options: before_after advancing_opt PAGE . + + $default reduce using rule 939 (write_options) + + +state 1168 + + 938 write_options: before_after advancing_opt gname . line_lines_opt + + LINE shift, and go to state 1341 + LINES shift, and go to state 1342 + + $default reduce using rule 207 (lines_opt) + + line_lines_opt go to state 1343 + lines_opt go to state 1344 + + +state 1169 + + 830 accept_hardware: ACCEPT name FROM ENVIRONMENT_VARIABLE CLITERAL end_accept_opt . + + $default reduce using rule 830 (accept_hardware) + + +state 1170 + + 827 accept_hardware: ACCEPT name FROM INPUT STATUS end_accept_opt . + + $default reduce using rule 827 (accept_hardware) + + +state 1171 + + 858 scr_position: COLUMN number_opt expr . + 1114 expr: expr . '*' expr + 1115 | expr . '/' expr + 1116 | expr . '+' expr + 1117 | expr . '-' expr + 1118 | expr . POW_OP expr + + '+' shift, and go to state 593 + '-' shift, and go to state 594 + '*' shift, and go to state 595 + '/' shift, and go to state 596 + POW_OP shift, and go to state 597 + + $default reduce using rule 858 (scr_position) + + +state 1172 + + 857 scr_line: LINE number_opt expr . + 1114 expr: expr . '*' expr + 1115 | expr . '/' expr + 1116 | expr . '+' expr + 1117 | expr . '-' expr + 1118 | expr . POW_OP expr + + '+' shift, and go to state 593 + '-' shift, and go to state 594 + '*' shift, and go to state 595 + '/' shift, and go to state 596 + POW_OP shift, and go to state 597 + + $default reduce using rule 857 (scr_line) + + +state 1173 + + 400 screen_attribx: BACKGROUNDCOLOR integer . + + $default reduce using rule 400 (screen_attribx) + + +state 1174 + + 376 screen_attribx: BLANK LINE . + + $default reduce using rule 376 (screen_attribx) + + +state 1175 + + 375 screen_attribx: BLANK SCREEN . + + $default reduce using rule 375 (screen_attribx) + + +state 1176 + + 393 screen_attribx: BLANK when_opt . ZERO + + ZERO shift, and go to state 1345 + + +state 1177 + + 377 screen_attribx: ERASE EOL . + + $default reduce using rule 377 (screen_attribx) + + +state 1178 + + 378 screen_attribx: ERASE EOS . + + $default reduce using rule 378 (screen_attribx) + + +state 1179 + + 399 screen_attribx: FOREGROUNDCOLOR integer . + + $default reduce using rule 399 (screen_attribx) + + +state 1180 + + 387 screen_attribx: JUSTIFIED LEFT . + + $default reduce using rule 387 (screen_attribx) + + +state 1181 + + 386 screen_attribx: JUSTIFIED RIGHT . + + $default reduce using rule 386 (screen_attribx) + + +state 1182 + + 396 screen_attribx: with_opt NO . ADVANCING + + ADVANCING shift, and go to state 1346 + + +state 1183 + + 380 screen_attribx: with_opt BELL . + + $default reduce using rule 380 (screen_attribx) + + +state 1184 + + 394 screen_attribx: with_opt NOECHO . + + $default reduce using rule 394 (screen_attribx) + + +state 1185 + + 395 screen_attribx: with_opt UPDATE . + + $default reduce using rule 395 (screen_attribx) + + +state 1186 + + 836 accept_screen: ACCEPT name accept_display_options on_opt EXCEPTION $@93 . variable @94 statement_list $@95 end_accept_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + + variable go to state 1347 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1187 + + 795 add_body: CORRESPONDING var_list_gname TO var_list_name rounded_opt . on_size_error_opt + + NOT shift, and go to state 985 + ON shift, and go to state 620 + + NOT [reduce using rule 997 (on_size_error_opt)] + SIZE reduce using rule 1235 (on_opt) + $default reduce using rule 997 (on_size_error_opt) + + on_size_error_opt go to state 1348 + on_opt go to state 987 + + +state 1188 + + 998 on_size_error_opt: NOT on_opt . SIZE on_size_error + + SIZE shift, and go to state 1349 + + +state 1189 + + 999 on_size_error_opt: on_opt SIZE . on_size_error + 1001 | on_opt SIZE . on_size_error NOT on_opt SIZE $@115 on_size_error + + ERROR_TOK shift, and go to state 1350 + + on_size_error go to state 1351 + + +state 1190 + + 794 add_body: var_list_gname add_to_opt GIVING var_list_name on_size_error_opt . + + $default reduce using rule 794 (add_body) + + +state 1191 + + 1128 returning_options: GIVING . variable + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + + variable go to state 1352 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1192 + + 1127 returning_options: RETURNING . variable + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + + variable go to state 1353 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1193 + + 967 call_statement: CALL $@105 call_convention_opt gname using_options returning_options . @106 @107 @108 on_exception_or_overflow on_not_exception $@109 end_call_opt + + $default reduce using rule 963 (@106) + + @106 go to state 1354 + + +state 1194 + + 1125 using_options: USING @127 dummy . @128 parm_list + + $default reduce using rule 1124 (@128) + + @128 go to state 1355 + + +state 1195 + + 981 chain_statement: CHAIN $@111 gname using_options @112 @113 . on_exception_or_overflow $@114 end_chain_opt + + ON shift, and go to state 620 + + EXCEPTION reduce using rule 1235 (on_opt) + OVERFLOW_TOK reduce using rule 1235 (on_opt) + $default reduce using rule 1049 (on_exception_or_overflow) + + on_exception_or_overflow go to state 1356 + on_opt go to state 1357 + + +state 1196 + + 949 end_delete_opt: END_DELETE . + + $default reduce using rule 949 (end_delete_opt) + + +state 1197 + + 947 delete_statement: DELETE name record_opt $@103 invalid_key_opt end_delete_opt . + + $default reduce using rule 947 (delete_statement) + + +state 1198 + + 850 display_line_options: display_line_options with_opt NO . ADVANCING + + ADVANCING shift, and go to state 1358 + + +state 1199 + + 851 display_line_options: display_line_options with_opt ERASE . + 852 | display_line_options with_opt ERASE . EOS + 853 | display_line_options with_opt ERASE . EOL + 854 | display_line_options with_opt ERASE . SCREEN + + EOL shift, and go to state 1359 + EOS shift, and go to state 1360 + SCREEN shift, and go to state 1361 + + $default reduce using rule 851 (display_line_options) + + +state 1200 + + 815 divide_body: gname BY gname GIVING var_list_name . on_size_error_opt + 992 var_list_name: var_list_name . name rounded_opt sep_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NOT shift, and go to state 985 + ON shift, and go to state 620 + + NOT [reduce using rule 997 (on_size_error_opt)] + SIZE reduce using rule 1235 (on_opt) + $default reduce using rule 997 (on_size_error_opt) + + on_size_error_opt go to state 1362 + on_opt go to state 987 + name go to state 567 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1201 + + 816 divide_body: gname BY gname GIVING name . rounded_opt REMAINDER name on_size_error_opt + 991 var_list_name: name . rounded_opt sep_opt + + ROUNDED shift, and go to state 568 + + $default reduce using rule 995 (rounded_opt) + + rounded_opt go to state 1363 + + +state 1202 + + 818 divide_body: gname INTO gname GIVING var_list_name . on_size_error_opt + 992 var_list_name: var_list_name . name rounded_opt sep_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NOT shift, and go to state 985 + ON shift, and go to state 620 + + NOT [reduce using rule 997 (on_size_error_opt)] + SIZE reduce using rule 1235 (on_opt) + $default reduce using rule 997 (on_size_error_opt) + + on_size_error_opt go to state 1364 + on_opt go to state 987 + name go to state 567 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1203 + + 817 divide_body: gname INTO gname GIVING name . rounded_opt REMAINDER name on_size_error_opt + 991 var_list_name: name . rounded_opt sep_opt + + ROUNDED shift, and go to state 568 + + $default reduce using rule 995 (rounded_opt) + + rounded_opt go to state 1365 + + +state 1204 + + 658 selection_subject_set: selection_subject_set ALSO @65 selection_subject . + + $default reduce using rule 658 (selection_subject_set) + + +state 1205 + + 665 when_case_list: WHEN @66 . @67 when_case sentence_or_nothing + + $default reduce using rule 664 (@67) + + @67 go to state 1366 + + +state 1206 + + 653 end_evaluate_or_eos: END_EVALUATE . + + $default reduce using rule 653 (end_evaluate_or_eos) + + +state 1207 + + 669 when_case_list: when_case_list WHEN . @68 @69 when_case $@70 sentence_or_nothing + + $default reduce using rule 666 (@68) + + @68 go to state 1367 + + +state 1208 + + 654 end_evaluate_or_eos: PERIOD_TOK . + + $default reduce using rule 654 (end_evaluate_or_eos) + + +state 1209 + + 652 evaluate_statement: EVALUATE @62 selection_subject_set $@63 when_case_list end_evaluate_or_eos . + + $default reduce using rule 652 (evaluate_statement) + + +state 1210 + + 957 goto_statement: GO to_opt goto_label_list DEPENDING on_opt variable . + + $default reduce using rule 957 (goto_statement) + + +state 1211 + + 1283 cond_name: VARCOND '(' $@146 subscripts ')' . + + $default reduce using rule 1283 (cond_name) + + +state 1212 + + 1201 extended_cond_op: IS ext_cond OR ext_cond . + + $default reduce using rule 1201 (extended_cond_op) + + +state 1213 + + 1209 cond_op: NOT conditional . + + $default reduce using rule 1209 (cond_op) + + +state 1214 + + 1114 expr: expr . '*' expr + 1115 | expr . '/' expr + 1116 | expr . '+' expr + 1117 | expr . '-' expr + 1118 | expr . POW_OP expr + 1190 implied_op_condition: cond_op expr . + + '+' shift, and go to state 593 + '-' shift, and go to state 594 + '*' shift, and go to state 595 + '/' shift, and go to state 596 + POW_OP shift, and go to state 597 + + $default reduce using rule 1190 (implied_op_condition) + + +state 1215 + + 1210 cond_op: conditional OR . conditional + + CONDITIONAL shift, and go to state 591 + + conditional go to state 1368 + + +state 1216 + + 780 initialize_replacing_list: initialize_type_list data_opt BY . gname + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gname go to state 1369 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1217 + + 1088 converting_clause: CONVERTING noallname TO noallname . inspect_before_after + + $default reduce using rule 1110 (inspect_before_after) + + inspect_before_after go to state 1370 + + +state 1218 + + 1091 tallying_list: tallying_list name FOR . tallying_for_list + + $default reduce using rule 1096 (tallying_for_list) + + tallying_for_list go to state 1371 + + +state 1219 + + 1097 replacing_clause: REPLACING replacing_list . + 1099 replacing_list: replacing_list . CHARACTERS BY noallname inspect_before_after + 1100 | replacing_list . replacing_kind replacing_by_list + + ALL shift, and go to state 1372 + CHARACTERS shift, and go to state 1373 + FIRST shift, and go to state 1374 + LEADING shift, and go to state 1375 + TRAILING shift, and go to state 1376 + + $default reduce using rule 1097 (replacing_clause) + + replacing_kind go to state 1377 + + +state 1220 + + 740 merge_statement: MERGE name sort_keys $@86 sort_collating_opt $@87 . merge_using $@88 sort_output + + USING shift, and go to state 1378 + + merge_using go to state 1379 + + +state 1221 + + 754 sort_key: on_opt DIRECTION key_opt sort_keys_names . + 757 sort_keys_names: sort_keys_names . name + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + $default reduce using rule 754 (sort_key) + + name go to state 1380 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1222 + + 756 sort_keys_names: name . + + $default reduce using rule 756 (sort_keys_names) + + +state 1223 + + 772 move_statement: MOVE LENGTH OF gname TO name_var . + + $default reduce using rule 772 (move_statement) + + +state 1224 + + 1242 name_var_list: name_var_list sep_opt name_var . + + $default reduce using rule 1242 (name_var_list) + + +state 1225 + + 809 multiply_body: gname BY gname GIVING var_list_name . on_size_error_opt + 992 var_list_name: var_list_name . name rounded_opt sep_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NOT shift, and go to state 985 + ON shift, and go to state 620 + + NOT [reduce using rule 997 (on_size_error_opt)] + SIZE reduce using rule 1235 (on_opt) + $default reduce using rule 997 (on_size_error_opt) + + on_size_error_opt go to state 1381 + on_opt go to state 987 + name go to state 567 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1226 + + 1151 perform_options: with_test_opt UNTIL @131 condition @132 . perform_statements $@133 END_PERFORM + + $default reduce using rule 1176 ($@141) + + perform_statements go to state 1382 + $@141 go to state 450 + + +state 1227 + + 1155 perform_options: with_test_opt VARYING name FROM gname . by_opt gname UNTIL @134 condition @135 perform_after_opt perform_statements $@136 END_PERFORM + + BY shift, and go to state 854 + + $default reduce using rule 1231 (by_opt) + + by_opt go to state 1383 + + +state 1228 + + 1147 perform_options: gname TIMES @129 perform_statements $@130 . END_PERFORM + + END_PERFORM shift, and go to state 1384 + + +state 1229 + + 1158 perform_options: label perform_thru_opt with_test_opt UNTIL @137 . condition + + VARIABLE shift, and go to state 56 + VARCOND shift, and go to state 422 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + NOT shift, and go to state 423 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + '(' shift, and go to state 424 + + expr go to state 425 + condition go to state 1385 + gname go to state 427 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + cond_name go to state 428 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1230 + + 1162 perform_options: label perform_thru_opt with_test_opt VARYING name . FROM gname by_opt gname UNTIL @138 condition @139 perform_after_opt + + FROM shift, and go to state 1386 + + +state 1231 + + 910 read_at_end_opt: NOT at_opt . on_end + + END shift, and go to state 1050 + + on_end go to state 1387 + + +state 1232 + + 911 read_at_end_opt: AT on_end . + 914 | AT on_end . NOT at_opt $@96 on_end + + NOT shift, and go to state 1388 + + NOT [reduce using rule 911 (read_at_end_opt)] + $default reduce using rule 911 (read_at_end_opt) + + +state 1233 + + 918 on_end: END @98 . statement_list + + READ shift, and go to state 254 + WRITE shift, and go to state 255 + RELEASE shift, and go to state 256 + ACCEPT shift, and go to state 257 + ADD shift, and go to state 258 + CALL shift, and go to state 259 + CALL_LOADLIB shift, and go to state 260 + CANCEL shift, and go to state 261 + CHAIN shift, and go to state 262 + CLOSE shift, and go to state 263 + COMPUTE shift, and go to state 264 + CONTINUE shift, and go to state 265 + DELETE shift, and go to state 266 + DISPLAY shift, and go to state 267 + DIVIDE shift, and go to state 268 + EVALUATE shift, and go to state 269 + EXIT shift, and go to state 270 + GENERATE shift, and go to state 271 + GO shift, and go to state 272 + GOBACK shift, and go to state 273 + IF shift, and go to state 274 + INITIALIZE shift, and go to state 275 + INITIATE shift, and go to state 276 + INSPECT shift, and go to state 277 + MERGE shift, and go to state 278 + MOVE shift, and go to state 279 + MULTIPLY shift, and go to state 280 + OPEN shift, and go to state 281 + PERFORM shift, and go to state 282 + READY shift, and go to state 283 + RESET shift, and go to state 284 + RETURN shift, and go to state 285 + REWRITE shift, and go to state 286 + SEARCH shift, and go to state 287 + SET shift, and go to state 288 + SORT shift, and go to state 289 + START shift, and go to state 290 + STOP shift, and go to state 291 + STRINGCMD shift, and go to state 292 + SUBTRACT shift, and go to state 293 + TCOBPROTO1 shift, and go to state 294 + TCOBPROTO2 shift, and go to state 295 + TERMINATE shift, and go to state 296 + UNLOCK shift, and go to state 297 + UNSTRING shift, and go to state 298 + + statement_list go to state 1389 + statements go to state 640 + statement go to state 300 + perform_statement go to state 301 + if_statement go to state 302 + search_statement go to state 303 + evaluate_statement go to state 304 + if_part go to state 305 + unlock_statement go to state 306 + proto_statement go to state 307 + trace_statement go to state 308 + initiate_statement go to state 309 + generate_statement go to state 310 + terminate_statement go to state 311 + cancel_statement go to state 312 + merge_statement go to state 313 + sort_statement go to state 314 + sort_file go to state 315 + sort_variable_indexed go to state 316 + move_statement go to state 317 + initialize_statement go to state 318 + compute_statement go to state 319 + add_statement go to state 320 + subtract_statement go to state 321 + multiply_statement go to state 322 + divide_statement go to state 323 + accept_statement go to state 324 + accept_hardware go to state 325 + accept_chronological go to state 326 + accept_screen go to state 327 + display_statement go to state 328 + display_line go to state 329 + display_screen go to state 330 + open_statement go to state 331 + close_statement go to state 332 + return_statement go to state 333 + read_statement go to state 334 + release_statement go to state 335 + write_statement go to state 336 + rewrite_statement go to state 337 + delete_statement go to state 338 + start_statement go to state 339 + goto_statement go to state 340 + call_statement go to state 341 + call_loadlib_statement go to state 342 + chain_statement go to state 343 + exit_statement go to state 344 + stop_statement go to state 345 + goback_statement go to state 346 + set_statement go to state 347 + string_statement go to state 348 + unstring_statement go to state 349 + inspect_statement go to state 350 + + +state 1234 + + 916 read_at_end_opt: on_end NOT . at_opt $@97 on_end + + AT shift, and go to state 1054 + + $default reduce using rule 1225 (at_opt) + + at_opt go to state 1390 + + +state 1235 + + 945 end_rewrite_opt: END_REWRITE . + + $default reduce using rule 945 (end_rewrite_opt) + + +state 1236 + + 943 rewrite_statement: REWRITE name write_from_opt $@102 invalid_key_opt end_rewrite_opt . + + $default reduce using rule 943 (rewrite_statement) + + +state 1237 + + 701 search_all: variable_indexed @79 search_at_end $@80 . search_all_when_list + + WHEN shift, and go to state 1391 + + search_all_when_list go to state 1392 + search_all_when go to state 1393 + + +state 1238 + + 705 search_at_end: at_opt END . @81 statement_list + + $default reduce using rule 704 (@81) + + @81 go to state 1394 + + +state 1239 + + 698 search: variable_indexed @76 search_varying_opt @77 search_at_end . @78 search_when_list + + $default reduce using rule 697 (@78) + + @78 go to state 1395 + + +state 1240 + + 1018 set_variable: NULL_TOK . + + $default reduce using rule 1018 (set_variable) + + +state 1241 + + 1014 set_list: address_of_opt variable TO address_of_opt set_variable . + + $default reduce using rule 1014 (set_list) + + +state 1242 + + 1017 set_variable: variable . + + $default reduce using rule 1017 (set_variable) + + +state 1243 + + 749 sort_variable_indexed: SORT variable_indexed sort_keys_idx $@92 sort_duplicates_opt sort_collating_opt . + + $default reduce using rule 749 (sort_variable_indexed) + + +state 1244 + + 761 sort_duplicates_opt: with_opt DUPLICATES . in_opt order_opt + + IN shift, and go to state 1396 + + $default reduce using rule 1227 (in_opt) + + in_opt go to state 1397 + + +state 1245 + + 755 sort_key_idx: on_opt DIRECTION key_opt sort_keys_names_idx . + 759 sort_keys_names_idx: sort_keys_names_idx . variable_indexed + + SUBSCVAR shift, and go to state 459 + + $default reduce using rule 755 (sort_key_idx) + + variable_indexed go to state 1398 + + +state 1246 + + 758 sort_keys_names_idx: variable_indexed . + + $default reduce using rule 758 (sort_keys_names_idx) + + +state 1247 + + 747 sort_file: SORT name sort_keys $@89 sort_duplicates_opt sort_collating_opt . $@90 sort_input $@91 sort_output + + $default reduce using rule 745 ($@90) + + $@90 go to state 1399 + + +state 1248 + + 1066 invalid_key_sentence: INVALID key_opt @124 statement_list . + + $default reduce using rule 1066 (invalid_key_sentence) + + +state 1249 + + 1068 not_invalid_key_sentence: not_excep INVALID key_opt @125 . statement_list + + READ shift, and go to state 254 + WRITE shift, and go to state 255 + RELEASE shift, and go to state 256 + ACCEPT shift, and go to state 257 + ADD shift, and go to state 258 + CALL shift, and go to state 259 + CALL_LOADLIB shift, and go to state 260 + CANCEL shift, and go to state 261 + CHAIN shift, and go to state 262 + CLOSE shift, and go to state 263 + COMPUTE shift, and go to state 264 + CONTINUE shift, and go to state 265 + DELETE shift, and go to state 266 + DISPLAY shift, and go to state 267 + DIVIDE shift, and go to state 268 + EVALUATE shift, and go to state 269 + EXIT shift, and go to state 270 + GENERATE shift, and go to state 271 + GO shift, and go to state 272 + GOBACK shift, and go to state 273 + IF shift, and go to state 274 + INITIALIZE shift, and go to state 275 + INITIATE shift, and go to state 276 + INSPECT shift, and go to state 277 + MERGE shift, and go to state 278 + MOVE shift, and go to state 279 + MULTIPLY shift, and go to state 280 + OPEN shift, and go to state 281 + PERFORM shift, and go to state 282 + READY shift, and go to state 283 + RESET shift, and go to state 284 + RETURN shift, and go to state 285 + REWRITE shift, and go to state 286 + SEARCH shift, and go to state 287 + SET shift, and go to state 288 + SORT shift, and go to state 289 + START shift, and go to state 290 + STOP shift, and go to state 291 + STRINGCMD shift, and go to state 292 + SUBTRACT shift, and go to state 293 + TCOBPROTO1 shift, and go to state 294 + TCOBPROTO2 shift, and go to state 295 + TERMINATE shift, and go to state 296 + UNLOCK shift, and go to state 297 + UNSTRING shift, and go to state 298 + + statement_list go to state 1400 + statements go to state 640 + statement go to state 300 + perform_statement go to state 301 + if_statement go to state 302 + search_statement go to state 303 + evaluate_statement go to state 304 + if_part go to state 305 + unlock_statement go to state 306 + proto_statement go to state 307 + trace_statement go to state 308 + initiate_statement go to state 309 + generate_statement go to state 310 + terminate_statement go to state 311 + cancel_statement go to state 312 + merge_statement go to state 313 + sort_statement go to state 314 + sort_file go to state 315 + sort_variable_indexed go to state 316 + move_statement go to state 317 + initialize_statement go to state 318 + compute_statement go to state 319 + add_statement go to state 320 + subtract_statement go to state 321 + multiply_statement go to state 322 + divide_statement go to state 323 + accept_statement go to state 324 + accept_hardware go to state 325 + accept_chronological go to state 326 + accept_screen go to state 327 + display_statement go to state 328 + display_line go to state 329 + display_screen go to state 330 + open_statement go to state 331 + close_statement go to state 332 + return_statement go to state 333 + read_statement go to state 334 + release_statement go to state 335 + write_statement go to state 336 + rewrite_statement go to state 337 + delete_statement go to state 338 + start_statement go to state 339 + goto_statement go to state 340 + call_statement go to state 341 + call_loadlib_statement go to state 342 + chain_statement go to state 343 + exit_statement go to state 344 + stop_statement go to state 345 + goback_statement go to state 346 + set_statement go to state 347 + string_statement go to state 348 + unstring_statement go to state 349 + inspect_statement go to state 350 + + +state 1250 + + 953 start_body: name KEY is_opt cond_op name . + + $default reduce using rule 953 (start_body) + + +state 1251 + + 1027 string_statement: STRINGCMD string_from_list INTO name string_with_pointer $@117 . on_overflow_opt end_stringcmd_opt + + $default reduce using rule 1045 ($@119) + + on_overflow_opt go to state 1401 + $@119 go to state 1402 + + +state 1252 + + 1071 string_with_pointer: with_opt POINTER . name + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + name go to state 1403 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1253 + + 804 subtract_body: CORRESPONDING var_list_gname FROM var_list_name rounded_opt . on_size_error_opt + + NOT shift, and go to state 985 + ON shift, and go to state 620 + + NOT [reduce using rule 997 (on_size_error_opt)] + SIZE reduce using rule 1235 (on_opt) + $default reduce using rule 997 (on_size_error_opt) + + on_size_error_opt go to state 1404 + on_opt go to state 987 + + +state 1254 + + 803 subtract_body: var_list_gname FROM gname GIVING var_list_name . on_size_error_opt + 992 var_list_name: var_list_name . name rounded_opt sep_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NOT shift, and go to state 985 + ON shift, and go to state 620 + + NOT [reduce using rule 997 (on_size_error_opt)] + SIZE reduce using rule 1235 (on_opt) + $default reduce using rule 997 (on_size_error_opt) + + on_size_error_opt go to state 1405 + on_opt go to state 987 + name go to state 567 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1255 + + 1033 unstring_delimited_vars: unstring_delimited_vars OR . all_opt gname + + ALL shift, and go to state 1092 + + ALL [reduce using rule 1043 (all_opt)] + $default reduce using rule 1043 (all_opt) + + all_opt go to state 1406 + + +state 1256 + + 1032 unstring_delimited_vars: all_opt gname . + + $default reduce using rule 1032 (unstring_delimited_vars) + + +state 1257 + + 1029 unstring_statement: UNSTRING name unstring_delimited INTO unstring_destinations string_with_pointer . unstring_tallying $@118 on_overflow_opt end_unstring_opt + + TALLYING shift, and go to state 1407 + + $default reduce using rule 1041 (unstring_tallying) + + unstring_tallying go to state 1408 + + +state 1258 + + 1035 unstring_destinations: unstring_destinations sep_opt . unstring_dest_var + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + unstring_dest_var go to state 1409 + name go to state 1097 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1259 + + 1038 unstring_delim_opt: DELIMITER . in_opt name + + IN shift, and go to state 1396 + + $default reduce using rule 1227 (in_opt) + + in_opt go to state 1410 + + +state 1260 + + 1036 unstring_dest_var: name unstring_delim_opt . unstring_count_opt + + COUNT shift, and go to state 1411 + + $default reduce using rule 1039 (unstring_count_opt) + + unstring_count_opt go to state 1412 + + +state 1261 + + 647 if_statement: if_part ELSE @60 conditional_statement $@61 end_if_opt . + + $default reduce using rule 647 (if_statement) + + +state 1262 + + 688 conditional_statement: $@75 NEXT SENTENCE . + + $default reduce using rule 688 (conditional_statement) + + +state 1263 + + 75 switch_on_opt: ON status_opt is_opt . STRING + + STRING shift, and go to state 1413 + + +state 1264 + + 77 switch_off_opt: OFF status_opt . is_opt STRING + + IS shift, and go to state 84 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 1414 + + +state 1265 + + 108 select_clause: ACCESS mode_opt is_opt . access_options + + STRING shift, and go to state 1280 + LABELSTR shift, and go to state 1281 + DYNAMIC shift, and go to state 1415 + RANDOM shift, and go to state 1416 + SEQUENTIAL shift, and go to state 1417 + + access_options go to state 1418 + anystring go to state 1419 + + +state 1266 + + 112 select_clause: ALTERNATE RECORD key_opt . is_opt STRING with_duplicates + + IS shift, and go to state 84 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 1420 + + +state 1267 + + 123 assign_clause: error . + + $default reduce using rule 123 (assign_clause) + + +state 1268 + + 1279 filename: STRING . + + $default reduce using rule 1279 (filename) + + +state 1269 + + 119 assign_clause: PORTNUM . + 121 | PORTNUM . filename + + STRING shift, and go to state 1268 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + STRING [reduce using rule 119 (assign_clause)] + $default reduce using rule 119 (assign_clause) + + literal go to state 1272 + signed_nliteral go to state 77 + filename go to state 1421 + + +state 1270 + + 122 assign_clause: EXTERNAL . filename + + STRING shift, and go to state 1268 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + literal go to state 1272 + signed_nliteral go to state 77 + filename go to state 1422 + + +state 1271 + + 107 select_clause: ASSIGN to_opt assign_clause . + + $default reduce using rule 107 (select_clause) + + +state 1272 + + 1278 filename: literal . + + $default reduce using rule 1278 (filename) + + +state 1273 + + 120 assign_clause: filename . + + $default reduce using rule 120 (assign_clause) + + +state 1274 + + 110 select_clause: RECORD key_opt is_opt . STRING + + STRING shift, and go to state 1423 + + +state 1275 + + 111 select_clause: RELATIVE key_opt is_opt . STRING + + STRING shift, and go to state 1424 + + +state 1276 + + 128 areas_opt: AREA . + + $default reduce using rule 128 (areas_opt) + + +state 1277 + + 129 areas_opt: AREAS . + + $default reduce using rule 129 (areas_opt) + + +state 1278 + + 113 select_clause: RESERVE NLITERAL areas_opt . + + $default reduce using rule 113 (select_clause) + + +state 1279 + + 109 select_clause: file_opt STATUS is_opt . STRING + + STRING shift, and go to state 1425 + + +state 1280 + + 1307 anystring: STRING . + + $default reduce using rule 1307 (anystring) + + +state 1281 + + 1308 anystring: LABELSTR . + + $default reduce using rule 1308 (anystring) + + +state 1282 + + 137 organization_options: INDEXED . + + $default reduce using rule 137 (organization_options) + + +state 1283 + + 140 organization_options: LINE . SEQUENTIAL + + SEQUENTIAL shift, and go to state 1426 + + +state 1284 + + 139 organization_options: RELATIVE . + + $default reduce using rule 139 (organization_options) + + +state 1285 + + 138 organization_options: SEQUENTIAL . + + $default reduce using rule 138 (organization_options) + + +state 1286 + + 106 select_clause: organization_opt is_opt organization_options . + + $default reduce using rule 106 (select_clause) + + +state 1287 + + 141 organization_options: anystring . + + $default reduce using rule 141 (organization_options) + + +state 1288 + + 162 i_o_control_multiple_file_position_opt: POSITION integer . + + $default reduce using rule 162 (i_o_control_multiple_file_position_opt) + + +state 1289 + + 499 file_description_clause_block: BLOCK contains_opt integer . to_integer_opt chars_or_recs_opt + + TO shift, and go to state 1427 + + $default reduce using rule 525 (to_integer_opt) + + to_integer_opt go to state 1428 + + +state 1290 + + 506 file_description_clause_code_set: CODE_SET is_opt STRING . + + $default reduce using rule 506 (file_description_clause_code_set) + + +state 1291 + + 535 record_is_are: RECORD is_opt . + + $default reduce using rule 535 (record_is_are) + + +state 1292 + + 536 record_is_are: RECORDS are_opt . + + $default reduce using rule 536 (record_is_are) + + +state 1293 + + 520 var_strings: STRING . + + $default reduce using rule 520 (var_strings) + + +state 1294 + + 504 file_description_clause_data: DATA record_is_are var_strings . + 521 var_strings: var_strings . STRING + + STRING shift, and go to state 1429 + + $default reduce using rule 504 (file_description_clause_data) + + +state 1295 + + 538 std_or_omitt: OMITTED . + + $default reduce using rule 538 (std_or_omitt) + + +state 1296 + + 537 std_or_omitt: STANDARD . + + $default reduce using rule 537 (std_or_omitt) + + +state 1297 + + 502 file_description_clause_label: LABEL record_is_are std_or_omitt . + + $default reduce using rule 502 (file_description_clause_label) + + +state 1298 + + 1281 data_name: STRING . + + $default reduce using rule 1281 (data_name) + + +state 1299 + + 1280 data_name: literal . + + $default reduce using rule 1280 (data_name) + + +state 1300 + + 507 file_description_clause_linage: LINAGE is_opt data_name . lines_opt file_description_clause_linage_footing file_description_clause_linage_top file_description_clause_linage_bottom + + LINES shift, and go to state 1342 + + LINES [reduce using rule 207 (lines_opt)] + $default reduce using rule 207 (lines_opt) + + lines_opt go to state 1430 + + +state 1301 + + 501 file_description_clause_record: RECORD is_opt VARYING . in_opt size_opt from_rec_varying to_rec_varying character_opts depend_rec_varying + + IN shift, and go to state 1396 + + $default reduce using rule 1227 (in_opt) + + in_opt go to state 1431 + + +state 1302 + + 500 file_description_clause_record: RECORD contains_opt integer . to_rec_varying character_opts + + TO shift, and go to state 1432 + + $default reduce using rule 533 (to_rec_varying) + + to_rec_varying go to state 1433 + + +state 1303 + + 503 file_description_clause_value: VALUE OF FILE_ID . is_opt filename + + IS shift, and go to state 84 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 1434 + + +state 1304 + + 419 file_section: file_section FD $@38 STRING $@39 file_description_fd_clauses PERIOD_TOK $@40 file_description . + 427 file_description: file_description . field_description + + NLITERAL shift, and go to state 59 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + $default reduce using rule 419 (file_section) + + field_description go to state 1435 + signed_nliteral go to state 234 + integer go to state 235 + + +state 1305 + + 426 file_description: field_description . + + $default reduce using rule 426 (file_description) + + +state 1306 + + 423 file_section: file_section SD $@41 STRING $@42 file_description_sd_clauses PERIOD_TOK $@43 file_description . + 427 file_description: file_description . field_description + + NLITERAL shift, and go to state 59 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + $default reduce using rule 423 (file_section) + + field_description go to state 1435 + signed_nliteral go to state 234 + integer go to state 235 + + +state 1307 + + 446 data_clause: BLANK when_opt ZERO . + + $default reduce using rule 446 (data_clause) + + +state 1308 + + 458 array_options: OCCURS integer TO . integer times_opt DEPENDING $@48 on_opt gname $@49 indexed_by_opt + + NLITERAL shift, and go to state 59 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + signed_nliteral go to state 234 + integer go to state 1436 + + +state 1309 + + 542 times_opt: TIMES . + + $default reduce using rule 542 (times_opt) + + +state 1310 + + 455 array_options: OCCURS integer times_opt . $@47 indexed_by_opt + + $default reduce using rule 454 ($@47) + + $@47 go to state 1437 + + +state 1311 + + 477 pictures: PICTURE $@50 is_opt . picture + + $default reduce using rule 478 (picture) + + picture go to state 1438 + + +state 1312 + + 435 redefines_var: VARIABLE . + + $default reduce using rule 435 (redefines_var) + + +state 1313 + + 436 redefines_var: SUBSCVAR . + + $default reduce using rule 436 (redefines_var) + + +state 1314 + + 434 redefines_clause: REDEFINES $@45 redefines_var . + + $default reduce using rule 434 (redefines_clause) + + +state 1315 + + 448 data_clause: RENAMES $@46 variable . thru_gname_opt + + THRU shift, and go to state 1439 + + $default reduce using rule 452 (thru_gname_opt) + + thru_gname_opt go to state 1440 + + +state 1316 + + 403 separate_opt: SEPARATE . character_opt + + CHARACTER shift, and go to state 1441 + + $default reduce using rule 406 (character_opt) + + character_opt go to state 1442 + + +state 1317 + + 401 sign_clause: sign_is_opt LEADING separate_opt . + + $default reduce using rule 401 (sign_clause) + + +state 1318 + + 402 sign_clause: sign_is_opt TRAILING separate_opt . + + $default reduce using rule 402 (sign_clause) + + +state 1319 + + 473 value_list: value_list comma_opt . value + + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + value go to state 1443 + gliteral go to state 1157 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + + +state 1320 + + 475 value: gliteral THRU . gliteral + + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gliteral go to state 1444 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + + +state 1321 + + 466 usage: USAGENUM . + + $default reduce using rule 466 (usage) + + +state 1322 + + 467 usage: DISPLAY . + + $default reduce using rule 467 (usage) + + +state 1323 + + 468 usage: POINTER . + + $default reduce using rule 468 (usage) + + +state 1324 + + 465 usage_option: usage_opt is_opt usage . + + $default reduce using rule 465 (usage_option) + + +state 1325 + + 198 report_control: CODE . gliteral + + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gliteral go to state 1445 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + + +state 1326 + + 209 control_is_are: CONTROL . is_opt + + IS shift, and go to state 84 + + IS [reduce using rule 132 (is_opt)] + $default reduce using rule 132 (is_opt) + + is_opt go to state 1446 + + +state 1327 + + 210 control_is_are: CONTROLS . are_opt + + ARE shift, and go to state 1130 + + $default reduce using rule 134 (are_opt) + + are_opt go to state 1447 + + +state 1328 + + 202 report_controls_page: PAGE . limit_is_are_opt integer line_lines_opt heading_opt first_detail_opt last_detail_opt footing_opt + + LIMIT shift, and go to state 1448 + LIMITS shift, and go to state 1449 + + $default reduce using rule 211 (limit_is_are_opt) + + limit_is_are_opt go to state 1450 + + +state 1329 + + 194 report_section: RD $@15 STRING $@16 report_controls PERIOD_TOK . $@17 report_description + + $default reduce using rule 193 ($@17) + + $@17 go to state 1451 + + +state 1330 + + 197 report_control: is_opt . GLOBAL + + GLOBAL shift, and go to state 1452 + + +state 1331 + + 196 report_controls: report_controls report_control . + + $default reduce using rule 196 (report_controls) + + +state 1332 + + 199 report_control: report_controls_control . + + $default reduce using rule 199 (report_control) + + +state 1333 + + 200 report_control: report_controls_page . + + $default reduce using rule 200 (report_control) + + +state 1334 + + 201 report_controls_control: control_is_are . final_opt report_break_list + + FINAL shift, and go to state 1453 + + $default reduce using rule 220 (final_opt) + + final_opt go to state 1454 + + +state 1335 + + 325 screen_item: integer def_name_opt $@28 screen_clauses . PERIOD_TOK + 327 screen_clauses: screen_clauses . LINE $@29 number_is_opt plus_minus_opt name_or_lit + 329 | screen_clauses . COLUMN $@30 number_is_opt plus_minus_opt name_or_lit + 330 | screen_clauses . with_opt screen_attrib + 332 | screen_clauses . with_opt FOREGROUNDCOLOR $@31 name_or_lit + 334 | screen_clauses . with_opt BACKGROUNDCOLOR $@32 name_or_lit + 336 | screen_clauses . with_opt COLOR $@33 name_or_lit + 337 | screen_clauses . screen_source_destination + 338 | screen_clauses . value_is_are gliteral + 339 | screen_clauses . pictures + 341 | screen_clauses . SIZE $@34 name_or_lit + + TO shift, and go to state 1455 + COLUMN shift, and go to state 1456 + FROM shift, and go to state 1457 + LINE shift, and go to state 1458 + PICTURE shift, and go to state 918 + SIZE shift, and go to state 1459 + USING shift, and go to state 1460 + VALUE shift, and go to state 924 + VALUES shift, and go to state 925 + WITH shift, and go to state 358 + PERIOD_TOK shift, and go to state 1461 + + WITH [reduce using rule 1233 (with_opt)] + $default reduce using rule 1233 (with_opt) + + screen_source_destination go to state 1462 + value_is_are go to state 1463 + pictures go to state 1464 + with_opt go to state 1465 + + +state 1336 + + 584 use_phrase: USE AFTER use_phrase_exception_error PROCEDURE on_opt . use_phrase_option PERIOD_TOK + + error shift, and go to state 438 + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + EXTEND shift, and go to state 439 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + INPUT shift, and go to state 440 + I_O shift, and go to state 441 + LOWVALUES shift, and go to state 66 + OUTPUT shift, and go to state 442 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + use_phrase_option go to state 1466 + open_mode go to state 1467 + gname_list go to state 1468 + gname go to state 71 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1337 + + 909 read_key_opt: KEY . is_opt name + + IS shift, and go to state 84 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 1469 + + +state 1338 + + 900 read_body: name read_next_opt record_opt read_into_opt with_lock_opt read_key_opt . + 901 | name read_next_opt record_opt read_into_opt with_lock_opt read_key_opt . read_at_end_opt + 902 | name read_next_opt record_opt read_into_opt with_lock_opt read_key_opt . read_invalid_key_opt + + NOT shift, and go to state 1470 + AT shift, and go to state 1049 + END shift, and go to state 1050 + INVALID shift, and go to state 1471 + + NOT [reduce using rule 900 (read_body)] + $default reduce using rule 900 (read_body) + + read_at_end_opt go to state 1472 + on_end go to state 1052 + read_invalid_key_opt go to state 1473 + read_invalid_key go to state 1474 + read_not_invalid_key go to state 1475 + + +state 1339 + + 941 end_write_opt: END_WRITE . + + $default reduce using rule 941 (end_write_opt) + + +state 1340 + + 934 write_statement: WRITE name write_from_opt write_options $@101 invalid_key_opt end_write_opt . + + $default reduce using rule 934 (write_statement) + + +state 1341 + + 206 line_lines_opt: LINE . + + $default reduce using rule 206 (line_lines_opt) + + +state 1342 + + 208 lines_opt: LINES . + + $default reduce using rule 208 (lines_opt) + + +state 1343 + + 938 write_options: before_after advancing_opt gname line_lines_opt . + + $default reduce using rule 938 (write_options) + + +state 1344 + + 205 line_lines_opt: lines_opt . + + $default reduce using rule 205 (line_lines_opt) + + +state 1345 + + 393 screen_attribx: BLANK when_opt ZERO . + + $default reduce using rule 393 (screen_attribx) + + +state 1346 + + 396 screen_attribx: with_opt NO ADVANCING . + + $default reduce using rule 396 (screen_attribx) + + +state 1347 + + 836 accept_screen: ACCEPT name accept_display_options on_opt EXCEPTION $@93 variable . @94 statement_list $@95 end_accept_opt + + $default reduce using rule 834 (@94) + + @94 go to state 1476 + + +state 1348 + + 795 add_body: CORRESPONDING var_list_gname TO var_list_name rounded_opt on_size_error_opt . + + $default reduce using rule 795 (add_body) + + +state 1349 + + 998 on_size_error_opt: NOT on_opt SIZE . on_size_error + + ERROR_TOK shift, and go to state 1350 + + on_size_error go to state 1477 + + +state 1350 + + 1003 on_size_error: ERROR_TOK . @116 statement_list + + $default reduce using rule 1002 (@116) + + @116 go to state 1478 + + +state 1351 + + 999 on_size_error_opt: on_opt SIZE on_size_error . + 1001 | on_opt SIZE on_size_error . NOT on_opt SIZE $@115 on_size_error + + NOT shift, and go to state 1479 + + NOT [reduce using rule 999 (on_size_error_opt)] + $default reduce using rule 999 (on_size_error_opt) + + +state 1352 + + 1128 returning_options: GIVING variable . + + $default reduce using rule 1128 (returning_options) + + +state 1353 + + 1127 returning_options: RETURNING variable . + + $default reduce using rule 1127 (returning_options) + + +state 1354 + + 967 call_statement: CALL $@105 call_convention_opt gname using_options returning_options @106 . @107 @108 on_exception_or_overflow on_not_exception $@109 end_call_opt + + $default reduce using rule 964 (@107) + + @107 go to state 1480 + + +state 1355 + + 1125 using_options: USING @127 dummy @128 . parm_list + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + BY shift, and go to state 854 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + $default reduce using rule 1231 (by_opt) + + parm_list go to state 1481 + parameter go to state 1482 + by_opt go to state 1483 + gname go to state 1484 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1356 + + 981 chain_statement: CHAIN $@111 gname using_options @112 @113 on_exception_or_overflow . $@114 end_chain_opt + + $default reduce using rule 980 ($@114) + + $@114 go to state 1485 + + +state 1357 + + 1048 on_exception_or_overflow: on_opt . exception_or_overflow @120 statement_list + + EXCEPTION shift, and go to state 1486 + OVERFLOW_TOK shift, and go to state 1487 + + exception_or_overflow go to state 1488 + + +state 1358 + + 850 display_line_options: display_line_options with_opt NO ADVANCING . + + $default reduce using rule 850 (display_line_options) + + +state 1359 + + 853 display_line_options: display_line_options with_opt ERASE EOL . + + $default reduce using rule 853 (display_line_options) + + +state 1360 + + 852 display_line_options: display_line_options with_opt ERASE EOS . + + $default reduce using rule 852 (display_line_options) + + +state 1361 + + 854 display_line_options: display_line_options with_opt ERASE SCREEN . + + $default reduce using rule 854 (display_line_options) + + +state 1362 + + 815 divide_body: gname BY gname GIVING var_list_name on_size_error_opt . + + $default reduce using rule 815 (divide_body) + + +state 1363 + + 816 divide_body: gname BY gname GIVING name rounded_opt . REMAINDER name on_size_error_opt + 991 var_list_name: name rounded_opt . sep_opt + + LISTSEP shift, and go to state 98 + REMAINDER shift, and go to state 1489 + + $default reduce using rule 1214 (sep_opt) + + sep_opt go to state 755 + + +state 1364 + + 818 divide_body: gname INTO gname GIVING var_list_name on_size_error_opt . + + $default reduce using rule 818 (divide_body) + + +state 1365 + + 817 divide_body: gname INTO gname GIVING name rounded_opt . REMAINDER name on_size_error_opt + 991 var_list_name: name rounded_opt . sep_opt + + LISTSEP shift, and go to state 98 + REMAINDER shift, and go to state 1490 + + $default reduce using rule 1214 (sep_opt) + + sep_opt go to state 755 + + +state 1366 + + 665 when_case_list: WHEN @66 @67 . when_case sentence_or_nothing + + OTHER shift, and go to state 1491 + + $default reduce using rule 670 (@71) + + when_case go to state 1492 + @71 go to state 1493 + + +state 1367 + + 669 when_case_list: when_case_list WHEN @68 . @69 when_case $@70 sentence_or_nothing + + $default reduce using rule 667 (@69) + + @69 go to state 1494 + + +state 1368 + + 1210 cond_op: conditional OR conditional . + + $default reduce using rule 1210 (cond_op) + + +state 1369 + + 780 initialize_replacing_list: initialize_type_list data_opt BY gname . + + $default reduce using rule 780 (initialize_replacing_list) + + +state 1370 + + 1088 converting_clause: CONVERTING noallname TO noallname inspect_before_after . + 1108 inspect_before_after: inspect_before_after . BEFORE initial_opt noallname + 1109 | inspect_before_after . AFTER initial_opt noallname + + AFTER shift, and go to state 1495 + BEFORE shift, and go to state 1496 + + $default reduce using rule 1088 (converting_clause) + + +state 1371 + + 1091 tallying_list: tallying_list name FOR tallying_for_list . + 1093 tallying_for_list: tallying_for_list . CHARACTERS inspect_before_after + 1094 | tallying_for_list . ALL noallname inspect_before_after + 1095 | tallying_for_list . LEADING noallname inspect_before_after + + ALL shift, and go to state 1497 + CHARACTERS shift, and go to state 1498 + LEADING shift, and go to state 1499 + + $default reduce using rule 1091 (tallying_list) + + +state 1372 + + 1104 replacing_kind: ALL . + + $default reduce using rule 1104 (replacing_kind) + + +state 1373 + + 1099 replacing_list: replacing_list CHARACTERS . BY noallname inspect_before_after + + BY shift, and go to state 1500 + + +state 1374 + + 1107 replacing_kind: FIRST . + + $default reduce using rule 1107 (replacing_kind) + + +state 1375 + + 1105 replacing_kind: LEADING . + + $default reduce using rule 1105 (replacing_kind) + + +state 1376 + + 1106 replacing_kind: TRAILING . + + $default reduce using rule 1106 (replacing_kind) + + +state 1377 + + 1100 replacing_list: replacing_list replacing_kind . replacing_by_list + + $default reduce using rule 1103 (replacing_by_list) + + replacing_by_list go to state 1501 + + +state 1378 + + 741 merge_using: USING . sort_file_list + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + sort_file_list go to state 1502 + name go to state 1503 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1379 + + 740 merge_statement: MERGE name sort_keys $@86 sort_collating_opt $@87 merge_using . $@88 sort_output + + $default reduce using rule 739 ($@88) + + $@88 go to state 1504 + + +state 1380 + + 757 sort_keys_names: sort_keys_names name . + + $default reduce using rule 757 (sort_keys_names) + + +state 1381 + + 809 multiply_body: gname BY gname GIVING var_list_name on_size_error_opt . + + $default reduce using rule 809 (multiply_body) + + +state 1382 + + 1151 perform_options: with_test_opt UNTIL @131 condition @132 perform_statements . $@133 END_PERFORM + + $default reduce using rule 1150 ($@133) + + $@133 go to state 1505 + + +state 1383 + + 1155 perform_options: with_test_opt VARYING name FROM gname by_opt . gname UNTIL @134 condition @135 perform_after_opt perform_statements $@136 END_PERFORM + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gname go to state 1506 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1384 + + 1147 perform_options: gname TIMES @129 perform_statements $@130 END_PERFORM . + + $default reduce using rule 1147 (perform_options) + + +state 1385 + + 1158 perform_options: label perform_thru_opt with_test_opt UNTIL @137 condition . + 1184 condition: condition . AND @143 implied_op_condition + 1186 | condition . OR @144 implied_op_condition + + OR shift, and go to state 611 + AND shift, and go to state 612 + + $default reduce using rule 1158 (perform_options) + + +state 1386 + + 1162 perform_options: label perform_thru_opt with_test_opt VARYING name FROM . gname by_opt gname UNTIL @138 condition @139 perform_after_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gname go to state 1507 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1387 + + 910 read_at_end_opt: NOT at_opt on_end . + + $default reduce using rule 910 (read_at_end_opt) + + +state 1388 + + 914 read_at_end_opt: AT on_end NOT . at_opt $@96 on_end + + AT shift, and go to state 1054 + + $default reduce using rule 1225 (at_opt) + + at_opt go to state 1508 + + +state 1389 + + 918 on_end: END @98 statement_list . + + $default reduce using rule 918 (on_end) + + +state 1390 + + 916 read_at_end_opt: on_end NOT at_opt . $@97 on_end + + $default reduce using rule 915 ($@97) + + $@97 go to state 1509 + + +state 1391 + + 718 search_all_when: WHEN . $@83 search_all_when_conditional @84 search_all_when_statement + + $default reduce using rule 716 ($@83) + + $@83 go to state 1510 + + +state 1392 + + 701 search_all: variable_indexed @79 search_at_end $@80 search_all_when_list . + 715 search_all_when_list: search_all_when_list . search_all_when + + WHEN shift, and go to state 1391 + + WHEN [reduce using rule 701 (search_all)] + $default reduce using rule 701 (search_all) + + search_all_when go to state 1511 + + +state 1393 + + 714 search_all_when_list: search_all_when . + + $default reduce using rule 714 (search_all_when_list) + + +state 1394 + + 705 search_at_end: at_opt END @81 . statement_list + + READ shift, and go to state 254 + WRITE shift, and go to state 255 + RELEASE shift, and go to state 256 + ACCEPT shift, and go to state 257 + ADD shift, and go to state 258 + CALL shift, and go to state 259 + CALL_LOADLIB shift, and go to state 260 + CANCEL shift, and go to state 261 + CHAIN shift, and go to state 262 + CLOSE shift, and go to state 263 + COMPUTE shift, and go to state 264 + CONTINUE shift, and go to state 265 + DELETE shift, and go to state 266 + DISPLAY shift, and go to state 267 + DIVIDE shift, and go to state 268 + EVALUATE shift, and go to state 269 + EXIT shift, and go to state 270 + GENERATE shift, and go to state 271 + GO shift, and go to state 272 + GOBACK shift, and go to state 273 + IF shift, and go to state 274 + INITIALIZE shift, and go to state 275 + INITIATE shift, and go to state 276 + INSPECT shift, and go to state 277 + MERGE shift, and go to state 278 + MOVE shift, and go to state 279 + MULTIPLY shift, and go to state 280 + OPEN shift, and go to state 281 + PERFORM shift, and go to state 282 + READY shift, and go to state 283 + RESET shift, and go to state 284 + RETURN shift, and go to state 285 + REWRITE shift, and go to state 286 + SEARCH shift, and go to state 287 + SET shift, and go to state 288 + SORT shift, and go to state 289 + START shift, and go to state 290 + STOP shift, and go to state 291 + STRINGCMD shift, and go to state 292 + SUBTRACT shift, and go to state 293 + TCOBPROTO1 shift, and go to state 294 + TCOBPROTO2 shift, and go to state 295 + TERMINATE shift, and go to state 296 + UNLOCK shift, and go to state 297 + UNSTRING shift, and go to state 298 + + statement_list go to state 1512 + statements go to state 640 + statement go to state 300 + perform_statement go to state 301 + if_statement go to state 302 + search_statement go to state 303 + evaluate_statement go to state 304 + if_part go to state 305 + unlock_statement go to state 306 + proto_statement go to state 307 + trace_statement go to state 308 + initiate_statement go to state 309 + generate_statement go to state 310 + terminate_statement go to state 311 + cancel_statement go to state 312 + merge_statement go to state 313 + sort_statement go to state 314 + sort_file go to state 315 + sort_variable_indexed go to state 316 + move_statement go to state 317 + initialize_statement go to state 318 + compute_statement go to state 319 + add_statement go to state 320 + subtract_statement go to state 321 + multiply_statement go to state 322 + divide_statement go to state 323 + accept_statement go to state 324 + accept_hardware go to state 325 + accept_chronological go to state 326 + accept_screen go to state 327 + display_statement go to state 328 + display_line go to state 329 + display_screen go to state 330 + open_statement go to state 331 + close_statement go to state 332 + return_statement go to state 333 + read_statement go to state 334 + release_statement go to state 335 + write_statement go to state 336 + rewrite_statement go to state 337 + delete_statement go to state 338 + start_statement go to state 339 + goto_statement go to state 340 + call_statement go to state 341 + call_loadlib_statement go to state 342 + chain_statement go to state 343 + exit_statement go to state 344 + stop_statement go to state 345 + goback_statement go to state 346 + set_statement go to state 347 + string_statement go to state 348 + unstring_statement go to state 349 + inspect_statement go to state 350 + + +state 1395 + + 698 search: variable_indexed @76 search_varying_opt @77 search_at_end @78 . search_when_list + + WHEN shift, and go to state 1513 + + search_when_list go to state 1514 + search_when go to state 1515 + + +state 1396 + + 1228 in_opt: IN . + + $default reduce using rule 1228 (in_opt) + + +state 1397 + + 761 sort_duplicates_opt: with_opt DUPLICATES in_opt . order_opt + + ORDER shift, and go to state 1516 + + $default reduce using rule 549 (order_opt) + + order_opt go to state 1517 + + +state 1398 + + 759 sort_keys_names_idx: sort_keys_names_idx variable_indexed . + + $default reduce using rule 759 (sort_keys_names_idx) + + +state 1399 + + 747 sort_file: SORT name sort_keys $@89 sort_duplicates_opt sort_collating_opt $@90 . sort_input $@91 sort_output + + INPUT shift, and go to state 1518 + USING shift, and go to state 1519 + + sort_input go to state 1520 + + +state 1400 + + 1068 not_invalid_key_sentence: not_excep INVALID key_opt @125 statement_list . + + $default reduce using rule 1068 (not_invalid_key_sentence) + + +state 1401 + + 1027 string_statement: STRINGCMD string_from_list INTO name string_with_pointer $@117 on_overflow_opt . end_stringcmd_opt + + END_STRINGCMD shift, and go to state 1521 + + END_STRINGCMD [reduce using rule 1081 (end_stringcmd_opt)] + $default reduce using rule 1081 (end_stringcmd_opt) + + end_stringcmd_opt go to state 1522 + + +state 1402 + + 1046 on_overflow_opt: $@119 . on_overflow on_not_overflow + + ON shift, and go to state 620 + + OVERFLOW_TOK reduce using rule 1235 (on_opt) + $default reduce using rule 1057 (on_overflow) + + on_overflow go to state 1523 + on_opt go to state 1524 + + +state 1403 + + 1071 string_with_pointer: with_opt POINTER name . + + $default reduce using rule 1071 (string_with_pointer) + + +state 1404 + + 804 subtract_body: CORRESPONDING var_list_gname FROM var_list_name rounded_opt on_size_error_opt . + + $default reduce using rule 804 (subtract_body) + + +state 1405 + + 803 subtract_body: var_list_gname FROM gname GIVING var_list_name on_size_error_opt . + + $default reduce using rule 803 (subtract_body) + + +state 1406 + + 1033 unstring_delimited_vars: unstring_delimited_vars OR all_opt . gname + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gname go to state 1525 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1407 + + 1042 unstring_tallying: TALLYING . in_opt name + + IN shift, and go to state 1396 + + $default reduce using rule 1227 (in_opt) + + in_opt go to state 1526 + + +state 1408 + + 1029 unstring_statement: UNSTRING name unstring_delimited INTO unstring_destinations string_with_pointer unstring_tallying . $@118 on_overflow_opt end_unstring_opt + + $default reduce using rule 1028 ($@118) + + $@118 go to state 1527 + + +state 1409 + + 1035 unstring_destinations: unstring_destinations sep_opt unstring_dest_var . + + $default reduce using rule 1035 (unstring_destinations) + + +state 1410 + + 1038 unstring_delim_opt: DELIMITER in_opt . name + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + name go to state 1528 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1411 + + 1040 unstring_count_opt: COUNT . in_opt name + + IN shift, and go to state 1396 + + $default reduce using rule 1227 (in_opt) + + in_opt go to state 1529 + + +state 1412 + + 1036 unstring_dest_var: name unstring_delim_opt unstring_count_opt . + + $default reduce using rule 1036 (unstring_dest_var) + + +state 1413 + + 75 switch_on_opt: ON status_opt is_opt STRING . + + $default reduce using rule 75 (switch_on_opt) + + +state 1414 + + 77 switch_off_opt: OFF status_opt is_opt . STRING + + STRING shift, and go to state 1530 + + +state 1415 + + 143 access_options: DYNAMIC . + + $default reduce using rule 143 (access_options) + + +state 1416 + + 144 access_options: RANDOM . + + $default reduce using rule 144 (access_options) + + +state 1417 + + 142 access_options: SEQUENTIAL . + + $default reduce using rule 142 (access_options) + + +state 1418 + + 108 select_clause: ACCESS mode_opt is_opt access_options . + + $default reduce using rule 108 (select_clause) + + +state 1419 + + 145 access_options: anystring . + + $default reduce using rule 145 (access_options) + + +state 1420 + + 112 select_clause: ALTERNATE RECORD key_opt is_opt . STRING with_duplicates + + STRING shift, and go to state 1531 + + +state 1421 + + 121 assign_clause: PORTNUM filename . + + $default reduce using rule 121 (assign_clause) + + +state 1422 + + 122 assign_clause: EXTERNAL filename . + + $default reduce using rule 122 (assign_clause) + + +state 1423 + + 110 select_clause: RECORD key_opt is_opt STRING . + + $default reduce using rule 110 (select_clause) + + +state 1424 + + 111 select_clause: RELATIVE key_opt is_opt STRING . + + $default reduce using rule 111 (select_clause) + + +state 1425 + + 109 select_clause: file_opt STATUS is_opt STRING . + + $default reduce using rule 109 (select_clause) + + +state 1426 + + 140 organization_options: LINE SEQUENTIAL . + + $default reduce using rule 140 (organization_options) + + +state 1427 + + 526 to_integer_opt: TO . integer + + NLITERAL shift, and go to state 59 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + signed_nliteral go to state 234 + integer go to state 1532 + + +state 1428 + + 499 file_description_clause_block: BLOCK contains_opt integer to_integer_opt . chars_or_recs_opt + + CHARACTERS shift, and go to state 1533 + RECORDS shift, and go to state 1534 + + $default reduce using rule 522 (chars_or_recs_opt) + + chars_or_recs_opt go to state 1535 + + +state 1429 + + 521 var_strings: var_strings STRING . + + $default reduce using rule 521 (var_strings) + + +state 1430 + + 507 file_description_clause_linage: LINAGE is_opt data_name lines_opt . file_description_clause_linage_footing file_description_clause_linage_top file_description_clause_linage_bottom + + WITH shift, and go to state 358 + + FOOTING reduce using rule 1233 (with_opt) + $default reduce using rule 508 (file_description_clause_linage_footing) + + file_description_clause_linage_footing go to state 1536 + with_opt go to state 1537 + + +state 1431 + + 501 file_description_clause_record: RECORD is_opt VARYING in_opt . size_opt from_rec_varying to_rec_varying character_opts depend_rec_varying + + SIZE shift, and go to state 1538 + + $default reduce using rule 1004 (size_opt) + + size_opt go to state 1539 + + +state 1432 + + 534 to_rec_varying: TO . nliteral + + NLITERAL shift, and go to state 59 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + nliteral go to state 1540 + signed_nliteral go to state 1069 + + +state 1433 + + 500 file_description_clause_record: RECORD contains_opt integer to_rec_varying . character_opts + + CHARACTERS shift, and go to state 1541 + + $default reduce using rule 547 (character_opts) + + character_opts go to state 1542 + + +state 1434 + + 503 file_description_clause_value: VALUE OF FILE_ID is_opt . filename + + STRING shift, and go to state 1268 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + literal go to state 1272 + signed_nliteral go to state 77 + filename go to state 1543 + + +state 1435 + + 427 file_description: file_description field_description . + + $default reduce using rule 427 (file_description) + + +state 1436 + + 458 array_options: OCCURS integer TO integer . times_opt DEPENDING $@48 on_opt gname $@49 indexed_by_opt + + TIMES shift, and go to state 1309 + + $default reduce using rule 541 (times_opt) + + times_opt go to state 1544 + + +state 1437 + + 455 array_options: OCCURS integer times_opt $@47 . indexed_by_opt + + DIRECTION shift, and go to state 1545 + + INDEXED reduce using rule 460 (key_is_opt) + $default reduce using rule 462 (indexed_by_opt) + + key_is_opt go to state 1546 + indexed_by_opt go to state 1547 + + +state 1438 + + 477 pictures: PICTURE $@50 is_opt picture . + 479 picture: picture . pic_elem + + CHAR shift, and go to state 1548 + + $default reduce using rule 477 (pictures) + + pic_elem go to state 1549 + + +state 1439 + + 453 thru_gname_opt: THRU . variable + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + + variable go to state 1550 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1440 + + 448 data_clause: RENAMES $@46 variable thru_gname_opt . + + $default reduce using rule 448 (data_clause) + + +state 1441 + + 405 character_opt: CHARACTER . + + $default reduce using rule 405 (character_opt) + + +state 1442 + + 403 separate_opt: SEPARATE character_opt . + + $default reduce using rule 403 (separate_opt) + + +state 1443 + + 473 value_list: value_list comma_opt value . + + $default reduce using rule 473 (value_list) + + +state 1444 + + 475 value: gliteral THRU gliteral . + + $default reduce using rule 475 (value) + + +state 1445 + + 198 report_control: CODE gliteral . + + $default reduce using rule 198 (report_control) + + +state 1446 + + 209 control_is_are: CONTROL is_opt . + + $default reduce using rule 209 (control_is_are) + + +state 1447 + + 210 control_is_are: CONTROLS are_opt . + + $default reduce using rule 210 (control_is_are) + + +state 1448 + + 212 limit_is_are_opt: LIMIT . IS + + IS shift, and go to state 1551 + + +state 1449 + + 213 limit_is_are_opt: LIMITS . ARE + + ARE shift, and go to state 1552 + + +state 1450 + + 202 report_controls_page: PAGE limit_is_are_opt . integer line_lines_opt heading_opt first_detail_opt last_detail_opt footing_opt + + NLITERAL shift, and go to state 59 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + signed_nliteral go to state 234 + integer go to state 1553 + + +state 1451 + + 194 report_section: RD $@15 STRING $@16 report_controls PERIOD_TOK $@17 . report_description + + NLITERAL shift, and go to state 59 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + report_description go to state 1554 + report_item go to state 1555 + signed_nliteral go to state 234 + integer go to state 1556 + + +state 1452 + + 197 report_control: is_opt GLOBAL . + + $default reduce using rule 197 (report_control) + + +state 1453 + + 221 final_opt: FINAL . + + $default reduce using rule 221 (final_opt) + + +state 1454 + + 201 report_controls_control: control_is_are final_opt . report_break_list + + $default reduce using rule 222 (report_break_list) + + report_break_list go to state 1557 + + +state 1455 + + 348 screen_source_destination: TO . $@37 name + + $default reduce using rule 347 ($@37) + + $@37 go to state 1558 + + +state 1456 + + 329 screen_clauses: screen_clauses COLUMN . $@30 number_is_opt plus_minus_opt name_or_lit + + $default reduce using rule 328 ($@30) + + $@30 go to state 1559 + + +state 1457 + + 346 screen_source_destination: FROM . $@36 name_or_lit screen_to_name + + $default reduce using rule 345 ($@36) + + $@36 go to state 1560 + + +state 1458 + + 327 screen_clauses: screen_clauses LINE . $@29 number_is_opt plus_minus_opt name_or_lit + + $default reduce using rule 326 ($@29) + + $@29 go to state 1561 + + +state 1459 + + 341 screen_clauses: screen_clauses SIZE . $@34 name_or_lit + + $default reduce using rule 340 ($@34) + + $@34 go to state 1562 + + +state 1460 + + 344 screen_source_destination: USING . $@35 name_or_lit + + $default reduce using rule 343 ($@35) + + $@35 go to state 1563 + + +state 1461 + + 325 screen_item: integer def_name_opt $@28 screen_clauses PERIOD_TOK . + + $default reduce using rule 325 (screen_item) + + +state 1462 + + 337 screen_clauses: screen_clauses screen_source_destination . + + $default reduce using rule 337 (screen_clauses) + + +state 1463 + + 338 screen_clauses: screen_clauses value_is_are . gliteral + + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gliteral go to state 1564 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + + +state 1464 + + 339 screen_clauses: screen_clauses pictures . + + $default reduce using rule 339 (screen_clauses) + + +state 1465 + + 330 screen_clauses: screen_clauses with_opt . screen_attrib + 332 | screen_clauses with_opt . FOREGROUNDCOLOR $@31 name_or_lit + 334 | screen_clauses with_opt . BACKGROUNDCOLOR $@32 name_or_lit + 336 | screen_clauses with_opt . COLOR $@33 name_or_lit + + IS shift, and go to state 84 + AUTO shift, and go to state 1565 + BACKGROUNDCOLOR shift, and go to state 1566 + BLANK shift, and go to state 1567 + BLINK shift, and go to state 1568 + COLOR shift, and go to state 1569 + ERASE shift, and go to state 1570 + FOREGROUNDCOLOR shift, and go to state 1571 + FULL shift, and go to state 1572 + HIGHLIGHT shift, and go to state 1573 + JUSTIFIED shift, and go to state 1574 + LOWER shift, and go to state 1575 + LOWLIGHT shift, and go to state 1576 + REQUIRED shift, and go to state 1577 + REVERSEVIDEO shift, and go to state 1578 + SECURE shift, and go to state 1579 + SIGN shift, and go to state 921 + UNDERLINE shift, and go to state 1580 + UPPER shift, and go to state 1581 + WITH shift, and go to state 358 + + LEADING reduce using rule 132 (is_opt) + TRAILING reduce using rule 132 (is_opt) + $default reduce using rule 1233 (with_opt) + + is_opt go to state 979 + screen_attrib go to state 1582 + sign_clause go to state 1583 + sign_is_opt go to state 929 + with_opt go to state 1584 + + +state 1466 + + 584 use_phrase: USE AFTER use_phrase_exception_error PROCEDURE on_opt use_phrase_option . PERIOD_TOK + + PERIOD_TOK shift, and go to state 1585 + + +state 1467 + + 591 use_phrase_option: open_mode . + + $default reduce using rule 591 (use_phrase_option) + + +state 1468 + + 590 use_phrase_option: gname_list . + 1244 gname_list: gname_list . sep_opt gname + + LISTSEP shift, and go to state 98 + + PERIOD_TOK reduce using rule 590 (use_phrase_option) + $default reduce using rule 1214 (sep_opt) + + sep_opt go to state 99 + + +state 1469 + + 909 read_key_opt: KEY is_opt . name + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + name go to state 1586 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1470 + + 910 read_at_end_opt: NOT . at_opt on_end + 925 read_not_invalid_key: NOT . INVALID key_opt @100 statement_list + + AT shift, and go to state 1054 + INVALID shift, and go to state 1587 + + $default reduce using rule 1225 (at_opt) + + at_opt go to state 1231 + + +state 1471 + + 923 read_invalid_key: INVALID . key_opt @99 statement_list + + KEY shift, and go to state 846 + + $default reduce using rule 1216 (key_opt) + + key_opt go to state 1588 + + +state 1472 + + 901 read_body: name read_next_opt record_opt read_into_opt with_lock_opt read_key_opt read_at_end_opt . + + $default reduce using rule 901 (read_body) + + +state 1473 + + 902 read_body: name read_next_opt record_opt read_into_opt with_lock_opt read_key_opt read_invalid_key_opt . + + $default reduce using rule 902 (read_body) + + +state 1474 + + 919 read_invalid_key_opt: read_invalid_key . + 921 | read_invalid_key . read_not_invalid_key + + NOT shift, and go to state 1589 + + NOT [reduce using rule 919 (read_invalid_key_opt)] + $default reduce using rule 919 (read_invalid_key_opt) + + read_not_invalid_key go to state 1590 + + +state 1475 + + 920 read_invalid_key_opt: read_not_invalid_key . + + $default reduce using rule 920 (read_invalid_key_opt) + + +state 1476 + + 836 accept_screen: ACCEPT name accept_display_options on_opt EXCEPTION $@93 variable @94 . statement_list $@95 end_accept_opt + + READ shift, and go to state 254 + WRITE shift, and go to state 255 + RELEASE shift, and go to state 256 + ACCEPT shift, and go to state 257 + ADD shift, and go to state 258 + CALL shift, and go to state 259 + CALL_LOADLIB shift, and go to state 260 + CANCEL shift, and go to state 261 + CHAIN shift, and go to state 262 + CLOSE shift, and go to state 263 + COMPUTE shift, and go to state 264 + CONTINUE shift, and go to state 265 + DELETE shift, and go to state 266 + DISPLAY shift, and go to state 267 + DIVIDE shift, and go to state 268 + EVALUATE shift, and go to state 269 + EXIT shift, and go to state 270 + GENERATE shift, and go to state 271 + GO shift, and go to state 272 + GOBACK shift, and go to state 273 + IF shift, and go to state 274 + INITIALIZE shift, and go to state 275 + INITIATE shift, and go to state 276 + INSPECT shift, and go to state 277 + MERGE shift, and go to state 278 + MOVE shift, and go to state 279 + MULTIPLY shift, and go to state 280 + OPEN shift, and go to state 281 + PERFORM shift, and go to state 282 + READY shift, and go to state 283 + RESET shift, and go to state 284 + RETURN shift, and go to state 285 + REWRITE shift, and go to state 286 + SEARCH shift, and go to state 287 + SET shift, and go to state 288 + SORT shift, and go to state 289 + START shift, and go to state 290 + STOP shift, and go to state 291 + STRINGCMD shift, and go to state 292 + SUBTRACT shift, and go to state 293 + TCOBPROTO1 shift, and go to state 294 + TCOBPROTO2 shift, and go to state 295 + TERMINATE shift, and go to state 296 + UNLOCK shift, and go to state 297 + UNSTRING shift, and go to state 298 + + statement_list go to state 1591 + statements go to state 640 + statement go to state 300 + perform_statement go to state 301 + if_statement go to state 302 + search_statement go to state 303 + evaluate_statement go to state 304 + if_part go to state 305 + unlock_statement go to state 306 + proto_statement go to state 307 + trace_statement go to state 308 + initiate_statement go to state 309 + generate_statement go to state 310 + terminate_statement go to state 311 + cancel_statement go to state 312 + merge_statement go to state 313 + sort_statement go to state 314 + sort_file go to state 315 + sort_variable_indexed go to state 316 + move_statement go to state 317 + initialize_statement go to state 318 + compute_statement go to state 319 + add_statement go to state 320 + subtract_statement go to state 321 + multiply_statement go to state 322 + divide_statement go to state 323 + accept_statement go to state 324 + accept_hardware go to state 325 + accept_chronological go to state 326 + accept_screen go to state 327 + display_statement go to state 328 + display_line go to state 329 + display_screen go to state 330 + open_statement go to state 331 + close_statement go to state 332 + return_statement go to state 333 + read_statement go to state 334 + release_statement go to state 335 + write_statement go to state 336 + rewrite_statement go to state 337 + delete_statement go to state 338 + start_statement go to state 339 + goto_statement go to state 340 + call_statement go to state 341 + call_loadlib_statement go to state 342 + chain_statement go to state 343 + exit_statement go to state 344 + stop_statement go to state 345 + goback_statement go to state 346 + set_statement go to state 347 + string_statement go to state 348 + unstring_statement go to state 349 + inspect_statement go to state 350 + + +state 1477 + + 998 on_size_error_opt: NOT on_opt SIZE on_size_error . + + $default reduce using rule 998 (on_size_error_opt) + + +state 1478 + + 1003 on_size_error: ERROR_TOK @116 . statement_list + + READ shift, and go to state 254 + WRITE shift, and go to state 255 + RELEASE shift, and go to state 256 + ACCEPT shift, and go to state 257 + ADD shift, and go to state 258 + CALL shift, and go to state 259 + CALL_LOADLIB shift, and go to state 260 + CANCEL shift, and go to state 261 + CHAIN shift, and go to state 262 + CLOSE shift, and go to state 263 + COMPUTE shift, and go to state 264 + CONTINUE shift, and go to state 265 + DELETE shift, and go to state 266 + DISPLAY shift, and go to state 267 + DIVIDE shift, and go to state 268 + EVALUATE shift, and go to state 269 + EXIT shift, and go to state 270 + GENERATE shift, and go to state 271 + GO shift, and go to state 272 + GOBACK shift, and go to state 273 + IF shift, and go to state 274 + INITIALIZE shift, and go to state 275 + INITIATE shift, and go to state 276 + INSPECT shift, and go to state 277 + MERGE shift, and go to state 278 + MOVE shift, and go to state 279 + MULTIPLY shift, and go to state 280 + OPEN shift, and go to state 281 + PERFORM shift, and go to state 282 + READY shift, and go to state 283 + RESET shift, and go to state 284 + RETURN shift, and go to state 285 + REWRITE shift, and go to state 286 + SEARCH shift, and go to state 287 + SET shift, and go to state 288 + SORT shift, and go to state 289 + START shift, and go to state 290 + STOP shift, and go to state 291 + STRINGCMD shift, and go to state 292 + SUBTRACT shift, and go to state 293 + TCOBPROTO1 shift, and go to state 294 + TCOBPROTO2 shift, and go to state 295 + TERMINATE shift, and go to state 296 + UNLOCK shift, and go to state 297 + UNSTRING shift, and go to state 298 + + statement_list go to state 1592 + statements go to state 640 + statement go to state 300 + perform_statement go to state 301 + if_statement go to state 302 + search_statement go to state 303 + evaluate_statement go to state 304 + if_part go to state 305 + unlock_statement go to state 306 + proto_statement go to state 307 + trace_statement go to state 308 + initiate_statement go to state 309 + generate_statement go to state 310 + terminate_statement go to state 311 + cancel_statement go to state 312 + merge_statement go to state 313 + sort_statement go to state 314 + sort_file go to state 315 + sort_variable_indexed go to state 316 + move_statement go to state 317 + initialize_statement go to state 318 + compute_statement go to state 319 + add_statement go to state 320 + subtract_statement go to state 321 + multiply_statement go to state 322 + divide_statement go to state 323 + accept_statement go to state 324 + accept_hardware go to state 325 + accept_chronological go to state 326 + accept_screen go to state 327 + display_statement go to state 328 + display_line go to state 329 + display_screen go to state 330 + open_statement go to state 331 + close_statement go to state 332 + return_statement go to state 333 + read_statement go to state 334 + release_statement go to state 335 + write_statement go to state 336 + rewrite_statement go to state 337 + delete_statement go to state 338 + start_statement go to state 339 + goto_statement go to state 340 + call_statement go to state 341 + call_loadlib_statement go to state 342 + chain_statement go to state 343 + exit_statement go to state 344 + stop_statement go to state 345 + goback_statement go to state 346 + set_statement go to state 347 + string_statement go to state 348 + unstring_statement go to state 349 + inspect_statement go to state 350 + + +state 1479 + + 1001 on_size_error_opt: on_opt SIZE on_size_error NOT . on_opt SIZE $@115 on_size_error + + ON shift, and go to state 620 + + $default reduce using rule 1235 (on_opt) + + on_opt go to state 1593 + + +state 1480 + + 967 call_statement: CALL $@105 call_convention_opt gname using_options returning_options @106 @107 . @108 on_exception_or_overflow on_not_exception $@109 end_call_opt + + $default reduce using rule 965 (@108) + + @108 go to state 1594 + + +state 1481 + + 1125 using_options: USING @127 dummy @128 parm_list . + 1133 parm_list: parm_list . sep_opt parameter + + LISTSEP shift, and go to state 98 + + VARIABLE reduce using rule 1214 (sep_opt) + SUBSCVAR reduce using rule 1214 (sep_opt) + LABELSTR reduce using rule 1214 (sep_opt) + NLITERAL reduce using rule 1214 (sep_opt) + CLITERAL reduce using rule 1214 (sep_opt) + '+' reduce using rule 1214 (sep_opt) + '-' reduce using rule 1214 (sep_opt) + ALL reduce using rule 1214 (sep_opt) + BY reduce using rule 1214 (sep_opt) + CONTENT reduce using rule 1214 (sep_opt) + FUNCTION reduce using rule 1214 (sep_opt) + HIGHVALUES reduce using rule 1214 (sep_opt) + LOWVALUES reduce using rule 1214 (sep_opt) + QUOTES reduce using rule 1214 (sep_opt) + REFERENCE reduce using rule 1214 (sep_opt) + SPACES reduce using rule 1214 (sep_opt) + VALUE reduce using rule 1214 (sep_opt) + ZERO reduce using rule 1214 (sep_opt) + $default reduce using rule 1125 (using_options) + + sep_opt go to state 1595 + + +state 1482 + + 1134 parm_list: parameter . + + $default reduce using rule 1134 (parm_list) + + +state 1483 + + 1136 parameter: by_opt . parm_type gname + + CONTENT shift, and go to state 1596 + REFERENCE shift, and go to state 1597 + VALUE shift, and go to state 1598 + + parm_type go to state 1599 + + +state 1484 + + 1135 parameter: gname . + + $default reduce using rule 1135 (parameter) + + +state 1485 + + 981 chain_statement: CHAIN $@111 gname using_options @112 @113 on_exception_or_overflow $@114 . end_chain_opt + + END_CHAIN shift, and go to state 1600 + + END_CHAIN [reduce using rule 1008 (end_chain_opt)] + $default reduce using rule 1008 (end_chain_opt) + + end_chain_opt go to state 1601 + + +state 1486 + + 1050 exception_or_overflow: EXCEPTION . + + $default reduce using rule 1050 (exception_or_overflow) + + +state 1487 + + 1051 exception_or_overflow: OVERFLOW_TOK . + + $default reduce using rule 1051 (exception_or_overflow) + + +state 1488 + + 1048 on_exception_or_overflow: on_opt exception_or_overflow . @120 statement_list + + $default reduce using rule 1047 (@120) + + @120 go to state 1602 + + +state 1489 + + 816 divide_body: gname BY gname GIVING name rounded_opt REMAINDER . name on_size_error_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + name go to state 1603 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1490 + + 817 divide_body: gname INTO gname GIVING name rounded_opt REMAINDER . name on_size_error_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + name go to state 1604 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1491 + + 674 when_case: OTHER . + + $default reduce using rule 674 (when_case) + + +state 1492 + + 665 when_case_list: WHEN @66 @67 when_case . sentence_or_nothing + 673 when_case: when_case . ALSO @72 selection_object + + ALSO shift, and go to state 1605 + + END_EVALUATE reduce using rule 681 (sentence_or_nothing) + NEXT reduce using rule 687 ($@75) + WHEN reduce using rule 681 (sentence_or_nothing) + PERIOD_TOK reduce using rule 681 (sentence_or_nothing) + $default reduce using rule 685 ($@74) + + sentence_or_nothing go to state 1606 + conditional_statement go to state 1607 + $@74 go to state 862 + $@75 go to state 863 + + +state 1493 + + 671 when_case: @71 . selection_object + + NOT shift, and go to state 1608 + ANY shift, and go to state 1609 + FALSE_TOK shift, and go to state 1610 + TRUE_TOK shift, and go to state 1611 + + $default reduce using rule 689 (not_opt) + + selection_object go to state 1612 + not_opt go to state 1613 + + +state 1494 + + 669 when_case_list: when_case_list WHEN @68 @69 . when_case $@70 sentence_or_nothing + + OTHER shift, and go to state 1491 + + $default reduce using rule 670 (@71) + + when_case go to state 1614 + @71 go to state 1493 + + +state 1495 + + 1109 inspect_before_after: inspect_before_after AFTER . initial_opt noallname + + INITIAL_TOK shift, and go to state 1615 + + $default reduce using rule 1112 (initial_opt) + + initial_opt go to state 1616 + + +state 1496 + + 1108 inspect_before_after: inspect_before_after BEFORE . initial_opt noallname + + INITIAL_TOK shift, and go to state 1615 + + $default reduce using rule 1112 (initial_opt) + + initial_opt go to state 1617 + + +state 1497 + + 1094 tallying_for_list: tallying_for_list ALL . noallname inspect_before_after + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + noallname go to state 1618 + without_all_literal go to state 806 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 807 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1498 + + 1093 tallying_for_list: tallying_for_list CHARACTERS . inspect_before_after + + $default reduce using rule 1110 (inspect_before_after) + + inspect_before_after go to state 1619 + + +state 1499 + + 1095 tallying_for_list: tallying_for_list LEADING . noallname inspect_before_after + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + noallname go to state 1620 + without_all_literal go to state 806 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 807 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1500 + + 1099 replacing_list: replacing_list CHARACTERS BY . noallname inspect_before_after + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + noallname go to state 1621 + without_all_literal go to state 806 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 807 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1501 + + 1100 replacing_list: replacing_list replacing_kind replacing_by_list . + 1102 replacing_by_list: replacing_by_list . noallname BY noallname inspect_before_after + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + $default reduce using rule 1100 (replacing_list) + + noallname go to state 1622 + without_all_literal go to state 806 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 807 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1502 + + 741 merge_using: USING sort_file_list . + 769 sort_file_list: sort_file_list . name + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + $default reduce using rule 741 (merge_using) + + name go to state 1623 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1503 + + 768 sort_file_list: name . + + $default reduce using rule 768 (sort_file_list) + + +state 1504 + + 740 merge_statement: MERGE name sort_keys $@86 sort_collating_opt $@87 merge_using $@88 . sort_output + + GIVING shift, and go to state 1624 + OUTPUT shift, and go to state 1625 + + sort_output go to state 1626 + + +state 1505 + + 1151 perform_options: with_test_opt UNTIL @131 condition @132 perform_statements $@133 . END_PERFORM + + END_PERFORM shift, and go to state 1627 + + +state 1506 + + 1155 perform_options: with_test_opt VARYING name FROM gname by_opt gname . UNTIL @134 condition @135 perform_after_opt perform_statements $@136 END_PERFORM + + UNTIL shift, and go to state 1628 + + +state 1507 + + 1162 perform_options: label perform_thru_opt with_test_opt VARYING name FROM gname . by_opt gname UNTIL @138 condition @139 perform_after_opt + + BY shift, and go to state 854 + + $default reduce using rule 1231 (by_opt) + + by_opt go to state 1629 + + +state 1508 + + 914 read_at_end_opt: AT on_end NOT at_opt . $@96 on_end + + $default reduce using rule 913 ($@96) + + $@96 go to state 1630 + + +state 1509 + + 916 read_at_end_opt: on_end NOT at_opt $@97 . on_end + + END shift, and go to state 1050 + + on_end go to state 1631 + + +state 1510 + + 718 search_all_when: WHEN $@83 . search_all_when_conditional @84 search_all_when_statement + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + + search_all_when_conditional go to state 1632 + variable go to state 1633 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1511 + + 715 search_all_when_list: search_all_when_list search_all_when . + + $default reduce using rule 715 (search_all_when_list) + + +state 1512 + + 705 search_at_end: at_opt END @81 statement_list . + + $default reduce using rule 705 (search_at_end) + + +state 1513 + + 710 search_when: WHEN . search_when_conditional @82 search_when_statement + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + search_when_conditional go to state 1634 + name_or_lit go to state 1635 + literal go to state 1065 + signed_nliteral go to state 77 + name go to state 1066 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1514 + + 698 search: variable_indexed @76 search_varying_opt @77 search_at_end @78 search_when_list . + 708 search_when_list: search_when_list . search_when + + WHEN shift, and go to state 1513 + + WHEN [reduce using rule 698 (search)] + $default reduce using rule 698 (search) + + search_when go to state 1636 + + +state 1515 + + 707 search_when_list: search_when . + + $default reduce using rule 707 (search_when_list) + + +state 1516 + + 550 order_opt: ORDER . + + $default reduce using rule 550 (order_opt) + + +state 1517 + + 761 sort_duplicates_opt: with_opt DUPLICATES in_opt order_opt . + + $default reduce using rule 761 (sort_duplicates_opt) + + +state 1518 + + 764 sort_input: INPUT . PROCEDURE is_opt perform_range + + PROCEDURE shift, and go to state 1637 + + +state 1519 + + 765 sort_input: USING . sort_file_list + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + sort_file_list go to state 1638 + name go to state 1503 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1520 + + 747 sort_file: SORT name sort_keys $@89 sort_duplicates_opt sort_collating_opt $@90 sort_input . $@91 sort_output + + $default reduce using rule 746 ($@91) + + $@91 go to state 1639 + + +state 1521 + + 1082 end_stringcmd_opt: END_STRINGCMD . + + $default reduce using rule 1082 (end_stringcmd_opt) + + +state 1522 + + 1027 string_statement: STRINGCMD string_from_list INTO name string_with_pointer $@117 on_overflow_opt end_stringcmd_opt . + + $default reduce using rule 1027 (string_statement) + + +state 1523 + + 1046 on_overflow_opt: $@119 on_overflow . on_not_overflow + + NOT shift, and go to state 665 + NOTEXCEP shift, and go to state 667 + + NOT [reduce using rule 1060 (on_not_overflow)] + NOTEXCEP [reduce using rule 1060 (on_not_overflow)] + $default reduce using rule 1060 (on_not_overflow) + + on_not_overflow go to state 1640 + not_excep go to state 1641 + + +state 1524 + + 1056 on_overflow: on_opt . OVERFLOW_TOK @122 statement_list + + OVERFLOW_TOK shift, and go to state 1642 + + +state 1525 + + 1033 unstring_delimited_vars: unstring_delimited_vars OR all_opt gname . + + $default reduce using rule 1033 (unstring_delimited_vars) + + +state 1526 + + 1042 unstring_tallying: TALLYING in_opt . name + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + name go to state 1643 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1527 + + 1029 unstring_statement: UNSTRING name unstring_delimited INTO unstring_destinations string_with_pointer unstring_tallying $@118 . on_overflow_opt end_unstring_opt + + $default reduce using rule 1045 ($@119) + + on_overflow_opt go to state 1644 + $@119 go to state 1402 + + +state 1528 + + 1038 unstring_delim_opt: DELIMITER in_opt name . + + $default reduce using rule 1038 (unstring_delim_opt) + + +state 1529 + + 1040 unstring_count_opt: COUNT in_opt . name + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + name go to state 1645 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1530 + + 77 switch_off_opt: OFF status_opt is_opt STRING . + + $default reduce using rule 77 (switch_off_opt) + + +state 1531 + + 112 select_clause: ALTERNATE RECORD key_opt is_opt STRING . with_duplicates + + WITH shift, and go to state 358 + + DUPLICATES reduce using rule 1233 (with_opt) + $default reduce using rule 125 (with_duplicates) + + with_duplicates go to state 1646 + with_opt go to state 1647 + + +state 1532 + + 526 to_integer_opt: TO integer . + + $default reduce using rule 526 (to_integer_opt) + + +state 1533 + + 523 chars_or_recs_opt: CHARACTERS . + + $default reduce using rule 523 (chars_or_recs_opt) + + +state 1534 + + 524 chars_or_recs_opt: RECORDS . + + $default reduce using rule 524 (chars_or_recs_opt) + + +state 1535 + + 499 file_description_clause_block: BLOCK contains_opt integer to_integer_opt chars_or_recs_opt . + + $default reduce using rule 499 (file_description_clause_block) + + +state 1536 + + 507 file_description_clause_linage: LINAGE is_opt data_name lines_opt file_description_clause_linage_footing . file_description_clause_linage_top file_description_clause_linage_bottom + + AT shift, and go to state 1648 + LINES shift, and go to state 1649 + + AT [reduce using rule 510 (file_description_clause_linage_top)] + LINES [reduce using rule 510 (file_description_clause_linage_top)] + TOP reduce using rule 514 (lines_at_opt) + $default reduce using rule 510 (file_description_clause_linage_top) + + file_description_clause_linage_top go to state 1650 + lines_at_opt go to state 1651 + + +state 1537 + + 509 file_description_clause_linage_footing: with_opt . FOOTING at_opt data_name + + FOOTING shift, and go to state 1652 + + +state 1538 + + 1005 size_opt: SIZE . + + $default reduce using rule 1005 (size_opt) + + +state 1539 + + 501 file_description_clause_record: RECORD is_opt VARYING in_opt size_opt . from_rec_varying to_rec_varying character_opts depend_rec_varying + + FROM shift, and go to state 1653 + + NLITERAL reduce using rule 532 (from_opt) + '+' reduce using rule 532 (from_opt) + '-' reduce using rule 532 (from_opt) + $default reduce using rule 529 (from_rec_varying) + + from_rec_varying go to state 1654 + from_opt go to state 1655 + + +state 1540 + + 534 to_rec_varying: TO nliteral . + + $default reduce using rule 534 (to_rec_varying) + + +state 1541 + + 548 character_opts: CHARACTERS . + + $default reduce using rule 548 (character_opts) + + +state 1542 + + 500 file_description_clause_record: RECORD contains_opt integer to_rec_varying character_opts . + + $default reduce using rule 500 (file_description_clause_record) + + +state 1543 + + 503 file_description_clause_value: VALUE OF FILE_ID is_opt filename . + + $default reduce using rule 503 (file_description_clause_value) + + +state 1544 + + 458 array_options: OCCURS integer TO integer times_opt . DEPENDING $@48 on_opt gname $@49 indexed_by_opt + + DEPENDING shift, and go to state 1656 + + +state 1545 + + 459 key_is_opt: DIRECTION . key_opt is_opt STRING + + KEY shift, and go to state 846 + + $default reduce using rule 1216 (key_opt) + + key_opt go to state 1657 + + +state 1546 + + 461 indexed_by_opt: key_is_opt . INDEXED by_opt index_name_list + + INDEXED shift, and go to state 1658 + + +state 1547 + + 455 array_options: OCCURS integer times_opt $@47 indexed_by_opt . + + $default reduce using rule 455 (array_options) + + +state 1548 + + 480 pic_elem: CHAR . multiplier_opt + + MULTIPLIER shift, and go to state 1659 + + $default reduce using rule 481 (multiplier_opt) + + multiplier_opt go to state 1660 + + +state 1549 + + 479 picture: picture pic_elem . + + $default reduce using rule 479 (picture) + + +state 1550 + + 453 thru_gname_opt: THRU variable . + + $default reduce using rule 453 (thru_gname_opt) + + +state 1551 + + 212 limit_is_are_opt: LIMIT IS . + + $default reduce using rule 212 (limit_is_are_opt) + + +state 1552 + + 213 limit_is_are_opt: LIMITS ARE . + + $default reduce using rule 213 (limit_is_are_opt) + + +state 1553 + + 202 report_controls_page: PAGE limit_is_are_opt integer . line_lines_opt heading_opt first_detail_opt last_detail_opt footing_opt + + LINE shift, and go to state 1341 + LINES shift, and go to state 1342 + + $default reduce using rule 207 (lines_opt) + + line_lines_opt go to state 1661 + lines_opt go to state 1344 + + +state 1554 + + 194 report_section: RD $@15 STRING $@16 report_controls PERIOD_TOK $@17 report_description . + 225 report_description: report_description . report_item + + NLITERAL shift, and go to state 59 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + $default reduce using rule 194 (report_section) + + report_item go to state 1662 + signed_nliteral go to state 234 + integer go to state 1556 + + +state 1555 + + 224 report_description: report_item . + + $default reduce using rule 224 (report_description) + + +state 1556 + + 227 report_item: integer . def_name_opt $@18 report_clauses PERIOD_TOK + + STRING shift, and go to state 368 + FILLER shift, and go to state 369 + + $default reduce using rule 1274 (def_name_opt) + + def_name_opt go to state 1663 + def_name go to state 381 + + +state 1557 + + 201 report_controls_control: control_is_are final_opt report_break_list . + 223 report_break_list: report_break_list . name + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + $default reduce using rule 201 (report_controls_control) + + name go to state 1664 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1558 + + 348 screen_source_destination: TO $@37 . name + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + name go to state 1665 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1559 + + 329 screen_clauses: screen_clauses COLUMN $@30 . number_is_opt plus_minus_opt name_or_lit + + NUMBER shift, and go to state 1666 + + $default reduce using rule 415 (number_is_opt) + + number_is_opt go to state 1667 + + +state 1560 + + 346 screen_source_destination: FROM $@36 . name_or_lit screen_to_name + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + name_or_lit go to state 1668 + literal go to state 1065 + signed_nliteral go to state 77 + name go to state 1066 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1561 + + 327 screen_clauses: screen_clauses LINE $@29 . number_is_opt plus_minus_opt name_or_lit + + NUMBER shift, and go to state 1666 + + $default reduce using rule 415 (number_is_opt) + + number_is_opt go to state 1669 + + +state 1562 + + 341 screen_clauses: screen_clauses SIZE $@34 . name_or_lit + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + name_or_lit go to state 1670 + literal go to state 1065 + signed_nliteral go to state 77 + name go to state 1066 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1563 + + 344 screen_source_destination: USING $@35 . name_or_lit + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + name_or_lit go to state 1671 + literal go to state 1065 + signed_nliteral go to state 77 + name go to state 1066 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1564 + + 338 screen_clauses: screen_clauses value_is_are gliteral . + + $default reduce using rule 338 (screen_clauses) + + +state 1565 + + 361 screen_attrib: AUTO . + + $default reduce using rule 361 (screen_attrib) + + +state 1566 + + 334 screen_clauses: screen_clauses with_opt BACKGROUNDCOLOR . $@32 name_or_lit + + $default reduce using rule 333 ($@32) + + $@32 go to state 1672 + + +state 1567 + + 351 screen_attrib: BLANK . SCREEN + 352 | BLANK . LINE + 369 | BLANK . when_opt ZERO + + LINE shift, and go to state 1673 + SCREEN shift, and go to state 1674 + WHEN shift, and go to state 1138 + + $default reduce using rule 543 (when_opt) + + when_opt go to state 1675 + + +state 1568 + + 364 screen_attrib: BLINK . + + $default reduce using rule 364 (screen_attrib) + + +state 1569 + + 336 screen_clauses: screen_clauses with_opt COLOR . $@33 name_or_lit + + $default reduce using rule 335 ($@33) + + $@33 go to state 1676 + + +state 1570 + + 353 screen_attrib: ERASE . EOL + 354 | ERASE . EOS + 355 | ERASE . + + EOL shift, and go to state 1677 + EOS shift, and go to state 1678 + + $default reduce using rule 355 (screen_attrib) + + +state 1571 + + 332 screen_clauses: screen_clauses with_opt FOREGROUNDCOLOR . $@31 name_or_lit + + $default reduce using rule 331 ($@31) + + $@31 go to state 1679 + + +state 1572 + + 358 screen_attrib: FULL . + + $default reduce using rule 358 (screen_attrib) + + +state 1573 + + 368 screen_attrib: HIGHLIGHT . + + $default reduce using rule 368 (screen_attrib) + + +state 1574 + + 362 screen_attrib: JUSTIFIED . RIGHT + 363 | JUSTIFIED . LEFT + + LEFT shift, and go to state 1680 + RIGHT shift, and go to state 1681 + + +state 1575 + + 374 screen_attrib: LOWER . + + $default reduce using rule 374 (screen_attrib) + + +state 1576 + + 367 screen_attrib: LOWLIGHT . + + $default reduce using rule 367 (screen_attrib) + + +state 1577 + + 359 screen_attrib: REQUIRED . + + $default reduce using rule 359 (screen_attrib) + + +state 1578 + + 365 screen_attrib: REVERSEVIDEO . + + $default reduce using rule 365 (screen_attrib) + + +state 1579 + + 360 screen_attrib: SECURE . + + $default reduce using rule 360 (screen_attrib) + + +state 1580 + + 366 screen_attrib: UNDERLINE . + + $default reduce using rule 366 (screen_attrib) + + +state 1581 + + 373 screen_attrib: UPPER . + + $default reduce using rule 373 (screen_attrib) + + +state 1582 + + 330 screen_clauses: screen_clauses with_opt screen_attrib . + + $default reduce using rule 330 (screen_clauses) + + +state 1583 + + 357 screen_attrib: sign_clause . + + $default reduce using rule 357 (screen_attrib) + + +state 1584 + + 356 screen_attrib: with_opt . BELL + 370 | with_opt . NOECHO + 371 | with_opt . UPDATE + 372 | with_opt . NO ADVANCING + + NO shift, and go to state 1682 + BELL shift, and go to state 1683 + NOECHO shift, and go to state 1684 + UPDATE shift, and go to state 1685 + + +state 1585 + + 584 use_phrase: USE AFTER use_phrase_exception_error PROCEDURE on_opt use_phrase_option PERIOD_TOK . + + $default reduce using rule 584 (use_phrase) + + +state 1586 + + 909 read_key_opt: KEY is_opt name . + + $default reduce using rule 909 (read_key_opt) + + +state 1587 + + 925 read_not_invalid_key: NOT INVALID . key_opt @100 statement_list + + KEY shift, and go to state 846 + + $default reduce using rule 1216 (key_opt) + + key_opt go to state 1686 + + +state 1588 + + 923 read_invalid_key: INVALID key_opt . @99 statement_list + + $default reduce using rule 922 (@99) + + @99 go to state 1687 + + +state 1589 + + 925 read_not_invalid_key: NOT . INVALID key_opt @100 statement_list + + INVALID shift, and go to state 1587 + + +state 1590 + + 921 read_invalid_key_opt: read_invalid_key read_not_invalid_key . + + $default reduce using rule 921 (read_invalid_key_opt) + + +state 1591 + + 836 accept_screen: ACCEPT name accept_display_options on_opt EXCEPTION $@93 variable @94 statement_list . $@95 end_accept_opt + + $default reduce using rule 835 ($@95) + + $@95 go to state 1688 + + +state 1592 + + 1003 on_size_error: ERROR_TOK @116 statement_list . + + $default reduce using rule 1003 (on_size_error) + + +state 1593 + + 1001 on_size_error_opt: on_opt SIZE on_size_error NOT on_opt . SIZE $@115 on_size_error + + SIZE shift, and go to state 1689 + + +state 1594 + + 967 call_statement: CALL $@105 call_convention_opt gname using_options returning_options @106 @107 @108 . on_exception_or_overflow on_not_exception $@109 end_call_opt + + ON shift, and go to state 620 + + EXCEPTION reduce using rule 1235 (on_opt) + OVERFLOW_TOK reduce using rule 1235 (on_opt) + $default reduce using rule 1049 (on_exception_or_overflow) + + on_exception_or_overflow go to state 1690 + on_opt go to state 1357 + + +state 1595 + + 1133 parm_list: parm_list sep_opt . parameter + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + BY shift, and go to state 854 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + $default reduce using rule 1231 (by_opt) + + parameter go to state 1691 + by_opt go to state 1483 + gname go to state 1484 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1596 + + 1139 parm_type: CONTENT . + + $default reduce using rule 1139 (parm_type) + + +state 1597 + + 1137 parm_type: REFERENCE . + + $default reduce using rule 1137 (parm_type) + + +state 1598 + + 1138 parm_type: VALUE . + + $default reduce using rule 1138 (parm_type) + + +state 1599 + + 1136 parameter: by_opt parm_type . gname + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gname go to state 1692 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1600 + + 1009 end_chain_opt: END_CHAIN . + + $default reduce using rule 1009 (end_chain_opt) + + +state 1601 + + 981 chain_statement: CHAIN $@111 gname using_options @112 @113 on_exception_or_overflow $@114 end_chain_opt . + + $default reduce using rule 981 (chain_statement) + + +state 1602 + + 1048 on_exception_or_overflow: on_opt exception_or_overflow @120 . statement_list + + READ shift, and go to state 254 + WRITE shift, and go to state 255 + RELEASE shift, and go to state 256 + ACCEPT shift, and go to state 257 + ADD shift, and go to state 258 + CALL shift, and go to state 259 + CALL_LOADLIB shift, and go to state 260 + CANCEL shift, and go to state 261 + CHAIN shift, and go to state 262 + CLOSE shift, and go to state 263 + COMPUTE shift, and go to state 264 + CONTINUE shift, and go to state 265 + DELETE shift, and go to state 266 + DISPLAY shift, and go to state 267 + DIVIDE shift, and go to state 268 + EVALUATE shift, and go to state 269 + EXIT shift, and go to state 270 + GENERATE shift, and go to state 271 + GO shift, and go to state 272 + GOBACK shift, and go to state 273 + IF shift, and go to state 274 + INITIALIZE shift, and go to state 275 + INITIATE shift, and go to state 276 + INSPECT shift, and go to state 277 + MERGE shift, and go to state 278 + MOVE shift, and go to state 279 + MULTIPLY shift, and go to state 280 + OPEN shift, and go to state 281 + PERFORM shift, and go to state 282 + READY shift, and go to state 283 + RESET shift, and go to state 284 + RETURN shift, and go to state 285 + REWRITE shift, and go to state 286 + SEARCH shift, and go to state 287 + SET shift, and go to state 288 + SORT shift, and go to state 289 + START shift, and go to state 290 + STOP shift, and go to state 291 + STRINGCMD shift, and go to state 292 + SUBTRACT shift, and go to state 293 + TCOBPROTO1 shift, and go to state 294 + TCOBPROTO2 shift, and go to state 295 + TERMINATE shift, and go to state 296 + UNLOCK shift, and go to state 297 + UNSTRING shift, and go to state 298 + + statement_list go to state 1693 + statements go to state 640 + statement go to state 300 + perform_statement go to state 301 + if_statement go to state 302 + search_statement go to state 303 + evaluate_statement go to state 304 + if_part go to state 305 + unlock_statement go to state 306 + proto_statement go to state 307 + trace_statement go to state 308 + initiate_statement go to state 309 + generate_statement go to state 310 + terminate_statement go to state 311 + cancel_statement go to state 312 + merge_statement go to state 313 + sort_statement go to state 314 + sort_file go to state 315 + sort_variable_indexed go to state 316 + move_statement go to state 317 + initialize_statement go to state 318 + compute_statement go to state 319 + add_statement go to state 320 + subtract_statement go to state 321 + multiply_statement go to state 322 + divide_statement go to state 323 + accept_statement go to state 324 + accept_hardware go to state 325 + accept_chronological go to state 326 + accept_screen go to state 327 + display_statement go to state 328 + display_line go to state 329 + display_screen go to state 330 + open_statement go to state 331 + close_statement go to state 332 + return_statement go to state 333 + read_statement go to state 334 + release_statement go to state 335 + write_statement go to state 336 + rewrite_statement go to state 337 + delete_statement go to state 338 + start_statement go to state 339 + goto_statement go to state 340 + call_statement go to state 341 + call_loadlib_statement go to state 342 + chain_statement go to state 343 + exit_statement go to state 344 + stop_statement go to state 345 + goback_statement go to state 346 + set_statement go to state 347 + string_statement go to state 348 + unstring_statement go to state 349 + inspect_statement go to state 350 + + +state 1603 + + 816 divide_body: gname BY gname GIVING name rounded_opt REMAINDER name . on_size_error_opt + + NOT shift, and go to state 985 + ON shift, and go to state 620 + + NOT [reduce using rule 997 (on_size_error_opt)] + SIZE reduce using rule 1235 (on_opt) + $default reduce using rule 997 (on_size_error_opt) + + on_size_error_opt go to state 1694 + on_opt go to state 987 + + +state 1604 + + 817 divide_body: gname INTO gname GIVING name rounded_opt REMAINDER name . on_size_error_opt + + NOT shift, and go to state 985 + ON shift, and go to state 620 + + NOT [reduce using rule 997 (on_size_error_opt)] + SIZE reduce using rule 1235 (on_opt) + $default reduce using rule 997 (on_size_error_opt) + + on_size_error_opt go to state 1695 + on_opt go to state 987 + + +state 1605 + + 673 when_case: when_case ALSO . @72 selection_object + + $default reduce using rule 672 (@72) + + @72 go to state 1696 + + +state 1606 + + 665 when_case_list: WHEN @66 @67 when_case sentence_or_nothing . + + $default reduce using rule 665 (when_case_list) + + +state 1607 + + 682 sentence_or_nothing: conditional_statement . + + $default reduce using rule 682 (sentence_or_nothing) + + +state 1608 + + 690 not_opt: NOT . + + $default reduce using rule 690 (not_opt) + + +state 1609 + + 675 selection_object: ANY . + + $default reduce using rule 675 (selection_object) + + +state 1610 + + 677 selection_object: FALSE_TOK . + + $default reduce using rule 677 (selection_object) + + +state 1611 + + 676 selection_object: TRUE_TOK . + + $default reduce using rule 676 (selection_object) + + +state 1612 + + 671 when_case: @71 selection_object . + + $default reduce using rule 671 (when_case) + + +state 1613 + + 678 selection_object: not_opt . expr + 679 | not_opt . expr THRU expr + 680 | not_opt . cond_name + + VARIABLE shift, and go to state 56 + VARCOND shift, and go to state 422 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + '(' shift, and go to state 752 + + expr go to state 1697 + gname go to state 427 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + cond_name go to state 1698 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1614 + + 669 when_case_list: when_case_list WHEN @68 @69 when_case . $@70 sentence_or_nothing + 673 when_case: when_case . ALSO @72 selection_object + + ALSO shift, and go to state 1605 + + $default reduce using rule 668 ($@70) + + $@70 go to state 1699 + + +state 1615 + + 1111 initial_opt: INITIAL_TOK . + + $default reduce using rule 1111 (initial_opt) + + +state 1616 + + 1109 inspect_before_after: inspect_before_after AFTER initial_opt . noallname + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + noallname go to state 1700 + without_all_literal go to state 806 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 807 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1617 + + 1108 inspect_before_after: inspect_before_after BEFORE initial_opt . noallname + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + noallname go to state 1701 + without_all_literal go to state 806 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 807 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1618 + + 1094 tallying_for_list: tallying_for_list ALL noallname . inspect_before_after + + $default reduce using rule 1110 (inspect_before_after) + + inspect_before_after go to state 1702 + + +state 1619 + + 1093 tallying_for_list: tallying_for_list CHARACTERS inspect_before_after . + 1108 inspect_before_after: inspect_before_after . BEFORE initial_opt noallname + 1109 | inspect_before_after . AFTER initial_opt noallname + + AFTER shift, and go to state 1495 + BEFORE shift, and go to state 1496 + + $default reduce using rule 1093 (tallying_for_list) + + +state 1620 + + 1095 tallying_for_list: tallying_for_list LEADING noallname . inspect_before_after + + $default reduce using rule 1110 (inspect_before_after) + + inspect_before_after go to state 1703 + + +state 1621 + + 1099 replacing_list: replacing_list CHARACTERS BY noallname . inspect_before_after + + $default reduce using rule 1110 (inspect_before_after) + + inspect_before_after go to state 1704 + + +state 1622 + + 1102 replacing_by_list: replacing_by_list noallname . BY noallname inspect_before_after + + BY shift, and go to state 1705 + + +state 1623 + + 769 sort_file_list: sort_file_list name . + + $default reduce using rule 769 (sort_file_list) + + +state 1624 + + 767 sort_output: GIVING . sort_file_list + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + sort_file_list go to state 1706 + name go to state 1503 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1625 + + 766 sort_output: OUTPUT . PROCEDURE is_opt perform_range + + PROCEDURE shift, and go to state 1707 + + +state 1626 + + 740 merge_statement: MERGE name sort_keys $@86 sort_collating_opt $@87 merge_using $@88 sort_output . + + $default reduce using rule 740 (merge_statement) + + +state 1627 + + 1151 perform_options: with_test_opt UNTIL @131 condition @132 perform_statements $@133 END_PERFORM . + + $default reduce using rule 1151 (perform_options) + + +state 1628 + + 1155 perform_options: with_test_opt VARYING name FROM gname by_opt gname UNTIL . @134 condition @135 perform_after_opt perform_statements $@136 END_PERFORM + + $default reduce using rule 1152 (@134) + + @134 go to state 1708 + + +state 1629 + + 1162 perform_options: label perform_thru_opt with_test_opt VARYING name FROM gname by_opt . gname UNTIL @138 condition @139 perform_after_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gname go to state 1709 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1630 + + 914 read_at_end_opt: AT on_end NOT at_opt $@96 . on_end + + END shift, and go to state 1050 + + on_end go to state 1710 + + +state 1631 + + 916 read_at_end_opt: on_end NOT at_opt $@97 on_end . + + $default reduce using rule 916 (read_at_end_opt) + + +state 1632 + + 718 search_all_when: WHEN $@83 search_all_when_conditional . @84 search_all_when_statement + 724 search_all_when_conditional: search_all_when_conditional . AND @85 search_all_when_conditional + + AND shift, and go to state 1711 + + $default reduce using rule 717 (@84) + + @84 go to state 1712 + + +state 1633 + + 721 search_all_when_conditional: variable . is_opt CONDITIONAL to_opt variable + 722 | variable . is_opt CONDITIONAL to_opt literal + + IS shift, and go to state 84 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 1713 + + +state 1634 + + 710 search_when: WHEN search_when_conditional . @82 search_when_statement + + $default reduce using rule 709 (@82) + + @82 go to state 1714 + + +state 1635 + + 713 search_when_conditional: name_or_lit . extended_cond_op name_or_lit + + CONDITIONAL shift, and go to state 591 + IS shift, and go to state 592 + NOT shift, and go to state 598 + ALPHABETIC shift, and go to state 599 + ALPHABETIC_LOWER shift, and go to state 600 + ALPHABETIC_UPPER shift, and go to state 601 + NEGATIVE shift, and go to state 602 + NUMERIC shift, and go to state 603 + POSITIVE shift, and go to state 604 + ZERO shift, and go to state 605 + + sign_condition go to state 606 + class_condition go to state 607 + extended_cond_op go to state 1715 + ext_cond go to state 609 + conditional go to state 610 + + +state 1636 + + 708 search_when_list: search_when_list search_when . + + $default reduce using rule 708 (search_when_list) + + +state 1637 + + 764 sort_input: INPUT PROCEDURE . is_opt perform_range + + IS shift, and go to state 84 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 1716 + + +state 1638 + + 765 sort_input: USING sort_file_list . + 769 sort_file_list: sort_file_list . name + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + $default reduce using rule 765 (sort_input) + + name go to state 1623 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1639 + + 747 sort_file: SORT name sort_keys $@89 sort_duplicates_opt sort_collating_opt $@90 sort_input $@91 . sort_output + + GIVING shift, and go to state 1624 + OUTPUT shift, and go to state 1625 + + sort_output go to state 1717 + + +state 1640 + + 1046 on_overflow_opt: $@119 on_overflow on_not_overflow . + + $default reduce using rule 1046 (on_overflow_opt) + + +state 1641 + + 1059 on_not_overflow: not_excep . on_opt OVERFLOW_TOK @123 statement_list + + ON shift, and go to state 620 + + $default reduce using rule 1235 (on_opt) + + on_opt go to state 1718 + + +state 1642 + + 1056 on_overflow: on_opt OVERFLOW_TOK . @122 statement_list + + $default reduce using rule 1055 (@122) + + @122 go to state 1719 + + +state 1643 + + 1042 unstring_tallying: TALLYING in_opt name . + + $default reduce using rule 1042 (unstring_tallying) + + +state 1644 + + 1029 unstring_statement: UNSTRING name unstring_delimited INTO unstring_destinations string_with_pointer unstring_tallying $@118 on_overflow_opt . end_unstring_opt + + END_UNSTRING shift, and go to state 1720 + + END_UNSTRING [reduce using rule 1083 (end_unstring_opt)] + $default reduce using rule 1083 (end_unstring_opt) + + end_unstring_opt go to state 1721 + + +state 1645 + + 1040 unstring_count_opt: COUNT in_opt name . + + $default reduce using rule 1040 (unstring_count_opt) + + +state 1646 + + 112 select_clause: ALTERNATE RECORD key_opt is_opt STRING with_duplicates . + + $default reduce using rule 112 (select_clause) + + +state 1647 + + 124 with_duplicates: with_opt . DUPLICATES + + DUPLICATES shift, and go to state 1722 + + +state 1648 + + 517 lines_at_opt: AT . + + $default reduce using rule 517 (lines_at_opt) + + +state 1649 + + 515 lines_at_opt: LINES . + 516 | LINES . AT + + AT shift, and go to state 1723 + + $default reduce using rule 515 (lines_at_opt) + + +state 1650 + + 507 file_description_clause_linage: LINAGE is_opt data_name lines_opt file_description_clause_linage_footing file_description_clause_linage_top . file_description_clause_linage_bottom + + AT shift, and go to state 1648 + LINES shift, and go to state 1649 + + BOTTOM reduce using rule 514 (lines_at_opt) + $default reduce using rule 512 (file_description_clause_linage_bottom) + + file_description_clause_linage_bottom go to state 1724 + lines_at_opt go to state 1725 + + +state 1651 + + 511 file_description_clause_linage_top: lines_at_opt . TOP data_name + + TOP shift, and go to state 1726 + + +state 1652 + + 509 file_description_clause_linage_footing: with_opt FOOTING . at_opt data_name + + AT shift, and go to state 1054 + + $default reduce using rule 1225 (at_opt) + + at_opt go to state 1727 + + +state 1653 + + 531 from_opt: FROM . + + $default reduce using rule 531 (from_opt) + + +state 1654 + + 501 file_description_clause_record: RECORD is_opt VARYING in_opt size_opt from_rec_varying . to_rec_varying character_opts depend_rec_varying + + TO shift, and go to state 1432 + + $default reduce using rule 533 (to_rec_varying) + + to_rec_varying go to state 1728 + + +state 1655 + + 530 from_rec_varying: from_opt . nliteral + + NLITERAL shift, and go to state 59 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + nliteral go to state 1729 + signed_nliteral go to state 1069 + + +state 1656 + + 458 array_options: OCCURS integer TO integer times_opt DEPENDING . $@48 on_opt gname $@49 indexed_by_opt + + $default reduce using rule 456 ($@48) + + $@48 go to state 1730 + + +state 1657 + + 459 key_is_opt: DIRECTION key_opt . is_opt STRING + + IS shift, and go to state 84 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 1731 + + +state 1658 + + 461 indexed_by_opt: key_is_opt INDEXED . by_opt index_name_list + + BY shift, and go to state 854 + + $default reduce using rule 1231 (by_opt) + + by_opt go to state 1732 + + +state 1659 + + 482 multiplier_opt: MULTIPLIER . + + $default reduce using rule 482 (multiplier_opt) + + +state 1660 + + 480 pic_elem: CHAR multiplier_opt . + + $default reduce using rule 480 (pic_elem) + + +state 1661 + + 202 report_controls_page: PAGE limit_is_are_opt integer line_lines_opt . heading_opt first_detail_opt last_detail_opt footing_opt + + HEADING shift, and go to state 1733 + + $default reduce using rule 203 (heading_opt) + + heading_opt go to state 1734 + + +state 1662 + + 225 report_description: report_description report_item . + + $default reduce using rule 225 (report_description) + + +state 1663 + + 227 report_item: integer def_name_opt . $@18 report_clauses PERIOD_TOK + + $default reduce using rule 226 ($@18) + + $@18 go to state 1735 + + +state 1664 + + 223 report_break_list: report_break_list name . + + $default reduce using rule 223 (report_break_list) + + +state 1665 + + 348 screen_source_destination: TO $@37 name . + + $default reduce using rule 348 (screen_source_destination) + + +state 1666 + + 414 number_is_opt: NUMBER . is_opt + + IS shift, and go to state 84 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 1736 + + +state 1667 + + 329 screen_clauses: screen_clauses COLUMN $@30 number_is_opt . plus_minus_opt name_or_lit + + '+' shift, and go to state 1737 + '-' shift, and go to state 1738 + MINUS shift, and go to state 1739 + PLUS shift, and go to state 1740 + + '+' [reduce using rule 413 (plus_minus_opt)] + '-' [reduce using rule 413 (plus_minus_opt)] + $default reduce using rule 413 (plus_minus_opt) + + plus_minus_opt go to state 1741 + + +state 1668 + + 346 screen_source_destination: FROM $@36 name_or_lit . screen_to_name + + TO shift, and go to state 1742 + + TO [reduce using rule 349 (screen_to_name)] + $default reduce using rule 349 (screen_to_name) + + screen_to_name go to state 1743 + + +state 1669 + + 327 screen_clauses: screen_clauses LINE $@29 number_is_opt . plus_minus_opt name_or_lit + + '+' shift, and go to state 1737 + '-' shift, and go to state 1738 + MINUS shift, and go to state 1739 + PLUS shift, and go to state 1740 + + '+' [reduce using rule 413 (plus_minus_opt)] + '-' [reduce using rule 413 (plus_minus_opt)] + $default reduce using rule 413 (plus_minus_opt) + + plus_minus_opt go to state 1744 + + +state 1670 + + 341 screen_clauses: screen_clauses SIZE $@34 name_or_lit . + + $default reduce using rule 341 (screen_clauses) + + +state 1671 + + 344 screen_source_destination: USING $@35 name_or_lit . + + $default reduce using rule 344 (screen_source_destination) + + +state 1672 + + 334 screen_clauses: screen_clauses with_opt BACKGROUNDCOLOR $@32 . name_or_lit + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + name_or_lit go to state 1745 + literal go to state 1065 + signed_nliteral go to state 77 + name go to state 1066 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1673 + + 352 screen_attrib: BLANK LINE . + + $default reduce using rule 352 (screen_attrib) + + +state 1674 + + 351 screen_attrib: BLANK SCREEN . + + $default reduce using rule 351 (screen_attrib) + + +state 1675 + + 369 screen_attrib: BLANK when_opt . ZERO + + ZERO shift, and go to state 1746 + + +state 1676 + + 336 screen_clauses: screen_clauses with_opt COLOR $@33 . name_or_lit + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + name_or_lit go to state 1747 + literal go to state 1065 + signed_nliteral go to state 77 + name go to state 1066 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1677 + + 353 screen_attrib: ERASE EOL . + + $default reduce using rule 353 (screen_attrib) + + +state 1678 + + 354 screen_attrib: ERASE EOS . + + $default reduce using rule 354 (screen_attrib) + + +state 1679 + + 332 screen_clauses: screen_clauses with_opt FOREGROUNDCOLOR $@31 . name_or_lit + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + name_or_lit go to state 1748 + literal go to state 1065 + signed_nliteral go to state 77 + name go to state 1066 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1680 + + 363 screen_attrib: JUSTIFIED LEFT . + + $default reduce using rule 363 (screen_attrib) + + +state 1681 + + 362 screen_attrib: JUSTIFIED RIGHT . + + $default reduce using rule 362 (screen_attrib) + + +state 1682 + + 372 screen_attrib: with_opt NO . ADVANCING + + ADVANCING shift, and go to state 1749 + + +state 1683 + + 356 screen_attrib: with_opt BELL . + + $default reduce using rule 356 (screen_attrib) + + +state 1684 + + 370 screen_attrib: with_opt NOECHO . + + $default reduce using rule 370 (screen_attrib) + + +state 1685 + + 371 screen_attrib: with_opt UPDATE . + + $default reduce using rule 371 (screen_attrib) + + +state 1686 + + 925 read_not_invalid_key: NOT INVALID key_opt . @100 statement_list + + $default reduce using rule 924 (@100) + + @100 go to state 1750 + + +state 1687 + + 923 read_invalid_key: INVALID key_opt @99 . statement_list + + READ shift, and go to state 254 + WRITE shift, and go to state 255 + RELEASE shift, and go to state 256 + ACCEPT shift, and go to state 257 + ADD shift, and go to state 258 + CALL shift, and go to state 259 + CALL_LOADLIB shift, and go to state 260 + CANCEL shift, and go to state 261 + CHAIN shift, and go to state 262 + CLOSE shift, and go to state 263 + COMPUTE shift, and go to state 264 + CONTINUE shift, and go to state 265 + DELETE shift, and go to state 266 + DISPLAY shift, and go to state 267 + DIVIDE shift, and go to state 268 + EVALUATE shift, and go to state 269 + EXIT shift, and go to state 270 + GENERATE shift, and go to state 271 + GO shift, and go to state 272 + GOBACK shift, and go to state 273 + IF shift, and go to state 274 + INITIALIZE shift, and go to state 275 + INITIATE shift, and go to state 276 + INSPECT shift, and go to state 277 + MERGE shift, and go to state 278 + MOVE shift, and go to state 279 + MULTIPLY shift, and go to state 280 + OPEN shift, and go to state 281 + PERFORM shift, and go to state 282 + READY shift, and go to state 283 + RESET shift, and go to state 284 + RETURN shift, and go to state 285 + REWRITE shift, and go to state 286 + SEARCH shift, and go to state 287 + SET shift, and go to state 288 + SORT shift, and go to state 289 + START shift, and go to state 290 + STOP shift, and go to state 291 + STRINGCMD shift, and go to state 292 + SUBTRACT shift, and go to state 293 + TCOBPROTO1 shift, and go to state 294 + TCOBPROTO2 shift, and go to state 295 + TERMINATE shift, and go to state 296 + UNLOCK shift, and go to state 297 + UNSTRING shift, and go to state 298 + + statement_list go to state 1751 + statements go to state 640 + statement go to state 300 + perform_statement go to state 301 + if_statement go to state 302 + search_statement go to state 303 + evaluate_statement go to state 304 + if_part go to state 305 + unlock_statement go to state 306 + proto_statement go to state 307 + trace_statement go to state 308 + initiate_statement go to state 309 + generate_statement go to state 310 + terminate_statement go to state 311 + cancel_statement go to state 312 + merge_statement go to state 313 + sort_statement go to state 314 + sort_file go to state 315 + sort_variable_indexed go to state 316 + move_statement go to state 317 + initialize_statement go to state 318 + compute_statement go to state 319 + add_statement go to state 320 + subtract_statement go to state 321 + multiply_statement go to state 322 + divide_statement go to state 323 + accept_statement go to state 324 + accept_hardware go to state 325 + accept_chronological go to state 326 + accept_screen go to state 327 + display_statement go to state 328 + display_line go to state 329 + display_screen go to state 330 + open_statement go to state 331 + close_statement go to state 332 + return_statement go to state 333 + read_statement go to state 334 + release_statement go to state 335 + write_statement go to state 336 + rewrite_statement go to state 337 + delete_statement go to state 338 + start_statement go to state 339 + goto_statement go to state 340 + call_statement go to state 341 + call_loadlib_statement go to state 342 + chain_statement go to state 343 + exit_statement go to state 344 + stop_statement go to state 345 + goback_statement go to state 346 + set_statement go to state 347 + string_statement go to state 348 + unstring_statement go to state 349 + inspect_statement go to state 350 + + +state 1688 + + 836 accept_screen: ACCEPT name accept_display_options on_opt EXCEPTION $@93 variable @94 statement_list $@95 . end_accept_opt + + END_ACCEPT shift, and go to state 725 + + END_ACCEPT [reduce using rule 837 (end_accept_opt)] + $default reduce using rule 837 (end_accept_opt) + + end_accept_opt go to state 1752 + + +state 1689 + + 1001 on_size_error_opt: on_opt SIZE on_size_error NOT on_opt SIZE . $@115 on_size_error + + $default reduce using rule 1000 ($@115) + + $@115 go to state 1753 + + +state 1690 + + 967 call_statement: CALL $@105 call_convention_opt gname using_options returning_options @106 @107 @108 on_exception_or_overflow . on_not_exception $@109 end_call_opt + + NOT shift, and go to state 1754 + + NOT [reduce using rule 1054 (on_not_exception)] + $default reduce using rule 1054 (on_not_exception) + + on_not_exception go to state 1755 + + +state 1691 + + 1133 parm_list: parm_list sep_opt parameter . + + $default reduce using rule 1133 (parm_list) + + +state 1692 + + 1136 parameter: by_opt parm_type gname . + + $default reduce using rule 1136 (parameter) + + +state 1693 + + 1048 on_exception_or_overflow: on_opt exception_or_overflow @120 statement_list . + + $default reduce using rule 1048 (on_exception_or_overflow) + + +state 1694 + + 816 divide_body: gname BY gname GIVING name rounded_opt REMAINDER name on_size_error_opt . + + $default reduce using rule 816 (divide_body) + + +state 1695 + + 817 divide_body: gname INTO gname GIVING name rounded_opt REMAINDER name on_size_error_opt . + + $default reduce using rule 817 (divide_body) + + +state 1696 + + 673 when_case: when_case ALSO @72 . selection_object + + NOT shift, and go to state 1608 + ANY shift, and go to state 1609 + FALSE_TOK shift, and go to state 1610 + TRUE_TOK shift, and go to state 1611 + + $default reduce using rule 689 (not_opt) + + selection_object go to state 1756 + not_opt go to state 1613 + + +state 1697 + + 678 selection_object: not_opt expr . + 679 | not_opt expr . THRU expr + 1114 expr: expr . '*' expr + 1115 | expr . '/' expr + 1116 | expr . '+' expr + 1117 | expr . '-' expr + 1118 | expr . POW_OP expr + + THRU shift, and go to state 1757 + '+' shift, and go to state 593 + '-' shift, and go to state 594 + '*' shift, and go to state 595 + '/' shift, and go to state 596 + POW_OP shift, and go to state 597 + + $default reduce using rule 678 (selection_object) + + +state 1698 + + 680 selection_object: not_opt cond_name . + + $default reduce using rule 680 (selection_object) + + +state 1699 + + 669 when_case_list: when_case_list WHEN @68 @69 when_case $@70 . sentence_or_nothing + + END_EVALUATE reduce using rule 681 (sentence_or_nothing) + NEXT reduce using rule 687 ($@75) + WHEN reduce using rule 681 (sentence_or_nothing) + PERIOD_TOK reduce using rule 681 (sentence_or_nothing) + $default reduce using rule 685 ($@74) + + sentence_or_nothing go to state 1758 + conditional_statement go to state 1607 + $@74 go to state 862 + $@75 go to state 863 + + +state 1700 + + 1109 inspect_before_after: inspect_before_after AFTER initial_opt noallname . + + $default reduce using rule 1109 (inspect_before_after) + + +state 1701 + + 1108 inspect_before_after: inspect_before_after BEFORE initial_opt noallname . + + $default reduce using rule 1108 (inspect_before_after) + + +state 1702 + + 1094 tallying_for_list: tallying_for_list ALL noallname inspect_before_after . + 1108 inspect_before_after: inspect_before_after . BEFORE initial_opt noallname + 1109 | inspect_before_after . AFTER initial_opt noallname + + AFTER shift, and go to state 1495 + BEFORE shift, and go to state 1496 + + $default reduce using rule 1094 (tallying_for_list) + + +state 1703 + + 1095 tallying_for_list: tallying_for_list LEADING noallname inspect_before_after . + 1108 inspect_before_after: inspect_before_after . BEFORE initial_opt noallname + 1109 | inspect_before_after . AFTER initial_opt noallname + + AFTER shift, and go to state 1495 + BEFORE shift, and go to state 1496 + + $default reduce using rule 1095 (tallying_for_list) + + +state 1704 + + 1099 replacing_list: replacing_list CHARACTERS BY noallname inspect_before_after . + 1108 inspect_before_after: inspect_before_after . BEFORE initial_opt noallname + 1109 | inspect_before_after . AFTER initial_opt noallname + + AFTER shift, and go to state 1495 + BEFORE shift, and go to state 1496 + + $default reduce using rule 1099 (replacing_list) + + +state 1705 + + 1102 replacing_by_list: replacing_by_list noallname BY . noallname inspect_before_after + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + noallname go to state 1759 + without_all_literal go to state 806 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 807 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1706 + + 767 sort_output: GIVING sort_file_list . + 769 sort_file_list: sort_file_list . name + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + $default reduce using rule 767 (sort_output) + + name go to state 1623 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1707 + + 766 sort_output: OUTPUT PROCEDURE . is_opt perform_range + + IS shift, and go to state 84 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 1760 + + +state 1708 + + 1155 perform_options: with_test_opt VARYING name FROM gname by_opt gname UNTIL @134 . condition @135 perform_after_opt perform_statements $@136 END_PERFORM + + VARIABLE shift, and go to state 56 + VARCOND shift, and go to state 422 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + NOT shift, and go to state 423 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + '(' shift, and go to state 424 + + expr go to state 425 + condition go to state 1761 + gname go to state 427 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + cond_name go to state 428 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1709 + + 1162 perform_options: label perform_thru_opt with_test_opt VARYING name FROM gname by_opt gname . UNTIL @138 condition @139 perform_after_opt + + UNTIL shift, and go to state 1762 + + +state 1710 + + 914 read_at_end_opt: AT on_end NOT at_opt $@96 on_end . + + $default reduce using rule 914 (read_at_end_opt) + + +state 1711 + + 724 search_all_when_conditional: search_all_when_conditional AND . @85 search_all_when_conditional + + $default reduce using rule 723 (@85) + + @85 go to state 1763 + + +state 1712 + + 718 search_all_when: WHEN $@83 search_all_when_conditional @84 . search_all_when_statement + + READ shift, and go to state 254 + WRITE shift, and go to state 255 + RELEASE shift, and go to state 256 + ACCEPT shift, and go to state 257 + ADD shift, and go to state 258 + CALL shift, and go to state 259 + CALL_LOADLIB shift, and go to state 260 + CANCEL shift, and go to state 261 + CHAIN shift, and go to state 262 + CLOSE shift, and go to state 263 + COMPUTE shift, and go to state 264 + CONTINUE shift, and go to state 265 + DELETE shift, and go to state 266 + DISPLAY shift, and go to state 267 + DIVIDE shift, and go to state 268 + EVALUATE shift, and go to state 269 + EXIT shift, and go to state 270 + GENERATE shift, and go to state 271 + GO shift, and go to state 272 + GOBACK shift, and go to state 273 + IF shift, and go to state 274 + INITIALIZE shift, and go to state 275 + INITIATE shift, and go to state 276 + INSPECT shift, and go to state 277 + MERGE shift, and go to state 278 + MOVE shift, and go to state 279 + MULTIPLY shift, and go to state 280 + NEXT shift, and go to state 1764 + OPEN shift, and go to state 281 + PERFORM shift, and go to state 282 + READY shift, and go to state 283 + RESET shift, and go to state 284 + RETURN shift, and go to state 285 + REWRITE shift, and go to state 286 + SEARCH shift, and go to state 287 + SET shift, and go to state 288 + SORT shift, and go to state 289 + START shift, and go to state 290 + STOP shift, and go to state 291 + STRINGCMD shift, and go to state 292 + SUBTRACT shift, and go to state 293 + TCOBPROTO1 shift, and go to state 294 + TCOBPROTO2 shift, and go to state 295 + TERMINATE shift, and go to state 296 + UNLOCK shift, and go to state 297 + UNSTRING shift, and go to state 298 + + statement_list go to state 1765 + statements go to state 640 + statement go to state 300 + perform_statement go to state 301 + if_statement go to state 302 + search_statement go to state 303 + evaluate_statement go to state 304 + if_part go to state 305 + search_all_when_statement go to state 1766 + unlock_statement go to state 306 + proto_statement go to state 307 + trace_statement go to state 308 + initiate_statement go to state 309 + generate_statement go to state 310 + terminate_statement go to state 311 + cancel_statement go to state 312 + merge_statement go to state 313 + sort_statement go to state 314 + sort_file go to state 315 + sort_variable_indexed go to state 316 + move_statement go to state 317 + initialize_statement go to state 318 + compute_statement go to state 319 + add_statement go to state 320 + subtract_statement go to state 321 + multiply_statement go to state 322 + divide_statement go to state 323 + accept_statement go to state 324 + accept_hardware go to state 325 + accept_chronological go to state 326 + accept_screen go to state 327 + display_statement go to state 328 + display_line go to state 329 + display_screen go to state 330 + open_statement go to state 331 + close_statement go to state 332 + return_statement go to state 333 + read_statement go to state 334 + release_statement go to state 335 + write_statement go to state 336 + rewrite_statement go to state 337 + delete_statement go to state 338 + start_statement go to state 339 + goto_statement go to state 340 + call_statement go to state 341 + call_loadlib_statement go to state 342 + chain_statement go to state 343 + exit_statement go to state 344 + stop_statement go to state 345 + goback_statement go to state 346 + set_statement go to state 347 + string_statement go to state 348 + unstring_statement go to state 349 + inspect_statement go to state 350 + + +state 1713 + + 721 search_all_when_conditional: variable is_opt . CONDITIONAL to_opt variable + 722 | variable is_opt . CONDITIONAL to_opt literal + + CONDITIONAL shift, and go to state 1767 + + +state 1714 + + 710 search_when: WHEN search_when_conditional @82 . search_when_statement + + READ shift, and go to state 254 + WRITE shift, and go to state 255 + RELEASE shift, and go to state 256 + ACCEPT shift, and go to state 257 + ADD shift, and go to state 258 + CALL shift, and go to state 259 + CALL_LOADLIB shift, and go to state 260 + CANCEL shift, and go to state 261 + CHAIN shift, and go to state 262 + CLOSE shift, and go to state 263 + COMPUTE shift, and go to state 264 + CONTINUE shift, and go to state 265 + DELETE shift, and go to state 266 + DISPLAY shift, and go to state 267 + DIVIDE shift, and go to state 268 + EVALUATE shift, and go to state 269 + EXIT shift, and go to state 270 + GENERATE shift, and go to state 271 + GO shift, and go to state 272 + GOBACK shift, and go to state 273 + IF shift, and go to state 274 + INITIALIZE shift, and go to state 275 + INITIATE shift, and go to state 276 + INSPECT shift, and go to state 277 + MERGE shift, and go to state 278 + MOVE shift, and go to state 279 + MULTIPLY shift, and go to state 280 + NEXT shift, and go to state 1768 + OPEN shift, and go to state 281 + PERFORM shift, and go to state 282 + READY shift, and go to state 283 + RESET shift, and go to state 284 + RETURN shift, and go to state 285 + REWRITE shift, and go to state 286 + SEARCH shift, and go to state 287 + SET shift, and go to state 288 + SORT shift, and go to state 289 + START shift, and go to state 290 + STOP shift, and go to state 291 + STRINGCMD shift, and go to state 292 + SUBTRACT shift, and go to state 293 + TCOBPROTO1 shift, and go to state 294 + TCOBPROTO2 shift, and go to state 295 + TERMINATE shift, and go to state 296 + UNLOCK shift, and go to state 297 + UNSTRING shift, and go to state 298 + + statement_list go to state 1769 + statements go to state 640 + statement go to state 300 + perform_statement go to state 301 + if_statement go to state 302 + search_statement go to state 303 + evaluate_statement go to state 304 + if_part go to state 305 + search_when_statement go to state 1770 + unlock_statement go to state 306 + proto_statement go to state 307 + trace_statement go to state 308 + initiate_statement go to state 309 + generate_statement go to state 310 + terminate_statement go to state 311 + cancel_statement go to state 312 + merge_statement go to state 313 + sort_statement go to state 314 + sort_file go to state 315 + sort_variable_indexed go to state 316 + move_statement go to state 317 + initialize_statement go to state 318 + compute_statement go to state 319 + add_statement go to state 320 + subtract_statement go to state 321 + multiply_statement go to state 322 + divide_statement go to state 323 + accept_statement go to state 324 + accept_hardware go to state 325 + accept_chronological go to state 326 + accept_screen go to state 327 + display_statement go to state 328 + display_line go to state 329 + display_screen go to state 330 + open_statement go to state 331 + close_statement go to state 332 + return_statement go to state 333 + read_statement go to state 334 + release_statement go to state 335 + write_statement go to state 336 + rewrite_statement go to state 337 + delete_statement go to state 338 + start_statement go to state 339 + goto_statement go to state 340 + call_statement go to state 341 + call_loadlib_statement go to state 342 + chain_statement go to state 343 + exit_statement go to state 344 + stop_statement go to state 345 + goback_statement go to state 346 + set_statement go to state 347 + string_statement go to state 348 + unstring_statement go to state 349 + inspect_statement go to state 350 + + +state 1715 + + 713 search_when_conditional: name_or_lit extended_cond_op . name_or_lit + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + name_or_lit go to state 1771 + literal go to state 1065 + signed_nliteral go to state 77 + name go to state 1066 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1716 + + 764 sort_input: INPUT PROCEDURE is_opt . perform_range + + LABELSTR shift, and go to state 582 + NLITERAL shift, and go to state 583 + + perform_range go to state 1772 + label go to state 1773 + + +state 1717 + + 747 sort_file: SORT name sort_keys $@89 sort_duplicates_opt sort_collating_opt $@90 sort_input $@91 sort_output . + + $default reduce using rule 747 (sort_file) + + +state 1718 + + 1059 on_not_overflow: not_excep on_opt . OVERFLOW_TOK @123 statement_list + + OVERFLOW_TOK shift, and go to state 1774 + + +state 1719 + + 1056 on_overflow: on_opt OVERFLOW_TOK @122 . statement_list + + READ shift, and go to state 254 + WRITE shift, and go to state 255 + RELEASE shift, and go to state 256 + ACCEPT shift, and go to state 257 + ADD shift, and go to state 258 + CALL shift, and go to state 259 + CALL_LOADLIB shift, and go to state 260 + CANCEL shift, and go to state 261 + CHAIN shift, and go to state 262 + CLOSE shift, and go to state 263 + COMPUTE shift, and go to state 264 + CONTINUE shift, and go to state 265 + DELETE shift, and go to state 266 + DISPLAY shift, and go to state 267 + DIVIDE shift, and go to state 268 + EVALUATE shift, and go to state 269 + EXIT shift, and go to state 270 + GENERATE shift, and go to state 271 + GO shift, and go to state 272 + GOBACK shift, and go to state 273 + IF shift, and go to state 274 + INITIALIZE shift, and go to state 275 + INITIATE shift, and go to state 276 + INSPECT shift, and go to state 277 + MERGE shift, and go to state 278 + MOVE shift, and go to state 279 + MULTIPLY shift, and go to state 280 + OPEN shift, and go to state 281 + PERFORM shift, and go to state 282 + READY shift, and go to state 283 + RESET shift, and go to state 284 + RETURN shift, and go to state 285 + REWRITE shift, and go to state 286 + SEARCH shift, and go to state 287 + SET shift, and go to state 288 + SORT shift, and go to state 289 + START shift, and go to state 290 + STOP shift, and go to state 291 + STRINGCMD shift, and go to state 292 + SUBTRACT shift, and go to state 293 + TCOBPROTO1 shift, and go to state 294 + TCOBPROTO2 shift, and go to state 295 + TERMINATE shift, and go to state 296 + UNLOCK shift, and go to state 297 + UNSTRING shift, and go to state 298 + + statement_list go to state 1775 + statements go to state 640 + statement go to state 300 + perform_statement go to state 301 + if_statement go to state 302 + search_statement go to state 303 + evaluate_statement go to state 304 + if_part go to state 305 + unlock_statement go to state 306 + proto_statement go to state 307 + trace_statement go to state 308 + initiate_statement go to state 309 + generate_statement go to state 310 + terminate_statement go to state 311 + cancel_statement go to state 312 + merge_statement go to state 313 + sort_statement go to state 314 + sort_file go to state 315 + sort_variable_indexed go to state 316 + move_statement go to state 317 + initialize_statement go to state 318 + compute_statement go to state 319 + add_statement go to state 320 + subtract_statement go to state 321 + multiply_statement go to state 322 + divide_statement go to state 323 + accept_statement go to state 324 + accept_hardware go to state 325 + accept_chronological go to state 326 + accept_screen go to state 327 + display_statement go to state 328 + display_line go to state 329 + display_screen go to state 330 + open_statement go to state 331 + close_statement go to state 332 + return_statement go to state 333 + read_statement go to state 334 + release_statement go to state 335 + write_statement go to state 336 + rewrite_statement go to state 337 + delete_statement go to state 338 + start_statement go to state 339 + goto_statement go to state 340 + call_statement go to state 341 + call_loadlib_statement go to state 342 + chain_statement go to state 343 + exit_statement go to state 344 + stop_statement go to state 345 + goback_statement go to state 346 + set_statement go to state 347 + string_statement go to state 348 + unstring_statement go to state 349 + inspect_statement go to state 350 + + +state 1720 + + 1084 end_unstring_opt: END_UNSTRING . + + $default reduce using rule 1084 (end_unstring_opt) + + +state 1721 + + 1029 unstring_statement: UNSTRING name unstring_delimited INTO unstring_destinations string_with_pointer unstring_tallying $@118 on_overflow_opt end_unstring_opt . + + $default reduce using rule 1029 (unstring_statement) + + +state 1722 + + 124 with_duplicates: with_opt DUPLICATES . + + $default reduce using rule 124 (with_duplicates) + + +state 1723 + + 516 lines_at_opt: LINES AT . + + $default reduce using rule 516 (lines_at_opt) + + +state 1724 + + 507 file_description_clause_linage: LINAGE is_opt data_name lines_opt file_description_clause_linage_footing file_description_clause_linage_top file_description_clause_linage_bottom . + + $default reduce using rule 507 (file_description_clause_linage) + + +state 1725 + + 513 file_description_clause_linage_bottom: lines_at_opt . BOTTOM data_name + + BOTTOM shift, and go to state 1776 + + +state 1726 + + 511 file_description_clause_linage_top: lines_at_opt TOP . data_name + + STRING shift, and go to state 1298 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + literal go to state 1299 + signed_nliteral go to state 77 + data_name go to state 1777 + + +state 1727 + + 509 file_description_clause_linage_footing: with_opt FOOTING at_opt . data_name + + STRING shift, and go to state 1298 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + literal go to state 1299 + signed_nliteral go to state 77 + data_name go to state 1778 + + +state 1728 + + 501 file_description_clause_record: RECORD is_opt VARYING in_opt size_opt from_rec_varying to_rec_varying . character_opts depend_rec_varying + + CHARACTERS shift, and go to state 1541 + + $default reduce using rule 547 (character_opts) + + character_opts go to state 1779 + + +state 1729 + + 530 from_rec_varying: from_opt nliteral . + + $default reduce using rule 530 (from_rec_varying) + + +state 1730 + + 458 array_options: OCCURS integer TO integer times_opt DEPENDING $@48 . on_opt gname $@49 indexed_by_opt + + ON shift, and go to state 620 + + $default reduce using rule 1235 (on_opt) + + on_opt go to state 1780 + + +state 1731 + + 459 key_is_opt: DIRECTION key_opt is_opt . STRING + + STRING shift, and go to state 1781 + + +state 1732 + + 461 indexed_by_opt: key_is_opt INDEXED by_opt . index_name_list + + STRING shift, and go to state 368 + FILLER shift, and go to state 369 + + index_name_list go to state 1782 + def_name go to state 1783 + + +state 1733 + + 204 heading_opt: HEADING . is_opt integer + + IS shift, and go to state 84 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 1784 + + +state 1734 + + 202 report_controls_page: PAGE limit_is_are_opt integer line_lines_opt heading_opt . first_detail_opt last_detail_opt footing_opt + + FIRST shift, and go to state 1785 + + $default reduce using rule 218 (first_detail_opt) + + first_detail_opt go to state 1786 + + +state 1735 + + 227 report_item: integer def_name_opt $@18 . report_clauses PERIOD_TOK + + BLANK shift, and go to state 1787 + COLUMN shift, and go to state 1788 + COLUMNS shift, and go to state 1789 + DISPLAY shift, and go to state 1790 + GROUP shift, and go to state 1791 + JUSTIFIED shift, and go to state 1792 + LEADING shift, and go to state 1793 + LINE shift, and go to state 1794 + LINES shift, and go to state 1795 + NEXT shift, and go to state 1796 + PICTURE shift, and go to state 1797 + SIGN shift, and go to state 1798 + SOURCE shift, and go to state 1799 + SUM shift, and go to state 1800 + TRAILING shift, and go to state 1801 + TYPE shift, and go to state 1802 + USAGE shift, and go to state 1803 + VALUE shift, and go to state 1804 + + BLANK [reduce using rule 296 (report_clause_group_indicate)] + COLUMN [reduce using rule 296 (report_clause_group_indicate)] + COLUMNS [reduce using rule 296 (report_clause_group_indicate)] + DISPLAY [reduce using rule 296 (report_clause_group_indicate)] + GROUP [reduce using rule 296 (report_clause_group_indicate)] + JUSTIFIED [reduce using rule 296 (report_clause_group_indicate)] + LEADING [reduce using rule 296 (report_clause_group_indicate)] + LINE [reduce using rule 296 (report_clause_group_indicate)] + LINES [reduce using rule 296 (report_clause_group_indicate)] + NEXT [reduce using rule 296 (report_clause_group_indicate)] + PICTURE [reduce using rule 296 (report_clause_group_indicate)] + SIGN [reduce using rule 296 (report_clause_group_indicate)] + SOURCE [reduce using rule 296 (report_clause_group_indicate)] + SUM [reduce using rule 296 (report_clause_group_indicate)] + TRAILING [reduce using rule 296 (report_clause_group_indicate)] + TYPE [reduce using rule 296 (report_clause_group_indicate)] + USAGE [reduce using rule 296 (report_clause_group_indicate)] + VALUE [reduce using rule 296 (report_clause_group_indicate)] + $default reduce using rule 296 (report_clause_group_indicate) + + report_clauses go to state 1805 + report_clause go to state 1806 + report_clause_type go to state 1807 + report_clause_sign_is go to state 1808 + report_clause_picture go to state 1809 + report_clause_usage_display go to state 1810 + report_clause_justified go to state 1811 + report_clause_next_group go to state 1812 + report_clause_line go to state 1813 + report_clause_line_is go to state 1814 + report_clause_column go to state 1815 + report_clause_column_is go to state 1816 + report_clause_svs go to state 1817 + report_clause_group_indicate go to state 1818 + report_clause_blank_zero go to state 1819 + leading_trailing go to state 1820 + + +state 1736 + + 414 number_is_opt: NUMBER is_opt . + + $default reduce using rule 414 (number_is_opt) + + +state 1737 + + 410 plus_minus_opt: '+' . + + $default reduce using rule 410 (plus_minus_opt) + + +state 1738 + + 412 plus_minus_opt: '-' . + + $default reduce using rule 412 (plus_minus_opt) + + +state 1739 + + 411 plus_minus_opt: MINUS . + + $default reduce using rule 411 (plus_minus_opt) + + +state 1740 + + 409 plus_minus_opt: PLUS . + + $default reduce using rule 409 (plus_minus_opt) + + +state 1741 + + 329 screen_clauses: screen_clauses COLUMN $@30 number_is_opt plus_minus_opt . name_or_lit + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + name_or_lit go to state 1821 + literal go to state 1065 + signed_nliteral go to state 77 + name go to state 1066 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1742 + + 350 screen_to_name: TO . name + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + name go to state 1822 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1743 + + 346 screen_source_destination: FROM $@36 name_or_lit screen_to_name . + + $default reduce using rule 346 (screen_source_destination) + + +state 1744 + + 327 screen_clauses: screen_clauses LINE $@29 number_is_opt plus_minus_opt . name_or_lit + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + name_or_lit go to state 1823 + literal go to state 1065 + signed_nliteral go to state 77 + name go to state 1066 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1745 + + 334 screen_clauses: screen_clauses with_opt BACKGROUNDCOLOR $@32 name_or_lit . + + $default reduce using rule 334 (screen_clauses) + + +state 1746 + + 369 screen_attrib: BLANK when_opt ZERO . + + $default reduce using rule 369 (screen_attrib) + + +state 1747 + + 336 screen_clauses: screen_clauses with_opt COLOR $@33 name_or_lit . + + $default reduce using rule 336 (screen_clauses) + + +state 1748 + + 332 screen_clauses: screen_clauses with_opt FOREGROUNDCOLOR $@31 name_or_lit . + + $default reduce using rule 332 (screen_clauses) + + +state 1749 + + 372 screen_attrib: with_opt NO ADVANCING . + + $default reduce using rule 372 (screen_attrib) + + +state 1750 + + 925 read_not_invalid_key: NOT INVALID key_opt @100 . statement_list + + READ shift, and go to state 254 + WRITE shift, and go to state 255 + RELEASE shift, and go to state 256 + ACCEPT shift, and go to state 257 + ADD shift, and go to state 258 + CALL shift, and go to state 259 + CALL_LOADLIB shift, and go to state 260 + CANCEL shift, and go to state 261 + CHAIN shift, and go to state 262 + CLOSE shift, and go to state 263 + COMPUTE shift, and go to state 264 + CONTINUE shift, and go to state 265 + DELETE shift, and go to state 266 + DISPLAY shift, and go to state 267 + DIVIDE shift, and go to state 268 + EVALUATE shift, and go to state 269 + EXIT shift, and go to state 270 + GENERATE shift, and go to state 271 + GO shift, and go to state 272 + GOBACK shift, and go to state 273 + IF shift, and go to state 274 + INITIALIZE shift, and go to state 275 + INITIATE shift, and go to state 276 + INSPECT shift, and go to state 277 + MERGE shift, and go to state 278 + MOVE shift, and go to state 279 + MULTIPLY shift, and go to state 280 + OPEN shift, and go to state 281 + PERFORM shift, and go to state 282 + READY shift, and go to state 283 + RESET shift, and go to state 284 + RETURN shift, and go to state 285 + REWRITE shift, and go to state 286 + SEARCH shift, and go to state 287 + SET shift, and go to state 288 + SORT shift, and go to state 289 + START shift, and go to state 290 + STOP shift, and go to state 291 + STRINGCMD shift, and go to state 292 + SUBTRACT shift, and go to state 293 + TCOBPROTO1 shift, and go to state 294 + TCOBPROTO2 shift, and go to state 295 + TERMINATE shift, and go to state 296 + UNLOCK shift, and go to state 297 + UNSTRING shift, and go to state 298 + + statement_list go to state 1824 + statements go to state 640 + statement go to state 300 + perform_statement go to state 301 + if_statement go to state 302 + search_statement go to state 303 + evaluate_statement go to state 304 + if_part go to state 305 + unlock_statement go to state 306 + proto_statement go to state 307 + trace_statement go to state 308 + initiate_statement go to state 309 + generate_statement go to state 310 + terminate_statement go to state 311 + cancel_statement go to state 312 + merge_statement go to state 313 + sort_statement go to state 314 + sort_file go to state 315 + sort_variable_indexed go to state 316 + move_statement go to state 317 + initialize_statement go to state 318 + compute_statement go to state 319 + add_statement go to state 320 + subtract_statement go to state 321 + multiply_statement go to state 322 + divide_statement go to state 323 + accept_statement go to state 324 + accept_hardware go to state 325 + accept_chronological go to state 326 + accept_screen go to state 327 + display_statement go to state 328 + display_line go to state 329 + display_screen go to state 330 + open_statement go to state 331 + close_statement go to state 332 + return_statement go to state 333 + read_statement go to state 334 + release_statement go to state 335 + write_statement go to state 336 + rewrite_statement go to state 337 + delete_statement go to state 338 + start_statement go to state 339 + goto_statement go to state 340 + call_statement go to state 341 + call_loadlib_statement go to state 342 + chain_statement go to state 343 + exit_statement go to state 344 + stop_statement go to state 345 + goback_statement go to state 346 + set_statement go to state 347 + string_statement go to state 348 + unstring_statement go to state 349 + inspect_statement go to state 350 + + +state 1751 + + 923 read_invalid_key: INVALID key_opt @99 statement_list . + + $default reduce using rule 923 (read_invalid_key) + + +state 1752 + + 836 accept_screen: ACCEPT name accept_display_options on_opt EXCEPTION $@93 variable @94 statement_list $@95 end_accept_opt . + + $default reduce using rule 836 (accept_screen) + + +state 1753 + + 1001 on_size_error_opt: on_opt SIZE on_size_error NOT on_opt SIZE $@115 . on_size_error + + ERROR_TOK shift, and go to state 1350 + + on_size_error go to state 1825 + + +state 1754 + + 1053 on_not_exception: NOT . on_opt EXCEPTION @121 statement_list + + ON shift, and go to state 620 + + $default reduce using rule 1235 (on_opt) + + on_opt go to state 1826 + + +state 1755 + + 967 call_statement: CALL $@105 call_convention_opt gname using_options returning_options @106 @107 @108 on_exception_or_overflow on_not_exception . $@109 end_call_opt + + $default reduce using rule 966 ($@109) + + $@109 go to state 1827 + + +state 1756 + + 673 when_case: when_case ALSO @72 selection_object . + + $default reduce using rule 673 (when_case) + + +state 1757 + + 679 selection_object: not_opt expr THRU . expr + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + '(' shift, and go to state 752 + + expr go to state 1828 + gname go to state 427 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1758 + + 669 when_case_list: when_case_list WHEN @68 @69 when_case $@70 sentence_or_nothing . + + $default reduce using rule 669 (when_case_list) + + +state 1759 + + 1102 replacing_by_list: replacing_by_list noallname BY noallname . inspect_before_after + + $default reduce using rule 1110 (inspect_before_after) + + inspect_before_after go to state 1829 + + +state 1760 + + 766 sort_output: OUTPUT PROCEDURE is_opt . perform_range + + LABELSTR shift, and go to state 582 + NLITERAL shift, and go to state 583 + + perform_range go to state 1830 + label go to state 1773 + + +state 1761 + + 1155 perform_options: with_test_opt VARYING name FROM gname by_opt gname UNTIL @134 condition . @135 perform_after_opt perform_statements $@136 END_PERFORM + 1184 condition: condition . AND @143 implied_op_condition + 1186 | condition . OR @144 implied_op_condition + + OR shift, and go to state 611 + AND shift, and go to state 612 + + $default reduce using rule 1153 (@135) + + @135 go to state 1831 + + +state 1762 + + 1162 perform_options: label perform_thru_opt with_test_opt VARYING name FROM gname by_opt gname UNTIL . @138 condition @139 perform_after_opt + + $default reduce using rule 1160 (@138) + + @138 go to state 1832 + + +state 1763 + + 724 search_all_when_conditional: search_all_when_conditional AND @85 . search_all_when_conditional + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + + search_all_when_conditional go to state 1833 + variable go to state 1633 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1764 + + 720 search_all_when_statement: NEXT . SENTENCE + + SENTENCE shift, and go to state 1834 + + +state 1765 + + 719 search_all_when_statement: statement_list . + + $default reduce using rule 719 (search_all_when_statement) + + +state 1766 + + 718 search_all_when: WHEN $@83 search_all_when_conditional @84 search_all_when_statement . + + $default reduce using rule 718 (search_all_when) + + +state 1767 + + 721 search_all_when_conditional: variable is_opt CONDITIONAL . to_opt variable + 722 | variable is_opt CONDITIONAL . to_opt literal + + TO shift, and go to state 420 + + $default reduce using rule 1239 (to_opt) + + to_opt go to state 1835 + + +state 1768 + + 712 search_when_statement: NEXT . SENTENCE + + SENTENCE shift, and go to state 1836 + + +state 1769 + + 711 search_when_statement: statement_list . + + $default reduce using rule 711 (search_when_statement) + + +state 1770 + + 710 search_when: WHEN search_when_conditional @82 search_when_statement . + + $default reduce using rule 710 (search_when) + + +state 1771 + + 713 search_when_conditional: name_or_lit extended_cond_op name_or_lit . + + $default reduce using rule 713 (search_when_conditional) + + +state 1772 + + 764 sort_input: INPUT PROCEDURE is_opt perform_range . + + $default reduce using rule 764 (sort_input) + + +state 1773 + + 1143 perform_range: label . perform_thru_opt + + THRU shift, and go to state 643 + + $default reduce using rule 1163 (perform_thru_opt) + + perform_thru_opt go to state 1837 + + +state 1774 + + 1059 on_not_overflow: not_excep on_opt OVERFLOW_TOK . @123 statement_list + + $default reduce using rule 1058 (@123) + + @123 go to state 1838 + + +state 1775 + + 1056 on_overflow: on_opt OVERFLOW_TOK @122 statement_list . + + $default reduce using rule 1056 (on_overflow) + + +state 1776 + + 513 file_description_clause_linage_bottom: lines_at_opt BOTTOM . data_name + + STRING shift, and go to state 1298 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + literal go to state 1299 + signed_nliteral go to state 77 + data_name go to state 1839 + + +state 1777 + + 511 file_description_clause_linage_top: lines_at_opt TOP data_name . + + $default reduce using rule 511 (file_description_clause_linage_top) + + +state 1778 + + 509 file_description_clause_linage_footing: with_opt FOOTING at_opt data_name . + + $default reduce using rule 509 (file_description_clause_linage_footing) + + +state 1779 + + 501 file_description_clause_record: RECORD is_opt VARYING in_opt size_opt from_rec_varying to_rec_varying character_opts . depend_rec_varying + + DEPENDING shift, and go to state 1840 + + $default reduce using rule 527 (depend_rec_varying) + + depend_rec_varying go to state 1841 + + +state 1780 + + 458 array_options: OCCURS integer TO integer times_opt DEPENDING $@48 on_opt . gname $@49 indexed_by_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gname go to state 1842 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1781 + + 459 key_is_opt: DIRECTION key_opt is_opt STRING . + + $default reduce using rule 459 (key_is_opt) + + +state 1782 + + 461 indexed_by_opt: key_is_opt INDEXED by_opt index_name_list . + 464 index_name_list: index_name_list . def_name + + STRING shift, and go to state 368 + FILLER shift, and go to state 369 + + $default reduce using rule 461 (indexed_by_opt) + + def_name go to state 1843 + + +state 1783 + + 463 index_name_list: def_name . + + $default reduce using rule 463 (index_name_list) + + +state 1784 + + 204 heading_opt: HEADING is_opt . integer + + NLITERAL shift, and go to state 59 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + signed_nliteral go to state 234 + integer go to state 1844 + + +state 1785 + + 219 first_detail_opt: FIRST . DETAIL is_opt integer + + DETAIL shift, and go to state 1845 + + +state 1786 + + 202 report_controls_page: PAGE limit_is_are_opt integer line_lines_opt heading_opt first_detail_opt . last_detail_opt footing_opt + + LAST shift, and go to state 1846 + + $default reduce using rule 216 (last_detail_opt) + + last_detail_opt go to state 1847 + + +state 1787 + + 298 report_clause_blank_zero: BLANK . when_opt ZERO + + WHEN shift, and go to state 1138 + + $default reduce using rule 543 (when_opt) + + when_opt go to state 1848 + + +state 1788 + + 277 report_clause_column_is: COLUMN . report_clause_column_orientation is_are_opt + 278 | COLUMN . NUMBER report_clause_column_orientation is_opt + 279 | COLUMN . NUMBERS report_clause_column_orientation are_opt + + CENTER shift, and go to state 1849 + LEFT shift, and go to state 1850 + NUMBER shift, and go to state 1851 + NUMBERS shift, and go to state 1852 + RIGHT shift, and go to state 1853 + + $default reduce using rule 281 (report_clause_column_orientation) + + report_clause_column_orientation go to state 1854 + + +state 1789 + + 280 report_clause_column_is: COLUMNS . report_clause_column_orientation are_opt + + CENTER shift, and go to state 1849 + LEFT shift, and go to state 1850 + RIGHT shift, and go to state 1853 + + $default reduce using rule 281 (report_clause_column_orientation) + + report_clause_column_orientation go to state 1855 + + +state 1790 + + 265 report_clause_usage_display: DISPLAY . + + $default reduce using rule 265 (report_clause_usage_display) + + +state 1791 + + 297 report_clause_group_indicate: GROUP . indicate_opt + + INDICATE shift, and go to state 1856 + + $default reduce using rule 299 (indicate_opt) + + indicate_opt go to state 1857 + + +state 1792 + + 266 report_clause_justified: JUSTIFIED . right_opt + + RIGHT shift, and go to state 1858 + + $default reduce using rule 310 (right_opt) + + right_opt go to state 1859 + + +state 1793 + + 308 leading_trailing: LEADING . + + $default reduce using rule 308 (leading_trailing) + + +state 1794 + + 272 report_clause_line_is: LINE . is_are_opt + 273 | LINE . NUMBER is_opt + 274 | LINE . NUMBERS are_opt + + IS shift, and go to state 1860 + ARE shift, and go to state 1861 + NUMBER shift, and go to state 1862 + NUMBERS shift, and go to state 1863 + + $default reduce using rule 285 (is_are_opt) + + is_are_opt go to state 1864 + + +state 1795 + + 275 report_clause_line_is: LINES . are_opt + + ARE shift, and go to state 1130 + + $default reduce using rule 134 (are_opt) + + are_opt go to state 1865 + + +state 1796 + + 267 report_clause_next_group: NEXT . GROUP is_opt integer_on_next_page + + GROUP shift, and go to state 1866 + + +state 1797 + + 263 report_clause_picture: PICTURE . $@23 is_opt picture + + $default reduce using rule 262 ($@23) + + $@23 go to state 1867 + + +state 1798 + + 260 report_clause_sign_is: SIGN . is_opt leading_trailing SEPARATE character_opt + + IS shift, and go to state 84 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 1868 + + +state 1799 + + 289 report_clause_svs: SOURCE . $@24 is_opt gname_page_counter + + $default reduce using rule 288 ($@24) + + $@24 go to state 1869 + + +state 1800 + + 293 report_clause_svs: SUM . $@25 gname_list $@26 upon_opt reset_opt + + $default reduce using rule 291 ($@25) + + $@25 go to state 1870 + + +state 1801 + + 309 leading_trailing: TRAILING . + + $default reduce using rule 309 (leading_trailing) + + +state 1802 + + 241 report_clause_type: TYPE . is_opt report_clause_type2 + + IS shift, and go to state 84 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 1871 + + +state 1803 + + 264 report_clause_usage_display: USAGE . is_opt DISPLAY + + IS shift, and go to state 84 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 1872 + + +state 1804 + + 290 report_clause_svs: VALUE . is_opt literal + + IS shift, and go to state 84 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 1873 + + +state 1805 + + 227 report_item: integer def_name_opt $@18 report_clauses . PERIOD_TOK + 229 report_clauses: report_clauses . report_clause + + BLANK shift, and go to state 1787 + COLUMN shift, and go to state 1788 + COLUMNS shift, and go to state 1789 + DISPLAY shift, and go to state 1790 + GROUP shift, and go to state 1791 + JUSTIFIED shift, and go to state 1792 + LEADING shift, and go to state 1793 + LINE shift, and go to state 1794 + LINES shift, and go to state 1795 + NEXT shift, and go to state 1796 + PICTURE shift, and go to state 1797 + SIGN shift, and go to state 1798 + SOURCE shift, and go to state 1799 + SUM shift, and go to state 1800 + TRAILING shift, and go to state 1801 + TYPE shift, and go to state 1802 + USAGE shift, and go to state 1803 + VALUE shift, and go to state 1804 + PERIOD_TOK shift, and go to state 1874 + + BLANK [reduce using rule 296 (report_clause_group_indicate)] + COLUMN [reduce using rule 296 (report_clause_group_indicate)] + COLUMNS [reduce using rule 296 (report_clause_group_indicate)] + DISPLAY [reduce using rule 296 (report_clause_group_indicate)] + GROUP [reduce using rule 296 (report_clause_group_indicate)] + JUSTIFIED [reduce using rule 296 (report_clause_group_indicate)] + LEADING [reduce using rule 296 (report_clause_group_indicate)] + LINE [reduce using rule 296 (report_clause_group_indicate)] + LINES [reduce using rule 296 (report_clause_group_indicate)] + NEXT [reduce using rule 296 (report_clause_group_indicate)] + PICTURE [reduce using rule 296 (report_clause_group_indicate)] + SIGN [reduce using rule 296 (report_clause_group_indicate)] + SOURCE [reduce using rule 296 (report_clause_group_indicate)] + SUM [reduce using rule 296 (report_clause_group_indicate)] + TRAILING [reduce using rule 296 (report_clause_group_indicate)] + TYPE [reduce using rule 296 (report_clause_group_indicate)] + USAGE [reduce using rule 296 (report_clause_group_indicate)] + VALUE [reduce using rule 296 (report_clause_group_indicate)] + PERIOD_TOK [reduce using rule 296 (report_clause_group_indicate)] + + report_clause go to state 1875 + report_clause_type go to state 1807 + report_clause_sign_is go to state 1808 + report_clause_picture go to state 1809 + report_clause_usage_display go to state 1810 + report_clause_justified go to state 1811 + report_clause_next_group go to state 1812 + report_clause_line go to state 1813 + report_clause_line_is go to state 1814 + report_clause_column go to state 1815 + report_clause_column_is go to state 1816 + report_clause_svs go to state 1817 + report_clause_group_indicate go to state 1818 + report_clause_blank_zero go to state 1819 + leading_trailing go to state 1820 + + +state 1806 + + 228 report_clauses: report_clause . + + $default reduce using rule 228 (report_clauses) + + +state 1807 + + 232 report_clause: report_clause_type . + + $default reduce using rule 232 (report_clause) + + +state 1808 + + 235 report_clause: report_clause_sign_is . + + $default reduce using rule 235 (report_clause) + + +state 1809 + + 234 report_clause: report_clause_picture . + + $default reduce using rule 234 (report_clause) + + +state 1810 + + 233 report_clause: report_clause_usage_display . + + $default reduce using rule 233 (report_clause) + + +state 1811 + + 236 report_clause: report_clause_justified . + + $default reduce using rule 236 (report_clause) + + +state 1812 + + 231 report_clause: report_clause_next_group . + + $default reduce using rule 231 (report_clause) + + +state 1813 + + 230 report_clause: report_clause_line . + + $default reduce using rule 230 (report_clause) + + +state 1814 + + 268 report_clause_line: report_clause_line_is . integer ON NEXT PAGE + 269 | report_clause_line_is . integer NEXT PAGE + 270 | report_clause_line_is . integer + 271 | report_clause_line_is . PLUS integer + + NLITERAL shift, and go to state 59 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + PLUS shift, and go to state 1876 + + signed_nliteral go to state 234 + integer go to state 1877 + + +state 1815 + + 238 report_clause: report_clause_column . + + $default reduce using rule 238 (report_clause) + + +state 1816 + + 276 report_clause_column: report_clause_column_is . integer + + NLITERAL shift, and go to state 59 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + signed_nliteral go to state 234 + integer go to state 1878 + + +state 1817 + + 239 report_clause: report_clause_svs . + + $default reduce using rule 239 (report_clause) + + +state 1818 + + 240 report_clause: report_clause_group_indicate . + + $default reduce using rule 240 (report_clause) + + +state 1819 + + 237 report_clause: report_clause_blank_zero . + + $default reduce using rule 237 (report_clause) + + +state 1820 + + 261 report_clause_sign_is: leading_trailing . SEPARATE character_opt + + SEPARATE shift, and go to state 1879 + + +state 1821 + + 329 screen_clauses: screen_clauses COLUMN $@30 number_is_opt plus_minus_opt name_or_lit . + + $default reduce using rule 329 (screen_clauses) + + +state 1822 + + 350 screen_to_name: TO name . + + $default reduce using rule 350 (screen_to_name) + + +state 1823 + + 327 screen_clauses: screen_clauses LINE $@29 number_is_opt plus_minus_opt name_or_lit . + + $default reduce using rule 327 (screen_clauses) + + +state 1824 + + 925 read_not_invalid_key: NOT INVALID key_opt @100 statement_list . + + $default reduce using rule 925 (read_not_invalid_key) + + +state 1825 + + 1001 on_size_error_opt: on_opt SIZE on_size_error NOT on_opt SIZE $@115 on_size_error . + + $default reduce using rule 1001 (on_size_error_opt) + + +state 1826 + + 1053 on_not_exception: NOT on_opt . EXCEPTION @121 statement_list + + EXCEPTION shift, and go to state 1880 + + +state 1827 + + 967 call_statement: CALL $@105 call_convention_opt gname using_options returning_options @106 @107 @108 on_exception_or_overflow on_not_exception $@109 . end_call_opt + + END_CALL shift, and go to state 1881 + + END_CALL [reduce using rule 1006 (end_call_opt)] + $default reduce using rule 1006 (end_call_opt) + + end_call_opt go to state 1882 + + +state 1828 + + 679 selection_object: not_opt expr THRU expr . + 1114 expr: expr . '*' expr + 1115 | expr . '/' expr + 1116 | expr . '+' expr + 1117 | expr . '-' expr + 1118 | expr . POW_OP expr + + '+' shift, and go to state 593 + '-' shift, and go to state 594 + '*' shift, and go to state 595 + '/' shift, and go to state 596 + POW_OP shift, and go to state 597 + + $default reduce using rule 679 (selection_object) + + +state 1829 + + 1102 replacing_by_list: replacing_by_list noallname BY noallname inspect_before_after . + 1108 inspect_before_after: inspect_before_after . BEFORE initial_opt noallname + 1109 | inspect_before_after . AFTER initial_opt noallname + + AFTER shift, and go to state 1495 + BEFORE shift, and go to state 1496 + + $default reduce using rule 1102 (replacing_by_list) + + +state 1830 + + 766 sort_output: OUTPUT PROCEDURE is_opt perform_range . + + $default reduce using rule 766 (sort_output) + + +state 1831 + + 1155 perform_options: with_test_opt VARYING name FROM gname by_opt gname UNTIL @134 condition @135 . perform_after_opt perform_statements $@136 END_PERFORM + + AFTER shift, and go to state 1883 + + $default reduce using rule 1167 (perform_after_opt) + + perform_after_opt go to state 1884 + + +state 1832 + + 1162 perform_options: label perform_thru_opt with_test_opt VARYING name FROM gname by_opt gname UNTIL @138 . condition @139 perform_after_opt + + VARIABLE shift, and go to state 56 + VARCOND shift, and go to state 422 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + NOT shift, and go to state 423 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + '(' shift, and go to state 424 + + expr go to state 425 + condition go to state 1885 + gname go to state 427 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + cond_name go to state 428 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1833 + + 724 search_all_when_conditional: search_all_when_conditional . AND @85 search_all_when_conditional + 724 | search_all_when_conditional AND @85 search_all_when_conditional . + + $default reduce using rule 724 (search_all_when_conditional) + + +state 1834 + + 720 search_all_when_statement: NEXT SENTENCE . + + $default reduce using rule 720 (search_all_when_statement) + + +state 1835 + + 721 search_all_when_conditional: variable is_opt CONDITIONAL to_opt . variable + 722 | variable is_opt CONDITIONAL to_opt . literal + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + literal go to state 1886 + signed_nliteral go to state 77 + variable go to state 1887 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1836 + + 712 search_when_statement: NEXT SENTENCE . + + $default reduce using rule 712 (search_when_statement) + + +state 1837 + + 1143 perform_range: label perform_thru_opt . + + $default reduce using rule 1143 (perform_range) + + +state 1838 + + 1059 on_not_overflow: not_excep on_opt OVERFLOW_TOK @123 . statement_list + + READ shift, and go to state 254 + WRITE shift, and go to state 255 + RELEASE shift, and go to state 256 + ACCEPT shift, and go to state 257 + ADD shift, and go to state 258 + CALL shift, and go to state 259 + CALL_LOADLIB shift, and go to state 260 + CANCEL shift, and go to state 261 + CHAIN shift, and go to state 262 + CLOSE shift, and go to state 263 + COMPUTE shift, and go to state 264 + CONTINUE shift, and go to state 265 + DELETE shift, and go to state 266 + DISPLAY shift, and go to state 267 + DIVIDE shift, and go to state 268 + EVALUATE shift, and go to state 269 + EXIT shift, and go to state 270 + GENERATE shift, and go to state 271 + GO shift, and go to state 272 + GOBACK shift, and go to state 273 + IF shift, and go to state 274 + INITIALIZE shift, and go to state 275 + INITIATE shift, and go to state 276 + INSPECT shift, and go to state 277 + MERGE shift, and go to state 278 + MOVE shift, and go to state 279 + MULTIPLY shift, and go to state 280 + OPEN shift, and go to state 281 + PERFORM shift, and go to state 282 + READY shift, and go to state 283 + RESET shift, and go to state 284 + RETURN shift, and go to state 285 + REWRITE shift, and go to state 286 + SEARCH shift, and go to state 287 + SET shift, and go to state 288 + SORT shift, and go to state 289 + START shift, and go to state 290 + STOP shift, and go to state 291 + STRINGCMD shift, and go to state 292 + SUBTRACT shift, and go to state 293 + TCOBPROTO1 shift, and go to state 294 + TCOBPROTO2 shift, and go to state 295 + TERMINATE shift, and go to state 296 + UNLOCK shift, and go to state 297 + UNSTRING shift, and go to state 298 + + statement_list go to state 1888 + statements go to state 640 + statement go to state 300 + perform_statement go to state 301 + if_statement go to state 302 + search_statement go to state 303 + evaluate_statement go to state 304 + if_part go to state 305 + unlock_statement go to state 306 + proto_statement go to state 307 + trace_statement go to state 308 + initiate_statement go to state 309 + generate_statement go to state 310 + terminate_statement go to state 311 + cancel_statement go to state 312 + merge_statement go to state 313 + sort_statement go to state 314 + sort_file go to state 315 + sort_variable_indexed go to state 316 + move_statement go to state 317 + initialize_statement go to state 318 + compute_statement go to state 319 + add_statement go to state 320 + subtract_statement go to state 321 + multiply_statement go to state 322 + divide_statement go to state 323 + accept_statement go to state 324 + accept_hardware go to state 325 + accept_chronological go to state 326 + accept_screen go to state 327 + display_statement go to state 328 + display_line go to state 329 + display_screen go to state 330 + open_statement go to state 331 + close_statement go to state 332 + return_statement go to state 333 + read_statement go to state 334 + release_statement go to state 335 + write_statement go to state 336 + rewrite_statement go to state 337 + delete_statement go to state 338 + start_statement go to state 339 + goto_statement go to state 340 + call_statement go to state 341 + call_loadlib_statement go to state 342 + chain_statement go to state 343 + exit_statement go to state 344 + stop_statement go to state 345 + goback_statement go to state 346 + set_statement go to state 347 + string_statement go to state 348 + unstring_statement go to state 349 + inspect_statement go to state 350 + + +state 1839 + + 513 file_description_clause_linage_bottom: lines_at_opt BOTTOM data_name . + + $default reduce using rule 513 (file_description_clause_linage_bottom) + + +state 1840 + + 528 depend_rec_varying: DEPENDING . on_opt STRING + + ON shift, and go to state 620 + + $default reduce using rule 1235 (on_opt) + + on_opt go to state 1889 + + +state 1841 + + 501 file_description_clause_record: RECORD is_opt VARYING in_opt size_opt from_rec_varying to_rec_varying character_opts depend_rec_varying . + + $default reduce using rule 501 (file_description_clause_record) + + +state 1842 + + 458 array_options: OCCURS integer TO integer times_opt DEPENDING $@48 on_opt gname . $@49 indexed_by_opt + + $default reduce using rule 457 ($@49) + + $@49 go to state 1890 + + +state 1843 + + 464 index_name_list: index_name_list def_name . + + $default reduce using rule 464 (index_name_list) + + +state 1844 + + 204 heading_opt: HEADING is_opt integer . + + $default reduce using rule 204 (heading_opt) + + +state 1845 + + 219 first_detail_opt: FIRST DETAIL . is_opt integer + + IS shift, and go to state 84 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 1891 + + +state 1846 + + 217 last_detail_opt: LAST . DETAIL is_opt integer + + DETAIL shift, and go to state 1892 + + +state 1847 + + 202 report_controls_page: PAGE limit_is_are_opt integer line_lines_opt heading_opt first_detail_opt last_detail_opt . footing_opt + + FOOTING shift, and go to state 1893 + + $default reduce using rule 214 (footing_opt) + + footing_opt go to state 1894 + + +state 1848 + + 298 report_clause_blank_zero: BLANK when_opt . ZERO + + ZERO shift, and go to state 1895 + + +state 1849 + + 283 report_clause_column_orientation: CENTER . + + $default reduce using rule 283 (report_clause_column_orientation) + + +state 1850 + + 282 report_clause_column_orientation: LEFT . + + $default reduce using rule 282 (report_clause_column_orientation) + + +state 1851 + + 278 report_clause_column_is: COLUMN NUMBER . report_clause_column_orientation is_opt + + CENTER shift, and go to state 1849 + LEFT shift, and go to state 1850 + RIGHT shift, and go to state 1853 + + $default reduce using rule 281 (report_clause_column_orientation) + + report_clause_column_orientation go to state 1896 + + +state 1852 + + 279 report_clause_column_is: COLUMN NUMBERS . report_clause_column_orientation are_opt + + CENTER shift, and go to state 1849 + LEFT shift, and go to state 1850 + RIGHT shift, and go to state 1853 + + $default reduce using rule 281 (report_clause_column_orientation) + + report_clause_column_orientation go to state 1897 + + +state 1853 + + 284 report_clause_column_orientation: RIGHT . + + $default reduce using rule 284 (report_clause_column_orientation) + + +state 1854 + + 277 report_clause_column_is: COLUMN report_clause_column_orientation . is_are_opt + + IS shift, and go to state 1860 + ARE shift, and go to state 1861 + + $default reduce using rule 285 (is_are_opt) + + is_are_opt go to state 1898 + + +state 1855 + + 280 report_clause_column_is: COLUMNS report_clause_column_orientation . are_opt + + ARE shift, and go to state 1130 + + $default reduce using rule 134 (are_opt) + + are_opt go to state 1899 + + +state 1856 + + 300 indicate_opt: INDICATE . + + $default reduce using rule 300 (indicate_opt) + + +state 1857 + + 297 report_clause_group_indicate: GROUP indicate_opt . + + $default reduce using rule 297 (report_clause_group_indicate) + + +state 1858 + + 311 right_opt: RIGHT . + + $default reduce using rule 311 (right_opt) + + +state 1859 + + 266 report_clause_justified: JUSTIFIED right_opt . + + $default reduce using rule 266 (report_clause_justified) + + +state 1860 + + 286 is_are_opt: IS . + + $default reduce using rule 286 (is_are_opt) + + +state 1861 + + 287 is_are_opt: ARE . + + $default reduce using rule 287 (is_are_opt) + + +state 1862 + + 273 report_clause_line_is: LINE NUMBER . is_opt + + IS shift, and go to state 84 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 1900 + + +state 1863 + + 274 report_clause_line_is: LINE NUMBERS . are_opt + + ARE shift, and go to state 1130 + + $default reduce using rule 134 (are_opt) + + are_opt go to state 1901 + + +state 1864 + + 272 report_clause_line_is: LINE is_are_opt . + + $default reduce using rule 272 (report_clause_line_is) + + +state 1865 + + 275 report_clause_line_is: LINES are_opt . + + $default reduce using rule 275 (report_clause_line_is) + + +state 1866 + + 267 report_clause_next_group: NEXT GROUP . is_opt integer_on_next_page + + IS shift, and go to state 84 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 1902 + + +state 1867 + + 263 report_clause_picture: PICTURE $@23 . is_opt picture + + IS shift, and go to state 84 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 1903 + + +state 1868 + + 260 report_clause_sign_is: SIGN is_opt . leading_trailing SEPARATE character_opt + + LEADING shift, and go to state 1793 + TRAILING shift, and go to state 1801 + + leading_trailing go to state 1904 + + +state 1869 + + 289 report_clause_svs: SOURCE $@24 . is_opt gname_page_counter + + IS shift, and go to state 84 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 1905 + + +state 1870 + + 293 report_clause_svs: SUM $@25 . gname_list $@26 upon_opt reset_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gname_list go to state 1906 + gname go to state 71 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1871 + + 241 report_clause_type: TYPE is_opt . report_clause_type2 + + CF shift, and go to state 1907 + CH shift, and go to state 1908 + CONTROL shift, and go to state 1909 + DE shift, and go to state 1910 + DETAIL shift, and go to state 1911 + PAGE shift, and go to state 1912 + PF shift, and go to state 1913 + PH shift, and go to state 1914 + REPORT shift, and go to state 1915 + RF shift, and go to state 1916 + RH shift, and go to state 1917 + + report_clause_type2 go to state 1918 + + +state 1872 + + 264 report_clause_usage_display: USAGE is_opt . DISPLAY + + DISPLAY shift, and go to state 1919 + + +state 1873 + + 290 report_clause_svs: VALUE is_opt . literal + + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + literal go to state 1920 + signed_nliteral go to state 77 + + +state 1874 + + 227 report_item: integer def_name_opt $@18 report_clauses PERIOD_TOK . + + $default reduce using rule 227 (report_item) + + +state 1875 + + 229 report_clauses: report_clauses report_clause . + + $default reduce using rule 229 (report_clauses) + + +state 1876 + + 271 report_clause_line: report_clause_line_is PLUS . integer + + NLITERAL shift, and go to state 59 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + signed_nliteral go to state 234 + integer go to state 1921 + + +state 1877 + + 268 report_clause_line: report_clause_line_is integer . ON NEXT PAGE + 269 | report_clause_line_is integer . NEXT PAGE + 270 | report_clause_line_is integer . + + NEXT shift, and go to state 1922 + ON shift, and go to state 1923 + + NEXT [reduce using rule 270 (report_clause_line)] + $default reduce using rule 270 (report_clause_line) + + +state 1878 + + 276 report_clause_column: report_clause_column_is integer . + + $default reduce using rule 276 (report_clause_column) + + +state 1879 + + 261 report_clause_sign_is: leading_trailing SEPARATE . character_opt + + CHARACTER shift, and go to state 1441 + + $default reduce using rule 406 (character_opt) + + character_opt go to state 1924 + + +state 1880 + + 1053 on_not_exception: NOT on_opt EXCEPTION . @121 statement_list + + $default reduce using rule 1052 (@121) + + @121 go to state 1925 + + +state 1881 + + 1007 end_call_opt: END_CALL . + + $default reduce using rule 1007 (end_call_opt) + + +state 1882 + + 967 call_statement: CALL $@105 call_convention_opt gname using_options returning_options @106 @107 @108 on_exception_or_overflow on_not_exception $@109 end_call_opt . + + $default reduce using rule 967 (call_statement) + + +state 1883 + + 1168 perform_after_opt: AFTER . perform_after + 1169 | AFTER . perform_after AFTER perform_after + 1170 | AFTER . perform_after AFTER perform_after AFTER perform_after + 1171 | AFTER . perform_after AFTER perform_after AFTER perform_after AFTER perform_after + 1172 | AFTER . perform_after AFTER perform_after AFTER perform_after AFTER perform_after AFTER perform_after + 1173 | AFTER . perform_after AFTER perform_after AFTER perform_after AFTER perform_after AFTER perform_after AFTER perform_after + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + perform_after go to state 1926 + name go to state 1927 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1884 + + 1155 perform_options: with_test_opt VARYING name FROM gname by_opt gname UNTIL @134 condition @135 perform_after_opt . perform_statements $@136 END_PERFORM + + $default reduce using rule 1176 ($@141) + + perform_statements go to state 1928 + $@141 go to state 450 + + +state 1885 + + 1162 perform_options: label perform_thru_opt with_test_opt VARYING name FROM gname by_opt gname UNTIL @138 condition . @139 perform_after_opt + 1184 condition: condition . AND @143 implied_op_condition + 1186 | condition . OR @144 implied_op_condition + + OR shift, and go to state 611 + AND shift, and go to state 612 + + $default reduce using rule 1161 (@139) + + @139 go to state 1929 + + +state 1886 + + 722 search_all_when_conditional: variable is_opt CONDITIONAL to_opt literal . + + $default reduce using rule 722 (search_all_when_conditional) + + +state 1887 + + 721 search_all_when_conditional: variable is_opt CONDITIONAL to_opt variable . + + $default reduce using rule 721 (search_all_when_conditional) + + +state 1888 + + 1059 on_not_overflow: not_excep on_opt OVERFLOW_TOK @123 statement_list . + + $default reduce using rule 1059 (on_not_overflow) + + +state 1889 + + 528 depend_rec_varying: DEPENDING on_opt . STRING + + STRING shift, and go to state 1930 + + +state 1890 + + 458 array_options: OCCURS integer TO integer times_opt DEPENDING $@48 on_opt gname $@49 . indexed_by_opt + + DIRECTION shift, and go to state 1545 + + INDEXED reduce using rule 460 (key_is_opt) + $default reduce using rule 462 (indexed_by_opt) + + key_is_opt go to state 1546 + indexed_by_opt go to state 1931 + + +state 1891 + + 219 first_detail_opt: FIRST DETAIL is_opt . integer + + NLITERAL shift, and go to state 59 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + signed_nliteral go to state 234 + integer go to state 1932 + + +state 1892 + + 217 last_detail_opt: LAST DETAIL . is_opt integer + + IS shift, and go to state 84 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 1933 + + +state 1893 + + 215 footing_opt: FOOTING . is_opt integer + + IS shift, and go to state 84 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 1934 + + +state 1894 + + 202 report_controls_page: PAGE limit_is_are_opt integer line_lines_opt heading_opt first_detail_opt last_detail_opt footing_opt . + + $default reduce using rule 202 (report_controls_page) + + +state 1895 + + 298 report_clause_blank_zero: BLANK when_opt ZERO . + + $default reduce using rule 298 (report_clause_blank_zero) + + +state 1896 + + 278 report_clause_column_is: COLUMN NUMBER report_clause_column_orientation . is_opt + + IS shift, and go to state 84 + + $default reduce using rule 132 (is_opt) + + is_opt go to state 1935 + + +state 1897 + + 279 report_clause_column_is: COLUMN NUMBERS report_clause_column_orientation . are_opt + + ARE shift, and go to state 1130 + + $default reduce using rule 134 (are_opt) + + are_opt go to state 1936 + + +state 1898 + + 277 report_clause_column_is: COLUMN report_clause_column_orientation is_are_opt . + + $default reduce using rule 277 (report_clause_column_is) + + +state 1899 + + 280 report_clause_column_is: COLUMNS report_clause_column_orientation are_opt . + + $default reduce using rule 280 (report_clause_column_is) + + +state 1900 + + 273 report_clause_line_is: LINE NUMBER is_opt . + + $default reduce using rule 273 (report_clause_line_is) + + +state 1901 + + 274 report_clause_line_is: LINE NUMBERS are_opt . + + $default reduce using rule 274 (report_clause_line_is) + + +state 1902 + + 267 report_clause_next_group: NEXT GROUP is_opt . integer_on_next_page + + NLITERAL shift, and go to state 59 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + NEXT shift, and go to state 1937 + PLUS shift, and go to state 1938 + + integer_on_next_page go to state 1939 + signed_nliteral go to state 234 + integer go to state 1940 + + +state 1903 + + 263 report_clause_picture: PICTURE $@23 is_opt . picture + + $default reduce using rule 478 (picture) + + picture go to state 1941 + + +state 1904 + + 260 report_clause_sign_is: SIGN is_opt leading_trailing . SEPARATE character_opt + + SEPARATE shift, and go to state 1942 + + +state 1905 + + 289 report_clause_svs: SOURCE $@24 is_opt . gname_page_counter + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + PAGE_COUNTER shift, and go to state 1943 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gname_page_counter go to state 1944 + gname go to state 1945 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1906 + + 293 report_clause_svs: SUM $@25 gname_list . $@26 upon_opt reset_opt + 1244 gname_list: gname_list . sep_opt gname + + LISTSEP shift, and go to state 98 + + VARIABLE reduce using rule 1214 (sep_opt) + SUBSCVAR reduce using rule 1214 (sep_opt) + LABELSTR reduce using rule 1214 (sep_opt) + NLITERAL reduce using rule 1214 (sep_opt) + CLITERAL reduce using rule 1214 (sep_opt) + '+' reduce using rule 1214 (sep_opt) + '-' reduce using rule 1214 (sep_opt) + ALL reduce using rule 1214 (sep_opt) + FUNCTION reduce using rule 1214 (sep_opt) + HIGHVALUES reduce using rule 1214 (sep_opt) + LOWVALUES reduce using rule 1214 (sep_opt) + QUOTES reduce using rule 1214 (sep_opt) + SPACES reduce using rule 1214 (sep_opt) + ZERO reduce using rule 1214 (sep_opt) + $default reduce using rule 292 ($@26) + + $@26 go to state 1946 + sep_opt go to state 99 + + +state 1907 + + 257 report_clause_type2: CF . $@22 name_final_opt + + $default reduce using rule 256 ($@22) + + $@22 go to state 1947 + + +state 1908 + + 254 report_clause_type2: CH . $@21 name_final_opt + + $default reduce using rule 253 ($@21) + + $@21 go to state 1948 + + +state 1909 + + 245 report_clause_type2: CONTROL . HEADING $@19 name_final_opt + 248 | CONTROL . FOOTING $@20 name_final_opt + + FOOTING shift, and go to state 1949 + HEADING shift, and go to state 1950 + + +state 1910 + + 255 report_clause_type2: DE . + + $default reduce using rule 255 (report_clause_type2) + + +state 1911 + + 246 report_clause_type2: DETAIL . + + $default reduce using rule 246 (report_clause_type2) + + +state 1912 + + 243 report_clause_type2: PAGE . HEADING + 249 | PAGE . FOOTING + + FOOTING shift, and go to state 1951 + HEADING shift, and go to state 1952 + + +state 1913 + + 258 report_clause_type2: PF . + + $default reduce using rule 258 (report_clause_type2) + + +state 1914 + + 252 report_clause_type2: PH . + + $default reduce using rule 252 (report_clause_type2) + + +state 1915 + + 242 report_clause_type2: REPORT . HEADING + 250 | REPORT . FOOTING + + FOOTING shift, and go to state 1953 + HEADING shift, and go to state 1954 + + +state 1916 + + 259 report_clause_type2: RF . + + $default reduce using rule 259 (report_clause_type2) + + +state 1917 + + 251 report_clause_type2: RH . + + $default reduce using rule 251 (report_clause_type2) + + +state 1918 + + 241 report_clause_type: TYPE is_opt report_clause_type2 . + + $default reduce using rule 241 (report_clause_type) + + +state 1919 + + 264 report_clause_usage_display: USAGE is_opt DISPLAY . + + $default reduce using rule 264 (report_clause_usage_display) + + +state 1920 + + 290 report_clause_svs: VALUE is_opt literal . + + $default reduce using rule 290 (report_clause_svs) + + +state 1921 + + 271 report_clause_line: report_clause_line_is PLUS integer . + + $default reduce using rule 271 (report_clause_line) + + +state 1922 + + 269 report_clause_line: report_clause_line_is integer NEXT . PAGE + + PAGE shift, and go to state 1955 + + +state 1923 + + 268 report_clause_line: report_clause_line_is integer ON . NEXT PAGE + + NEXT shift, and go to state 1956 + + +state 1924 + + 261 report_clause_sign_is: leading_trailing SEPARATE character_opt . + + $default reduce using rule 261 (report_clause_sign_is) + + +state 1925 + + 1053 on_not_exception: NOT on_opt EXCEPTION @121 . statement_list + + READ shift, and go to state 254 + WRITE shift, and go to state 255 + RELEASE shift, and go to state 256 + ACCEPT shift, and go to state 257 + ADD shift, and go to state 258 + CALL shift, and go to state 259 + CALL_LOADLIB shift, and go to state 260 + CANCEL shift, and go to state 261 + CHAIN shift, and go to state 262 + CLOSE shift, and go to state 263 + COMPUTE shift, and go to state 264 + CONTINUE shift, and go to state 265 + DELETE shift, and go to state 266 + DISPLAY shift, and go to state 267 + DIVIDE shift, and go to state 268 + EVALUATE shift, and go to state 269 + EXIT shift, and go to state 270 + GENERATE shift, and go to state 271 + GO shift, and go to state 272 + GOBACK shift, and go to state 273 + IF shift, and go to state 274 + INITIALIZE shift, and go to state 275 + INITIATE shift, and go to state 276 + INSPECT shift, and go to state 277 + MERGE shift, and go to state 278 + MOVE shift, and go to state 279 + MULTIPLY shift, and go to state 280 + OPEN shift, and go to state 281 + PERFORM shift, and go to state 282 + READY shift, and go to state 283 + RESET shift, and go to state 284 + RETURN shift, and go to state 285 + REWRITE shift, and go to state 286 + SEARCH shift, and go to state 287 + SET shift, and go to state 288 + SORT shift, and go to state 289 + START shift, and go to state 290 + STOP shift, and go to state 291 + STRINGCMD shift, and go to state 292 + SUBTRACT shift, and go to state 293 + TCOBPROTO1 shift, and go to state 294 + TCOBPROTO2 shift, and go to state 295 + TERMINATE shift, and go to state 296 + UNLOCK shift, and go to state 297 + UNSTRING shift, and go to state 298 + + statement_list go to state 1957 + statements go to state 640 + statement go to state 300 + perform_statement go to state 301 + if_statement go to state 302 + search_statement go to state 303 + evaluate_statement go to state 304 + if_part go to state 305 + unlock_statement go to state 306 + proto_statement go to state 307 + trace_statement go to state 308 + initiate_statement go to state 309 + generate_statement go to state 310 + terminate_statement go to state 311 + cancel_statement go to state 312 + merge_statement go to state 313 + sort_statement go to state 314 + sort_file go to state 315 + sort_variable_indexed go to state 316 + move_statement go to state 317 + initialize_statement go to state 318 + compute_statement go to state 319 + add_statement go to state 320 + subtract_statement go to state 321 + multiply_statement go to state 322 + divide_statement go to state 323 + accept_statement go to state 324 + accept_hardware go to state 325 + accept_chronological go to state 326 + accept_screen go to state 327 + display_statement go to state 328 + display_line go to state 329 + display_screen go to state 330 + open_statement go to state 331 + close_statement go to state 332 + return_statement go to state 333 + read_statement go to state 334 + release_statement go to state 335 + write_statement go to state 336 + rewrite_statement go to state 337 + delete_statement go to state 338 + start_statement go to state 339 + goto_statement go to state 340 + call_statement go to state 341 + call_loadlib_statement go to state 342 + chain_statement go to state 343 + exit_statement go to state 344 + stop_statement go to state 345 + goback_statement go to state 346 + set_statement go to state 347 + string_statement go to state 348 + unstring_statement go to state 349 + inspect_statement go to state 350 + + +state 1926 + + 1168 perform_after_opt: AFTER perform_after . + 1169 | AFTER perform_after . AFTER perform_after + 1170 | AFTER perform_after . AFTER perform_after AFTER perform_after + 1171 | AFTER perform_after . AFTER perform_after AFTER perform_after AFTER perform_after + 1172 | AFTER perform_after . AFTER perform_after AFTER perform_after AFTER perform_after AFTER perform_after + 1173 | AFTER perform_after . AFTER perform_after AFTER perform_after AFTER perform_after AFTER perform_after AFTER perform_after + + AFTER shift, and go to state 1958 + + $default reduce using rule 1168 (perform_after_opt) + + +state 1927 + + 1175 perform_after: name . FROM gname by_opt gname UNTIL @140 condition + + FROM shift, and go to state 1959 + + +state 1928 + + 1155 perform_options: with_test_opt VARYING name FROM gname by_opt gname UNTIL @134 condition @135 perform_after_opt perform_statements . $@136 END_PERFORM + + $default reduce using rule 1154 ($@136) + + $@136 go to state 1960 + + +state 1929 + + 1162 perform_options: label perform_thru_opt with_test_opt VARYING name FROM gname by_opt gname UNTIL @138 condition @139 . perform_after_opt + + AFTER shift, and go to state 1883 + + $default reduce using rule 1167 (perform_after_opt) + + perform_after_opt go to state 1961 + + +state 1930 + + 528 depend_rec_varying: DEPENDING on_opt STRING . + + $default reduce using rule 528 (depend_rec_varying) + + +state 1931 + + 458 array_options: OCCURS integer TO integer times_opt DEPENDING $@48 on_opt gname $@49 indexed_by_opt . + + $default reduce using rule 458 (array_options) + + +state 1932 + + 219 first_detail_opt: FIRST DETAIL is_opt integer . + + $default reduce using rule 219 (first_detail_opt) + + +state 1933 + + 217 last_detail_opt: LAST DETAIL is_opt . integer + + NLITERAL shift, and go to state 59 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + signed_nliteral go to state 234 + integer go to state 1962 + + +state 1934 + + 215 footing_opt: FOOTING is_opt . integer + + NLITERAL shift, and go to state 59 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + signed_nliteral go to state 234 + integer go to state 1963 + + +state 1935 + + 278 report_clause_column_is: COLUMN NUMBER report_clause_column_orientation is_opt . + + $default reduce using rule 278 (report_clause_column_is) + + +state 1936 + + 279 report_clause_column_is: COLUMN NUMBERS report_clause_column_orientation are_opt . + + $default reduce using rule 279 (report_clause_column_is) + + +state 1937 + + 316 integer_on_next_page: NEXT . PAGE + + PAGE shift, and go to state 1964 + + +state 1938 + + 315 integer_on_next_page: PLUS . integer + + NLITERAL shift, and go to state 59 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + + signed_nliteral go to state 234 + integer go to state 1965 + + +state 1939 + + 267 report_clause_next_group: NEXT GROUP is_opt integer_on_next_page . + + $default reduce using rule 267 (report_clause_next_group) + + +state 1940 + + 314 integer_on_next_page: integer . + + $default reduce using rule 314 (integer_on_next_page) + + +state 1941 + + 263 report_clause_picture: PICTURE $@23 is_opt picture . + 479 picture: picture . pic_elem + + CHAR shift, and go to state 1548 + + $default reduce using rule 263 (report_clause_picture) + + pic_elem go to state 1549 + + +state 1942 + + 260 report_clause_sign_is: SIGN is_opt leading_trailing SEPARATE . character_opt + + CHARACTER shift, and go to state 1441 + + $default reduce using rule 406 (character_opt) + + character_opt go to state 1966 + + +state 1943 + + 295 gname_page_counter: PAGE_COUNTER . + + $default reduce using rule 295 (gname_page_counter) + + +state 1944 + + 289 report_clause_svs: SOURCE $@24 is_opt gname_page_counter . + + $default reduce using rule 289 (report_clause_svs) + + +state 1945 + + 294 gname_page_counter: gname . + + $default reduce using rule 294 (gname_page_counter) + + +state 1946 + + 293 report_clause_svs: SUM $@25 gname_list $@26 . upon_opt reset_opt + + UPON shift, and go to state 1967 + + $default reduce using rule 301 (upon_opt) + + upon_opt go to state 1968 + + +state 1947 + + 257 report_clause_type2: CF $@22 . name_final_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FINAL shift, and go to state 1969 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + name_final_opt go to state 1970 + gname go to state 1971 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1948 + + 254 report_clause_type2: CH $@21 . name_final_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FINAL shift, and go to state 1969 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + name_final_opt go to state 1972 + gname go to state 1971 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1949 + + 248 report_clause_type2: CONTROL FOOTING . $@20 name_final_opt + + $default reduce using rule 247 ($@20) + + $@20 go to state 1973 + + +state 1950 + + 245 report_clause_type2: CONTROL HEADING . $@19 name_final_opt + + $default reduce using rule 244 ($@19) + + $@19 go to state 1974 + + +state 1951 + + 249 report_clause_type2: PAGE FOOTING . + + $default reduce using rule 249 (report_clause_type2) + + +state 1952 + + 243 report_clause_type2: PAGE HEADING . + + $default reduce using rule 243 (report_clause_type2) + + +state 1953 + + 250 report_clause_type2: REPORT FOOTING . + + $default reduce using rule 250 (report_clause_type2) + + +state 1954 + + 242 report_clause_type2: REPORT HEADING . + + $default reduce using rule 242 (report_clause_type2) + + +state 1955 + + 269 report_clause_line: report_clause_line_is integer NEXT PAGE . + + $default reduce using rule 269 (report_clause_line) + + +state 1956 + + 268 report_clause_line: report_clause_line_is integer ON NEXT . PAGE + + PAGE shift, and go to state 1975 + + +state 1957 + + 1053 on_not_exception: NOT on_opt EXCEPTION @121 statement_list . + + $default reduce using rule 1053 (on_not_exception) + + +state 1958 + + 1169 perform_after_opt: AFTER perform_after AFTER . perform_after + 1170 | AFTER perform_after AFTER . perform_after AFTER perform_after + 1171 | AFTER perform_after AFTER . perform_after AFTER perform_after AFTER perform_after + 1172 | AFTER perform_after AFTER . perform_after AFTER perform_after AFTER perform_after AFTER perform_after + 1173 | AFTER perform_after AFTER . perform_after AFTER perform_after AFTER perform_after AFTER perform_after AFTER perform_after + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + perform_after go to state 1976 + name go to state 1927 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1959 + + 1175 perform_after: name FROM . gname by_opt gname UNTIL @140 condition + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gname go to state 1977 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1960 + + 1155 perform_options: with_test_opt VARYING name FROM gname by_opt gname UNTIL @134 condition @135 perform_after_opt perform_statements $@136 . END_PERFORM + + END_PERFORM shift, and go to state 1978 + + +state 1961 + + 1162 perform_options: label perform_thru_opt with_test_opt VARYING name FROM gname by_opt gname UNTIL @138 condition @139 perform_after_opt . + + $default reduce using rule 1162 (perform_options) + + +state 1962 + + 217 last_detail_opt: LAST DETAIL is_opt integer . + + $default reduce using rule 217 (last_detail_opt) + + +state 1963 + + 215 footing_opt: FOOTING is_opt integer . + + $default reduce using rule 215 (footing_opt) + + +state 1964 + + 316 integer_on_next_page: NEXT PAGE . + + $default reduce using rule 316 (integer_on_next_page) + + +state 1965 + + 315 integer_on_next_page: PLUS integer . + + $default reduce using rule 315 (integer_on_next_page) + + +state 1966 + + 260 report_clause_sign_is: SIGN is_opt leading_trailing SEPARATE character_opt . + + $default reduce using rule 260 (report_clause_sign_is) + + +state 1967 + + 302 upon_opt: UPON . gname_list + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gname_list go to state 1979 + gname go to state 71 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1968 + + 293 report_clause_svs: SUM $@25 gname_list $@26 upon_opt . reset_opt + + RESET shift, and go to state 1980 + + $default reduce using rule 303 (reset_opt) + + reset_opt go to state 1981 + + +state 1969 + + 313 name_final_opt: FINAL . + + $default reduce using rule 313 (name_final_opt) + + +state 1970 + + 257 report_clause_type2: CF $@22 name_final_opt . + + $default reduce using rule 257 (report_clause_type2) + + +state 1971 + + 312 name_final_opt: gname . + + $default reduce using rule 312 (name_final_opt) + + +state 1972 + + 254 report_clause_type2: CH $@21 name_final_opt . + + $default reduce using rule 254 (report_clause_type2) + + +state 1973 + + 248 report_clause_type2: CONTROL FOOTING $@20 . name_final_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FINAL shift, and go to state 1969 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + name_final_opt go to state 1982 + gname go to state 1971 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1974 + + 245 report_clause_type2: CONTROL HEADING $@19 . name_final_opt + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FINAL shift, and go to state 1969 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + name_final_opt go to state 1983 + gname go to state 1971 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1975 + + 268 report_clause_line: report_clause_line_is integer ON NEXT PAGE . + + $default reduce using rule 268 (report_clause_line) + + +state 1976 + + 1169 perform_after_opt: AFTER perform_after AFTER perform_after . + 1170 | AFTER perform_after AFTER perform_after . AFTER perform_after + 1171 | AFTER perform_after AFTER perform_after . AFTER perform_after AFTER perform_after + 1172 | AFTER perform_after AFTER perform_after . AFTER perform_after AFTER perform_after AFTER perform_after + 1173 | AFTER perform_after AFTER perform_after . AFTER perform_after AFTER perform_after AFTER perform_after AFTER perform_after + + AFTER shift, and go to state 1984 + + $default reduce using rule 1169 (perform_after_opt) + + +state 1977 + + 1175 perform_after: name FROM gname . by_opt gname UNTIL @140 condition + + BY shift, and go to state 854 + + $default reduce using rule 1231 (by_opt) + + by_opt go to state 1985 + + +state 1978 + + 1155 perform_options: with_test_opt VARYING name FROM gname by_opt gname UNTIL @134 condition @135 perform_after_opt perform_statements $@136 END_PERFORM . + + $default reduce using rule 1155 (perform_options) + + +state 1979 + + 302 upon_opt: UPON gname_list . + 1244 gname_list: gname_list . sep_opt gname + + LISTSEP shift, and go to state 98 + + VARIABLE reduce using rule 1214 (sep_opt) + SUBSCVAR reduce using rule 1214 (sep_opt) + LABELSTR reduce using rule 1214 (sep_opt) + NLITERAL reduce using rule 1214 (sep_opt) + CLITERAL reduce using rule 1214 (sep_opt) + '+' reduce using rule 1214 (sep_opt) + '-' reduce using rule 1214 (sep_opt) + ALL reduce using rule 1214 (sep_opt) + FUNCTION reduce using rule 1214 (sep_opt) + HIGHVALUES reduce using rule 1214 (sep_opt) + LOWVALUES reduce using rule 1214 (sep_opt) + QUOTES reduce using rule 1214 (sep_opt) + SPACES reduce using rule 1214 (sep_opt) + ZERO reduce using rule 1214 (sep_opt) + $default reduce using rule 302 (upon_opt) + + sep_opt go to state 99 + + +state 1980 + + 304 reset_opt: RESET . gname + 305 | RESET . FINAL + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FINAL shift, and go to state 1986 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gname go to state 1987 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1981 + + 293 report_clause_svs: SUM $@25 gname_list $@26 upon_opt reset_opt . + + $default reduce using rule 293 (report_clause_svs) + + +state 1982 + + 248 report_clause_type2: CONTROL FOOTING $@20 name_final_opt . + + $default reduce using rule 248 (report_clause_type2) + + +state 1983 + + 245 report_clause_type2: CONTROL HEADING $@19 name_final_opt . + + $default reduce using rule 245 (report_clause_type2) + + +state 1984 + + 1170 perform_after_opt: AFTER perform_after AFTER perform_after AFTER . perform_after + 1171 | AFTER perform_after AFTER perform_after AFTER . perform_after AFTER perform_after + 1172 | AFTER perform_after AFTER perform_after AFTER . perform_after AFTER perform_after AFTER perform_after + 1173 | AFTER perform_after AFTER perform_after AFTER . perform_after AFTER perform_after AFTER perform_after AFTER perform_after + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + perform_after go to state 1988 + name go to state 1927 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1985 + + 1175 perform_after: name FROM gname by_opt . gname UNTIL @140 condition + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + + gname go to state 1989 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1986 + + 305 reset_opt: RESET FINAL . + + $default reduce using rule 305 (reset_opt) + + +state 1987 + + 304 reset_opt: RESET gname . + + $default reduce using rule 304 (reset_opt) + + +state 1988 + + 1170 perform_after_opt: AFTER perform_after AFTER perform_after AFTER perform_after . + 1171 | AFTER perform_after AFTER perform_after AFTER perform_after . AFTER perform_after + 1172 | AFTER perform_after AFTER perform_after AFTER perform_after . AFTER perform_after AFTER perform_after + 1173 | AFTER perform_after AFTER perform_after AFTER perform_after . AFTER perform_after AFTER perform_after AFTER perform_after + + AFTER shift, and go to state 1990 + + $default reduce using rule 1170 (perform_after_opt) + + +state 1989 + + 1175 perform_after: name FROM gname by_opt gname . UNTIL @140 condition + + UNTIL shift, and go to state 1991 + + +state 1990 + + 1171 perform_after_opt: AFTER perform_after AFTER perform_after AFTER perform_after AFTER . perform_after + 1172 | AFTER perform_after AFTER perform_after AFTER perform_after AFTER . perform_after AFTER perform_after + 1173 | AFTER perform_after AFTER perform_after AFTER perform_after AFTER . perform_after AFTER perform_after AFTER perform_after + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + perform_after go to state 1992 + name go to state 1927 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1991 + + 1175 perform_after: name FROM gname by_opt gname UNTIL . @140 condition + + $default reduce using rule 1174 (@140) + + @140 go to state 1993 + + +state 1992 + + 1171 perform_after_opt: AFTER perform_after AFTER perform_after AFTER perform_after AFTER perform_after . + 1172 | AFTER perform_after AFTER perform_after AFTER perform_after AFTER perform_after . AFTER perform_after + 1173 | AFTER perform_after AFTER perform_after AFTER perform_after AFTER perform_after . AFTER perform_after AFTER perform_after + + AFTER shift, and go to state 1994 + + $default reduce using rule 1171 (perform_after_opt) + + +state 1993 + + 1175 perform_after: name FROM gname by_opt gname UNTIL @140 . condition + + VARIABLE shift, and go to state 56 + VARCOND shift, and go to state 422 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + NLITERAL shift, and go to state 59 + CLITERAL shift, and go to state 60 + '+' shift, and go to state 61 + '-' shift, and go to state 62 + NOT shift, and go to state 423 + ALL shift, and go to state 63 + FUNCTION shift, and go to state 64 + HIGHVALUES shift, and go to state 65 + LOWVALUES shift, and go to state 66 + QUOTES shift, and go to state 67 + SPACES shift, and go to state 68 + ZERO shift, and go to state 69 + '(' shift, and go to state 424 + + expr go to state 425 + condition go to state 1995 + gname go to state 427 + gliteral go to state 72 + without_all_literal go to state 73 + all_literal go to state 74 + special_literal go to state 75 + literal go to state 76 + signed_nliteral go to state 77 + cond_name go to state 428 + name go to state 78 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1994 + + 1172 perform_after_opt: AFTER perform_after AFTER perform_after AFTER perform_after AFTER perform_after AFTER . perform_after + 1173 | AFTER perform_after AFTER perform_after AFTER perform_after AFTER perform_after AFTER . perform_after AFTER perform_after + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + perform_after go to state 1996 + name go to state 1927 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1995 + + 1175 perform_after: name FROM gname by_opt gname UNTIL @140 condition . + 1184 condition: condition . AND @143 implied_op_condition + 1186 | condition . OR @144 implied_op_condition + + OR shift, and go to state 611 + AND shift, and go to state 612 + + $default reduce using rule 1175 (perform_after) + + +state 1996 + + 1172 perform_after_opt: AFTER perform_after AFTER perform_after AFTER perform_after AFTER perform_after AFTER perform_after . + 1173 | AFTER perform_after AFTER perform_after AFTER perform_after AFTER perform_after AFTER perform_after . AFTER perform_after + + AFTER shift, and go to state 1997 + + $default reduce using rule 1172 (perform_after_opt) + + +state 1997 + + 1173 perform_after_opt: AFTER perform_after AFTER perform_after AFTER perform_after AFTER perform_after AFTER perform_after AFTER . perform_after + + VARIABLE shift, and go to state 56 + SUBSCVAR shift, and go to state 57 + LABELSTR shift, and go to state 58 + + perform_after go to state 1998 + name go to state 1927 + variable go to state 79 + qualified_var go to state 80 + unqualified_var go to state 81 + + +state 1998 + + 1173 perform_after_opt: AFTER perform_after AFTER perform_after AFTER perform_after AFTER perform_after AFTER perform_after AFTER perform_after . + + $default reduce using rule 1173 (perform_after_opt) diff --git a/compiler/htcobol.tab.c b/compiler/htcobol.tab.c new file mode 100644 index 0000000..2f90aaf --- /dev/null +++ b/compiler/htcobol.tab.c @@ -0,0 +1,12583 @@ +/* A Bison parser, made by GNU Bison 2.4.2. */ + +/* Skeleton implementation for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2006, 2009-2010 Free Software + Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* C LALR(1) parser skeleton written by Richard Stallman, by + simplifying the original so-called "semantic" parser. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* Identify Bison output. */ +#define YYBISON 1 + +/* Bison version. */ +#define YYBISON_VERSION "2.4.2" + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 0 + +/* Push parsers. */ +#define YYPUSH 0 + +/* Pull parsers. */ +#define YYPULL 1 + +/* Using locations. */ +#define YYLSP_NEEDED 0 + + + +/* Copy the first part of user declarations. */ + +/* Line 189 of yacc.c */ +#line 27 "htcobol.y" + +//#define YYDEBUG 1 +#define YYMAXDEPTH 1000 + +#include +#include +#include + +#include +#if defined(SunOS) +va_list __builtin_va_alist; +#endif + +#include + +#include "htcoboly.h" +#include "htcoblib.h" +#include "htglobals.h" + +/* #if 1 */ +#if USE_PARSER_TEST_MODE +#define UNIMPLEMENTED(xyz) +#else +#define UNIMPLEMENTED(xyz) yyerror("`%s' is not currently implemented", xyz); +#endif + +// walter +int fg=0, bg=0, co=0; +//struct lit *init_alphab=NULL, *init_alpha=NULL, *init_num=NULL, *init_numedt=NULL, *init_alphaedt=NULL; +// fim walter +extern int screen_io_enable,scr_line,scr_column; +extern int decimal_comma; +extern char currency_symbol; +extern int has_linkage; +extern int module_flag; +extern int nested_flag; +extern FILE *lexin; +extern FILE *o_src; +extern struct sym *screen_status_field; /* pointer to the screen status */ +extern struct sym *cursor_field; /* pointer to the cursor field */ +extern struct sym *curr_paragr,*curr_section; +extern struct sym *curr_field; +extern short curr_call_mode; +extern short curr_call_convention; +extern struct sym *pgm_id; +extern unsigned stack_offset; /* offset das variaveis na pilha */ +extern unsigned global_offset; /* offset das variaveis globais (DATA) */ +extern int paragr_num; +extern int loc_label; +extern char picture[]; +extern int picix,piccnt,decimals,sign,v_flag,n_flag,pscale; +extern int at_linkage,stack_plus; +extern char *toktext; +extern int yylex(void); +extern struct index_to_table_list *index2table; +extern int pgm_segment; +extern int initial_flag; +extern struct lit *spe_lit_ZE; +extern struct lit *spe_lit_SP; +extern struct lit *spe_lit_LV; +extern struct lit *spe_lit_HV; +extern struct lit *spe_lit_QU; + +struct sym *curr_file; +struct sym *alloc_filler( void ); +int curr_division=0; +int need_subscripts=0; +static int is_var=0; +extern char *yytext; +extern int envdiv_bypass_save_sw; + +extern int stabs_on_sw; +extern int HTG_prg_uses_fileio; +extern int HTG_prg_uses_term; +/* extern int HTG_prg_uses_dcall; */ + +unsigned long lbend, lbstart; +unsigned int perform_after_sw; + +int write_advancing_sw; +int decl_lbl; + +/* struct math_var *vl1, *vl2; */ +struct math_ose *tmose=NULL; +struct ginfo *gic=NULL; + +static void assert_numeric_sy (struct sym *sy); +static void assert_numeric_dest_sy (struct sym *sy); + +static char err_msg_bad_form[] = "ill-formed %s statement"; + + +/* Line 189 of yacc.c */ +#line 165 "htcobol.tab.c" + +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 0 +#endif + +/* Enabling the token table. */ +#ifndef YYTOKEN_TABLE +# define YYTOKEN_TABLE 0 +#endif + + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + LOW_PREC = 258, + IDSTRING = 259, + STRING = 260, + VARIABLE = 261, + VARCOND = 262, + SUBSCVAR = 263, + LABELSTR = 264, + CMD_LINE = 265, + ENVIRONMENT_VARIABLE = 266, + INKEY = 267, + ESCKEY = 268, + CHAR = 269, + MULTIPLIER = 270, + USAGENUM = 271, + ZERONUM = 272, + CONDITIONAL = 273, + TO = 274, + IS = 275, + ARE = 276, + THRU = 277, + THAN = 278, + NO = 279, + COMMENTING = 280, + DIRECTION = 281, + READ = 282, + WRITE = 283, + INPUT_OUTPUT = 284, + RELEASE = 285, + NLITERAL = 286, + CLITERAL = 287, + PORTNUM = 288, + DATE_TIME = 289, + POW_OP = 290, + OR = 291, + AND = 292, + NOT = 293, + ACCEPT = 294, + ACCESS = 295, + ADD = 296, + ADDRESS = 297, + ADVANCING = 298, + AFTER = 299, + ALL = 300, + ALPHABET = 301, + ALPHABETIC = 302, + ALPHABETIC_LOWER = 303, + ALPHABETIC_UPPER = 304, + ALPHANUMERIC = 305, + ALPHANUMERIC_EDITED = 306, + ALSO = 307, + ALTERNATE = 308, + ANY = 309, + AREA = 310, + AREAS = 311, + ASSIGN = 312, + AT = 313, + AUTHOR = 314, + AUTO = 315, + BACKGROUNDCOLOR = 316, + BEFORE = 317, + BELL = 318, + BLANK = 319, + BLINK = 320, + BLOCK = 321, + BOTTOM = 322, + BY = 323, + CALL = 324, + CALL_CONV_C = 325, + CALL_CONV_STDCALL = 326, + CALL_LOADLIB = 327, + CANCEL = 328, + CENTER = 329, + CF = 330, + CH = 331, + CHAIN = 332, + CHAINING = 333, + CHARACTER = 334, + CHARACTERS = 335, + CLASS = 336, + CLOSE = 337, + CODE = 338, + CODE_SET = 339, + COLLATING = 340, + COLOR = 341, + COLUMN = 342, + COLUMNS = 343, + COMMA = 344, + COMMON = 345, + COMPUTE = 346, + CONFIGURATION = 347, + CONSOLE = 348, + CONTAINS = 349, + CONTENT = 350, + CONTINUE = 351, + CONTROL = 352, + CONTROLS = 353, + CONVERTING = 354, + CORRESPONDING = 355, + COUNT = 356, + CURRENCY = 357, + CURSOR = 358, + DATA = 359, + DATE_COMPILED = 360, + DATE_WRITTEN = 361, + DE = 362, + DEBUGGING = 363, + DECIMAL_POINT = 364, + DECLARATIVES = 365, + DELETE = 366, + DELIMITED = 367, + DELIMITER = 368, + DEPENDING = 369, + DETAIL = 370, + DISPLAY = 371, + DISPLAY_SCREEN = 372, + DIVIDE = 373, + DIVISION = 374, + DOWN = 375, + DUPLICATES = 376, + DYNAMIC = 377, + ELSE = 378, + END = 379, + END_ACCEPT = 380, + END_ADD = 381, + END_CALL = 382, + END_CALL_LOADLIB = 383, + END_CHAIN = 384, + END_COMPUTE = 385, + END_DELETE = 386, + END_DISPLAY = 387, + END_DIVIDE = 388, + END_EVALUATE = 389, + END_IF = 390, + END_MULTIPLY = 391, + END_OF_PAGE = 392, + END_PERFORM = 393, + END_READ = 394, + END_RETURN = 395, + END_REWRITE = 396, + END_SEARCH = 397, + END_START = 398, + END_STRINGCMD = 399, + END_SUBTRACT = 400, + END_UNSTRING = 401, + END_WRITE = 402, + ENVIRONMENT = 403, + EOL = 404, + EOS = 405, + ERASE = 406, + ERROR_TOK = 407, + EVALUATE = 408, + EXCEPTION = 409, + EXIT = 410, + EXTEND = 411, + EXTERNAL = 412, + FALSE_TOK = 413, + FD = 414, + FILE_CONTROL = 415, + FILE_ID = 416, + FILE_TOK = 417, + FILLER = 418, + FINAL = 419, + FIRST = 420, + FOOTING = 421, + FOR = 422, + FOREGROUNDCOLOR = 423, + FROM = 424, + FULL = 425, + FUNCTION = 426, + GENERATE = 427, + GIVING = 428, + GLOBAL = 429, + GO = 430, + GOBACK = 431, + GROUP = 432, + HEADING = 433, + HIGHLIGHT = 434, + HIGHVALUES = 435, + IDENTIFICATION = 436, + IF = 437, + IGNORE = 438, + IN = 439, + INDEXED = 440, + INDICATE = 441, + INITIALIZE = 442, + INITIAL_TOK = 443, + INITIATE = 444, + INPUT = 445, + INSPECT = 446, + INSTALLATION = 447, + INTO = 448, + INVALID = 449, + I_O = 450, + I_O_CONTROL = 451, + JUSTIFIED = 452, + KEY = 453, + LABEL = 454, + LAST = 455, + LEADING = 456, + LEFT = 457, + LENGTH = 458, + LIMIT = 459, + LIMITS = 460, + LINAGE = 461, + LINE = 462, + LINES = 463, + LINKAGE = 464, + LISTSEP = 465, + LOCK = 466, + LOWER = 467, + LOWLIGHT = 468, + LOWVALUES = 469, + LPAR = 470, + MERGE = 471, + MINUS = 472, + MODE = 473, + MOVE = 474, + MULTIPLE = 475, + MULTIPLY = 476, + NATIVE = 477, + NEGATIVE = 478, + NEXT = 479, + NOECHO = 480, + NOTEXCEP = 481, + NULL_TOK = 482, + NUMBER = 483, + NUMBERS = 484, + NUMERIC = 485, + NUMERIC_EDITED = 486, + OBJECT_COMPUTER = 487, + OCCURS = 488, + OF = 489, + OFF = 490, + OMITTED = 491, + ON = 492, + ONLY = 493, + OPEN = 494, + OPTIONAL = 495, + ORDER = 496, + ORGANIZATION = 497, + OTHER = 498, + OUTPUT = 499, + OVERFLOW_TOK = 500, + PADDING = 501, + PAGE = 502, + PAGE_COUNTER = 503, + PARAGRAPH = 504, + PERFORM = 505, + PF = 506, + PH = 507, + PICTURE = 508, + PLUS = 509, + POINTER = 510, + POSITION = 511, + POSITIVE = 512, + PREVIOUS = 513, + PROCEDURE = 514, + PROCEED = 515, + PROGRAM = 516, + PROGRAM_ID = 517, + QUOTES = 518, + RANDOM = 519, + RD = 520, + READY = 521, + RECORD = 522, + RECORDS = 523, + REDEFINES = 524, + REEL = 525, + REFERENCE = 526, + RELATIVE = 527, + REMAINDER = 528, + REMOVAL = 529, + RENAMES = 530, + REPLACING = 531, + REPORT = 532, + REPORTS = 533, + REQUIRED = 534, + RESERVE = 535, + RESET = 536, + RETURN = 537, + RETURNING = 538, + REVERSEVIDEO = 539, + REWIND = 540, + REWRITE = 541, + RF = 542, + RH = 543, + RIGHT = 544, + ROUNDED = 545, + RUN = 546, + SAME = 547, + SCREEN = 548, + SD = 549, + SEARCH = 550, + SECTION = 551, + SECURE = 552, + SECURITY = 553, + SELECT = 554, + SENTENCE = 555, + SEPARATE = 556, + SEQUENCE = 557, + SEQUENTIAL = 558, + SET = 559, + SIGN = 560, + SIZE = 561, + SORT = 562, + SORT_MERGE = 563, + SOURCE = 564, + SOURCE_COMPUTER = 565, + SPACES = 566, + SPECIAL_NAMES = 567, + STANDARD = 568, + STANDARD_1 = 569, + STANDARD_2 = 570, + START = 571, + STATUS = 572, + STD_ERROR = 573, + STD_OUTPUT = 574, + STOP = 575, + STRINGCMD = 576, + SUBTRACT = 577, + SUM = 578, + SYNCHRONIZED = 579, + TALLYING = 580, + TAPE = 581, + TCOBPROTO1 = 582, + TCOBPROTO2 = 583, + TERMINATE = 584, + TEST = 585, + THEN = 586, + TIMES = 587, + TOKDUMMY = 588, + TOP = 589, + TRACE = 590, + TRAILING = 591, + TRUE_TOK = 592, + TYPE = 593, + UNDERLINE = 594, + UNIT = 595, + UNLOCK = 596, + UNSTRING = 597, + UNTIL = 598, + UP = 599, + UPDATE = 600, + UPON = 601, + UPPER = 602, + USAGE = 603, + USE = 604, + USING = 605, + VALUE = 606, + VALUES = 607, + VARYING = 608, + WHEN = 609, + WITH = 610, + WORKING_STORAGE = 611, + ZERO = 612, + PERIOD_TOK = 613 + }; +#endif + + + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef union YYSTYPE +{ + +/* Line 214 of yacc.c */ +#line 119 "htcobol.y" + + struct sym *sval; /* symbol */ + int ival; /* int */ + struct coord_pair pval; /* lin,col */ + struct lit *lval; /* literal */ + unsigned long dval; /* label definition, compacted */ + struct ddval { /* dual label definition */ + int lb1,lb2; + } ddval; + char *str; + struct vref *rval; /* variable reference (with subscripts) */ + struct refmod *rmval; /* variable with RefMod specifier */ + struct string_from *sfval; /* variable list in string statement */ + struct unstring_delimited *udval; + struct unstring_destinations *udstval; + struct tallying_list *tlval; + struct tallying_for_list *tfval; + struct replacing_list *repval; + struct replacing_by_list *rbval; + struct converting_struct *cvval; + struct inspect_before_after *baval; + struct scr_info *sival; + struct perf_info *pfval; + struct perform_info *pfvals; + struct sortfile_node *snval; + struct selsubject *ssbjval; + struct math_var *mval; /* math variables container list */ + struct math_ose *mose; /* math ON SIZE ERROR variables container */ + struct ginfo *gic; /* generic container */ + struct invalid_keys *iks; /* [NOT] INVALID KEY */ + struct invalid_key_element *ike; /* [NOT] INVALID KEY */ + struct condition condval; + struct list *lstval; /* generic container list */ + struct gvar_list *glistval; /* generic variable list */ + + + +/* Line 214 of yacc.c */ +#line 597 "htcobol.tab.c" +} YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +#endif + + +/* Copy the second part of user declarations. */ + + +/* Line 264 of yacc.c */ +#line 609 "htcobol.tab.c" + +#ifdef short +# undef short +#endif + +#ifdef YYTYPE_UINT8 +typedef YYTYPE_UINT8 yytype_uint8; +#else +typedef unsigned char yytype_uint8; +#endif + +#ifdef YYTYPE_INT8 +typedef YYTYPE_INT8 yytype_int8; +#elif (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +typedef signed char yytype_int8; +#else +typedef short int yytype_int8; +#endif + +#ifdef YYTYPE_UINT16 +typedef YYTYPE_UINT16 yytype_uint16; +#else +typedef unsigned short int yytype_uint16; +#endif + +#ifdef YYTYPE_INT16 +typedef YYTYPE_INT16 yytype_int16; +#else +typedef short int yytype_int16; +#endif + +#ifndef YYSIZE_T +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned int +# endif +#endif + +#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) + +#ifndef YY_ +# if defined YYENABLE_NLS && YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(msgid) dgettext ("bison-runtime", msgid) +# endif +# endif +# ifndef YY_ +# define YY_(msgid) msgid +# endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YYUSE(e) ((void) (e)) +#else +# define YYUSE(e) /* empty */ +#endif + +/* Identity function, used to suppress warnings about constant conditions. */ +#ifndef lint +# define YYID(n) (n) +#else +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static int +YYID (int yyi) +#else +static int +YYID (yyi) + int yyi; +#endif +{ + return yyi; +} +#endif + +#if ! defined yyoverflow || YYERROR_VERBOSE + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef _STDLIB_H +# define _STDLIB_H 1 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined _STDLIB_H \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef _STDLIB_H +# define _STDLIB_H 1 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ + + +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + yytype_int16 yyss_alloc; + YYSTYPE yyvs_alloc; +}; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + + YYSTACK_GAP_MAXIMUM) + +/* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (YYID (0)) +# endif +# endif + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (YYID (0)) + +#endif + +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 8 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 4780 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 368 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 620 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 1309 +/* YYNRULES -- Number of states. */ +#define YYNSTATES 1999 + +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +#define YYUNDEFTOK 2 +#define YYMAXUTOK 613 + +#define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +static const yytype_uint16 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 364, 365, 37, 35, 366, 36, 363, 38, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 367, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, + 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, + 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, + 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, + 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, + 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, + 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, + 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, + 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, + 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, + 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, + 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, + 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, + 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, + 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, + 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, + 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, + 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, + 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, + 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, + 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, + 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, + 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, + 359, 360, 361, 362 +}; + +#if YYDEBUG +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in + YYRHS. */ +static const yytype_uint16 yyprhs[] = +{ + 0, 0, 3, 5, 7, 9, 12, 15, 16, 21, + 25, 26, 31, 36, 37, 38, 39, 52, 53, 57, + 61, 62, 64, 65, 68, 71, 74, 77, 80, 83, + 84, 91, 92, 97, 98, 101, 102, 103, 110, 111, + 118, 122, 124, 127, 128, 133, 135, 136, 140, 141, + 142, 145, 147, 149, 152, 154, 156, 158, 160, 162, + 164, 166, 171, 173, 174, 179, 181, 184, 186, 190, + 194, 199, 203, 204, 207, 208, 215, 220, 221, 226, + 227, 229, 230, 235, 237, 239, 241, 243, 245, 248, + 250, 254, 257, 260, 264, 269, 270, 273, 275, 279, + 280, 284, 286, 289, 290, 297, 300, 301, 305, 309, + 314, 319, 324, 329, 336, 340, 342, 344, 345, 347, + 348, 350, 352, 355, 358, 360, 363, 364, 366, 367, + 369, 371, 372, 374, 375, 377, 378, 380, 381, 383, + 385, 387, 390, 392, 394, 396, 398, 400, 401, 404, + 406, 409, 411, 413, 419, 420, 422, 424, 426, 432, + 434, 437, 440, 441, 444, 446, 447, 449, 450, 452, + 453, 455, 458, 460, 462, 465, 467, 468, 478, 479, + 480, 486, 487, 488, 494, 495, 496, 502, 503, 508, + 509, 512, 513, 514, 515, 516, 525, 526, 529, 532, + 535, 537, 539, 543, 552, 553, 557, 559, 561, 562, + 564, 567, 570, 571, 574, 577, 578, 582, 583, 588, + 589, 594, 595, 597, 598, 601, 603, 606, 607, 613, + 615, 618, 620, 622, 624, 626, 628, 630, 632, 634, + 636, 638, 640, 644, 647, 650, 651, 656, 658, 659, + 664, 667, 670, 672, 674, 675, 679, 681, 682, 686, + 688, 690, 696, 700, 701, 706, 710, 712, 715, 720, + 726, 731, 734, 738, 741, 745, 749, 752, 755, 759, + 764, 769, 773, 774, 776, 778, 780, 781, 783, 785, + 786, 791, 795, 796, 797, 804, 806, 808, 809, 812, + 816, 817, 819, 820, 823, 824, 827, 830, 831, 833, + 835, 837, 838, 840, 842, 844, 846, 849, 852, 854, + 855, 856, 862, 863, 866, 867, 868, 874, 875, 882, + 883, 890, 894, 895, 901, 902, 908, 909, 915, 918, + 922, 925, 926, 931, 932, 933, 937, 938, 943, 944, + 948, 949, 952, 955, 958, 961, 964, 966, 969, 971, + 973, 975, 977, 979, 982, 985, 987, 989, 991, 993, + 995, 999, 1002, 1005, 1009, 1011, 1013, 1016, 1019, 1022, + 1025, 1027, 1030, 1032, 1034, 1036, 1038, 1040, 1043, 1046, + 1048, 1050, 1052, 1054, 1056, 1060, 1063, 1066, 1070, 1072, + 1074, 1077, 1080, 1084, 1088, 1091, 1092, 1094, 1095, 1098, + 1100, 1102, 1104, 1106, 1108, 1109, 1112, 1113, 1114, 1115, + 1116, 1126, 1127, 1128, 1129, 1139, 1141, 1142, 1144, 1147, + 1148, 1154, 1155, 1158, 1161, 1162, 1166, 1168, 1170, 1172, + 1174, 1176, 1178, 1180, 1183, 1186, 1189, 1192, 1196, 1197, + 1202, 1203, 1205, 1207, 1208, 1211, 1212, 1218, 1219, 1220, + 1232, 1237, 1238, 1243, 1244, 1246, 1249, 1253, 1255, 1257, + 1259, 1262, 1265, 1268, 1270, 1274, 1276, 1280, 1281, 1286, + 1287, 1290, 1293, 1294, 1296, 1297, 1300, 1301, 1304, 1307, + 1310, 1312, 1314, 1316, 1318, 1320, 1322, 1324, 1326, 1328, + 1330, 1336, 1342, 1352, 1356, 1362, 1366, 1369, 1373, 1381, + 1382, 1387, 1388, 1392, 1393, 1397, 1398, 1400, 1403, 1405, + 1408, 1411, 1413, 1416, 1417, 1419, 1421, 1422, 1425, 1426, + 1430, 1431, 1434, 1436, 1437, 1438, 1441, 1444, 1447, 1449, + 1451, 1452, 1454, 1455, 1457, 1458, 1460, 1461, 1463, 1464, + 1466, 1467, 1469, 1470, 1472, 1475, 1476, 1477, 1480, 1481, + 1482, 1491, 1492, 1493, 1496, 1498, 1500, 1501, 1505, 1506, + 1510, 1512, 1513, 1522, 1523, 1524, 1527, 1529, 1531, 1532, + 1536, 1537, 1541, 1542, 1546, 1548, 1556, 1558, 1560, 1562, + 1565, 1568, 1570, 1572, 1576, 1579, 1581, 1583, 1585, 1587, + 1590, 1592, 1594, 1596, 1598, 1600, 1602, 1604, 1606, 1608, + 1610, 1612, 1614, 1616, 1618, 1620, 1622, 1624, 1626, 1628, + 1630, 1632, 1634, 1636, 1638, 1640, 1642, 1644, 1646, 1648, + 1650, 1652, 1654, 1656, 1658, 1660, 1662, 1664, 1666, 1668, + 1670, 1672, 1674, 1676, 1679, 1680, 1684, 1685, 1686, 1693, + 1697, 1702, 1703, 1704, 1711, 1713, 1715, 1716, 1719, 1720, + 1725, 1727, 1729, 1731, 1733, 1734, 1735, 1741, 1742, 1743, + 1744, 1752, 1753, 1756, 1757, 1762, 1764, 1766, 1768, 1770, + 1773, 1778, 1781, 1782, 1784, 1785, 1791, 1792, 1795, 1796, + 1800, 1801, 1803, 1804, 1806, 1807, 1809, 1810, 1811, 1812, + 1820, 1821, 1822, 1828, 1831, 1832, 1833, 1838, 1839, 1841, + 1844, 1845, 1850, 1852, 1855, 1859, 1861, 1864, 1865, 1866, + 1872, 1874, 1877, 1883, 1889, 1890, 1895, 1896, 1898, 1901, + 1904, 1908, 1911, 1914, 1917, 1920, 1923, 1926, 1929, 1930, + 1931, 1932, 1942, 1945, 1947, 1949, 1950, 1951, 1952, 1963, + 1964, 1971, 1973, 1976, 1978, 1981, 1986, 1991, 1993, 1996, + 1998, 2001, 2002, 2007, 2008, 2010, 2015, 2018, 2023, 2026, + 2028, 2031, 2036, 2042, 2049, 2053, 2057, 2059, 2060, 2063, + 2065, 2068, 2073, 2075, 2077, 2079, 2081, 2083, 2087, 2089, + 2094, 2095, 2097, 2101, 2103, 2108, 2114, 2121, 2122, 2125, + 2126, 2128, 2132, 2134, 2139, 2146, 2153, 2154, 2156, 2160, + 2162, 2169, 2174, 2175, 2177, 2181, 2183, 2190, 2200, 2210, + 2217, 2222, 2223, 2225, 2227, 2229, 2231, 2233, 2239, 2246, + 2252, 2258, 2265, 2271, 2276, 2277, 2278, 2279, 2291, 2292, + 2294, 2296, 2298, 2300, 2306, 2311, 2313, 2317, 2320, 2323, + 2326, 2327, 2332, 2336, 2341, 2346, 2351, 2352, 2354, 2358, + 2362, 2365, 2368, 2371, 2372, 2375, 2378, 2380, 2382, 2384, + 2387, 2389, 2392, 2396, 2398, 2400, 2402, 2404, 2406, 2408, + 2412, 2415, 2417, 2419, 2423, 2426, 2428, 2430, 2434, 2436, + 2438, 2442, 2446, 2449, 2453, 2454, 2458, 2460, 2464, 2469, + 2473, 2475, 2482, 2490, 2498, 2499, 2501, 2503, 2504, 2507, + 2508, 2512, 2516, 2519, 2521, 2522, 2529, 2530, 2536, 2537, + 2541, 2543, 2545, 2548, 2549, 2554, 2555, 2561, 2562, 2564, + 2565, 2567, 2571, 2572, 2575, 2576, 2584, 2585, 2588, 2589, + 2594, 2598, 2599, 2601, 2602, 2609, 2610, 2612, 2613, 2620, + 2621, 2623, 2624, 2630, 2632, 2638, 2639, 2641, 2645, 2652, + 2654, 2656, 2659, 2663, 2664, 2665, 2666, 2667, 2668, 2682, + 2684, 2685, 2687, 2689, 2690, 2695, 2697, 2699, 2700, 2701, + 2702, 2703, 2704, 2714, 2716, 2718, 2721, 2724, 2727, 2730, + 2732, 2734, 2736, 2740, 2745, 2748, 2752, 2753, 2755, 2756, + 2761, 2765, 2766, 2775, 2776, 2780, 2781, 2783, 2784, 2786, + 2787, 2789, 2792, 2797, 2802, 2807, 2813, 2815, 2817, 2819, + 2821, 2823, 2825, 2827, 2829, 2831, 2832, 2835, 2836, 2845, + 2846, 2857, 2861, 2862, 2865, 2870, 2872, 2876, 2880, 2881, + 2885, 2886, 2890, 2891, 2895, 2896, 2898, 2899, 2903, 2904, + 2909, 2910, 2912, 2914, 2915, 2921, 2922, 2923, 2928, 2929, + 2930, 2936, 2937, 2939, 2941, 2944, 2945, 2946, 2951, 2952, + 2958, 2960, 2962, 2966, 2967, 2969, 2973, 2975, 2977, 2982, + 2984, 2986, 2988, 2989, 2991, 2992, 2994, 2995, 3001, 3005, + 3011, 3014, 3015, 3020, 3021, 3025, 3030, 3035, 3036, 3039, + 3040, 3046, 3050, 3051, 3057, 3058, 3060, 3062, 3064, 3066, + 3071, 3076, 3077, 3079, 3080, 3082, 3086, 3090, 3094, 3098, + 3102, 3106, 3107, 3109, 3110, 3111, 3112, 3118, 3119, 3122, + 3125, 3126, 3127, 3130, 3133, 3137, 3139, 3141, 3145, 3147, + 3149, 3151, 3155, 3157, 3159, 3162, 3165, 3166, 3167, 3174, + 3175, 3176, 3177, 3186, 3187, 3188, 3189, 3205, 3208, 3209, + 3216, 3221, 3222, 3223, 3238, 3239, 3242, 3243, 3247, 3248, + 3251, 3256, 3263, 3272, 3283, 3296, 3297, 3306, 3307, 3310, + 3312, 3314, 3315, 3320, 3323, 3324, 3329, 3330, 3335, 3339, + 3341, 3343, 3346, 3348, 3350, 3352, 3354, 3356, 3358, 3360, + 3362, 3365, 3369, 3374, 3376, 3380, 3384, 3386, 3388, 3390, + 3392, 3395, 3399, 3402, 3403, 3405, 3406, 3408, 3409, 3411, + 3412, 3414, 3415, 3417, 3419, 3420, 3422, 3423, 3425, 3426, + 3428, 3430, 3432, 3433, 3435, 3436, 3438, 3439, 3441, 3443, + 3444, 3445, 3447, 3449, 3453, 3455, 3459, 3461, 3463, 3464, + 3471, 3474, 3476, 3478, 3480, 3482, 3484, 3486, 3488, 3490, + 3493, 3496, 3498, 3500, 3502, 3504, 3506, 3508, 3510, 3512, + 3514, 3516, 3518, 3521, 3524, 3526, 3527, 3529, 3531, 3533, + 3535, 3537, 3539, 3541, 3542, 3548, 3550, 3557, 3559, 3561, + 3563, 3565, 3566, 3572, 3574, 3578, 3580, 3582, 3584, 3588, + 3590, 3594, 3598, 3600, 3604, 3606, 3608, 3612, 3616, 3618 +}; + +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const yytype_int16 yyrhs[] = +{ + 369, 0, -1, 370, -1, 375, -1, 371, -1, 371, + 375, -1, 375, 373, -1, -1, 375, 372, 371, 373, + -1, 371, 375, 373, -1, -1, 128, 265, 374, 4, + -1, 376, 384, 451, 614, -1, -1, -1, -1, 185, + 123, 362, 266, 362, 377, 4, 378, 380, 362, 379, + 382, -1, -1, 432, 192, 381, -1, 432, 94, 381, + -1, -1, 265, -1, -1, 382, 383, -1, 63, 362, + -1, 110, 362, -1, 109, 362, -1, 196, 362, -1, + 302, 362, -1, -1, 152, 123, 362, 385, 386, 417, + -1, -1, 96, 300, 362, 387, -1, -1, 387, 388, + -1, -1, -1, 314, 362, 389, 5, 394, 362, -1, + -1, 236, 362, 390, 5, 391, 362, -1, 316, 362, + 395, -1, 1, -1, 265, 392, -1, -1, 393, 306, + 432, 5, -1, 89, -1, -1, 952, 112, 222, -1, + -1, -1, 396, 362, -1, 1, -1, 397, -1, 396, + 397, -1, 406, -1, 412, -1, 398, -1, 403, -1, + 404, -1, 405, -1, 400, -1, 106, 399, 432, 32, + -1, 309, -1, -1, 85, 5, 432, 401, -1, 402, + -1, 401, 402, -1, 32, -1, 32, 22, 32, -1, + 113, 432, 93, -1, 121, 321, 432, 5, -1, 107, + 432, 5, -1, -1, 406, 407, -1, -1, 5, 432, + 5, 408, 409, 410, -1, 241, 411, 432, 5, -1, + -1, 239, 411, 432, 5, -1, -1, 321, -1, -1, + 50, 5, 432, 413, -1, 226, -1, 318, -1, 319, + -1, 414, -1, 415, -1, 414, 415, -1, 963, -1, + 963, 22, 963, -1, 963, 416, -1, 56, 963, -1, + 416, 56, 963, -1, 29, 300, 362, 418, -1, -1, + 419, 420, -1, 1, -1, 164, 362, 421, -1, -1, + 200, 362, 437, -1, 422, -1, 421, 422, -1, -1, + 303, 430, 971, 423, 424, 362, -1, 424, 425, -1, + -1, 427, 432, 435, -1, 61, 955, 428, -1, 44, + 434, 432, 436, -1, 426, 321, 432, 5, -1, 271, + 944, 432, 5, -1, 276, 944, 432, 5, -1, 57, + 271, 944, 432, 5, 429, -1, 284, 31, 431, -1, + 1, -1, 166, -1, -1, 246, -1, -1, 33, -1, + 973, -1, 33, 973, -1, 161, 973, -1, 1, -1, + 952, 125, -1, -1, 244, -1, -1, 59, -1, 60, + -1, -1, 20, -1, -1, 21, -1, -1, 222, -1, + -1, 189, -1, 307, -1, 276, -1, 211, 307, -1, + 987, -1, 307, -1, 126, -1, 268, -1, 987, -1, + -1, 438, 362, -1, 439, -1, 438, 439, -1, 440, + -1, 442, -1, 296, 441, 447, 448, 449, -1, -1, + 271, -1, 311, -1, 312, -1, 224, 166, 446, 608, + 443, -1, 444, -1, 443, 444, -1, 5, 445, -1, + -1, 260, 985, -1, 330, -1, -1, 59, -1, -1, + 171, -1, -1, 5, -1, 449, 5, -1, 1, -1, + 979, -1, 450, 979, -1, 1, -1, -1, 108, 123, + 362, 452, 453, 455, 457, 459, 518, -1, -1, -1, + 166, 300, 362, 454, 543, -1, -1, -1, 360, 300, + 362, 456, 612, -1, -1, -1, 213, 300, 362, 458, + 613, -1, -1, 281, 300, 362, 460, -1, -1, 460, + 461, -1, -1, -1, -1, -1, 269, 462, 5, 463, + 465, 362, 464, 479, -1, -1, 465, 466, -1, 432, + 178, -1, 87, 962, -1, 467, -1, 468, -1, 472, + 477, 478, -1, 251, 473, 985, 470, 469, 476, 475, + 474, -1, -1, 182, 432, 985, -1, 471, -1, 211, + -1, -1, 212, -1, 101, 432, -1, 102, 433, -1, + -1, 208, 20, -1, 209, 21, -1, -1, 170, 432, + 985, -1, -1, 204, 119, 432, 985, -1, -1, 169, + 119, 432, 985, -1, -1, 168, -1, -1, 478, 977, + -1, 480, -1, 479, 480, -1, -1, 985, 970, 481, + 482, 362, -1, 483, -1, 482, 483, -1, 496, -1, + 495, -1, 484, -1, 493, -1, 491, -1, 490, -1, + 494, -1, 508, -1, 498, -1, 502, -1, 507, -1, + 342, 432, 485, -1, 281, 182, -1, 251, 182, -1, + -1, 101, 182, 486, 515, -1, 119, -1, -1, 101, + 170, 487, 515, -1, 251, 170, -1, 281, 170, -1, + 292, -1, 256, -1, -1, 80, 488, 515, -1, 111, + -1, -1, 79, 489, 515, -1, 255, -1, 291, -1, + 309, 432, 513, 305, 539, -1, 513, 305, 539, -1, + -1, 257, 492, 432, 576, -1, 352, 432, 120, -1, + 120, -1, 201, 514, -1, 228, 181, 432, 516, -1, + 497, 985, 241, 228, 251, -1, 497, 985, 228, 251, + -1, 497, 985, -1, 497, 258, 985, -1, 211, 501, + -1, 211, 232, 432, -1, 211, 233, 433, -1, 212, + 433, -1, 499, 985, -1, 91, 500, 501, -1, 91, + 232, 500, 432, -1, 91, 233, 500, 433, -1, 92, + 500, 433, -1, -1, 206, -1, 78, -1, 293, -1, + -1, 20, -1, 21, -1, -1, 313, 503, 432, 506, + -1, 355, 432, 968, -1, -1, -1, 327, 504, 957, + 505, 510, 511, -1, 958, -1, 252, -1, -1, 181, + 509, -1, 68, 607, 361, -1, -1, 190, -1, -1, + 350, 957, -1, -1, 285, 958, -1, 285, 168, -1, + -1, 232, -1, 205, -1, 340, -1, -1, 293, -1, + 958, -1, 168, -1, 985, -1, 258, 985, -1, 228, + 251, -1, 238, -1, -1, -1, 297, 300, 362, 519, + 520, -1, -1, 520, 521, -1, -1, -1, 985, 970, + 522, 523, 362, -1, -1, 523, 211, 524, 542, 541, + 960, -1, -1, 523, 91, 525, 542, 541, 960, -1, + 523, 952, 535, -1, -1, 523, 952, 172, 526, 960, + -1, -1, 523, 952, 65, 527, 960, -1, -1, 523, + 952, 90, 528, 960, -1, 523, 530, -1, 523, 571, + 962, -1, 523, 574, -1, -1, 523, 310, 529, 960, + -1, -1, -1, 354, 531, 960, -1, -1, 173, 532, + 960, 534, -1, -1, 19, 533, 977, -1, -1, 19, + 977, -1, 68, 297, -1, 68, 211, -1, 155, 153, + -1, 155, 154, -1, 155, -1, 952, 67, -1, 537, + -1, 174, -1, 283, -1, 301, -1, 64, -1, 201, + 293, -1, 201, 206, -1, 69, -1, 288, -1, 343, + -1, 217, -1, 183, -1, 68, 607, 361, -1, 952, + 229, -1, 952, 349, -1, 952, 24, 47, -1, 351, + -1, 216, -1, 68, 297, -1, 68, 211, -1, 155, + 153, -1, 155, 154, -1, 155, -1, 952, 67, -1, + 537, -1, 174, -1, 283, -1, 301, -1, 64, -1, + 201, 293, -1, 201, 206, -1, 69, -1, 288, -1, + 343, -1, 217, -1, 183, -1, 68, 607, 361, -1, + 952, 229, -1, 952, 349, -1, 952, 24, 47, -1, + 351, -1, 216, -1, 172, 985, -1, 65, 985, -1, + 540, 205, 538, -1, 540, 340, 538, -1, 305, 539, + -1, -1, 83, -1, -1, 309, 432, -1, 432, -1, + 258, -1, 35, -1, 221, -1, 36, -1, -1, 232, + 432, -1, -1, -1, -1, -1, 543, 163, 544, 5, + 545, 579, 362, 546, 550, -1, -1, -1, -1, 543, + 298, 547, 5, 548, 580, 362, 549, 550, -1, 1, + -1, -1, 551, -1, 550, 551, -1, -1, 985, 970, + 552, 553, 362, -1, -1, 553, 557, -1, 553, 554, + -1, -1, 273, 555, 556, -1, 6, -1, 8, -1, + 561, -1, 574, -1, 568, -1, 537, -1, 570, -1, + 328, 559, -1, 201, 559, -1, 432, 161, -1, 432, + 178, -1, 68, 607, 361, -1, -1, 279, 558, 979, + 560, -1, -1, 206, -1, 293, -1, -1, 22, 979, + -1, -1, 237, 985, 606, 562, 566, -1, -1, -1, + 237, 985, 19, 985, 606, 118, 563, 953, 958, 564, + 566, -1, 26, 944, 432, 5, -1, -1, 565, 189, + 951, 567, -1, -1, 971, -1, 567, 971, -1, 605, + 432, 569, -1, 16, -1, 120, -1, 259, -1, 571, + 572, -1, 355, 432, -1, 356, 433, -1, 573, -1, + 572, 942, 573, -1, 962, -1, 962, 22, 962, -1, + -1, 257, 575, 432, 576, -1, -1, 576, 577, -1, + 14, 578, -1, -1, 15, -1, -1, 579, 581, -1, + -1, 580, 582, -1, 432, 161, -1, 432, 178, -1, + 583, -1, 584, -1, 585, -1, 586, -1, 587, -1, + 588, -1, 590, -1, 589, -1, 584, -1, 587, -1, + 70, 608, 985, 598, 597, -1, 271, 608, 985, 602, + 609, -1, 271, 432, 357, 949, 841, 600, 602, 609, + 599, -1, 203, 603, 604, -1, 355, 238, 165, 432, + 973, -1, 108, 603, 596, -1, 595, 5, -1, 88, + 432, 5, -1, 210, 432, 974, 471, 591, 592, 593, + -1, -1, 952, 170, 948, 974, -1, -1, 594, 338, + 974, -1, -1, 594, 71, 974, -1, -1, 212, -1, + 212, 62, -1, 62, -1, 281, 432, -1, 282, 433, + -1, 5, -1, 596, 5, -1, -1, 84, -1, 272, + -1, -1, 19, 985, -1, -1, 118, 953, 5, -1, + -1, 601, 967, -1, 173, -1, -1, -1, 19, 967, + -1, 271, 432, -1, 272, 433, -1, 317, -1, 240, + -1, -1, 352, -1, -1, 336, -1, -1, 358, -1, + -1, 98, -1, -1, 84, -1, -1, 245, -1, -1, + 108, -1, 612, 551, -1, -1, -1, 613, 551, -1, + -1, -1, 263, 123, 615, 904, 362, 616, 621, 617, + -1, -1, -1, 617, 618, -1, 632, -1, 633, -1, + -1, 619, 636, 362, -1, -1, 1, 620, 362, -1, + 362, -1, -1, 114, 362, 622, 627, 623, 128, 114, + 362, -1, -1, -1, 623, 624, -1, 627, -1, 633, + -1, -1, 625, 636, 362, -1, -1, 1, 626, 362, + -1, -1, 632, 628, 629, -1, 1, -1, 353, 48, + 630, 263, 953, 631, 362, -1, 1, -1, 158, -1, + 156, -1, 317, 158, -1, 317, 156, -1, 957, -1, + 768, -1, 9, 300, 362, -1, 9, 634, -1, 363, + -1, 362, -1, 636, -1, 637, -1, 636, 637, -1, + 724, -1, 725, -1, 730, -1, 733, -1, 737, -1, + 740, -1, 743, -1, 746, -1, 754, -1, 766, -1, + 770, -1, 778, -1, 776, -1, 795, -1, 797, -1, + 802, -1, 805, -1, 808, -1, 638, -1, 812, -1, + 830, -1, 831, -1, 815, -1, 822, -1, 825, -1, + 844, -1, 706, -1, 701, -1, 885, -1, 850, -1, + 852, -1, 697, -1, 698, -1, 699, -1, 695, -1, + 696, -1, 833, -1, 700, -1, 694, -1, 639, -1, + 644, -1, 643, -1, 100, -1, 254, 911, -1, -1, + 663, 640, 669, -1, -1, -1, 663, 127, 641, 665, + 642, 669, -1, 299, 671, 693, -1, 299, 49, 675, + 693, -1, -1, -1, 157, 645, 648, 646, 652, 647, + -1, 138, -1, 362, -1, -1, 649, 651, -1, -1, + 648, 56, 650, 651, -1, 897, -1, 931, -1, 341, + -1, 162, -1, -1, -1, 358, 653, 654, 658, 662, + -1, -1, -1, -1, 652, 358, 655, 656, 658, 657, + 662, -1, -1, 659, 661, -1, -1, 658, 56, 660, + 661, -1, 247, -1, 58, -1, 341, -1, 162, -1, + 668, 897, -1, 668, 897, 22, 897, -1, 668, 975, + -1, -1, 665, -1, -1, 186, 931, 664, 670, 665, + -1, -1, 666, 635, -1, -1, 667, 228, 304, -1, + -1, 42, -1, -1, 139, -1, -1, 335, -1, -1, + -1, -1, 972, 672, 678, 673, 679, 674, 681, -1, + -1, -1, 972, 676, 679, 677, 686, -1, 357, 979, + -1, -1, -1, 948, 128, 680, 635, -1, -1, 682, + -1, 681, 682, -1, -1, 358, 685, 683, 684, -1, + 635, -1, 228, 304, -1, 960, 938, 960, -1, 687, + -1, 686, 687, -1, -1, -1, 358, 688, 691, 689, + 690, -1, 635, -1, 228, 304, -1, 979, 432, 18, + 955, 979, -1, 979, 432, 18, 955, 968, -1, -1, + 691, 41, 692, 691, -1, -1, 146, -1, 345, 977, + -1, 331, 958, -1, 332, 958, 958, -1, 270, 339, + -1, 285, 339, -1, 193, 977, -1, 176, 977, -1, + 333, 977, -1, 77, 958, -1, 77, 49, -1, -1, + -1, -1, 220, 977, 713, 702, 720, 703, 705, 704, + 722, -1, 354, 723, -1, 707, -1, 711, -1, -1, + -1, -1, 311, 977, 713, 708, 719, 720, 709, 721, + 710, 722, -1, -1, 311, 972, 714, 712, 719, 720, + -1, 715, -1, 713, 715, -1, 716, -1, 714, 716, + -1, 953, 26, 944, 717, -1, 953, 26, 944, 718, + -1, 977, -1, 717, 977, -1, 972, -1, 718, 972, + -1, -1, 952, 125, 949, 610, -1, -1, 392, -1, + 194, 263, 432, 910, -1, 354, 723, -1, 248, 263, + 432, 910, -1, 177, 723, -1, 977, -1, 723, 977, + -1, 223, 958, 19, 956, -1, 223, 104, 978, 19, + 978, -1, 223, 207, 238, 958, 19, 978, -1, 223, + 958, 19, -1, 191, 957, 726, -1, 191, -1, -1, + 280, 727, -1, 728, -1, 727, 728, -1, 729, 611, + 72, 958, -1, 51, -1, 54, -1, 234, -1, 55, + -1, 235, -1, 95, 731, 732, -1, 95, -1, 834, + 18, 897, 837, -1, -1, 134, -1, 45, 734, 736, + -1, 45, -1, 835, 19, 834, 837, -1, 835, 735, + 177, 834, 837, -1, 104, 835, 19, 834, 836, 837, + -1, -1, 19, 958, -1, -1, 130, -1, 326, 738, + 739, -1, 326, -1, 835, 173, 834, 837, -1, 835, + 173, 958, 177, 834, 837, -1, 104, 835, 173, 834, + 836, 837, -1, -1, 149, -1, 225, 741, 742, -1, + 225, -1, 958, 72, 958, 177, 834, 837, -1, 958, + 72, 834, 837, -1, -1, 140, -1, 122, 744, 745, + -1, 122, -1, 958, 72, 958, 177, 834, 837, -1, + 958, 72, 958, 177, 977, 836, 277, 977, 837, -1, + 958, 197, 958, 177, 977, 836, 277, 977, 837, -1, + 958, 197, 958, 177, 834, 837, -1, 958, 197, 834, + 837, -1, -1, 137, -1, 747, -1, 748, -1, 749, + -1, 43, -1, 43, 977, 173, 12, 753, -1, 43, + 977, 173, 194, 321, 753, -1, 43, 977, 173, 10, + 753, -1, 43, 977, 173, 13, 753, -1, 43, 977, + 173, 11, 32, 753, -1, 43, 977, 173, 34, 753, + -1, 43, 977, 764, 753, -1, -1, -1, -1, 43, + 977, 764, 953, 158, 750, 979, 751, 635, 752, 753, + -1, -1, 129, -1, 755, -1, 756, -1, 120, -1, + 120, 757, 758, 759, 760, -1, 120, 757, 764, 760, + -1, 958, -1, 757, 943, 958, -1, 350, 97, -1, + 350, 323, -1, 350, 322, -1, -1, 759, 952, 24, + 47, -1, 759, 952, 155, -1, 759, 952, 155, 154, + -1, 759, 952, 155, 153, -1, 759, 952, 155, 297, + -1, -1, 136, -1, 211, 512, 897, -1, 91, 512, + 897, -1, 260, 897, -1, 62, 31, -1, 62, 979, + -1, -1, 764, 765, -1, 952, 536, -1, 761, -1, + 762, -1, 763, -1, 243, 767, -1, 243, -1, 768, + 769, -1, 767, 768, 769, -1, 194, -1, 199, -1, + 248, -1, 160, -1, 1, -1, 977, -1, 769, 943, + 977, -1, 86, 771, -1, 86, -1, 772, -1, 771, + 943, 772, -1, 977, 773, -1, 774, -1, 775, -1, + 952, 24, 289, -1, 274, -1, 344, -1, 274, 448, + 278, -1, 344, 448, 278, -1, 952, 215, -1, 952, + 187, 215, -1, -1, 286, 777, 794, -1, 286, -1, + 977, 947, 781, -1, 977, 947, 781, 783, -1, 27, + 779, 793, -1, 27, -1, 977, 780, 947, 781, 775, + 782, -1, 977, 780, 947, 781, 775, 782, 783, -1, + 977, 780, 947, 781, 775, 782, 788, -1, -1, 228, + -1, 262, -1, -1, 197, 977, -1, -1, 202, 432, + 977, -1, 42, 948, 786, -1, 62, 786, -1, 786, + -1, -1, 62, 786, 42, 948, 784, 786, -1, -1, + 786, 42, 948, 785, 786, -1, -1, 128, 787, 635, + -1, 789, -1, 791, -1, 789, 791, -1, -1, 198, + 944, 790, 635, -1, -1, 42, 198, 944, 792, 635, + -1, -1, 143, -1, -1, 144, -1, 30, 977, 796, + -1, -1, 173, 958, -1, -1, 28, 977, 799, 800, + 798, 873, 801, -1, -1, 173, 958, -1, -1, 930, + 945, 958, 470, -1, 930, 945, 251, -1, -1, 151, + -1, -1, 290, 977, 799, 803, 873, 804, -1, -1, + 145, -1, -1, 115, 977, 947, 806, 873, 807, -1, + -1, 135, -1, -1, 320, 810, 873, 809, 811, -1, + 977, -1, 977, 202, 432, 940, 977, -1, -1, 147, + -1, 179, 955, 813, -1, 179, 955, 814, 118, 953, + 979, -1, 986, -1, 986, -1, 814, 986, -1, 814, + 214, 986, -1, -1, -1, -1, -1, -1, 73, 816, + 821, 958, 899, 902, 817, 818, 819, 864, 867, 820, + 842, -1, 73, -1, -1, 74, -1, 75, -1, -1, + 76, 958, 823, 824, -1, 76, -1, 132, -1, -1, + -1, -1, -1, -1, 81, 826, 958, 899, 827, 828, + 864, 829, 843, -1, 81, -1, 159, -1, 159, 253, + -1, 159, 265, -1, 324, 295, -1, 324, 832, -1, + 32, -1, 31, -1, 180, -1, 977, 836, 943, -1, + 834, 977, 836, 943, -1, 958, 943, -1, 835, 958, + 943, -1, -1, 294, -1, -1, 42, 953, 310, 839, + -1, 953, 310, 839, -1, -1, 953, 310, 839, 42, + 953, 310, 838, 839, -1, -1, 156, 840, 635, -1, + -1, 310, -1, -1, 131, -1, -1, 133, -1, 308, + 845, -1, 846, 19, 849, 848, -1, 846, 348, 72, + 966, -1, 846, 124, 72, 966, -1, 849, 979, 19, + 849, 847, -1, 450, -1, 975, -1, 979, -1, 231, + -1, 960, -1, 241, -1, 239, -1, 231, -1, 341, + -1, -1, 46, 517, -1, -1, 325, 880, 197, 977, + 879, 851, 862, 883, -1, -1, 346, 977, 854, 197, + 856, 879, 860, 853, 862, 884, -1, 116, 951, 855, + -1, -1, 861, 958, -1, 855, 40, 861, 958, -1, + 857, -1, 856, 943, 857, -1, 977, 858, 859, -1, + -1, 117, 949, 977, -1, -1, 105, 949, 977, -1, + -1, 329, 949, 977, -1, -1, 49, -1, -1, 863, + 869, 871, -1, -1, 953, 866, 865, 635, -1, -1, + 158, -1, 249, -1, -1, 42, 953, 158, 868, 635, + -1, -1, -1, 953, 249, 870, 635, -1, -1, -1, + 878, 953, 249, 872, 635, -1, -1, 874, -1, 876, + -1, 874, 876, -1, -1, -1, 198, 944, 875, 635, + -1, -1, 878, 198, 944, 877, 635, -1, 230, -1, + 42, -1, 952, 259, 977, -1, -1, 881, -1, 880, + 943, 881, -1, 1, -1, 958, -1, 958, 116, 951, + 882, -1, 958, -1, 310, -1, 1, -1, -1, 148, + -1, -1, 150, -1, -1, 195, 977, 888, 886, 891, + -1, 195, 977, 887, -1, 103, 961, 19, 961, 895, + -1, 329, 889, -1, -1, 889, 977, 171, 890, -1, + -1, 890, 84, 895, -1, 890, 49, 961, 895, -1, + 890, 205, 961, 895, -1, -1, 280, 892, -1, -1, + 892, 84, 72, 961, 895, -1, 892, 894, 893, -1, + -1, 893, 961, 72, 961, 895, -1, -1, 49, -1, + 205, -1, 340, -1, 169, -1, 895, 66, 896, 961, + -1, 895, 48, 896, 961, -1, -1, 192, -1, -1, + 958, -1, 897, 37, 897, -1, 897, 38, 897, -1, + 897, 35, 897, -1, 897, 36, 897, -1, 897, 39, + 897, -1, 364, 897, 365, -1, -1, 897, -1, -1, + -1, -1, 354, 900, 903, 901, 905, -1, -1, 287, + 979, -1, 177, 979, -1, -1, -1, 354, 957, -1, + 82, 957, -1, 905, 943, 906, -1, 906, -1, 958, + -1, 951, 907, 958, -1, 275, -1, 355, -1, 99, + -1, 908, 943, 909, -1, 909, -1, 958, -1, 986, + 923, -1, 928, 142, -1, -1, -1, 958, 336, 912, + 928, 913, 142, -1, -1, -1, -1, 924, 347, 914, + 931, 915, 928, 916, 142, -1, -1, -1, -1, 924, + 357, 977, 173, 958, 951, 958, 347, 917, 931, 918, + 925, 928, 919, 142, -1, 986, 923, -1, -1, 986, + 923, 924, 347, 920, 931, -1, 986, 923, 958, 336, + -1, -1, -1, 986, 923, 924, 357, 977, 173, 958, + 951, 958, 347, 921, 931, 922, 925, -1, -1, 22, + 986, -1, -1, 952, 334, 930, -1, -1, 48, 926, + -1, 48, 926, 48, 926, -1, 48, 926, 48, 926, + 48, 926, -1, 48, 926, 48, 926, 48, 926, 48, + 926, -1, 48, 926, 48, 926, 48, 926, 48, 926, + 48, 926, -1, 48, 926, 48, 926, 48, 926, 48, + 926, 48, 926, 48, 926, -1, -1, 977, 173, 958, + 951, 958, 347, 927, 931, -1, -1, 929, 635, -1, + 66, -1, 48, -1, -1, 897, 938, 932, 898, -1, + 42, 931, -1, -1, 931, 41, 933, 935, -1, -1, + 931, 40, 934, 935, -1, 364, 931, 365, -1, 975, + -1, 931, -1, 940, 897, -1, 897, -1, 261, -1, + 227, -1, 361, -1, 234, -1, 51, -1, 52, -1, + 53, -1, 20, 939, -1, 20, 42, 939, -1, 20, + 939, 40, 939, -1, 939, -1, 42, 432, 939, -1, + 939, 40, 939, -1, 941, -1, 937, -1, 936, -1, + 941, -1, 42, 941, -1, 941, 40, 941, -1, 18, + 946, -1, -1, 366, -1, -1, 214, -1, -1, 202, + -1, -1, 47, -1, -1, 19, -1, 23, -1, -1, + 271, -1, -1, 62, -1, -1, 188, -1, 188, -1, + 238, -1, -1, 72, -1, -1, 359, -1, -1, 241, + -1, 958, -1, -1, -1, 19, -1, 978, -1, 956, + 943, 978, -1, 958, -1, 957, 943, 958, -1, 977, + -1, 962, -1, -1, 175, 9, 364, 959, 908, 365, + -1, 175, 9, -1, 977, -1, 968, -1, 977, -1, + 963, -1, 963, -1, 964, -1, 968, -1, 965, -1, + 49, 968, -1, 49, 965, -1, 315, -1, 361, -1, + 267, -1, 184, -1, 218, -1, 979, -1, 967, -1, + 969, -1, 969, -1, 32, -1, 31, -1, 35, 31, + -1, 36, 31, -1, 971, -1, -1, 5, -1, 167, + -1, 8, -1, 968, -1, 5, -1, 968, -1, 5, + -1, -1, 7, 364, 976, 983, 365, -1, 7, -1, + 979, 364, 958, 367, 954, 365, -1, 979, -1, 9, + -1, 958, -1, 981, -1, -1, 981, 219, 980, 983, + 365, -1, 982, -1, 982, 950, 981, -1, 6, -1, + 8, -1, 984, -1, 983, 942, 984, -1, 958, -1, + 984, 35, 958, -1, 984, 36, 958, -1, 969, -1, + 9, 950, 9, -1, 9, -1, 31, -1, 31, 950, + 31, -1, 31, 950, 9, -1, 5, -1, 9, -1 +}; + +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ +static const yytype_uint16 yyrline[] = +{ + 0, 309, 309, 312, 313, 314, 323, 324, 324, 325, + 337, 336, 346, 356, 360, 368, 354, 373, 375, 376, + 378, 379, 381, 383, 386, 387, 388, 389, 390, 397, + 396, 405, 411, 412, 415, 416, 420, 419, 424, 423, + 427, 428, 431, 432, 435, 437, 438, 441, 442, 444, + 446, 447, 450, 451, 456, 457, 458, 459, 460, 461, + 462, 467, 472, 473, 476, 479, 480, 483, 484, 488, + 492, 496, 499, 500, 504, 503, 511, 512, 515, 516, + 519, 520, 523, 530, 531, 532, 533, 536, 537, 540, + 541, 542, 545, 546, 552, 553, 556, 557, 560, 562, + 563, 570, 571, 576, 575, 600, 601, 604, 606, 607, + 617, 618, 619, 620, 622, 623, 626, 627, 630, 631, + 633, 634, 635, 636, 641, 644, 645, 648, 649, 651, + 652, 653, 656, 657, 660, 661, 664, 665, 668, 669, + 670, 671, 672, 675, 676, 677, 678, 683, 684, 688, + 689, 692, 693, 696, 698, 699, 700, 701, 704, 707, + 708, 711, 713, 714, 717, 718, 721, 722, 725, 726, + 729, 730, 731, 734, 735, 736, 745, 744, 752, 758, + 758, 760, 766, 766, 768, 774, 774, 776, 790, 792, + 795, 796, 800, 802, 812, 799, 821, 822, 824, 825, + 826, 827, 830, 833, 838, 839, 842, 843, 845, 847, + 850, 851, 853, 855, 856, 858, 860, 862, 864, 866, + 868, 870, 872, 874, 876, 879, 880, 884, 883, 900, + 901, 904, 905, 906, 907, 908, 909, 910, 911, 912, + 913, 914, 917, 920, 921, 922, 922, 924, 925, 925, + 927, 928, 929, 930, 931, 931, 933, 934, 934, 936, + 937, 940, 941, 945, 944, 951, 952, 955, 958, 961, + 962, 963, 964, 967, 968, 969, 970, 973, 976, 977, + 978, 979, 982, 983, 984, 985, 987, 989, 990, 993, + 992, 996, 997, 998, 997, 1001, 1002, 1004, 1005, 1008, + 1010, 1011, 1013, 1014, 1016, 1017, 1018, 1020, 1021, 1024, + 1025, 1027, 1028, 1031, 1032, 1035, 1036, 1037, 1040, 1041, + 1051, 1050, 1057, 1064, 1065, 1069, 1068, 1080, 1080, 1085, + 1085, 1090, 1092, 1092, 1096, 1096, 1100, 1100, 1105, 1107, + 1109, 1110, 1110, 1113, 1116, 1116, 1121, 1121, 1127, 1127, + 1134, 1135, 1138, 1139, 1140, 1141, 1142, 1143, 1144, 1145, + 1146, 1147, 1148, 1149, 1150, 1151, 1152, 1153, 1154, 1155, + 1156, 1157, 1158, 1159, 1160, 1161, 1165, 1166, 1167, 1168, + 1169, 1170, 1171, 1172, 1173, 1174, 1175, 1176, 1177, 1178, + 1179, 1180, 1181, 1182, 1183, 1184, 1185, 1186, 1187, 1188, + 1189, 1190, 1194, 1196, 1200, 1201, 1204, 1205, 1208, 1209, + 1212, 1213, 1214, 1215, 1216, 1219, 1220, 1229, 1231, 1233, + 1228, 1245, 1246, 1248, 1245, 1259, 1260, 1263, 1264, 1280, + 1279, 1299, 1301, 1302, 1306, 1305, 1319, 1320, 1323, 1324, + 1325, 1326, 1329, 1330, 1331, 1332, 1333, 1334, 1335, 1335, + 1341, 1342, 1343, 1345, 1346, 1352, 1351, 1355, 1357, 1354, + 1364, 1375, 1378, 1390, 1393, 1405, 1414, 1417, 1418, 1419, + 1425, 1428, 1429, 1432, 1433, 1436, 1437, 1447, 1446, 1467, + 1468, 1471, 1480, 1481, 1485, 1486, 1488, 1489, 1492, 1493, + 1494, 1495, 1496, 1497, 1498, 1499, 1500, 1501, 1504, 1505, + 1509, 1516, 1524, 1537, 1540, 1551, 1554, 1557, 1561, 1567, + 1568, 1570, 1571, 1573, 1574, 1576, 1577, 1578, 1579, 1581, + 1582, 1584, 1585, 1587, 1589, 1590, 1592, 1593, 1595, 1596, + 1599, 1600, 1603, 1604, 1607, 1608, 1611, 1612, 1615, 1616, + 1618, 1620, 1622, 1624, 1626, 1628, 1630, 1632, 1634, 1636, + 1638, 1640, 1642, 1644, 1650, 1652, 1657, 1659, 1672, 1676, + 1671, 1687, 1689, 1690, 1693, 1694, 1695, 1695, 1697, 1697, + 1698, 1703, 1702, 1713, 1715, 1716, 1721, 1722, 1723, 1723, + 1724, 1724, 1730, 1729, 1735, 1738, 1740, 1742, 1743, 1744, + 1745, 1748, 1749, 1760, 1771, 1785, 1786, 1794, 1797, 1798, + 1801, 1802, 1803, 1804, 1805, 1806, 1807, 1808, 1809, 1810, + 1811, 1812, 1813, 1814, 1815, 1816, 1817, 1818, 1819, 1820, + 1821, 1822, 1823, 1824, 1825, 1826, 1827, 1828, 1829, 1830, + 1831, 1832, 1833, 1834, 1835, 1836, 1837, 1838, 1839, 1840, + 1841, 1842, 1843, 1850, 1853, 1853, 1855, 1857, 1854, 1861, + 1862, 1866, 1868, 1865, 1874, 1875, 1878, 1878, 1881, 1880, + 1886, 1895, 1896, 1897, 1900, 1901, 1900, 1905, 1906, 1908, + 1905, 1913, 1913, 1920, 1919, 1926, 1929, 1930, 1931, 1932, + 1949, 1961, 1972, 1973, 1978, 1977, 1988, 1988, 1989, 1989, + 1996, 1997, 1999, 2000, 2002, 2003, 2007, 2013, 2024, 2006, + 2040, 2058, 2039, 2070, 2071, 2076, 2075, 2085, 2092, 2093, + 2098, 2096, 2108, 2109, 2122, 2126, 2127, 2130, 2132, 2130, + 2141, 2143, 2150, 2158, 2166, 2166, 2170, 2171, 2175, 2178, + 2179, 2182, 2183, 2186, 2189, 2192, 2195, 2196, 2202, 2204, + 2206, 2201, 2215, 2220, 2221, 2225, 2227, 2229, 2224, 2244, + 2243, 2250, 2251, 2255, 2256, 2260, 2265, 2270, 2271, 2275, + 2276, 2279, 2280, 2287, 2288, 2294, 2295, 2298, 2299, 2302, + 2303, 2311, 2312, 2313, 2314, 2319, 2320, 2322, 2323, 2327, + 2328, 2331, 2334, 2335, 2336, 2337, 2338, 2343, 2344, 2347, + 2360, 2362, 2367, 2368, 2371, 2379, 2387, 2397, 2398, 2400, + 2402, 2408, 2409, 2412, 2420, 2429, 2438, 2439, 2445, 2446, + 2449, 2458, 2467, 2469, 2475, 2476, 2479, 2488, 2497, 2506, + 2515, 2524, 2526, 2531, 2532, 2533, 2534, 2537, 2538, 2539, + 2540, 2541, 2549, 2555, 2563, 2570, 2574, 2562, 2577, 2579, + 2584, 2585, 2586, 2589, 2594, 2602, 2603, 2606, 2607, 2608, + 2611, 2612, 2613, 2614, 2615, 2616, 2618, 2620, 2628, 2637, + 2644, 2653, 2659, 2668, 2669, 2672, 2673, 2674, 2675, 2682, + 2683, 2686, 2687, 2691, 2692, 2693, 2694, 2695, 2698, 2699, + 2705, 2706, 2709, 2710, 2713, 2716, 2721, 2724, 2725, 2726, + 2727, 2728, 2731, 2732, 2733, 2739, 2740, 2743, 2751, 2769, + 2770, 2773, 2787, 2804, 2822, 2823, 2824, 2827, 2828, 2831, + 2832, 2835, 2840, 2845, 2851, 2850, 2860, 2859, 2871, 2870, + 2884, 2885, 2886, 2889, 2889, 2893, 2893, 2896, 2898, 2900, + 2902, 2908, 2914, 2915, 2922, 2921, 2931, 2932, 2935, 2936, + 2942, 2948, 2950, 2957, 2956, 2965, 2967, 2973, 2973, 2977, + 2979, 2986, 2985, 2990, 2991, 2993, 2995, 3005, 3006, 3013, + 3016, 3017, 3018, 3023, 3028, 3029, 3030, 3041, 3023, 3043, + 3046, 3047, 3048, 3056, 3054, 3060, 3064, 3065, 3070, 3072, + 3073, 3075, 3070, 3077, 3082, 3083, 3084, 3089, 3090, 3102, + 3108, 3118, 3121, 3125, 3131, 3135, 3142, 3143, 3148, 3151, + 3156, 3164, 3161, 3175, 3174, 3192, 3194, 3196, 3198, 3200, + 3202, 3207, 3209, 3211, 3213, 3215, 3221, 3222, 3226, 3227, + 3231, 3232, 3233, 3234, 3235, 3243, 3244, 3251, 3250, 3262, + 3258, 3269, 3270, 3273, 3274, 3282, 3283, 3290, 3295, 3296, + 3299, 3300, 3303, 3304, 3307, 3308, 3311, 3311, 3317, 3317, + 3319, 3322, 3323, 3326, 3326, 3328, 3331, 3331, 3333, 3336, + 3336, 3338, 3342, 3343, 3344, 3346, 3349, 3349, 3353, 3353, + 3357, 3358, 3361, 3362, 3365, 3366, 3370, 3373, 3377, 3382, + 3383, 3384, 3386, 3388, 3390, 3392, 3399, 3397, 3401, 3406, + 3412, 3413, 3416, 3419, 3422, 3425, 3428, 3431, 3434, 3436, + 3439, 3442, 3445, 3448, 3451, 3454, 3455, 3456, 3457, 3460, + 3463, 3466, 3469, 3470, 3474, 3475, 3477, 3479, 3481, 3483, + 3485, 3490, 3491, 3494, 3495, 3496, 3495, 3500, 3501, 3502, + 3504, 3507, 3508, 3509, 3513, 3520, 3529, 3538, 3559, 3560, + 3561, 3565, 3567, 3570, 3572, 3578, 3580, 3586, 3579, 3591, + 3598, 3606, 3590, 3620, 3641, 3651, 3619, 3694, 3700, 3699, + 3718, 3729, 3749, 3727, 3805, 3806, 3808, 3809, 3815, 3816, + 3822, 3829, 3838, 3848, 3859, 3874, 3872, 3909, 3909, 3915, + 3916, 3920, 3919, 3949, 3952, 3950, 3957, 3955, 3960, 3961, + 3971, 3972, 3983, 3997, 3998, 3999, 4002, 4003, 4004, 4005, + 4008, 4009, 4010, 4011, 4012, 4013, 4016, 4017, 4018, 4021, + 4022, 4023, 4026, 4028, 4029, 4031, 4033, 4044, 4046, 4048, + 4050, 4052, 4054, 4055, 4057, 4059, 4061, 4062, 4064, 4065, + 4068, 4069, 4071, 4072, 4074, 4076, 4078, 4080, 4083, 4084, + 4086, 4087, 4090, 4091, 4095, 4096, 4099, 4104, 4105, 4105, + 4112, 4119, 4120, 4123, 4124, 4127, 4128, 4131, 4132, 4135, + 4136, 4139, 4140, 4141, 4142, 4143, 4146, 4147, 4150, 4153, + 4154, 4157, 4158, 4159, 4167, 4168, 4171, 4178, 4181, 4207, + 4208, 4211, 4212, 4215, 4215, 4221, 4224, 4228, 4229, 4232, + 4259, 4271, 4270, 4280, 4286, 4296, 4304, 4307, 4308, 4311, + 4312, 4313, 4316, 4328, 4355, 4371, 4372, 4373, 4376, 4377 +}; +#endif + +#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +static const char *const yytname[] = +{ + "$end", "error", "$undefined", "LOW_PREC", "IDSTRING", "STRING", + "VARIABLE", "VARCOND", "SUBSCVAR", "LABELSTR", "CMD_LINE", + "ENVIRONMENT_VARIABLE", "INKEY", "ESCKEY", "CHAR", "MULTIPLIER", + "USAGENUM", "ZERONUM", "CONDITIONAL", "TO", "IS", "ARE", "THRU", "THAN", + "NO", "COMMENTING", "DIRECTION", "READ", "WRITE", "INPUT_OUTPUT", + "RELEASE", "NLITERAL", "CLITERAL", "PORTNUM", "DATE_TIME", "'+'", "'-'", + "'*'", "'/'", "POW_OP", "OR", "AND", "NOT", "ACCEPT", "ACCESS", "ADD", + "ADDRESS", "ADVANCING", "AFTER", "ALL", "ALPHABET", "ALPHABETIC", + "ALPHABETIC_LOWER", "ALPHABETIC_UPPER", "ALPHANUMERIC", + "ALPHANUMERIC_EDITED", "ALSO", "ALTERNATE", "ANY", "AREA", "AREAS", + "ASSIGN", "AT", "AUTHOR", "AUTO", "BACKGROUNDCOLOR", "BEFORE", "BELL", + "BLANK", "BLINK", "BLOCK", "BOTTOM", "BY", "CALL", "CALL_CONV_C", + "CALL_CONV_STDCALL", "CALL_LOADLIB", "CANCEL", "CENTER", "CF", "CH", + "CHAIN", "CHAINING", "CHARACTER", "CHARACTERS", "CLASS", "CLOSE", "CODE", + "CODE_SET", "COLLATING", "COLOR", "COLUMN", "COLUMNS", "COMMA", "COMMON", + "COMPUTE", "CONFIGURATION", "CONSOLE", "CONTAINS", "CONTENT", "CONTINUE", + "CONTROL", "CONTROLS", "CONVERTING", "CORRESPONDING", "COUNT", + "CURRENCY", "CURSOR", "DATA", "DATE_COMPILED", "DATE_WRITTEN", "DE", + "DEBUGGING", "DECIMAL_POINT", "DECLARATIVES", "DELETE", "DELIMITED", + "DELIMITER", "DEPENDING", "DETAIL", "DISPLAY", "DISPLAY_SCREEN", + "DIVIDE", "DIVISION", "DOWN", "DUPLICATES", "DYNAMIC", "ELSE", "END", + "END_ACCEPT", "END_ADD", "END_CALL", "END_CALL_LOADLIB", "END_CHAIN", + "END_COMPUTE", "END_DELETE", "END_DISPLAY", "END_DIVIDE", "END_EVALUATE", + "END_IF", "END_MULTIPLY", "END_OF_PAGE", "END_PERFORM", "END_READ", + "END_RETURN", "END_REWRITE", "END_SEARCH", "END_START", "END_STRINGCMD", + "END_SUBTRACT", "END_UNSTRING", "END_WRITE", "ENVIRONMENT", "EOL", "EOS", + "ERASE", "ERROR_TOK", "EVALUATE", "EXCEPTION", "EXIT", "EXTEND", + "EXTERNAL", "FALSE_TOK", "FD", "FILE_CONTROL", "FILE_ID", "FILE_TOK", + "FILLER", "FINAL", "FIRST", "FOOTING", "FOR", "FOREGROUNDCOLOR", "FROM", + "FULL", "FUNCTION", "GENERATE", "GIVING", "GLOBAL", "GO", "GOBACK", + "GROUP", "HEADING", "HIGHLIGHT", "HIGHVALUES", "IDENTIFICATION", "IF", + "IGNORE", "IN", "INDEXED", "INDICATE", "INITIALIZE", "INITIAL_TOK", + "INITIATE", "INPUT", "INSPECT", "INSTALLATION", "INTO", "INVALID", "I_O", + "I_O_CONTROL", "JUSTIFIED", "KEY", "LABEL", "LAST", "LEADING", "LEFT", + "LENGTH", "LIMIT", "LIMITS", "LINAGE", "LINE", "LINES", "LINKAGE", + "LISTSEP", "LOCK", "LOWER", "LOWLIGHT", "LOWVALUES", "LPAR", "MERGE", + "MINUS", "MODE", "MOVE", "MULTIPLE", "MULTIPLY", "NATIVE", "NEGATIVE", + "NEXT", "NOECHO", "NOTEXCEP", "NULL_TOK", "NUMBER", "NUMBERS", "NUMERIC", + "NUMERIC_EDITED", "OBJECT_COMPUTER", "OCCURS", "OF", "OFF", "OMITTED", + "ON", "ONLY", "OPEN", "OPTIONAL", "ORDER", "ORGANIZATION", "OTHER", + "OUTPUT", "OVERFLOW_TOK", "PADDING", "PAGE", "PAGE_COUNTER", "PARAGRAPH", + "PERFORM", "PF", "PH", "PICTURE", "PLUS", "POINTER", "POSITION", + "POSITIVE", "PREVIOUS", "PROCEDURE", "PROCEED", "PROGRAM", "PROGRAM_ID", + "QUOTES", "RANDOM", "RD", "READY", "RECORD", "RECORDS", "REDEFINES", + "REEL", "REFERENCE", "RELATIVE", "REMAINDER", "REMOVAL", "RENAMES", + "REPLACING", "REPORT", "REPORTS", "REQUIRED", "RESERVE", "RESET", + "RETURN", "RETURNING", "REVERSEVIDEO", "REWIND", "REWRITE", "RF", "RH", + "RIGHT", "ROUNDED", "RUN", "SAME", "SCREEN", "SD", "SEARCH", "SECTION", + "SECURE", "SECURITY", "SELECT", "SENTENCE", "SEPARATE", "SEQUENCE", + "SEQUENTIAL", "SET", "SIGN", "SIZE", "SORT", "SORT_MERGE", "SOURCE", + "SOURCE_COMPUTER", "SPACES", "SPECIAL_NAMES", "STANDARD", "STANDARD_1", + "STANDARD_2", "START", "STATUS", "STD_ERROR", "STD_OUTPUT", "STOP", + "STRINGCMD", "SUBTRACT", "SUM", "SYNCHRONIZED", "TALLYING", "TAPE", + "TCOBPROTO1", "TCOBPROTO2", "TERMINATE", "TEST", "THEN", "TIMES", + "TOKDUMMY", "TOP", "TRACE", "TRAILING", "TRUE_TOK", "TYPE", "UNDERLINE", + "UNIT", "UNLOCK", "UNSTRING", "UNTIL", "UP", "UPDATE", "UPON", "UPPER", + "USAGE", "USE", "USING", "VALUE", "VALUES", "VARYING", "WHEN", "WITH", + "WORKING_STORAGE", "ZERO", "PERIOD_TOK", "'.'", "'('", "')'", "','", + "':'", "$accept", "root_", "program_sequences", "program_sequence", + "$@1", "end_program", "$@2", "program", "identification_division", "$@3", + "$@4", "$@5", "programid_opts_opt", "programid_program_opt", + "identification_division_options_opt", "identification_division_option", + "environment_division_opt", "$@6", "configuration_opt", + "configuration_section", "configuration_option", "$@7", "$@8", + "program_collating_opt", "collating_sequence", "collating_opt", + "debug_mode_opt", "special_names_opt", "special_names", "special_name", + "currency_details", "sign_opt", "special_name_class", + "special_name_class_item_list", "special_name_class_item", + "decimal_point_details", "screen_status_details", "cursor_details", + "switches_details_list", "switches_details", "$@9", "switch_on_opt", + "switch_off_opt", "status_opt", "alphabet_details", "alphabet_type", + "alphabet_literal_list", "alphabet_literal_item", "alphabet_also_list", + "input_output_opt", "input_output_section", "file_control_paragraph", + "i_o_control_paragraph", "file_control", "file_select", "$@10", + "select_clauses", "select_clause", "file_opt", "organization_opt", + "assign_clause", "with_duplicates", "optional_opt", "areas_opt", + "is_opt", "are_opt", "mode_opt", "organization_options", + "access_options", "i_o_control_opt", "i_o_control_list", + "i_o_control_clause", "i_o_control_same_clause", "same_clause_options", + "i_o_control_multiple_file_tape_clause", + "i_o_control_multiple_file_list", "i_o_control_multiple_file", + "i_o_control_multiple_file_position_opt", "tape_opt", "are_opta", + "for_opt", "string_list", "name_list", "data_division_opt", "$@11", + "file_section_opt", "$@12", "working_storage_opt", "$@13", + "linkage_section_opt", "$@14", "report_section_opt", "report_sections", + "report_section", "$@15", "$@16", "$@17", "report_controls", + "report_control", "report_controls_control", "report_controls_page", + "heading_opt", "line_lines_opt", "lines_opt", "control_is_are", + "limit_is_are_opt", "footing_opt", "last_detail_opt", "first_detail_opt", + "final_opt", "report_break_list", "report_description", "report_item", + "$@18", "report_clauses", "report_clause", "report_clause_type", + "report_clause_type2", "$@19", "$@20", "$@21", "$@22", + "report_clause_sign_is", "report_clause_picture", "$@23", + "report_clause_usage_display", "report_clause_justified", + "report_clause_next_group", "report_clause_line", + "report_clause_line_is", "report_clause_column", + "report_clause_column_is", "report_clause_column_orientation", + "is_are_opt", "report_clause_svs", "$@24", "$@25", "$@26", + "gname_page_counter", "report_clause_group_indicate", + "report_clause_blank_zero", "indicate_opt", "upon_opt", "reset_opt", + "number_opt", "leading_trailing", "right_opt", "name_final_opt", + "integer_on_next_page", "of_opt", "screen_section_opt", "$@27", + "screen_section", "screen_item", "$@28", "screen_clauses", "$@29", + "$@30", "$@31", "$@32", "$@33", "$@34", "screen_source_destination", + "$@35", "$@36", "$@37", "screen_to_name", "screen_attrib", + "screen_attribx", "sign_clause", "separate_opt", "character_opt", + "sign_is_opt", "plus_minus_opt", "number_is_opt", "file_section", "$@38", + "$@39", "$@40", "$@41", "$@42", "$@43", "file_description", + "field_description", "$@44", "data_clauses", "redefines_clause", "$@45", + "redefines_var", "data_clause", "$@46", "sync_options", "thru_gname_opt", + "array_options", "$@47", "$@48", "$@49", "key_is_opt", "indexed_by_opt", + "index_name_list", "usage_option", "usage", "value_option", + "value_is_are", "value_list", "value", "pictures", "$@50", "picture", + "pic_elem", "multiplier_opt", "file_description_fd_clauses", + "file_description_sd_clauses", "file_description_fd_clause", + "file_description_sd_clause", "file_description_clause_block", + "file_description_clause_record", "file_description_clause_label", + "file_description_clause_value", "file_description_clause_data", + "file_description_clause_report", "file_description_clause_code_set", + "file_description_clause_linage", + "file_description_clause_linage_footing", + "file_description_clause_linage_top", + "file_description_clause_linage_bottom", "lines_at_opt", "report_is_are", + "var_strings", "chars_or_recs_opt", "to_integer_opt", + "depend_rec_varying", "from_rec_varying", "from_opt", "to_rec_varying", + "record_is_are", "std_or_omitt", "usage_opt", "times_opt", "when_opt", + "contains_opt", "character_opts", "order_opt", "data_opt", + "working_storage_section", "linkage_section", "procedure_division_opt", + "$@51", "$@52", "procedure_division", "procedure_decl", "$@53", "$@54", + "declaratives_opt", "$@55", "declaratives_division", "declaratives_decl", + "$@56", "$@57", "declaratives_procedure", "$@58", "use_phrase", + "use_phrase_exception_error", "use_phrase_option", "procedure_section", + "paragraph", "dot_or_eos", "statement_list", "statements", "statement", + "perform_statement", "if_statement", "$@59", "@60", "$@61", + "search_statement", "evaluate_statement", "@62", "$@63", + "end_evaluate_or_eos", "selection_subject_set", "@64", "@65", + "selection_subject", "when_case_list", "@66", "@67", "@68", "@69", + "$@70", "when_case", "@71", "@72", "selection_object", + "sentence_or_nothing", "if_part", "@73", "conditional_statement", "$@74", + "$@75", "not_opt", "end_if_opt", "end_then_opt", "search", "@76", "@77", + "@78", "search_all", "@79", "$@80", "search_varying_opt", + "search_at_end", "@81", "search_when_list", "search_when", "@82", + "search_when_statement", "search_when_conditional", + "search_all_when_list", "search_all_when", "$@83", "@84", + "search_all_when_statement", "search_all_when_conditional", "@85", + "end_search_opt", "unlock_statement", "proto_statement", + "trace_statement", "initiate_statement", "generate_statement", + "terminate_statement", "cancel_statement", "merge_statement", "$@86", + "$@87", "$@88", "merge_using", "sort_statement", "sort_file", "$@89", + "$@90", "$@91", "sort_variable_indexed", "$@92", "sort_keys", + "sort_keys_idx", "sort_key", "sort_key_idx", "sort_keys_names", + "sort_keys_names_idx", "sort_duplicates_opt", "sort_collating_opt", + "sort_input", "sort_output", "sort_file_list", "move_statement", + "initialize_statement", "initialize_replacing_opt", + "initialize_replacing_lists", "initialize_replacing_list", + "initialize_type_list", "compute_statement", "compute_body", + "end_compute_opt", "add_statement", "add_body", "add_to_opt", + "end_add_opt", "subtract_statement", "subtract_body", "end_subtract_opt", + "multiply_statement", "multiply_body", "end_multiply_opt", + "divide_statement", "divide_body", "end_divide_opt", "accept_statement", + "accept_hardware", "accept_chronological", "accept_screen", "$@93", + "@94", "$@95", "end_accept_opt", "display_statement", "display_line", + "display_screen", "display_varlist", "display_upon", + "display_line_options", "end_display_opt", "scr_line", "scr_position", + "scr_line_position", "accept_display_options", "accept_display_option", + "open_statement", "open_options", "open_mode", "open_varlist", + "close_statement", "close_files", "close_file", "close_options_opt", + "close_options", "with_lock_opt", "return_statement", "return_body", + "read_statement", "read_body", "read_next_opt", "read_into_opt", + "read_key_opt", "read_at_end_opt", "$@96", "$@97", "on_end", "@98", + "read_invalid_key_opt", "read_invalid_key", "@99", + "read_not_invalid_key", "@100", "end_read_opt", "end_return_opt", + "release_statement", "release_from_opt", "write_statement", "$@101", + "write_from_opt", "write_options", "end_write_opt", "rewrite_statement", + "$@102", "end_rewrite_opt", "delete_statement", "$@103", + "end_delete_opt", "start_statement", "$@104", "start_body", + "end_start_opt", "goto_statement", "goto_label", "goto_label_list", + "call_statement", "$@105", "@106", "@107", "@108", "$@109", + "call_convention_opt", "call_loadlib_statement", "$@110", + "end_call_loadlib_opt", "chain_statement", "$@111", "@112", "@113", + "$@114", "exit_statement", "stop_statement", "stop_literal", + "goback_statement", "var_list_name", "var_list_gname", "rounded_opt", + "on_size_error_opt", "$@115", "on_size_error", "@116", "size_opt", + "end_call_opt", "end_chain_opt", "set_statement", "set_list", + "set_target", "set_variable", "set_variable_or_nlit", "address_of_opt", + "string_statement", "$@117", "unstring_statement", "$@118", + "unstring_delimited", "unstring_delimited_vars", "unstring_destinations", + "unstring_dest_var", "unstring_delim_opt", "unstring_count_opt", + "unstring_tallying", "all_opt", "on_overflow_opt", "$@119", + "on_exception_or_overflow", "@120", "exception_or_overflow", + "on_not_exception", "@121", "on_overflow", "@122", "on_not_overflow", + "@123", "invalid_key_opt", "invalid_key_sentence", "@124", + "not_invalid_key_sentence", "@125", "not_excep", "string_with_pointer", + "string_from_list", "string_from", "delimited_by", "end_stringcmd_opt", + "end_unstring_opt", "inspect_statement", "$@126", "converting_clause", + "tallying_clause", "tallying_list", "tallying_for_list", + "replacing_clause", "replacing_list", "replacing_by_list", + "replacing_kind", "inspect_before_after", "initial_opt", "expr", + "expr_opt", "using_options", "@127", "@128", "returning_options", + "dummy", "using_parameters", "parm_list", "parameter", "parm_type", + "intrinsic_parm_list", "intrinsic_parm", "perform_range", + "perform_options", "@129", "$@130", "@131", "@132", "$@133", "@134", + "@135", "$@136", "@137", "@138", "@139", "perform_thru_opt", + "with_test_opt", "perform_after_opt", "perform_after", "@140", + "perform_statements", "$@141", "before_after", "condition", "$@142", + "@143", "@144", "implied_op_condition", "sign_condition", + "class_condition", "extended_cond_op", "ext_cond", "cond_op", + "conditional", "comma_opt", "sep_opt", "key_opt", "advancing_opt", + "than_to_opt", "record_opt", "at_opt", "in_opt", "in_of", "by_opt", + "with_opt", "on_opt", "gname_opt", "to_opt", "name_var_list", + "gname_list", "gname", "@145", "name_or_lit", "noallname", "gliteral", + "without_all_literal", "all_literal", "special_literal", + "var_or_nliteral", "nliteral", "literal", "signed_nliteral", + "def_name_opt", "def_name", "variable_indexed", "filename", "data_name", + "cond_name", "$@146", "name", "name_var", "variable", "$@147", + "qualified_var", "unqualified_var", "subscripts", "subscript", "integer", + "label", "anystring", 0 +}; +#endif + +# ifdef YYPRINT +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to + token YYLEX-NUM. */ +static const yytype_uint16 yytoknum[] = +{ + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 43, 45, 42, 47, 290, + 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, + 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, + 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, + 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, + 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, + 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, + 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, + 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, + 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, + 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, + 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, + 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, + 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, + 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, + 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, + 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, + 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, + 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, + 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, + 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, + 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, + 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, + 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, + 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, + 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, + 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, + 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, + 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, + 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, + 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, + 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, + 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, + 611, 612, 613, 46, 40, 41, 44, 58 +}; +# endif + +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint16 yyr1[] = +{ + 0, 368, 369, 370, 370, 370, 371, 372, 371, 371, + 374, 373, 375, 377, 378, 379, 376, 380, 380, 380, + 381, 381, 382, 382, 383, 383, 383, 383, 383, 385, + 384, 384, 386, 386, 387, 387, 389, 388, 390, 388, + 388, 388, 391, 391, 392, 393, 393, 394, 394, 395, + 395, 395, 396, 396, 397, 397, 397, 397, 397, 397, + 397, 398, 399, 399, 400, 401, 401, 402, 402, 403, + 404, 405, 406, 406, 408, 407, 409, 409, 410, 410, + 411, 411, 412, 413, 413, 413, 413, 414, 414, 415, + 415, 415, 416, 416, 417, 417, 418, 418, 419, 420, + 420, 421, 421, 423, 422, 424, 424, 425, 425, 425, + 425, 425, 425, 425, 425, 425, 426, 426, 427, 427, + 428, 428, 428, 428, 428, 429, 429, 430, 430, 431, + 431, 431, 432, 432, 433, 433, 434, 434, 435, 435, + 435, 435, 435, 436, 436, 436, 436, 437, 437, 438, + 438, 439, 439, 440, 441, 441, 441, 441, 442, 443, + 443, 444, 445, 445, 446, 446, 447, 447, 448, 448, + 449, 449, 449, 450, 450, 450, 452, 451, 451, 454, + 453, 453, 456, 455, 455, 458, 457, 457, 459, 459, + 460, 460, 462, 463, 464, 461, 465, 465, 466, 466, + 466, 466, 467, 468, 469, 469, 470, 470, 471, 471, + 472, 472, 473, 473, 473, 474, 474, 475, 475, 476, + 476, 477, 477, 478, 478, 479, 479, 481, 480, 482, + 482, 483, 483, 483, 483, 483, 483, 483, 483, 483, + 483, 483, 484, 485, 485, 486, 485, 485, 487, 485, + 485, 485, 485, 485, 488, 485, 485, 489, 485, 485, + 485, 490, 490, 492, 491, 493, 493, 494, 495, 496, + 496, 496, 496, 497, 497, 497, 497, 498, 499, 499, + 499, 499, 500, 500, 500, 500, 501, 501, 501, 503, + 502, 502, 504, 505, 502, 506, 506, 507, 507, 508, + 509, 509, 510, 510, 511, 511, 511, 512, 512, 513, + 513, 514, 514, 515, 515, 516, 516, 516, 517, 517, + 519, 518, 518, 520, 520, 522, 521, 524, 523, 525, + 523, 523, 526, 523, 527, 523, 528, 523, 523, 523, + 523, 529, 523, 523, 531, 530, 532, 530, 533, 530, + 534, 534, 535, 535, 535, 535, 535, 535, 535, 535, + 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, + 535, 535, 535, 535, 535, 535, 536, 536, 536, 536, + 536, 536, 536, 536, 536, 536, 536, 536, 536, 536, + 536, 536, 536, 536, 536, 536, 536, 536, 536, 536, + 536, 536, 537, 537, 538, 538, 539, 539, 540, 540, + 541, 541, 541, 541, 541, 542, 542, 544, 545, 546, + 543, 547, 548, 549, 543, 543, 543, 550, 550, 552, + 551, 553, 553, 553, 555, 554, 556, 556, 557, 557, + 557, 557, 557, 557, 557, 557, 557, 557, 558, 557, + 559, 559, 559, 560, 560, 562, 561, 563, 564, 561, + 565, 565, 566, 566, 567, 567, 568, 569, 569, 569, + 570, 571, 571, 572, 572, 573, 573, 575, 574, 576, + 576, 577, 578, 578, 579, 579, 580, 580, 581, 581, + 581, 581, 581, 581, 581, 581, 581, 581, 582, 582, + 583, 584, 584, 585, 586, 587, 588, 589, 590, 591, + 591, 592, 592, 593, 593, 594, 594, 594, 594, 595, + 595, 596, 596, 597, 597, 597, 598, 598, 599, 599, + 600, 600, 601, 601, 602, 602, 603, 603, 604, 604, + 605, 605, 606, 606, 607, 607, 608, 608, 609, 609, + 610, 610, 611, 611, 612, 612, 613, 613, 615, 616, + 614, 614, 617, 617, 618, 618, 619, 618, 620, 618, + 618, 622, 621, 621, 623, 623, 624, 624, 625, 624, + 626, 624, 628, 627, 627, 629, 629, 630, 630, 630, + 630, 631, 631, 632, 633, 634, 634, 635, 636, 636, + 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, + 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, + 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, + 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, + 637, 637, 637, 638, 640, 639, 641, 642, 639, 643, + 643, 645, 646, 644, 647, 647, 649, 648, 650, 648, + 651, 651, 651, 651, 653, 654, 652, 655, 656, 657, + 652, 659, 658, 660, 658, 658, 661, 661, 661, 661, + 661, 661, 662, 662, 664, 663, 666, 665, 667, 665, + 668, 668, 669, 669, 670, 670, 672, 673, 674, 671, + 676, 677, 675, 678, 678, 680, 679, 679, 681, 681, + 683, 682, 684, 684, 685, 686, 686, 688, 689, 687, + 690, 690, 691, 691, 692, 691, 693, 693, 694, 695, + 695, 696, 696, 697, 698, 699, 700, 700, 702, 703, + 704, 701, 705, 706, 706, 708, 709, 710, 707, 712, + 711, 713, 713, 714, 714, 715, 716, 717, 717, 718, + 718, 719, 719, 720, 720, 721, 721, 722, 722, 723, + 723, 724, 724, 724, 724, 725, 725, 726, 726, 727, + 727, 728, 729, 729, 729, 729, 729, 730, 730, 731, + 732, 732, 733, 733, 734, 734, 734, 735, 735, 736, + 736, 737, 737, 738, 738, 738, 739, 739, 740, 740, + 741, 741, 742, 742, 743, 743, 744, 744, 744, 744, + 744, 745, 745, 746, 746, 746, 746, 747, 747, 747, + 747, 747, 748, 749, 750, 751, 752, 749, 753, 753, + 754, 754, 754, 755, 756, 757, 757, 758, 758, 758, + 759, 759, 759, 759, 759, 759, 760, 760, 761, 762, + 762, 763, 763, 764, 764, 765, 765, 765, 765, 766, + 766, 767, 767, 768, 768, 768, 768, 768, 769, 769, + 770, 770, 771, 771, 772, 773, 773, 774, 774, 774, + 774, 774, 775, 775, 775, 776, 776, 777, 777, 778, + 778, 779, 779, 779, 780, 780, 780, 781, 781, 782, + 782, 783, 783, 783, 784, 783, 785, 783, 787, 786, + 788, 788, 788, 790, 789, 792, 791, 793, 793, 794, + 794, 795, 796, 796, 798, 797, 799, 799, 800, 800, + 800, 801, 801, 803, 802, 804, 804, 806, 805, 807, + 807, 809, 808, 810, 810, 811, 811, 812, 812, 813, + 814, 814, 814, 816, 817, 818, 819, 820, 815, 815, + 821, 821, 821, 823, 822, 822, 824, 824, 826, 827, + 828, 829, 825, 825, 830, 830, 830, 831, 831, 832, + 832, 833, 834, 834, 835, 835, 836, 836, 837, 837, + 837, 838, 837, 840, 839, 841, 841, 842, 842, 843, + 843, 844, 845, 845, 845, 845, 846, 846, 847, 847, + 848, 848, 848, 848, 848, 849, 849, 851, 850, 853, + 852, 854, 854, 855, 855, 856, 856, 857, 858, 858, + 859, 859, 860, 860, 861, 861, 863, 862, 865, 864, + 864, 866, 866, 868, 867, 867, 870, 869, 869, 872, + 871, 871, 873, 873, 873, 873, 875, 874, 877, 876, + 878, 878, 879, 879, 880, 880, 880, 881, 881, 882, + 882, 882, 883, 883, 884, 884, 886, 885, 885, 887, + 888, 888, 889, 889, 890, 890, 890, 890, 891, 891, + 892, 892, 892, 893, 893, 894, 894, 894, 894, 895, + 895, 895, 896, 896, 897, 897, 897, 897, 897, 897, + 897, 898, 898, 899, 900, 901, 899, 902, 902, 902, + 903, 904, 904, 904, 905, 905, 906, 906, 907, 907, + 907, 908, 908, 909, 910, 911, 912, 913, 911, 914, + 915, 916, 911, 917, 918, 919, 911, 911, 920, 911, + 911, 921, 922, 911, 923, 923, 924, 924, 925, 925, + 925, 925, 925, 925, 925, 927, 926, 929, 928, 930, + 930, 932, 931, 931, 933, 931, 934, 931, 931, 931, + 935, 935, 935, 936, 936, 936, 937, 937, 937, 937, + 938, 938, 938, 938, 938, 938, 939, 939, 939, 940, + 940, 940, 941, 942, 942, 943, 943, 944, 944, 945, + 945, 946, 946, 946, 947, 947, 948, 948, 949, 949, + 950, 950, 951, 951, 952, 952, 953, 953, 954, 954, + 955, 955, 956, 956, 957, 957, 958, 958, 959, 958, + 958, 960, 960, 961, 961, 962, 962, 963, 963, 964, + 964, 965, 965, 965, 965, 965, 966, 966, 967, 968, + 968, 969, 969, 969, 970, 970, 971, 971, 972, 973, + 973, 974, 974, 976, 975, 975, 977, 977, 977, 978, + 979, 980, 979, 981, 981, 982, 982, 983, 983, 984, + 984, 984, 985, 986, 986, 986, 986, 986, 987, 987 +}; + +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 1, 1, 1, 2, 2, 0, 4, 3, + 0, 4, 4, 0, 0, 0, 12, 0, 3, 3, + 0, 1, 0, 2, 2, 2, 2, 2, 2, 0, + 6, 0, 4, 0, 2, 0, 0, 6, 0, 6, + 3, 1, 2, 0, 4, 1, 0, 3, 0, 0, + 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, + 1, 4, 1, 0, 4, 1, 2, 1, 3, 3, + 4, 3, 0, 2, 0, 6, 4, 0, 4, 0, + 1, 0, 4, 1, 1, 1, 1, 1, 2, 1, + 3, 2, 2, 3, 4, 0, 2, 1, 3, 0, + 3, 1, 2, 0, 6, 2, 0, 3, 3, 4, + 4, 4, 4, 6, 3, 1, 1, 0, 1, 0, + 1, 1, 2, 2, 1, 2, 0, 1, 0, 1, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, + 1, 2, 1, 1, 1, 1, 1, 0, 2, 1, + 2, 1, 1, 5, 0, 1, 1, 1, 5, 1, + 2, 2, 0, 2, 1, 0, 1, 0, 1, 0, + 1, 2, 1, 1, 2, 1, 0, 9, 0, 0, + 5, 0, 0, 5, 0, 0, 5, 0, 4, 0, + 2, 0, 0, 0, 0, 8, 0, 2, 2, 2, + 1, 1, 3, 8, 0, 3, 1, 1, 0, 1, + 2, 2, 0, 2, 2, 0, 3, 0, 4, 0, + 4, 0, 1, 0, 2, 1, 2, 0, 5, 1, + 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 3, 2, 2, 0, 4, 1, 0, 4, + 2, 2, 1, 1, 0, 3, 1, 0, 3, 1, + 1, 5, 3, 0, 4, 3, 1, 2, 4, 5, + 4, 2, 3, 2, 3, 3, 2, 2, 3, 4, + 4, 3, 0, 1, 1, 1, 0, 1, 1, 0, + 4, 3, 0, 0, 6, 1, 1, 0, 2, 3, + 0, 1, 0, 2, 0, 2, 2, 0, 1, 1, + 1, 0, 1, 1, 1, 1, 2, 2, 1, 0, + 0, 5, 0, 2, 0, 0, 5, 0, 6, 0, + 6, 3, 0, 5, 0, 5, 0, 5, 2, 3, + 2, 0, 4, 0, 0, 3, 0, 4, 0, 3, + 0, 2, 2, 2, 2, 2, 1, 2, 1, 1, + 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, + 3, 2, 2, 3, 1, 1, 2, 2, 2, 2, + 1, 2, 1, 1, 1, 1, 1, 2, 2, 1, + 1, 1, 1, 1, 3, 2, 2, 3, 1, 1, + 2, 2, 3, 3, 2, 0, 1, 0, 2, 1, + 1, 1, 1, 1, 0, 2, 0, 0, 0, 0, + 9, 0, 0, 0, 9, 1, 0, 1, 2, 0, + 5, 0, 2, 2, 0, 3, 1, 1, 1, 1, + 1, 1, 1, 2, 2, 2, 2, 3, 0, 4, + 0, 1, 1, 0, 2, 0, 5, 0, 0, 11, + 4, 0, 4, 0, 1, 2, 3, 1, 1, 1, + 2, 2, 2, 1, 3, 1, 3, 0, 4, 0, + 2, 2, 0, 1, 0, 2, 0, 2, 2, 2, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 5, 5, 9, 3, 5, 3, 2, 3, 7, 0, + 4, 0, 3, 0, 3, 0, 1, 2, 1, 2, + 2, 1, 2, 0, 1, 1, 0, 2, 0, 3, + 0, 2, 1, 0, 0, 2, 2, 2, 1, 1, + 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 2, 0, 0, 2, 0, 0, + 8, 0, 0, 2, 1, 1, 0, 3, 0, 3, + 1, 0, 8, 0, 0, 2, 1, 1, 0, 3, + 0, 3, 0, 3, 1, 7, 1, 1, 1, 2, + 2, 1, 1, 3, 2, 1, 1, 1, 1, 2, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 2, 0, 3, 0, 0, 6, 3, + 4, 0, 0, 6, 1, 1, 0, 2, 0, 4, + 1, 1, 1, 1, 0, 0, 5, 0, 0, 0, + 7, 0, 2, 0, 4, 1, 1, 1, 1, 2, + 4, 2, 0, 1, 0, 5, 0, 2, 0, 3, + 0, 1, 0, 1, 0, 1, 0, 0, 0, 7, + 0, 0, 5, 2, 0, 0, 4, 0, 1, 2, + 0, 4, 1, 2, 3, 1, 2, 0, 0, 5, + 1, 2, 5, 5, 0, 4, 0, 1, 2, 2, + 3, 2, 2, 2, 2, 2, 2, 2, 0, 0, + 0, 9, 2, 1, 1, 0, 0, 0, 10, 0, + 6, 1, 2, 1, 2, 4, 4, 1, 2, 1, + 2, 0, 4, 0, 1, 4, 2, 4, 2, 1, + 2, 4, 5, 6, 3, 3, 1, 0, 2, 1, + 2, 4, 1, 1, 1, 1, 1, 3, 1, 4, + 0, 1, 3, 1, 4, 5, 6, 0, 2, 0, + 1, 3, 1, 4, 6, 6, 0, 1, 3, 1, + 6, 4, 0, 1, 3, 1, 6, 9, 9, 6, + 4, 0, 1, 1, 1, 1, 1, 5, 6, 5, + 5, 6, 5, 4, 0, 0, 0, 11, 0, 1, + 1, 1, 1, 5, 4, 1, 3, 2, 2, 2, + 0, 4, 3, 4, 4, 4, 0, 1, 3, 3, + 2, 2, 2, 0, 2, 2, 1, 1, 1, 2, + 1, 2, 3, 1, 1, 1, 1, 1, 1, 3, + 2, 1, 1, 3, 2, 1, 1, 3, 1, 1, + 3, 3, 2, 3, 0, 3, 1, 3, 4, 3, + 1, 6, 7, 7, 0, 1, 1, 0, 2, 0, + 3, 3, 2, 1, 0, 6, 0, 5, 0, 3, + 1, 1, 2, 0, 4, 0, 5, 0, 1, 0, + 1, 3, 0, 2, 0, 7, 0, 2, 0, 4, + 3, 0, 1, 0, 6, 0, 1, 0, 6, 0, + 1, 0, 5, 1, 5, 0, 1, 3, 6, 1, + 1, 2, 3, 0, 0, 0, 0, 0, 13, 1, + 0, 1, 1, 0, 4, 1, 1, 0, 0, 0, + 0, 0, 9, 1, 1, 2, 2, 2, 2, 1, + 1, 1, 3, 4, 2, 3, 0, 1, 0, 4, + 3, 0, 8, 0, 3, 0, 1, 0, 1, 0, + 1, 2, 4, 4, 4, 5, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 0, 2, 0, 8, 0, + 10, 3, 0, 2, 4, 1, 3, 3, 0, 3, + 0, 3, 0, 3, 0, 1, 0, 3, 0, 4, + 0, 1, 1, 0, 5, 0, 0, 4, 0, 0, + 5, 0, 1, 1, 2, 0, 0, 4, 0, 5, + 1, 1, 3, 0, 1, 3, 1, 1, 4, 1, + 1, 1, 0, 1, 0, 1, 0, 5, 3, 5, + 2, 0, 4, 0, 3, 4, 4, 0, 2, 0, + 5, 3, 0, 5, 0, 1, 1, 1, 1, 4, + 4, 0, 1, 0, 1, 3, 3, 3, 3, 3, + 3, 0, 1, 0, 0, 0, 5, 0, 2, 2, + 0, 0, 2, 2, 3, 1, 1, 3, 1, 1, + 1, 3, 1, 1, 2, 2, 0, 0, 6, 0, + 0, 0, 8, 0, 0, 0, 15, 2, 0, 6, + 4, 0, 0, 14, 0, 2, 0, 3, 0, 2, + 4, 6, 8, 10, 12, 0, 8, 0, 2, 1, + 1, 0, 4, 2, 0, 4, 0, 4, 3, 1, + 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 3, 4, 1, 3, 3, 1, 1, 1, 1, + 2, 3, 2, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, + 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, + 0, 1, 1, 3, 1, 3, 1, 1, 0, 6, + 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, + 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 2, 2, 1, 0, 1, 1, 1, 1, + 1, 1, 1, 0, 5, 1, 6, 1, 1, 1, + 1, 0, 5, 1, 3, 1, 1, 1, 3, 1, + 3, 3, 1, 3, 1, 1, 3, 3, 1, 1 +}; + +/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state + STATE-NUM when YYTABLE doesn't specify something else to do. Zero + means the default is an error. */ +static const yytype_uint16 yydefact[] = +{ + 0, 0, 0, 2, 4, 3, 31, 0, 1, 5, + 0, 0, 6, 0, 178, 0, 9, 10, 0, 7, + 0, 0, 561, 0, 0, 8, 0, 29, 0, 0, + 12, 13, 11, 33, 176, 558, 0, 0, 95, 181, + 1131, 14, 0, 0, 30, 0, 184, 0, 0, 0, + 133, 35, 0, 0, 0, 187, 1295, 1296, 1288, 1271, + 1270, 0, 0, 0, 0, 1264, 1265, 1263, 1261, 1262, + 1215, 1244, 1247, 1255, 1256, 1258, 1257, 1269, 1246, 1287, + 1290, 1293, 1215, 559, 132, 0, 0, 0, 0, 179, + 0, 0, 189, 1272, 1273, 1260, 1259, 1250, 1216, 0, + 0, 1291, 1230, 1231, 0, 573, 15, 20, 20, 41, + 0, 0, 0, 34, 97, 0, 94, 99, 0, 182, + 0, 0, 322, 1248, 1245, 0, 0, 1294, 0, 562, + 22, 21, 19, 18, 38, 36, 0, 0, 0, 96, + 425, 180, 555, 185, 0, 0, 177, 0, 1239, 1299, + 1213, 1297, 571, 0, 16, 0, 0, 51, 0, 0, + 63, 133, 133, 0, 40, 72, 52, 56, 60, 57, + 58, 59, 54, 55, 128, 98, 101, 147, 417, 421, + 183, 556, 191, 0, 1215, 1142, 1143, 0, 1238, 1292, + 1214, 0, 0, 0, 0, 568, 0, 570, 563, 0, + 564, 565, 0, 0, 0, 0, 0, 23, 43, 48, + 133, 133, 62, 133, 0, 0, 133, 50, 53, 133, + 73, 127, 0, 102, 0, 154, 100, 0, 149, 151, + 152, 0, 0, 554, 1302, 1275, 186, 188, 320, 1249, + 0, 1286, 1298, 1300, 1301, 584, 0, 574, 582, 0, + 0, 596, 595, 594, 900, 0, 0, 826, 793, 969, + 975, 0, 983, 881, 788, 642, 0, 842, 815, 651, + 984, 0, 1240, 991, 0, 776, 0, 0, 0, 0, + 809, 0, 1177, 0, 0, 896, 0, 0, 0, 0, + 0, 0, 0, 802, 0, 0, 0, 0, 0, 0, + 598, 618, 639, 641, 640, 644, 638, 634, 635, 631, + 632, 633, 637, 627, 626, 743, 744, 600, 601, 602, + 603, 604, 605, 606, 607, 823, 824, 825, 608, 840, + 841, 609, 610, 612, 611, 613, 614, 615, 616, 617, + 619, 622, 623, 624, 620, 621, 636, 625, 629, 630, + 628, 24, 26, 25, 27, 28, 46, 0, 1235, 0, + 0, 0, 0, 0, 71, 69, 0, 0, 1276, 1277, + 103, 165, 155, 156, 157, 167, 148, 150, 418, 422, + 429, 1274, 557, 192, 190, 324, 1141, 0, 0, 569, + 593, 927, 904, 936, 932, 863, 0, 799, 797, 1215, + 970, 973, 737, 736, 0, 880, 882, 894, 790, 0, + 996, 1224, 863, 845, 821, 0, 656, 985, 986, 734, + 1241, 0, 1285, 0, 0, 0, 684, 1114, 1189, 777, + 733, 1091, 1236, 0, 0, 0, 812, 0, 877, 876, + 873, 874, 875, 0, 0, 1304, 1305, 643, 0, 0, + 0, 0, 0, 1164, 731, 732, 929, 1224, 936, 1278, + 0, 726, 696, 175, 319, 1016, 1011, 0, 0, 1017, + 173, 1296, 1236, 1236, 1065, 953, 990, 989, 987, 988, + 1076, 1215, 1074, 1077, 0, 806, 0, 729, 0, 735, + 728, 1032, 567, 599, 646, 692, 45, 42, 0, 39, + 37, 0, 83, 84, 85, 82, 86, 87, 89, 67, + 64, 65, 61, 70, 74, 106, 164, 546, 166, 169, + 484, 486, 431, 0, 321, 584, 0, 575, 0, 576, + 577, 586, 0, 583, 928, 899, 905, 906, 1224, 0, + 938, 0, 931, 0, 838, 0, 800, 792, 0, 0, + 1215, 994, 971, 972, 0, 977, 1123, 0, 888, 889, + 884, 885, 886, 0, 791, 787, 0, 996, 997, 1215, + 1225, 947, 0, 850, 856, 0, 822, 814, 0, 0, + 652, 0, 1304, 1305, 957, 0, 959, 1283, 1183, 0, + 0, 1221, 0, 0, 0, 0, 0, 0, 133, 1197, + 1198, 1199, 1194, 1196, 1193, 1195, 1208, 1207, 1181, 1203, + 1206, 1186, 1184, 694, 0, 775, 0, 1093, 1088, 1086, + 1237, 738, 751, 0, 1289, 0, 0, 774, 813, 808, + 0, 0, 871, 878, 0, 0, 1149, 0, 1145, 1178, + 597, 0, 1146, 0, 1157, 930, 895, 907, 943, 726, + 700, 727, 649, 704, 318, 1026, 174, 1025, 0, 0, + 0, 749, 753, 0, 745, 1071, 1217, 1070, 951, 1062, + 1063, 0, 133, 0, 0, 1232, 0, 807, 801, 0, + 730, 1232, 0, 686, 693, 645, 133, 47, 88, 0, + 0, 91, 0, 66, 77, 0, 547, 0, 168, 0, + 133, 0, 133, 193, 323, 1275, 0, 0, 0, 0, + 907, 937, 1180, 1179, 934, 1219, 933, 838, 0, 838, + 838, 838, 0, 0, 307, 839, 307, 0, 833, 866, + 867, 868, 864, 1234, 0, 0, 998, 798, 996, 0, + 995, 1123, 976, 974, 1124, 979, 883, 0, 0, 0, + 0, 892, 0, 998, 1215, 992, 1065, 847, 849, 848, + 856, 857, 844, 846, 0, 998, 0, 658, 0, 663, + 662, 657, 660, 661, 1236, 0, 961, 0, 1120, 1188, + 1222, 1223, 1212, 0, 1200, 1117, 1118, 1115, 1116, 1119, + 0, 1121, 0, 0, 0, 695, 686, 782, 783, 785, + 784, 786, 778, 779, 552, 0, 1254, 1253, 1090, 1099, + 46, 752, 1217, 0, 0, 771, 1242, 998, 0, 872, + 0, 1303, 1307, 1306, 0, 0, 1167, 1177, 1165, 0, + 0, 0, 897, 1065, 650, 707, 0, 697, 0, 0, + 0, 1025, 761, 754, 1217, 761, 1218, 1066, 955, 1064, + 1217, 0, 1073, 1075, 1233, 0, 0, 998, 0, 1044, + 0, 647, 0, 0, 0, 90, 92, 0, 68, 81, + 79, 115, 137, 0, 1240, 116, 118, 1217, 1217, 0, + 104, 105, 0, 133, 162, 158, 159, 172, 170, 153, + 546, 133, 0, 0, 133, 546, 133, 135, 0, 419, + 0, 485, 490, 491, 492, 493, 494, 495, 497, 496, + 0, 423, 487, 498, 499, 544, 450, 0, 477, 434, + 448, 133, 450, 541, 133, 135, 430, 409, 441, 0, + 433, 432, 438, 440, 442, 0, 439, 133, 196, 325, + 581, 572, 579, 588, 587, 0, 0, 894, 1065, 1220, + 0, 829, 838, 827, 830, 832, 838, 861, 862, 308, + 0, 0, 860, 386, 0, 544, 389, 380, 0, 383, + 393, 0, 399, 392, 384, 390, 385, 391, 398, 409, + 865, 382, 0, 834, 996, 1236, 794, 0, 998, 1127, + 1130, 980, 890, 891, 887, 893, 0, 789, 993, 949, + 843, 0, 0, 820, 0, 0, 664, 0, 0, 962, + 1213, 1201, 0, 1204, 1122, 1182, 1205, 0, 1192, 1190, + 1187, 0, 1209, 1185, 685, 780, 553, 0, 0, 0, + 1102, 1087, 764, 739, 0, 772, 0, 0, 811, 0, + 879, 1150, 0, 1147, 1158, 0, 1160, 908, 1226, 0, + 918, 898, 913, 945, 1227, 701, 0, 703, 707, 1023, + 1022, 1021, 1024, 1012, 1020, 1252, 1251, 1014, 1267, 1268, + 1266, 1013, 0, 763, 0, 0, 763, 0, 956, 952, + 1068, 0, 0, 1027, 0, 1081, 1080, 1078, 1079, 996, + 803, 0, 1045, 1031, 0, 1073, 1035, 1038, 692, 687, + 0, 44, 93, 80, 133, 81, 75, 136, 133, 1217, + 0, 133, 133, 131, 133, 0, 0, 161, 160, 171, + 0, 0, 133, 135, 0, 0, 0, 0, 0, 519, + 134, 520, 0, 0, 488, 489, 506, 0, 545, 0, + 451, 452, 444, 542, 133, 0, 0, 408, 443, 471, + 472, 445, 446, 405, 405, 470, 473, 475, 0, 133, + 343, 590, 589, 1236, 909, 0, 941, 940, 208, 831, + 828, 859, 858, 401, 377, 376, 0, 378, 379, 400, + 388, 387, 0, 381, 395, 396, 0, 998, 0, 0, + 795, 0, 0, 964, 1125, 1050, 950, 948, 0, 852, + 998, 996, 998, 996, 659, 665, 654, 667, 655, 653, + 958, 1284, 1202, 1210, 1191, 0, 0, 1111, 1097, 1098, + 0, 755, 757, 773, 1243, 998, 1177, 1232, 0, 0, + 0, 0, 912, 0, 1226, 946, 944, 0, 705, 698, + 1019, 1015, 1018, 750, 1228, 756, 759, 746, 1067, 0, + 954, 1046, 0, 998, 998, 1044, 1033, 1042, 0, 1228, + 1040, 648, 689, 0, 133, 0, 133, 124, 1280, 120, + 0, 108, 1279, 121, 0, 0, 129, 130, 114, 0, + 1308, 1309, 138, 0, 140, 139, 107, 142, 163, 526, + 507, 536, 537, 521, 505, 539, 538, 503, 1282, 1281, + 208, 1228, 534, 133, 420, 427, 424, 447, 0, 543, + 455, 479, 436, 437, 435, 453, 407, 402, 403, 0, + 0, 467, 468, 469, 466, 0, 133, 135, 212, 194, + 0, 197, 200, 201, 221, 1234, 0, 133, 901, 942, + 935, 207, 209, 939, 206, 394, 397, 835, 796, 0, + 1003, 1000, 1129, 1128, 965, 1232, 981, 0, 851, 854, + 853, 855, 816, 1215, 819, 1215, 671, 668, 1211, 781, + 1089, 1092, 1105, 0, 1108, 1106, 1107, 1104, 0, 740, + 758, 810, 1151, 0, 1148, 1159, 0, 911, 1226, 919, + 916, 717, 702, 715, 0, 0, 1229, 550, 760, 0, + 1069, 1082, 1058, 1072, 805, 804, 0, 1228, 1029, 1036, + 0, 1228, 1037, 76, 0, 144, 145, 143, 109, 146, + 0, 122, 123, 111, 112, 110, 141, 0, 523, 522, + 509, 1005, 0, 548, 0, 428, 542, 463, 478, 0, + 449, 406, 404, 474, 476, 199, 210, 211, 0, 0, + 0, 0, 198, 222, 223, 348, 329, 346, 327, 341, + 344, 326, 338, 0, 340, 1234, 0, 592, 1215, 0, + 1226, 1217, 902, 903, 920, 921, 0, 999, 0, 1236, + 966, 1126, 1135, 0, 1136, 1009, 1051, 1052, 1048, 0, + 0, 675, 686, 690, 671, 1113, 1113, 0, 1111, 0, + 0, 1101, 742, 769, 0, 0, 0, 1232, 914, 0, + 0, 716, 706, 0, 699, 708, 551, 762, 0, 0, + 747, 1083, 1028, 1061, 0, 1034, 0, 1046, 1039, 0, + 78, 126, 527, 524, 525, 500, 511, 0, 1006, 530, + 535, 549, 501, 504, 0, 1217, 0, 456, 482, 480, + 454, 213, 214, 208, 195, 225, 1275, 202, 0, 416, + 0, 416, 0, 0, 339, 362, 334, 544, 365, 336, + 356, 332, 359, 369, 0, 375, 368, 360, 366, 361, + 367, 374, 331, 358, 0, 585, 910, 1217, 923, 0, + 922, 836, 1004, 0, 1050, 1232, 1140, 1138, 1139, 0, + 1010, 982, 0, 998, 998, 673, 666, 683, 691, 676, + 678, 677, 672, 0, 669, 1112, 0, 0, 1111, 1094, + 1111, 1111, 0, 770, 0, 0, 741, 1152, 1153, 0, + 0, 917, 718, 133, 710, 0, 709, 133, 766, 0, + 1047, 1236, 1056, 1043, 1084, 1041, 113, 0, 518, 516, + 513, 0, 1226, 532, 534, 0, 457, 133, 1232, 483, + 481, 204, 226, 227, 224, 349, 133, 414, 350, 414, + 342, 345, 0, 353, 352, 0, 0, 354, 355, 0, + 364, 363, 0, 357, 371, 372, 925, 0, 838, 1001, + 1055, 1134, 1137, 1049, 817, 818, 690, 679, 681, 686, + 1110, 1109, 1095, 1096, 1100, 0, 768, 133, 0, 0, + 915, 724, 0, 0, 0, 0, 0, 748, 0, 0, + 1085, 1030, 125, 517, 508, 0, 0, 0, 548, 531, + 1236, 0, 0, 133, 219, 297, 415, 411, 413, 412, + 410, 0, 0, 347, 0, 335, 370, 337, 333, 373, + 0, 924, 837, 0, 1236, 967, 674, 0, 670, 1111, + 0, 1154, 1161, 0, 0, 720, 719, 1240, 0, 712, + 711, 714, 765, 1164, 1059, 1057, 0, 512, 510, 528, + 0, 460, 462, 464, 0, 0, 217, 544, 282, 282, + 266, 300, 311, 309, 286, 135, 0, 263, 133, 289, + 292, 310, 133, 133, 133, 0, 229, 233, 236, 235, + 234, 237, 232, 231, 0, 239, 0, 240, 241, 238, + 0, 330, 351, 328, 926, 1002, 0, 1007, 680, 1103, + 767, 1168, 0, 725, 721, 0, 713, 1144, 0, 514, + 1236, 502, 458, 465, 205, 133, 0, 215, 0, 284, + 283, 282, 282, 285, 286, 135, 301, 298, 312, 267, + 287, 288, 133, 135, 273, 276, 133, 133, 0, 133, + 0, 0, 0, 0, 228, 230, 0, 271, 277, 407, + 1053, 1008, 968, 0, 1177, 1162, 723, 722, 1060, 0, + 463, 0, 133, 133, 203, 299, 133, 135, 278, 281, + 274, 275, 0, 479, 0, 0, 293, 257, 254, 0, + 256, 247, 0, 259, 253, 0, 260, 252, 242, 265, + 291, 272, 0, 0, 262, 0, 1169, 0, 1155, 1168, + 529, 459, 220, 0, 0, 279, 280, 0, 0, 268, + 315, 264, 407, 296, 290, 295, 302, 0, 0, 248, + 245, 250, 244, 251, 243, 270, 0, 1054, 0, 0, + 0, 1163, 218, 216, 317, 316, 261, 0, 304, 314, + 258, 313, 255, 0, 0, 269, 1170, 1232, 1156, 303, + 0, 294, 249, 246, 0, 0, 306, 305, 1171, 0, + 0, 1175, 1172, 0, 0, 1176, 1173, 0, 1174 +}; + +/* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int16 yydefgoto[] = +{ + -1, 2, 3, 4, 11, 12, 24, 5, 6, 36, + 50, 130, 85, 132, 154, 207, 14, 33, 38, 87, + 113, 156, 155, 357, 1032, 498, 359, 164, 165, 166, + 167, 213, 168, 510, 511, 169, 170, 171, 172, 220, + 694, 870, 1106, 1104, 173, 505, 506, 507, 691, 44, + 116, 117, 139, 175, 176, 515, 695, 881, 882, 883, + 1271, 1646, 222, 1278, 979, 1131, 1108, 1286, 1418, 226, + 227, 228, 229, 375, 230, 885, 886, 1117, 517, 519, + 699, 889, 465, 22, 39, 46, 118, 55, 142, 92, + 181, 122, 237, 384, 523, 938, 1451, 1159, 1331, 1332, + 1333, 1734, 1343, 1344, 1334, 1450, 1894, 1847, 1786, 1454, + 1557, 1554, 1555, 1735, 1805, 1806, 1807, 1918, 1974, 1973, + 1948, 1947, 1808, 1809, 1867, 1810, 1811, 1812, 1813, 1814, + 1815, 1816, 1854, 1864, 1817, 1869, 1870, 1946, 1944, 1818, + 1819, 1857, 1968, 1981, 960, 1820, 1859, 1970, 1939, 655, + 146, 385, 524, 704, 1160, 1335, 1561, 1559, 1679, 1672, + 1676, 1562, 1462, 1563, 1560, 1558, 1743, 1582, 980, 928, + 1317, 1442, 929, 1741, 1667, 141, 231, 520, 1133, 232, + 521, 1137, 1304, 1305, 522, 702, 930, 1145, 1314, 931, + 1146, 1142, 1440, 932, 1437, 1730, 1890, 1546, 1547, 1782, + 933, 1324, 934, 935, 1155, 1156, 936, 1144, 1438, 1549, + 1660, 700, 701, 901, 912, 902, 903, 904, 905, 906, + 907, 908, 909, 1536, 1650, 1724, 1651, 910, 1294, 1535, + 1428, 1841, 1654, 1655, 1433, 1124, 1297, 937, 1310, 1139, + 697, 1542, 1517, 1027, 180, 236, 30, 40, 105, 153, + 198, 199, 249, 129, 194, 387, 527, 528, 706, 247, + 388, 533, 946, 1466, 248, 201, 253, 639, 640, 300, + 301, 302, 495, 683, 1098, 303, 304, 416, 768, 1209, + 580, 581, 1005, 771, 1007, 1205, 1366, 1367, 1494, 1699, + 1492, 1493, 1696, 1612, 1606, 305, 613, 1607, 862, 863, + 1613, 685, 796, 461, 653, 1058, 1395, 649, 835, 1237, + 837, 1055, 1394, 1514, 1515, 1714, 1770, 1634, 1392, 1393, + 1510, 1712, 1766, 1632, 1763, 652, 306, 307, 308, 309, + 310, 311, 312, 313, 810, 1220, 1504, 1379, 314, 315, + 845, 1399, 1639, 316, 842, 621, 661, 622, 662, 1221, + 1245, 1073, 1033, 1520, 1626, 1502, 317, 318, 615, 802, + 803, 804, 319, 408, 565, 320, 397, 549, 547, 321, + 485, 678, 322, 436, 629, 323, 414, 577, 324, 325, + 326, 327, 1186, 1476, 1688, 728, 328, 329, 330, 412, + 573, 760, 762, 729, 730, 731, 544, 732, 331, 443, + 444, 632, 332, 405, 406, 560, 561, 562, 333, 456, + 334, 391, 538, 832, 1338, 1051, 1630, 1509, 1052, 1233, + 1473, 1474, 1687, 1475, 1750, 535, 646, 335, 542, 336, + 948, 540, 714, 1340, 337, 833, 1236, 338, 756, 1197, + 339, 848, 474, 1079, 340, 584, 585, 341, 400, 1354, + 1480, 1594, 1827, 554, 342, 555, 743, 343, 404, 991, + 1195, 1485, 344, 345, 479, 346, 409, 398, 569, 986, + 1753, 1351, 1478, 1539, 1882, 1601, 347, 466, 467, 1241, + 1063, 468, 348, 1251, 349, 1527, 682, 1093, 1095, 1096, + 1260, 1412, 1408, 1094, 1401, 1402, 1356, 1602, 1488, 1755, + 1925, 1523, 1719, 1640, 1838, 668, 669, 1077, 670, 1249, + 671, 1083, 481, 482, 1087, 1522, 1721, 350, 809, 618, + 619, 808, 1371, 1031, 1219, 1501, 1377, 1370, 1616, 425, + 1015, 745, 990, 1355, 1193, 1194, 49, 1481, 1482, 1599, + 184, 185, 1772, 447, 827, 1228, 824, 1226, 1505, 1708, + 1831, 1960, 1229, 1832, 1929, 644, 448, 1884, 1926, 1993, + 449, 450, 715, 588, 791, 794, 793, 1020, 606, 607, + 608, 609, 1021, 610, 191, 99, 847, 950, 782, 571, + 1056, 1397, 634, 1483, 451, 987, 187, 421, 815, 70, + 427, 147, 1064, 805, 72, 73, 74, 75, 1067, 1068, + 76, 77, 380, 381, 462, 1273, 1300, 428, 777, 78, + 625, 79, 126, 80, 81, 150, 151, 235, 1773, 1287 +}; + +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +#define YYPACT_NINF -1419 +static const yytype_int16 yypact[] = +{ + -63, 58, 215, -1419, -63, 255, 241, -102, -1419, 359, + 197, -63, -1419, 429, 534, 391, -1419, -1419, 493, 359, + 354, 619, 488, 459, 752, -1419, 359, -1419, 465, 805, + -1419, -1419, -1419, 838, -1419, -1419, 960, 671, 945, 816, + -7, -1419, 640, 705, -1419, 713, 660, 3109, 3109, 667, + 23, -1419, 680, 686, 740, 845, -1419, -1419, -1419, -1419, + -1419, 1025, 1031, 1365, 1055, -1419, -1419, -1419, -1419, -1419, + -118, -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, 711, + 850, 546, -53, -1419, -1419, 720, 495, 847, 251, -1419, + 722, 787, 812, -1419, -1419, -1419, -1419, 731, -1419, 3109, + 3109, -1419, -1419, -1419, 972, 983, -1419, 839, 839, -1419, + 738, 747, 749, -1419, -1419, 751, -1419, 907, 71, -1419, + 753, 824, 829, -1419, -1419, 762, 3109, -1419, 779, -1419, + -1419, -1419, -1419, -1419, -1419, -1419, 823, 830, 798, -1419, + -1419, 101, -1419, -1419, 806, 873, -1419, 3109, 3109, -1419, + 595, 835, -1419, 1913, 360, 1176, 1178, -1419, 1179, 1186, + 883, 1175, 1175, 876, -1419, 1046, -1419, -1419, -1419, -1419, + -1419, -1419, 1193, -1419, 955, 830, -1419, 414, -1419, -1419, + 866, -1419, -1419, 841, -5, -1419, -1419, 840, -1419, -1419, + -1419, 3109, 3109, 3109, 898, -1419, 402, -1419, -1419, 4434, + -1419, -1419, 848, 854, 855, 856, 859, -1419, 942, -20, + 1175, 1175, -1419, 1175, 1210, 1133, 1175, -1419, -1419, 1175, + -1419, -1419, 235, -1419, 1061, 525, -1419, 210, -1419, -1419, + -1419, 1223, 1225, -1419, -1419, 235, 866, 964, -1419, -1419, + 3109, -1419, 835, -1419, -1419, -1419, 934, -1419, -1419, 875, + 877, -1419, -1419, -1419, 985, 985, 985, 985, 1570, 1397, + 3109, 3159, 3209, 985, 985, -1419, 985, 3109, 3109, -1419, + -82, 985, 1221, -1419, 1538, 3109, 985, 985, 985, 2012, + 3109, 2221, 2139, 902, 903, 985, 985, 143, 780, 1009, + 985, 53, 832, 2725, 3109, 3109, 985, 985, 985, 3778, + -1419, -1419, -1419, -1419, -1419, 1121, -1419, -1419, -1419, -1419, + -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, + -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, + -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, + -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, + -1419, -1419, -1419, -1419, -1419, -1419, 1157, 888, -1419, 894, + 1145, 1381, 1229, 1231, -1419, -1419, 1259, 1260, -1419, -1419, + -1419, 938, -1419, -1419, -1419, 1208, -1419, -1419, -1419, -1419, + -1419, -1419, -1419, -1419, -1419, -1419, -1419, 3272, 44, -1419, + -1419, 1126, -24, 1097, 1099, 1102, 3109, 1148, 2786, 1065, + 912, -1419, 1365, -1419, 3109, 505, -1419, 108, 1146, 1037, + 987, 1012, 2508, -1419, 1147, 396, -1419, -1419, -1419, -1419, + -1419, 789, 922, 1538, 1538, 263, 969, -1419, -1419, 2678, + -1419, 30, 1053, 3109, 1049, 1278, 1158, 1227, -1419, -1419, + -1419, -1419, -1419, 2482, 985, 349, 352, -1419, 420, 1160, + 4434, 966, 968, 1283, -1419, -1419, 1165, 1012, 1097, -1419, + 1305, 1170, -1419, -1419, 1080, 972, -1419, 31, 972, -1419, + -1419, 81, 1053, 1053, 375, 1117, -1419, -1419, -1419, -1419, + -1419, 440, -1419, 1206, 3109, 1174, 2824, -1419, 3109, -1419, + -1419, 1209, -1419, -1419, -1419, 1187, -1419, -1419, 1022, -1419, + -1419, 1107, -1419, -1419, -1419, -1419, 1365, -1419, 614, 1308, + 1229, -1419, -1419, -1419, -1419, -1419, -1419, 1233, -1419, 1161, + -1419, -1419, -1419, 1329, 866, 973, 1224, -1419, 4434, -1419, + -1419, -1419, 1293, -1419, -1419, -1419, -1419, -1419, 1012, 3109, + 827, 3109, -1419, 683, 3349, 2859, -1419, -1419, 3109, 1173, + 1065, -1419, -1419, -1419, 3109, 1220, 988, 985, 313, 313, + -1419, -1419, -1419, 67, -1419, -1419, 1614, 987, -1419, 1065, + -1419, -1419, 13, -1419, 3419, 3109, -1419, -1419, 3109, 3109, + 1297, 1337, 546, 546, -1419, 565, 585, -1419, -1419, 986, + 25, 189, 278, 1614, 1614, 1614, 1614, 1614, 1175, -1419, + -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, 1314, + -1419, -1419, -1419, 1020, 406, -1419, 468, -1419, -1419, -1419, + -1419, 133, -1419, 1330, -1419, 1338, 3109, 3109, -1419, -1419, + 3109, 985, 505, -1419, 1352, 804, -1419, 985, -1419, -1419, + 4434, 827, -1419, 789, 2430, -1419, -1419, 1168, -1419, 1170, + -1419, -1419, -1419, 1005, -1419, -1419, -1419, 1320, 1295, 1298, + 1355, 133, -1419, 1345, 133, -1419, 1180, -1419, -1419, 182, + -1419, 1183, 1175, 985, 3109, 1311, 2839, -1419, -1419, 3109, + -1419, 1311, 1190, 1149, -1419, -1419, 1175, -1419, -1419, 1365, + 1365, 1332, 1358, -1419, 1150, 773, -1419, 1387, -1419, 811, + 317, -6, 965, -1419, -1419, 235, 1033, 1036, 3902, 130, + 1168, -1419, -1419, -1419, -1419, 1346, -1419, 1273, 1372, 1273, + 1273, 1273, 1086, 843, 1177, -1419, 1177, 1614, -1419, -1419, + -1419, -1419, -1419, 3609, 1252, 985, 261, -1419, 242, 985, + -1419, 988, -1419, -1419, -1419, -1419, -1419, 1136, 1144, 1122, + 1211, -1419, 1614, 512, 1065, -1419, 375, -1419, -1419, -1419, + 52, -1419, -1419, -1419, 1247, 261, 1250, -1419, 1072, -1419, + -1419, -1419, 263, 969, 1053, 789, -1419, 3109, -1419, -1419, + -1419, -1419, -1419, 46, 1395, 930, 930, 1399, 1399, -1419, + 46, 1614, 46, 1070, 1070, -1419, 1149, -1419, -1419, -1419, + -1419, -1419, 406, -1419, 1328, 1421, -1419, -1419, 985, 1162, + -16, -1419, 1180, 3109, 1422, 2871, -1419, 261, 1266, 505, + 985, -1419, -1419, -1419, 1538, 1272, -1419, -1419, -1419, 515, + 1111, 985, 540, 375, -1419, 78, 972, -1419, 941, 853, + 853, 1320, 4, -1419, 1180, 4, -1419, -1419, 1302, -1419, + 1180, 697, 294, -1419, -1419, 103, 985, 261, 1274, 1403, + 985, -1419, 4434, 1226, 1448, -1419, -1419, 1365, -1419, 1135, + 1218, -1419, 1236, 1189, 1221, -1419, -1419, 1180, 1180, 1430, + -1419, -1419, 1141, 1175, 1204, 1387, -1419, -1419, -1419, 1460, + 1233, 1175, 764, 764, 1175, 39, 1175, 1445, 1230, -1419, + 593, -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, + 1465, -1419, -1419, -1419, -1419, 1115, 457, 866, -1419, -1419, + -1419, 1175, 457, -1419, 1175, 1445, -1419, 678, -1419, 280, + -1419, -1419, -1419, -1419, -1419, 673, -1419, 1175, -1419, -1419, + -1419, -1419, -1419, -1419, -1419, 748, 1212, -84, 375, -1419, + 2904, -1419, 1273, -1419, -1419, -1419, 1273, -1419, -1419, -1419, + 1614, 1614, 1151, -1419, 866, 315, -1419, 900, 866, -1419, + -1419, 469, -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, + -1419, -1419, 89, -1419, 61, 1053, -1419, 1166, 261, -71, + -1419, -1419, -1419, -1419, -1419, -1419, 88, -1419, -1419, 1342, + -1419, 334, 985, -1419, 985, 1337, -1419, 9, 972, -1419, + 695, -1419, 46, -1419, 1151, -1419, -1419, 1501, 263, 969, + -1419, 1614, 1438, -1419, -1419, -1419, -1419, 1407, 468, 1312, + -1419, -1419, -1419, -1419, 985, -1419, 3109, 3109, -1419, 985, + -1419, 969, 3109, -1419, -1419, 985, -1419, -1419, 1423, 1356, + -1419, -1419, 1444, 1343, -1419, -1419, 1359, -1419, 78, -1419, + -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, + -1419, -1419, 183, 5, 1364, 1305, 5, 4434, -1419, -1419, + -1419, 1472, 985, -1419, 1232, -1419, -1419, -1419, -1419, 61, + -1419, 985, -1419, 1452, 3109, 49, -1419, 1377, 1187, -1419, + 1191, -1419, -1419, -1419, 1175, 1135, -1419, -1419, 1175, 1180, + 771, 1175, 1175, 1032, 1175, 357, 866, -1419, -1419, -1419, + 866, 1491, 1175, 1445, 1492, -99, 885, 1143, 866, -1419, + -1419, -1419, 1333, 866, -1419, -1419, -1419, 866, -1419, 1142, + -1419, -1419, -1419, 55, 1175, 991, 972, -1419, -1419, -1419, + -1419, -1419, -1419, 1196, 1196, 1275, -1419, 1484, 102, 41, + -1419, -1419, -1419, 1053, 1309, 443, 1363, -1419, 911, -1419, + -1419, 1151, 1151, -1419, -1419, -1419, 1155, -1419, -1419, -1419, + -1419, -1419, 1471, -1419, -1419, -1419, 972, 36, 1213, 1366, + -1419, 972, 972, -1419, -1419, 428, -1419, -1419, 1473, 460, + 261, 987, 261, 987, -1419, -1419, -1419, -1419, -1419, -1419, + -1419, -1419, -1419, -1419, 1151, 1472, 3109, -1419, -1419, 32, + 1171, 985, -1419, -1419, -1419, 261, -1419, 1311, 1385, 1538, + 1357, 1356, 1486, 4434, 1423, -1419, -1419, 1181, -1419, -1419, + -1419, -1419, -1419, -1419, 1341, 1305, -1419, -1419, -1419, 4434, + -1419, -1419, 985, 36, 261, 1403, -1419, 1202, 985, 1341, + 1429, -1419, -1419, 1530, 1175, 159, 1175, -1419, -1419, 1085, + 1085, -1419, -1419, -1419, 1533, 1535, -1419, -1419, -1419, 1536, + -1419, -1419, -1419, 1244, -1419, -1419, -1419, -1419, -1419, 1534, + -1419, -1419, -1419, -1419, 1551, -1419, -1419, -1419, -1419, -1419, + 1347, 1341, 1539, 1175, 866, -1419, 866, -1419, 866, -1419, + -1419, -1419, -1419, -1419, -1419, 1540, 1474, -1419, -1419, 673, + 673, -1419, -1419, -1419, -1419, 673, 1175, 1445, 937, -1419, + 1382, -1419, -1419, -1419, 1396, 390, 1200, 1175, 394, -1419, + -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, 1366, + -1419, 1524, -1419, -1419, -1419, 2915, -1419, 376, -1419, -1419, + -1419, -1419, -1419, 524, -1419, 533, 1324, -1419, -1419, -1419, + 834, 535, -1419, 1495, -1419, -1419, -1419, -1419, 985, -1419, + -1419, -1419, -1419, 3109, -1419, 969, 3109, -1419, 1423, -1419, + -1419, -1419, 1181, -1419, 4434, 1217, -1419, 1339, -1419, -64, + -1419, 1437, 694, -1419, -1419, -1419, 3109, 1341, -1419, -1419, + 985, 1341, -1419, -1419, 1572, -1419, -1419, -1419, -1419, -1419, + 1581, -1419, -1419, -1419, -1419, -1419, -1419, 866, 157, -1419, + -55, 1279, 866, 1504, 1085, -1419, 1255, 246, 1579, 972, + -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, 1574, 1576, + 866, 866, -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, + -1419, -1419, -1419, 673, -1419, 3574, 1238, -1419, 62, 985, + 327, 1180, -1419, -1419, 1553, -1419, 4434, -1419, 4434, 1053, + -1419, 1735, -1419, 18, -1419, 1470, -1419, -1419, -1419, 985, + 985, -1419, 117, 132, 1324, 1406, 1406, 468, -1419, 468, + 468, 468, 985, -1419, 449, 1466, 1262, 1311, -1419, 1356, + 972, -1419, -1419, 1119, 1217, -1419, -1419, -1419, 1348, 985, + -1419, -1419, -1419, 182, 1368, -1419, 985, -1419, -1419, 985, + -1419, 4, -1419, -1419, -1419, -1419, 27, 1442, -1419, 507, + -1419, -1419, -1419, -1419, 1506, 1180, 1424, -1419, 1611, -1419, + -1419, -1419, -1419, 911, 866, -1419, 235, 985, 985, 1398, + 1119, 1398, 1119, 1119, -1419, -1419, -1419, 370, -1419, -1419, + 1003, -1419, -1419, -1419, 470, -1419, -1419, -1419, -1419, -1419, + -1419, -1419, -1419, -1419, 95, -1419, -1419, 1180, -1419, 1431, + -1419, -1419, -1419, 1317, 428, 2915, -1419, -1419, -1419, 3109, + -1419, -1419, 4434, 36, 36, -1419, -1419, -1419, -1419, -1419, + -1419, -1419, -1419, 1699, 1575, -1419, 468, 468, -1419, 834, + -1419, -1419, 1556, -1419, 985, 1370, -1419, -1419, -1419, 3109, + 1356, -1419, 1593, 1175, -1419, 558, -1419, 1175, 985, 449, + -1419, 1053, -1419, -1419, 1488, -1419, -1419, 1514, -1419, 1582, + 115, 1313, 1423, -1419, 1539, 866, -1419, 1175, 1311, -1419, + -1419, 1461, -1419, -1419, -1419, -1419, 1175, 397, 1628, 397, + -1419, -1419, 1119, -1419, -1419, 1292, 1119, -1419, -1419, 1119, + -1419, -1419, 1607, -1419, -1419, -1419, -1419, 4434, 1273, -1419, + 1613, -1419, -1419, -1419, -1419, -1419, 132, 1140, -1419, -52, + -1419, -1419, 834, 834, 834, 468, 985, 1175, 1538, 1315, + -1419, -1419, 4103, 1640, 4227, 1119, 789, -1419, 1410, 4434, + -1419, -1419, -1419, -1419, -1419, 1590, 885, 885, 1504, -1419, + 1053, 1660, 235, 1175, 1498, 4288, -1419, -1419, -1419, -1419, + -1419, 1119, 985, -1419, 1119, -1419, -1419, -1419, -1419, -1419, + 4434, -1419, -1419, 1366, 1053, -1419, -1419, 1614, -1419, -1419, + 789, 969, -1419, 972, 1367, -1419, -1419, 1221, 1369, -1419, + -1419, -1419, -1419, 1283, -1419, -1419, 885, -1419, -1419, 1552, + 3109, -1419, 235, -1419, 866, 1558, 1468, 1115, 276, 248, + -1419, 1485, 1386, -1419, 145, 1445, 1500, -1419, 1175, -1419, + -1419, -1419, 1175, 1175, 1175, 3799, -1419, -1419, -1419, -1419, + -1419, -1419, -1419, -1419, 122, -1419, 866, -1419, -1419, -1419, + 1379, -1419, -1419, -1419, -1419, -1419, 1532, 1557, 1151, 834, + -1419, 1634, 1538, -1419, -1419, 995, -1419, -1419, 4434, -1419, + 1053, -1419, -1419, -1419, -1419, 1175, 1578, 1521, 1334, -1419, + -1419, 248, 248, -1419, 1128, 1445, -1419, -1419, -1419, -1419, + -1419, -1419, 1175, 1445, -1419, -1419, 1175, 1175, 316, 1175, + 3109, 1976, 1583, 921, -1419, -1419, 866, 520, -1419, 1474, + -1419, -1419, -1419, 985, -1419, 969, -1419, -1419, -1419, 1689, + 246, 866, 1175, 1175, -1419, -1419, 1175, 1445, -1419, -1419, + -1419, -1419, 222, -1419, 1404, 2946, 2871, -1419, -1419, 676, + -1419, -1419, 696, -1419, -1419, 745, -1419, -1419, -1419, -1419, + -1419, -1419, 1453, 1482, -1419, 4434, 1663, 1541, -1419, 1634, + -1419, -1419, -1419, 866, 866, -1419, -1419, 1464, 866, -1419, + -1419, 1579, 1474, -1419, -1419, -1419, 1371, 3013, 3013, -1419, + -1419, -1419, -1419, -1419, -1419, -1419, 1469, -1419, 985, 3109, + 1585, -1419, -1419, -1419, -1419, -1419, -1419, 3109, 1439, -1419, + -1419, -1419, -1419, 3013, 3013, -1419, 1668, 1311, -1419, 2871, + 3088, -1419, -1419, -1419, 985, 3109, -1419, -1419, 1675, 1378, + 985, -1419, 1684, 1538, 985, 969, 1688, 985, -1419 +}; + +/* YYPGOTO[NTERM-NUM]. */ +static const yytype_int16 yypgoto[] = +{ + -1419, -1419, -1419, 1726, -1419, 915, -1419, 814, -1419, -1419, + -1419, -1419, -1419, 1630, -1419, -1419, -1419, -1419, -1419, -1419, + -1419, -1419, -1419, -1419, 1383, -1419, -1419, -1419, -1419, 1584, + -1419, -1419, -1419, -1419, 1237, -1419, -1419, -1419, -1419, -1419, + -1419, -1419, -1419, 635, -1419, -1419, -1419, 1240, -1419, -1419, + -1419, -1419, -1419, -1419, 1577, -1419, -1419, -1419, -1419, -1419, + -1419, -1419, -1419, -1419, -41, -897, -1419, -1419, -1419, -1419, + -1419, 1523, -1419, -1419, -1419, -1419, 868, -1419, -1419, -1419, + 606, -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, + -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, + -1419, -1419, 198, 455, -1419, -1419, -1419, -1419, -1419, -1419, + -1419, -1419, 211, -1419, -1419, -36, -1419, -1419, -1419, -1419, + -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, + -1419, -1419, -1082, -81, -1419, -1419, -1419, -1419, -1419, -1419, + -1419, -1419, -1419, -1419, 1048, -96, -1419, -1159, -1419, -1419, + -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, + -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, -707, + 621, -1205, -1419, 107, 217, -1419, -1419, -1419, -1419, -1419, + -1419, -1419, 642, -168, -1419, -1419, -1419, -1419, -1419, -1419, + -1419, 858, -1419, -1419, -1419, -1419, -1419, -1419, -109, -1419, + -1419, -1419, -1419, 447, -1419, 464, 450, -1419, -117, -1419, + -1419, -1419, -1419, -1419, -1419, -1419, 1089, -1419, -1419, 1090, + -1419, -1419, -1419, -1419, -1419, -1419, 137, -1419, -1419, -1419, + -1419, -1419, -1419, -1419, 138, 901, -1419, -1419, 361, -944, + -247, 65, -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, + -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, 1408, + -1419, -1419, -1419, -1419, 1643, 1412, -1419, -827, -152, -265, + -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, + -1419, -1419, -1419, 795, -1419, -1419, -1419, -1419, -1419, -1419, + 307, -1419, -1419, 106, 104, -1419, -1419, -386, -1419, -1419, + -1419, 708, -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, + -1419, 750, -1419, -1419, 295, -1419, -1419, -1419, -1419, 418, + -1419, -1419, -1419, 48, -1419, 1163, -1419, -1419, -1419, -1419, + -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, + -1419, -1419, -1419, -1419, -1419, 1344, -1419, 147, 1159, -1419, + -1419, 974, -128, -1419, 179, -1047, -1419, -1419, -1419, -1419, + 1027, -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, + -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, + -1419, -1419, -1419, -1419, -1419, -690, -1419, -1419, -1419, -1419, + -1419, -1419, 1062, -1419, -1419, -1419, 1415, -1419, -1419, -1419, + -427, 1199, -1419, -1419, 1276, -1419, -1419, 884, -1419, -1419, + -1419, -1419, -1419, 1125, -1419, 498, -1419, -1419, -1026, -1419, + -1419, -1419, -1419, 364, -1419, -1419, -1419, -1419, -1419, -1419, + -1419, 1384, -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, + -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, + -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, + -1419, -1419, -1419, -1419, -1419, -1419, -516, -216, -519, -709, + -1419, -1308, -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1419, + -1419, -552, -1419, -1419, -1419, -1419, -1419, -1419, -1419, 581, + -1419, -1419, -1419, 586, 319, -1419, 249, -1419, -1419, -1419, + -1419, -1419, -1419, -1419, -1419, -606, -1419, -1419, 1185, -1419, + 321, 754, -1419, 1182, -1419, -1419, -1419, -1419, -1419, -1419, + -1419, -1419, -1419, -1419, -1419, -1419, -1419, -1418, 344, -399, + -1419, 1106, -1419, -1419, -1419, -1419, -1419, -1419, 253, -1419, + -1419, 1610, 97, -1419, -1419, -1419, -1419, -1419, -1419, -1419, + -1419, -1419, -1419, -1419, -1419, 86, 1216, -62, -1072, -1419, + -810, -1419, 1228, -264, -1419, -1419, -1419, 1074, -1419, -1419, + 231, -541, 1019, -756, 716, -169, -790, -1419, -1419, -321, + -1024, -693, -48, -662, -116, -390, -1419, -854, -1419, -46, + -47, -1419, 301, -982, -899, -357, -1419, -14, 1035, -1342, + -58, -174, -687, -219, -275, -774, -967, -280, -1419, 435, + -588, -281, -1419, 1768, -1419, 1096, 1685, -513, -242, 612 +}; + +/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule which + number is the opposite. If zero, do what YYDEFACT says. + If YYTABLE_NINF, syntax error. */ +#define YYTABLE_NINF -1289 +static const yytype_int16 yytable[] = +{ + 71, 71, 82, 370, 508, 96, 234, 470, 469, 86, + 426, 705, 233, 855, 472, 240, 631, 1043, 939, 859, + 1110, 1176, 1034, 1232, 1231, 589, 981, 951, 1150, 953, + 954, 955, 736, 104, 493, 1099, 1157, 1022, 1022, 816, + 453, 1477, 623, 84, 997, 531, 1217, 299, 754, 95, + 657, 784, 124, 125, 1075, -1215, 1003, -1215, -1215, 84, + 1080, 84, 234, 765, 591, 611, 612, 56, 382, 57, + 58, -426, 140, 496, 1308, 47, -1234, 486, 985, 149, + 1619, 1372, 663, 623, 476, 477, -682, 1111, 1112, 1648, + 1540, 749, -1234, 360, 496, 1022, 98, 599, 600, 601, + 186, 188, 892, -1234, 1085, 838, 1191, -1278, 1038, 56, + 757, 57, 58, 1182, 817, -1234, 1373, 1596, 1321, 1682, + 214, 215, 1, 593, 594, 595, 596, 597, 1325, -1234, + 1518, -1234, -1234, 616, 59, 60, 647, 696, 61, 62, + 1054, 1295, 1326, 1327, 149, 243, 244, 1206, 1090, 508, + 999, 459, 63, 59, 734, 658, 1183, 61, 62, -1236, + 590, 98, 1683, 857, 1280, 1860, 1861, 753, 1281, 361, + 362, 417, 363, 1605, 1608, 366, -688, 1648, 367, 586, + 545, 7, 772, 418, 656, 650, -515, 660, 761, 56, + 1609, 57, 460, 186, 785, 786, 787, 788, 789, -426, + 1702, 1374, 1703, 1704, 536, 1387, -1226, -1234, 780, 98, + 1390, 399, 781, 401, 403, 8, 1192, 710, 1296, 984, + 413, 415, 1322, 988, 665, 1035, 1292, 1053, 71, 429, + 551, 623, 435, 437, -426, 452, 557, 1375, 537, 1649, + 368, 1533, 1011, 575, -1133, 483, 399, 487, 488, 1013, + 1248, 1016, 114, 59, 750, -682, -426, 61, 62, 806, + 15, 1213, 1169, 98, 178, 895, 1170, 56, 676, 57, + 58, 663, 1545, 602, 623, 358, 98, 620, 64, 1190, + 603, 591, 751, 592, -426, 1415, 943, 65, 944, 1072, + 1519, 563, 1328, 1597, 1610, -1234, 591, 861, 593, 594, + 595, 596, 597, 985, 358, 598, -682, 604, -1234, -1132, + -682, -46, 674, 1729, 599, 600, 601, 773, 1184, 1266, + 783, 66, -1278, -1234, 1684, 1213, 1849, 1649, 962, 599, + 600, 601, 865, 866, -426, 758, 759, 84, -763, 358, + 1089, 1829, 1166, 776, 96, -688, -1236, 48, 478, 399, + 234, 550, -426, 996, 1849, 568, 911, 556, 1198, 617, + 239, 1323, 1280, 358, 1508, -515, 1281, 1207, -426, -426, + 67, 1208, 1376, 1598, 620, 493, 708, 1862, 1863, 659, + 1876, 740, 558, 10, 1008, -17, 624, 890, 95, 1054, + 779, 1309, 1014, 13, 1018, 1018, -133, 532, 635, 179, + 755, 828, 369, 1329, 1143, 891, 1389, 605, 358, 1455, + 1024, 358, 667, 1086, 1240, 115, 1382, 665, 68, -1246, + 1157, 1444, 1400, 202, -591, 892, 1445, 1416, 733, 1534, + 1447, -426, 1737, 1738, 224, -461, 1470, 399, 1185, 550, + -7, 680, 958, 493, 1685, 1825, 1231, 945, 1223, 1224, + 1937, 1173, 559, 778, 1850, 1179, 1049, 797, 733, 1368, + 798, 799, 17, 820, 69, 1187, 1417, 358, 578, 203, + 204, 1212, 1638, 1611, 56, -682, 57, 58, 1348, -682, + 1938, 1456, 1850, 1631, 698, 1153, 1200, 10, 1202, 1199, + 602, 1362, 711, 1364, 716, 1421, 1422, 603, 550, 59, + 60, 737, 620, 61, 62, 602, 225, 741, 1851, 1852, + 1102, -1215, 603, -1215, -1215, 1618, 1381, 1620, 1621, 1622, + 893, 1793, 1050, 1225, 604, 1587, 1174, 894, 763, 1019, + 1019, 764, 766, 1009, 1486, 635, 568, 102, -533, 604, + 102, 1853, -533, -533, 1404, 1405, 1282, 593, 594, 595, + 596, 597, 20, -1234, 985, 1057, 205, 790, 1070, 1070, + 1041, 1171, 1172, 1457, 1564, 1383, 1410, 1512, 1283, 1853, + 1253, -1236, 376, 666, 582, 1254, 591, 1706, 592, 814, + 624, 1673, 1048, 818, 1497, 998, -1236, 103, 895, 107, + 103, -169, 1471, 579, -960, 1188, 583, 830, 896, 897, + 598, 1458, 1049, 1288, 1710, 667, 772, 1289, 1431, 599, + 600, 601, 1175, 1359, 1360, 1302, -960, 982, 1739, 1498, + 1154, 10, 1214, 1675, 605, 1487, 1624, 483, 1727, 550, + 750, 851, 858, 1284, 1700, 1701, 689, 673, 224, 605, + 800, 801, 21, 1120, 1001, 864, 1037, 918, 1128, 1591, + 820, 1592, 65, 358, 98, 1740, 1801, 23, 751, 900, + 1543, 927, 206, 1140, 1285, 1069, 1069, 1674, 1050, 620, + 690, 806, 898, 1138, 1924, 1180, 1680, -1236, 1, 899, + 1653, 1588, 1363, 774, 1365, -1288, 66, 108, -1271, 392, + 393, 394, 395, 717, 718, 719, 720, 1625, 407, 410, + 1459, 411, 250, -960, 59, 60, 419, 1855, 61, 62, + 225, 430, 431, 432, 1526, 591, 27, 721, 1529, 98, + 457, 458, 63, 1759, 473, 475, 1074, 1210, 1138, 1074, + 149, 489, 490, 491, 102, 67, 1084, 1966, 98, 1081, + 1499, 773, 28, 234, 1460, 924, 925, 98, 1922, 358, + 1141, 29, 1461, 620, 1134, 1657, 32, 1361, 1583, 1777, + 1778, 1923, 1181, 1681, 251, 252, 624, 636, 811, 1896, + 1897, 1135, 1267, 1336, 871, 1693, 1268, 637, -119, 775, + 1065, 463, -119, 68, 103, 602, 56, 422, 57, 1972, + 234, 1242, 603, -119, 234, 1436, 372, 1686, 582, -960, + 1246, 1489, 59, 60, 1269, 1357, 61, 62, 1088, 1839, + 1490, 811, 887, 822, 1982, 1983, 888, 872, 9, 604, + 583, 31, -1236, -49, 157, 19, 464, 34, -72, 69, + 873, 1165, 26, 480, 874, 823, 373, 374, 56, 1151, + 57, 58, 1115, 1848, 567, 1629, 1949, -32, 109, 56, + 1121, 57, -49, 1126, 1127, 1129, 1152, 65, 1950, 56, + 1751, 57, 1044, 59, 60, 1315, 1951, 61, 62, 1663, + 192, 193, 1045, 158, 957, 712, -32, 722, 1952, 633, + 1147, 63, 1495, 1149, 59, 1765, 1976, 1769, 61, 62, + 1298, 66, 1775, 713, 1694, 1695, 1158, 59, 1865, 245, + 1496, 61, 62, 1168, 1161, 1347, 1162, 246, 159, 1467, + 1352, 1353, 1988, 1835, 1532, 1953, 59, 60, 1992, 605, + 61, 62, 1996, 1824, 16, 1998, 1258, 1954, 35, 160, + 161, -49, 1270, 25, 37, 620, 162, 1553, 1556, 875, + 67, 16, 234, -1236, 163, 1243, 234, 56, 1247, 57, + 58, -49, 59, 60, 234, -32, 61, 62, 1899, 234, + 189, 190, -119, 234, 41, 1385, 1901, 595, 596, 597, + 1398, 42, 59, 60, 43, -32, 61, 62, 56, 1084, + 57, -540, 45, 738, -119, 84, 552, 553, 68, 624, + 624, 56, 407, 57, 58, 1227, 1732, 1312, 1752, 1313, + 1936, 56, 51, 57, 591, 52, 592, 64, -49, 611, + 612, 1888, 1524, 53, 738, 56, 65, 471, 58, 876, + 54, 593, 594, 595, 596, 597, 59, 60, 598, 83, + 61, 62, -32, 915, 69, 1122, 1123, 599, 600, 601, + 90, 1556, 88, 56, 877, 57, 58, 1256, 89, 878, + 66, 807, 1272, 1177, 1178, 566, 93, 879, 91, -49, + 1211, 190, 94, 1263, 97, 738, 633, 1265, 1299, 101, + 1274, 1275, 825, 1279, 1928, 100, 56, 422, 57, 58, + -119, 1291, 106, 110, 119, -540, -49, 120, 591, 1593, + 1268, 1276, 1277, 121, -117, 123, 158, 128, 1957, 67, + 134, 59, 60, 1311, 131, 61, 62, 138, 852, 135, + -32, 136, 1017, 137, 738, 143, 59, 60, 1330, 63, + 61, 62, 1341, 1342, 144, 56, 145, 57, 58, 148, + 234, 159, 234, 174, 234, 880, 1435, -49, 1435, -49, + 806, 152, 806, 806, 806, 1448, 1449, 68, 1860, 1861, + 59, 60, 160, 161, 61, 62, 1677, 1678, 1550, 162, + 177, 111, 1757, 112, 747, 748, 916, 163, 182, 1369, + 410, 567, 1059, 183, 410, 593, 594, 595, 596, 597, + 1060, 208, 1061, 209, 210, -72, 593, 594, 595, 596, + 597, 211, 212, 69, 755, 84, 755, 216, 219, 221, + 567, 438, 917, 238, 1357, 241, 56, 356, 57, 58, + 351, 1272, 1272, 602, 1697, 364, 352, 353, 354, 1465, + 603, 355, 918, 1414, -540, 1420, 365, 371, 378, 1633, + 379, 59, 60, 383, 250, 61, 62, 389, 919, 390, + 420, 454, 455, 1029, 920, 64, 496, 604, 494, 63, + 499, 1718, 567, 234, 65, 1040, 500, 501, 1069, 806, + 806, 509, 1434, 512, 513, 514, 1047, 518, 516, 534, + 539, 1844, 541, 1066, 921, 543, 234, 234, 546, 98, + 564, 568, 1062, 570, 576, 1446, 587, 626, 66, 71, + 1468, 410, 567, 922, 620, 1097, 1469, 627, 628, 630, + 641, 1877, 638, 1878, 642, 643, -1213, -1213, 1484, 645, + -1213, -1213, 1595, 459, 1537, 1985, 651, 923, 654, 672, + 924, 925, 675, 677, -1213, 681, 684, 926, 686, 687, + 692, 696, 698, 1698, 703, -580, 1506, 67, 707, 1507, + 1780, 709, 744, 56, 422, 57, 58, 605, 806, 1584, + 739, 778, 742, 767, 792, 795, 812, 813, 1828, 1525, + 439, 821, 836, 1921, 1826, 831, 464, 839, 59, 60, + 840, 844, 61, 62, 841, 64, 1272, -688, 1932, 423, + 234, 850, 846, 854, 65, 68, 63, 860, 867, 1940, + 868, 869, 884, 949, 440, 940, 59, 60, 941, 441, + 61, 62, 725, -963, 952, -963, -963, 956, 217, 959, + 983, 994, 59, 60, 992, 1647, 61, 62, 66, 567, + 1962, 1963, 993, 567, 1002, 1965, 995, 1004, -963, -963, + 1006, 69, -963, -963, 424, 1012, 1026, 1201, 597, 1203, + 1028, 1036, 1030, 1039, 1761, 1042, -963, 1046, 442, 1078, + 1889, 1091, 1092, 1101, 1100, 1065, 1103, 1105, 1107, -1213, + 1109, 1113, 1114, 807, 1116, 1119, 1130, 67, 1132, 1222, + 1136, -963, -963, 1138, 410, 1163, 1189, 1196, 1215, 1216, + 1230, 1069, 1633, 1218, 1050, 1054, 1234, 1238, 1235, 1244, + 591, 1252, 1255, -1213, 1259, 1262, 1290, 1293, 1303, 769, + 1301, 1316, 1065, 1307, 1065, 1065, 1320, 56, 422, 57, + 58, 1337, 64, 1783, 1339, 68, 1345, 1250, 1346, 591, + 1358, 65, 1350, 1349, 567, 1378, 410, 1384, 1388, 1396, + 1386, 1407, 59, 60, 1411, 1413, 61, 62, 1423, 1391, + 1424, 1425, -1213, 423, 56, 422, 57, 58, 1484, 65, + 63, 1426, 1692, 1427, 1887, 66, 1429, 1441, 1432, 1342, + 1452, 69, 1439, 1843, 1453, 65, 1479, 1500, 1885, 59, + 60, 1491, -963, 61, 62, 1513, 56, 1530, 57, 58, + 423, -963, 1709, 66, 1516, 1521, 1531, 63, 1541, 1538, + -1213, 1309, 1713, 1548, 1551, 1589, 1716, 1552, 1615, 66, + 1585, 59, 60, 1600, 67, 61, 62, 502, 1627, 1628, + 234, 1637, 1652, 1658, 1065, -963, 1731, 1642, 1065, 63, + 56, 1065, 57, 58, 1656, 1736, 1659, 1689, 1705, 1587, + 1666, 1605, 67, 1707, 1711, 567, -1213, 567, 1720, 1722, + 234, 190, 234, 1733, 1723, 59, 60, 1742, 67, 61, + 62, 1726, 68, 1746, 1749, 1754, 1380, 1065, 1767, 1774, + 567, 1776, 1762, 63, -963, 1781, 1760, 1785, 1299, 1299, + 1840, 1834, 1846, 1836, 396, 1856, 64, 1845, 770, 1858, + 68, 1866, 1883, 1065, 1879, 65, 1065, 1403, 1881, 567, + 1880, 1893, 1784, 1097, 1930, 1895, 68, 1892, 69, 503, + 504, 424, 234, 1919, 1955, 56, 422, 57, 58, 1942, + 1956, 1958, -963, 64, 1959, 1964, 1984, 234, 1299, 66, + 1975, 1967, 65, 1990, 1980, 1991, 69, 1978, 234, 1995, + 59, 60, 1994, 1842, 61, 62, 1997, 18, 133, 497, + 1264, -1215, 69, -1215, -1215, 64, 688, 693, 63, 218, + 377, 1661, 223, 1118, 65, 1430, 66, 1868, -963, 234, + 234, 1871, 1872, 1873, 234, 1662, -1215, -1215, 67, 1875, + -1215, -1215, 1904, 1898, 961, 1318, 1744, 1886, 1669, 1306, + 1148, 1931, 1463, 1443, -1215, 1464, 1941, 1725, 66, 64, + 913, 914, 1728, 1779, 1125, 529, 200, 1544, 65, 530, + 1204, 1614, 1756, 1758, 1891, 67, 1261, -1215, 1239, 1636, + 1511, 1833, 834, 1503, 1635, 1920, 68, 664, 1717, 1076, + 843, 1900, 1000, 71, 1906, 1902, 1903, 574, 1905, 1025, + 819, 1164, 66, 746, -1215, 947, 1472, 67, 1590, 1409, + 1617, 1406, 648, 1690, 1641, 1528, 1644, 989, 1691, 1257, + 386, 1933, 1934, 68, 849, 1935, 853, 1830, 1945, 1837, + 829, 1668, 69, 1670, 1671, 424, 1715, 1961, 1023, 826, + 1082, 1319, 127, 1010, 64, 1071, 242, 1419, 0, 0, + 0, 67, 0, 65, 0, 68, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, + 1971, 1971, 424, 0, 1586, 0, 0, 0, 0, 0, + -1215, 0, 1977, -560, 195, 0, 0, 66, 0, -1215, + 71, 1979, 196, 0, 1603, 1604, 1971, 1971, 0, 68, + 0, 69, 807, 1987, 807, 807, 807, 1623, 1989, 0, + -566, -566, 0, -566, 0, 0, 0, 0, 1066, 98, + 0, 0, 0, -1215, 1503, 0, -566, 0, -566, 0, + 0, 1643, 0, 0, 1645, 0, 67, 0, 0, 0, + 0, 0, 0, 1745, 0, 69, 0, 1747, 752, 0, + 1748, 0, 0, 0, 0, 0, -566, 0, 0, -566, + -566, 0, 1664, 1665, -566, 1066, 0, 1066, 1066, -566, + 0, 0, -1215, 0, 0, 0, 0, 0, -566, 0, + -1215, 0, 0, -566, 68, 0, 1771, 0, 56, 0, + 57, 58, 0, 0, 0, 0, 0, 0, -566, 0, + 0, 0, 0, -566, 0, -566, 0, 0, 0, 0, + 0, -560, 1821, 59, 60, 1823, 0, 61, 62, 0, + -1215, 807, 807, 0, 0, 1907, 1908, 0, 0, 1503, + 69, 63, 0, 752, 0, 0, 0, 0, 0, 0, + -566, 0, -566, 1623, 0, 0, 0, 1909, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1910, 0, -566, + -1215, 0, -566, -566, 0, 1911, -1215, 0, -560, -566, + 0, 0, 0, 0, -566, 0, -566, 1066, -566, 0, + 0, 1066, 0, 0, 1066, 0, 433, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -566, 0, 0, -566, 0, -566, 0, + 807, 1623, 0, 0, 0, 56, 0, 57, 445, 0, + 1066, 0, 0, 0, 0, 0, -566, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -566, 0, 0, + 446, 60, 0, 0, 61, 62, 1066, 1822, 0, 1066, + 0, 0, 0, -566, 0, 0, 0, 64, 63, 0, + 0, 0, 0, 0, 0, 0, 65, 0, -566, -566, + 0, 0, 0, -566, 0, 0, 0, 0, 0, 0, + 0, 0, -566, 0, 0, 0, 0, 0, 0, 434, + 0, -566, 438, 0, -566, 0, 0, 1912, 0, 0, + 66, 1913, 1914, -566, 0, 0, 0, -566, -566, -566, + 0, 0, 0, 0, -566, -566, -566, 0, -870, -870, + 0, -870, 0, 0, 0, 0, 0, 1915, -566, -566, + 0, 0, 0, -870, -870, 0, -870, 1916, 1917, 0, + 0, 0, 0, 0, 0, 197, 0, 0, 0, 67, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -870, 0, 0, -870, -870, 0, + 0, 0, -870, 0, 0, 0, 0, -870, 0, 0, + 0, 0, 0, 0, 64, 0, -870, 0, 1927, 0, + 0, -870, 0, 65, 0, 0, 0, 68, 0, 0, + 0, 0, 0, 0, 0, 0, -870, 0, 0, 0, + 0, -870, 0, -870, 0, 0, 0, 0, -870, 0, + -870, -870, -870, 0, -870, -870, -870, 66, -870, -870, + -870, -870, 0, -870, -870, -870, -870, -870, -870, -870, + -870, -870, -870, 69, 0, 0, 0, 0, -870, 0, + -870, 439, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1927, 0, 0, 0, -870, 0, 0, + -870, -870, 0, 0, 0, 0, 67, -870, 0, 0, + 0, 0, -870, 0, -870, 440, -870, 0, 0, 1927, + 441, 0, 0, 0, 0, 1927, 0, 0, 0, 1927, + 0, 0, 1927, 0, 0, 0, 56, 0, 57, 58, + 0, -870, 0, 0, -870, 0, -870, 0, 0, 0, + 0, -870, 0, 0, 68, 0, 0, 0, 0, 0, + 0, 59, 60, 0, -870, 61, 62, 0, 0, 442, + 0, 0, 0, -1234, 0, -870, 0, 0, 0, 63, + 0, 0, 0, 438, 0, 0, -1166, 0, 0, 0, + 0, -870, 0, 0, 0, 0, -1166, 0, 358, 0, + 69, 0, 0, 0, 0, 0, -870, -870, 0, -869, + -869, -870, -869, 0, -1215, 0, -1215, -1215, 0, 0, + -870, 0, 0, 0, -869, -869, 0, -869, 0, -870, + 0, 0, -870, 0, 0, 0, 0, 0, 0, -1215, + -1215, -870, 0, -1215, -1215, -870, -870, -870, 0, 0, + 0, 0, -870, -870, -870, -869, 0, -1215, -869, -869, + 0, 0, 0, -869, 0, 0, -870, -870, -869, 0, + 0, 0, 0, 0, 0, 0, 0, -869, 0, -870, + 0, 0, -869, -870, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -869, 0, 0, + 0, 0, -869, 0, -869, 64, 0, 0, 0, -869, + 0, -869, -869, -869, 65, -869, -869, -869, 0, -869, + -869, -869, -869, 0, -869, -869, -869, -869, -869, -869, + -869, -869, -869, -869, 0, 0, 0, 0, 0, -869, + 0, -869, 439, 0, 0, 0, 0, 0, 66, 0, + 0, 0, 0, 0, 0, 0, 0, 0, -869, 0, + 0, -869, -869, 0, 0, 0, 0, 0, -869, 0, + 0, 0, 0, -869, 0, -869, 440, -869, 0, 0, + 0, 441, 0, -1215, -1215, 0, -1215, -1215, 0, 0, + 0, 0, -1215, 0, 0, 0, 0, 67, 0, 0, + 0, 0, -869, 0, 0, -869, 0, -869, 0, -1215, + -1215, 0, -869, -1215, -1215, 0, 0, 0, 0, 0, + 0, 0, 98, 0, 0, -869, -1215, -1215, 0, 0, + 442, 56, 0, 57, 58, 0, -869, 0, 0, 0, + 0, 0, 0, 0, 0, 68, 0, 0, 0, 0, + 0, 0, -869, 0, 0, 0, 59, 60, 0, 0, + 61, 62, 0, 0, -1234, 0, 0, -869, -869, 0, + 0, 0, -869, 0, 63, -1215, 0, -1166, 0, 0, + 0, -869, 0, 0, 0, 0, 0, -1166, 0, 358, + -869, 69, 56, -869, 57, 58, 0, 0, 0, 0, + 0, 0, -869, 0, 0, 548, -869, -869, -869, 0, + 0, 0, 0, -869, -869, -869, 0, 59, 60, 0, + 0, 61, 62, -1215, 0, 0, 0, -869, -869, 484, + 56, 0, 57, 58, 0, 63, 0, 0, 0, 0, + -869, 0, 0, 0, -869, 56, 0, 57, 58, 0, + 0, 0, 0, -1215, 0, 59, 60, 0, 572, 61, + 62, 0, -1215, 0, 0, 56, 0, 57, 58, -1215, + 59, 60, 0, 63, 61, 62, 0, -1215, 735, -1215, + -1215, 0, 0, 0, 0, 0, 0, 0, 63, 0, + 59, 60, 98, 0, 61, 62, -1215, 0, 0, 0, + 64, 0, -1215, -1215, 0, 0, -1215, -1215, 63, 65, + 56, 0, 57, 58, 0, 0, 0, 0, 0, 0, + -1215, 56, 0, 57, 58, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 59, 60, 0, 0, 61, + 62, 0, 0, 66, 0, -1215, 59, 60, 0, 0, + 61, 62, 56, 63, 57, 58, 0, 0, 614, 0, + 0, 64, 0, 0, 63, 0, 0, 0, 0, 0, + 65, 0, 0, 0, 0, 0, 0, 59, 60, 0, + 0, 61, 62, 0, 0, 0, 0, 854, 0, 0, + 0, 0, 67, -1215, 0, 63, 0, 679, 0, 64, + 0, 0, 0, 0, 66, 0, 0, 0, 65, 0, + 0, 0, 856, 0, 64, 0, 0, 0, 0, 56, + 0, 57, 58, 65, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 64, 0, 0, 0, 0, -1215, + 68, 0, 66, 65, 59, 60, -1215, 0, 61, 62, + 0, 0, 0, 67, 0, -1215, 0, 66, 0, 0, + 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 66, 0, 64, + 0, 0, 0, 0, 0, 98, 69, 0, 65, -1215, + 64, 67, 0, 0, 56, 0, 57, 58, 0, 65, + 0, 68, 0, 0, 0, 0, 67, 0, 0, 0, + 0, 0, 0, 0, 0, 56, 0, 57, 58, 59, + 60, 64, 66, 61, 62, 0, 67, 0, 0, 0, + 65, 0, 0, 66, 0, 0, 0, 63, -1215, 68, + 59, 60, 0, 0, 61, 62, 0, 69, 0, 0, + 0, 0, 0, 0, 68, 1167, 0, 0, 63, 0, + 0, 0, 0, 0, 66, 56, 0, 57, 58, 0, + 0, 67, 0, 0, 68, 0, 0, 0, 0, 0, + 0, 1969, 67, 0, 0, 69, -1215, 0, 64, 0, + 59, 60, 0, 0, 61, 62, 0, 65, 1943, 0, + 69, 0, 0, 0, 0, 0, 0, 0, 402, 0, + 0, 0, 0, 67, 0, -978, 0, -978, -978, 68, + 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 66, -1215, 0, 0, 0, 0, 0, 0, 0, + -978, -978, 0, 0, -978, -978, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1986, 0, -978, 0, + 0, 68, 0, 64, 0, 69, 0, 0, 0, 0, + 0, 0, 65, 525, 0, 0, 69, 0, 0, 0, + 67, 196, 0, 0, 64, 0, 0, 0, 0, 0, + 0, 0, 0, 65, 0, 0, 0, 0, 0, -578, + -578, 0, -578, 0, 0, 0, 66, 69, 0, 0, + 0, 0, 0, 0, 0, -578, 0, -578, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 66, 68, 0, + 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, + 0, 0, 0, 65, 0, -578, 0, 0, -578, -578, + 0, 0, 0, -578, 0, 67, 0, 0, -578, 0, + 0, 0, 0, 0, 0, 0, 0, -578, 0, -1234, + 0, 0, -578, -1234, 69, 0, 67, 66, 0, 0, + 0, 0, 0, 0, -978, 0, 0, -578, 0, 0, + 0, 0, -578, -978, -578, 0, 0, 0, 0, 0, + 526, 0, 0, 68, 0, 0, 0, 0, 0, 0, + 0, 723, 0, -1234, -1234, 0, -1234, -1234, -1234, 0, + 0, 0, 0, 0, 68, 0, 67, -978, 0, -578, + 0, -578, 0, 0, 0, 0, 0, 0, 0, -1234, + 724, 0, 0, -1234, 0, 0, 0, 0, -578, 69, + 0, -578, -578, 0, 0, 0, 0, 0, -578, 0, + 0, 0, 0, -578, 0, -578, 0, -578, 0, 0, + 69, 0, 0, 0, 68, 0, -978, 0, 725, 0, + 0, 723, 0, -1234, -1234, 0, -1234, -1234, -1234, 0, + 0, 0, -578, 0, 0, -578, 0, -578, 0, 0, + 0, 0, 0, 0, -1234, 0, 0, -1236, 0, 0, + 724, 0, 0, 0, 0, -578, 0, 0, 0, 0, + 69, -1234, 0, -1234, -978, 0, -578, 0, 0, 0, + 0, 0, -1234, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -578, 0, 0, 0, 0, 0, 0, 0, + -1234, 0, 0, 0, -1234, 761, 0, -578, -578, 0, + 726, 0, -578, 0, 0, -1234, -1234, 0, 0, 0, + -978, -578, 0, 0, -1234, 0, 0, 0, -1234, 0, + -578, 0, 0, -578, 0, 0, 0, 0, 0, 0, + 620, -1234, -578, -1234, 84, 0, -578, -578, -578, 0, + 0, 0, -1234, -578, -578, -578, 0, 0, 0, 727, + 0, 0, 0, 0, 0, 0, 0, -578, -578, 0, + -1234, 0, 0, 0, -1234, 0, 0, 0, 0, 84, + 726, 0, -1234, 0, 0, -1234, -1234, -1234, 1565, 1566, + 0, 0, 1567, 1568, 0, 0, 0, 0, -1234, 0, + -1234, 0, 0, 0, 0, 0, 0, 0, -1234, 0, + 0, 0, 0, 0, 1569, 0, 0, 0, 0, 0, + 0, 0, 0, 963, 964, 0, 0, 965, 966, 727, + 0, 0, 0, 0, 0, 0, 0, 0, 0, -1234, + 0, 0, -1234, 0, 0, 0, 0, 0, -1234, 0, + -1234, 0, -1234, 0, 0, 0, 0, -1234, 358, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -1234, 0, 0, 0, 0, 0, 0, 0, -1234, 1570, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1571, 0, 1572, 0, + 0, 0, 0, 0, 0, 0, 0, 1573, 0, -1234, + 0, 0, -1234, 0, 967, 0, 0, 0, -1234, 0, + -1234, 0, 0, 0, 0, 1574, 0, 0, 358, -133, + 0, 968, 0, 969, 0, 0, 0, 0, 0, 0, + 1575, 1576, 970, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 254, 255, 0, 256, 0, + 971, 0, 0, 0, -133, 0, 0, 0, 0, 0, + 0, 257, 0, 258, 0, 972, 973, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 259, 0, 0, 260, 261, 0, 1577, 0, 262, + 0, 0, 1578, 0, 263, 0, 0, 1787, 0, 0, + 0, 0, 0, 264, 0, 1579, 0, 0, 265, 0, + 0, 0, 0, 921, 0, 0, 0, 0, 0, 0, + 1788, 1789, 974, 266, 0, 0, 0, 975, 267, 0, + 268, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 976, 0, 0, 0, -133, 0, 0, 1580, 921, 1790, + 0, 0, 0, 0, 0, 1581, 0, 0, 0, 254, + 255, 0, 256, 358, 0, 269, 0, 270, 0, 0, + 0, 0, 0, 0, 0, 257, 0, 258, 0, -133, + 0, 0, 977, 0, 271, 0, 0, 272, 273, 0, + 978, 0, 0, 0, 274, 0, 0, 0, 358, 275, + 0, 276, 0, 277, 0, 259, 0, 0, 260, 261, + 1791, 0, 0, 262, 0, 0, 0, 0, 263, 0, + 0, 0, 0, 0, 0, 0, 0, 264, 278, 0, + 1792, 279, 265, 280, 1793, 0, 0, 0, 0, 0, + 1794, 1795, 0, 0, 0, 0, 0, 266, 0, 0, + 0, 281, 267, 0, 268, 0, 0, 1796, 0, 0, + 0, 0, 282, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 283, 0, + 0, 0, 0, 0, 0, 0, 1797, 0, 0, 269, + 0, 270, 0, 284, 285, 0, 0, 0, 286, 0, + 0, 0, 0, 0, 0, 0, 0, 287, 271, 0, + 0, 272, 273, 0, 0, 0, 288, 0, 274, 289, + 0, 0, 0, 275, 0, 276, 0, 277, 290, 0, + 0, 0, 291, 292, 293, 0, 0, 0, 1798, 294, + 295, 296, 1799, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 278, 297, 298, 279, 1800, 280, 0, 0, + 254, 255, 0, 256, 0, 0, 0, 0, 0, 1801, + 492, 1802, 0, 0, 0, 281, 257, 0, 258, 0, + 0, 1803, 0, 0, 1804, 0, 282, 0, 0, 0, + 0, 1874, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 283, 0, 0, 0, 259, 0, 0, 260, + 261, 0, 0, 0, 262, 0, 0, 284, 285, 263, + 0, 0, 286, 0, 0, 0, 0, 0, 264, 0, + 0, 287, 0, 265, 0, 0, 0, 0, 0, 0, + 288, 0, 0, 289, 0, 0, 0, 0, 266, 0, + 0, 0, 290, 267, 0, 268, 291, 292, 293, 0, + 0, 0, 0, 294, 295, 296, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 297, 298, 0, + 0, 0, 0, 0, 254, 255, 0, 256, 0, 0, + 269, 0, 270, 0, 942, 0, 0, 0, 0, 0, + 257, 0, 258, 0, 0, 0, 0, 0, 0, 271, + 0, 0, 272, 273, 0, 0, 0, 0, 0, 274, + 0, 0, 0, 0, 275, 0, 276, 0, 277, 0, + 259, 0, 0, 260, 261, 0, 0, 0, 262, 0, + 0, 0, 0, 263, 0, 0, 0, 0, 0, 0, + 0, 0, 264, 278, 0, 0, 279, 265, 280, 0, + 0, 1764, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 266, 0, 0, 0, 281, 267, 0, 268, + 0, 0, 0, 0, 0, 0, 1787, 282, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 283, 0, 0, 0, 0, 0, 1788, + 1789, 0, 0, 0, 269, 0, 270, 0, 284, 285, + 0, 0, 0, 286, 0, 0, 0, 0, 0, 0, + 0, 0, 287, 271, 0, 0, 272, 273, 1790, 0, + 0, 288, 0, 274, 289, 0, 0, 0, 275, 0, + 276, 0, 277, 290, 0, 0, 0, 291, 292, 293, + 0, 0, 0, 0, 294, 295, 296, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 278, 297, 298, + 279, 0, 280, 0, 0, 1768, 0, 0, 0, 0, + 0, 254, 255, 0, 256, 0, 0, 0, 0, 1791, + 281, 0, 0, 0, 0, 0, 0, 257, 0, 258, + 0, 282, 0, 0, 0, 0, 0, 0, 0, 1792, + 0, 0, 0, 1793, 0, 0, 0, 283, 0, 1794, + 1795, 0, 0, 0, 0, 0, 0, 259, 0, 0, + 260, 261, 284, 285, 0, 262, 1796, 286, 0, 0, + 263, 0, 0, 0, 0, 0, 287, 0, 0, 264, + 0, 0, 0, 0, 265, 288, 0, 0, 289, 0, + 0, 0, 0, 0, 0, 1797, 0, 290, 0, 266, + 0, 291, 292, 293, 267, 0, 268, 0, 294, 295, + 296, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 297, 298, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 269, 0, 270, 0, 0, 0, 1798, 0, 0, + 0, 1799, 0, 0, 0, 0, 0, 0, 0, 0, + 271, 0, 0, 272, 273, 1800, 0, 0, 0, 0, + 274, 0, 0, 0, 0, 275, 0, 276, 1801, 277, + 1802, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1803, 0, 0, 1804, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 278, 0, 0, 279, 0, 280, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 281, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 282, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 283, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 284, + 285, 0, 0, 0, 286, 0, 0, 0, 0, 0, + 0, 0, 0, 287, 0, 0, 0, 0, 0, 0, + 0, 0, 288, 0, 0, 289, 0, 0, 0, 0, + 0, 0, 0, 0, 290, 0, 0, 0, 291, 292, + 293, 0, 0, 0, 0, 294, 295, 296, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 297, + 298 +}; + +static const yytype_int16 yycheck[] = +{ + 47, 48, 48, 222, 361, 63, 180, 288, 288, 50, + 274, 524, 180, 675, 289, 184, 443, 827, 705, 681, + 874, 965, 812, 1049, 1048, 424, 733, 717, 925, 719, + 720, 721, 548, 81, 299, 862, 935, 793, 794, 627, + 282, 1349, 432, 20, 753, 1, 1028, 199, 567, 63, + 19, 592, 99, 100, 844, 6, 765, 8, 9, 20, + 850, 20, 236, 579, 18, 40, 41, 6, 236, 8, + 9, 0, 1, 89, 19, 82, 24, 293, 42, 126, + 1498, 49, 472, 473, 31, 32, 138, 877, 878, 62, + 1432, 24, 112, 209, 89, 851, 214, 51, 52, 53, + 147, 148, 108, 187, 1, 657, 177, 26, 817, 6, + 97, 8, 9, 24, 630, 170, 84, 99, 16, 24, + 161, 162, 185, 35, 36, 37, 38, 39, 87, 125, + 194, 215, 24, 103, 31, 32, 457, 98, 35, 36, + 62, 240, 101, 102, 191, 192, 193, 138, 857, 506, + 756, 8, 49, 31, 544, 124, 67, 35, 36, 26, + 424, 214, 67, 679, 5, 20, 21, 566, 9, 210, + 211, 253, 213, 56, 42, 216, 228, 62, 219, 421, + 396, 123, 581, 265, 465, 460, 71, 468, 136, 6, + 58, 8, 49, 240, 593, 594, 595, 596, 597, 128, + 1618, 169, 1620, 1621, 228, 1231, 128, 155, 19, 214, + 1234, 258, 23, 260, 261, 0, 287, 538, 317, 735, + 267, 268, 120, 739, 42, 813, 1123, 833, 275, 275, + 399, 621, 279, 280, 163, 282, 405, 205, 262, 212, + 5, 84, 783, 412, 362, 292, 293, 294, 295, 790, + 1077, 792, 1, 31, 187, 138, 185, 35, 36, 616, + 362, 1017, 952, 214, 163, 271, 956, 6, 484, 8, + 9, 661, 26, 227, 664, 359, 214, 241, 175, 988, + 234, 18, 215, 20, 213, 126, 156, 184, 158, 841, + 354, 407, 251, 275, 162, 187, 18, 683, 35, 36, + 37, 38, 39, 42, 359, 42, 358, 261, 259, 362, + 362, 306, 481, 1655, 51, 52, 53, 581, 229, 1109, + 42, 218, 241, 215, 229, 1081, 78, 212, 727, 51, + 52, 53, 689, 690, 263, 322, 323, 20, 354, 359, + 856, 1759, 948, 585, 402, 228, 310, 354, 295, 396, + 524, 398, 281, 752, 78, 294, 362, 404, 24, 329, + 365, 259, 5, 359, 1388, 338, 9, 358, 297, 298, + 267, 362, 340, 355, 241, 640, 528, 232, 233, 348, + 258, 550, 274, 128, 774, 362, 433, 70, 402, 62, + 365, 336, 791, 152, 793, 794, 357, 353, 446, 298, + 569, 643, 167, 362, 917, 88, 1233, 361, 359, 19, + 796, 359, 230, 310, 231, 164, 1226, 42, 315, 177, + 1319, 1320, 1249, 63, 362, 108, 1325, 268, 544, 272, + 1327, 360, 35, 36, 224, 189, 42, 484, 349, 486, + 185, 488, 723, 708, 349, 1753, 1470, 317, 1036, 1037, + 228, 964, 344, 365, 206, 968, 62, 51, 574, 1215, + 54, 55, 265, 632, 361, 984, 307, 359, 72, 109, + 110, 1012, 1519, 341, 6, 358, 8, 9, 1187, 362, + 258, 91, 206, 1509, 171, 205, 1002, 128, 1004, 155, + 227, 1200, 539, 1202, 541, 1269, 1270, 234, 545, 31, + 32, 548, 241, 35, 36, 227, 296, 554, 232, 233, + 867, 6, 234, 8, 9, 1497, 1225, 1499, 1500, 1501, + 203, 205, 128, 1039, 261, 198, 211, 210, 575, 793, + 794, 578, 579, 775, 158, 583, 294, 188, 31, 261, + 188, 293, 35, 36, 1253, 1254, 189, 35, 36, 37, + 38, 39, 123, 259, 42, 836, 196, 598, 839, 840, + 824, 960, 961, 173, 1463, 1227, 1259, 1394, 211, 293, + 1089, 310, 362, 198, 9, 1091, 18, 1624, 20, 626, + 627, 211, 42, 630, 49, 754, 158, 238, 271, 94, + 238, 278, 198, 197, 9, 985, 31, 644, 281, 282, + 42, 211, 62, 1116, 1630, 230, 1005, 1120, 1301, 51, + 52, 53, 297, 153, 154, 1128, 31, 733, 221, 84, + 340, 128, 1021, 1567, 361, 249, 177, 674, 1652, 676, + 187, 672, 679, 276, 1616, 1617, 22, 197, 224, 361, + 234, 235, 108, 890, 760, 686, 815, 257, 895, 1476, + 819, 1478, 184, 359, 214, 258, 340, 266, 215, 700, + 1434, 702, 302, 206, 307, 839, 840, 297, 128, 241, + 56, 1028, 355, 358, 1879, 206, 206, 249, 185, 362, + 173, 1471, 1201, 118, 1203, 336, 218, 192, 336, 254, + 255, 256, 257, 10, 11, 12, 13, 248, 263, 264, + 310, 266, 300, 118, 31, 32, 271, 1789, 35, 36, + 296, 276, 277, 278, 1407, 18, 362, 34, 1411, 214, + 285, 286, 49, 1705, 289, 290, 842, 1008, 358, 845, + 777, 296, 297, 298, 188, 267, 852, 1942, 214, 42, + 205, 1005, 123, 917, 354, 355, 356, 214, 228, 359, + 293, 263, 362, 241, 161, 1545, 4, 297, 1465, 1726, + 1727, 241, 293, 293, 362, 363, 813, 347, 621, 1851, + 1852, 178, 1, 1163, 1, 1602, 5, 357, 5, 214, + 838, 1, 9, 315, 238, 227, 6, 7, 8, 1948, + 964, 1072, 234, 20, 968, 1308, 271, 1587, 9, 214, + 1075, 277, 31, 32, 33, 1195, 35, 36, 855, 1776, + 277, 664, 1, 9, 1973, 1974, 5, 44, 4, 261, + 31, 362, 310, 0, 1, 11, 46, 362, 5, 361, + 57, 947, 18, 1, 61, 31, 311, 312, 6, 161, + 8, 9, 883, 1787, 409, 1507, 170, 0, 1, 6, + 891, 8, 29, 894, 895, 896, 178, 184, 182, 6, + 1687, 8, 347, 31, 32, 1146, 170, 35, 36, 1556, + 35, 36, 357, 50, 31, 48, 29, 194, 182, 444, + 921, 49, 48, 924, 31, 1712, 1958, 1714, 35, 36, + 5, 218, 1719, 66, 1603, 1604, 937, 31, 1795, 1, + 66, 35, 36, 950, 156, 1186, 158, 9, 85, 1336, + 1191, 1192, 1984, 1767, 1427, 170, 31, 32, 1990, 361, + 35, 36, 1994, 1750, 9, 1997, 1095, 182, 123, 106, + 107, 108, 161, 18, 96, 241, 113, 1450, 1451, 166, + 267, 26, 1116, 249, 121, 1073, 1120, 6, 1076, 8, + 9, 128, 31, 32, 1128, 108, 35, 36, 1855, 1133, + 365, 366, 189, 1137, 4, 1229, 1863, 37, 38, 39, + 1245, 300, 31, 32, 29, 128, 35, 36, 6, 1095, + 8, 16, 166, 548, 211, 20, 74, 75, 315, 1036, + 1037, 6, 557, 8, 9, 1042, 1658, 6, 1688, 8, + 1897, 6, 362, 8, 18, 300, 20, 175, 185, 40, + 41, 1838, 1402, 300, 579, 6, 184, 8, 9, 246, + 360, 35, 36, 37, 38, 39, 31, 32, 42, 362, + 35, 36, 185, 68, 361, 271, 272, 51, 52, 53, + 300, 1554, 362, 6, 271, 8, 9, 1094, 362, 276, + 218, 616, 1110, 153, 154, 18, 31, 284, 213, 236, + 365, 366, 31, 1104, 9, 630, 631, 1108, 1126, 219, + 1111, 1112, 637, 1114, 1884, 364, 6, 7, 8, 9, + 307, 1122, 362, 236, 362, 120, 263, 300, 18, 1479, + 5, 59, 60, 281, 321, 364, 50, 114, 1925, 267, + 362, 31, 32, 1144, 265, 35, 36, 200, 673, 362, + 263, 362, 42, 362, 679, 362, 31, 32, 1159, 49, + 35, 36, 211, 212, 300, 6, 297, 8, 9, 367, + 1304, 85, 1306, 303, 1308, 362, 1304, 314, 1306, 316, + 1497, 362, 1499, 1500, 1501, 208, 209, 315, 20, 21, + 31, 32, 106, 107, 35, 36, 153, 154, 1439, 113, + 362, 314, 22, 316, 558, 559, 201, 121, 362, 1216, + 735, 736, 231, 300, 739, 35, 36, 37, 38, 39, + 239, 5, 241, 5, 5, 362, 35, 36, 37, 38, + 39, 5, 309, 361, 1363, 20, 1365, 321, 5, 244, + 765, 1, 237, 362, 1594, 365, 6, 265, 8, 9, + 362, 1269, 1270, 227, 1613, 5, 362, 362, 362, 1335, + 234, 362, 257, 1264, 259, 1266, 93, 166, 5, 1510, + 5, 31, 32, 269, 300, 35, 36, 362, 273, 362, + 19, 339, 339, 808, 279, 175, 89, 261, 127, 49, + 362, 1641, 817, 1427, 184, 820, 362, 112, 1432, 1616, + 1617, 32, 1303, 32, 5, 5, 831, 59, 330, 143, + 173, 1784, 173, 838, 309, 173, 1450, 1451, 130, 214, + 134, 294, 341, 271, 137, 1326, 364, 238, 218, 1336, + 1336, 856, 857, 328, 241, 860, 1337, 19, 140, 72, + 334, 1814, 142, 1816, 336, 22, 31, 32, 1355, 144, + 35, 36, 1481, 8, 1430, 1977, 146, 352, 238, 202, + 355, 356, 116, 149, 49, 116, 139, 362, 306, 222, + 22, 98, 171, 1613, 5, 362, 1383, 267, 114, 1386, + 1730, 48, 354, 6, 7, 8, 9, 361, 1705, 1465, + 177, 365, 132, 56, 40, 335, 26, 19, 1757, 1406, + 160, 9, 357, 1876, 1754, 197, 46, 72, 31, 32, + 72, 26, 35, 36, 19, 175, 1434, 228, 1891, 42, + 1554, 198, 202, 72, 184, 315, 49, 197, 56, 1902, + 32, 241, 5, 47, 194, 362, 31, 32, 362, 199, + 35, 36, 129, 6, 32, 8, 9, 321, 362, 232, + 158, 289, 31, 32, 278, 1531, 35, 36, 218, 984, + 1933, 1934, 278, 988, 177, 1938, 215, 177, 31, 32, + 358, 361, 35, 36, 364, 40, 108, 1002, 39, 1004, + 19, 19, 280, 177, 1708, 173, 49, 336, 248, 147, + 1840, 177, 49, 5, 228, 1513, 321, 239, 222, 184, + 271, 31, 321, 1028, 260, 5, 21, 267, 238, 1034, + 5, 74, 75, 358, 1039, 263, 310, 135, 40, 72, + 1045, 1655, 1763, 171, 128, 62, 42, 128, 145, 125, + 18, 259, 40, 218, 117, 304, 5, 5, 165, 162, + 357, 305, 1560, 361, 1562, 1563, 22, 6, 7, 8, + 9, 202, 175, 1732, 151, 315, 361, 1082, 47, 18, + 47, 184, 156, 310, 1089, 354, 1091, 142, 42, 188, + 173, 329, 31, 32, 105, 5, 35, 36, 5, 358, + 5, 5, 267, 42, 6, 7, 8, 9, 1595, 184, + 49, 307, 1599, 19, 1835, 218, 5, 83, 19, 212, + 178, 361, 22, 1782, 168, 184, 42, 72, 1832, 31, + 32, 247, 175, 35, 36, 358, 6, 5, 8, 9, + 42, 184, 1629, 218, 245, 148, 5, 49, 84, 310, + 315, 336, 1633, 14, 20, 42, 1637, 21, 192, 218, + 362, 31, 32, 133, 267, 35, 36, 226, 142, 347, + 1784, 263, 170, 189, 1672, 218, 1657, 249, 1676, 49, + 6, 1679, 8, 9, 118, 1666, 15, 310, 72, 198, + 232, 56, 267, 263, 41, 1200, 361, 1202, 150, 125, + 1814, 366, 1816, 182, 62, 31, 32, 19, 267, 35, + 36, 338, 315, 361, 47, 42, 1221, 1715, 18, 249, + 1225, 71, 347, 49, 267, 5, 1707, 169, 1726, 1727, + 118, 304, 204, 304, 104, 190, 175, 119, 341, 293, + 315, 181, 48, 1741, 305, 184, 1744, 1252, 131, 1254, + 158, 170, 1733, 1258, 5, 361, 315, 119, 361, 318, + 319, 364, 1876, 120, 251, 6, 7, 8, 9, 305, + 228, 48, 315, 175, 173, 251, 48, 1891, 1776, 218, + 251, 350, 184, 48, 285, 347, 361, 142, 1902, 1993, + 31, 32, 48, 1780, 35, 36, 48, 11, 108, 356, + 1105, 6, 361, 8, 9, 175, 506, 510, 49, 165, + 227, 1553, 175, 885, 184, 1300, 218, 1798, 361, 1933, + 1934, 1802, 1803, 1804, 1938, 1554, 31, 32, 267, 1805, + 35, 36, 1868, 1854, 726, 1154, 1669, 1835, 1561, 1137, + 922, 1890, 1335, 1319, 49, 1335, 1903, 1650, 218, 175, + 701, 701, 1654, 1728, 893, 387, 153, 1436, 184, 387, + 1005, 1494, 1696, 1699, 1845, 267, 1098, 72, 1058, 1514, + 1392, 1763, 649, 1378, 1513, 1873, 315, 473, 1639, 845, + 661, 1862, 760, 1870, 1870, 1866, 1867, 412, 1869, 802, + 631, 947, 218, 557, 99, 710, 1338, 267, 1474, 1258, + 1496, 1255, 458, 1594, 1523, 1410, 1527, 741, 1595, 1095, + 240, 1892, 1893, 315, 669, 1896, 674, 1760, 1905, 1773, + 644, 1560, 361, 1562, 1563, 364, 1635, 1929, 794, 641, + 851, 1155, 104, 777, 175, 840, 191, 1265, -1, -1, + -1, 267, -1, 184, -1, 315, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 361, + 1947, 1948, 364, -1, 1469, -1, -1, -1, -1, -1, + 175, -1, 1959, 0, 1, -1, -1, 218, -1, 184, + 1967, 1967, 9, -1, 1489, 1490, 1973, 1974, -1, 315, + -1, 361, 1497, 1980, 1499, 1500, 1501, 1502, 1985, -1, + 27, 28, -1, 30, -1, -1, -1, -1, 1513, 214, + -1, -1, -1, 218, 1519, -1, 43, -1, 45, -1, + -1, 1526, -1, -1, 1529, -1, 267, -1, -1, -1, + -1, -1, -1, 1672, -1, 361, -1, 1676, 364, -1, + 1679, -1, -1, -1, -1, -1, 73, -1, -1, 76, + 77, -1, 1557, 1558, 81, 1560, -1, 1562, 1563, 86, + -1, -1, 267, -1, -1, -1, -1, -1, 95, -1, + 275, -1, -1, 100, 315, -1, 1715, -1, 6, -1, + 8, 9, -1, -1, -1, -1, -1, -1, 115, -1, + -1, -1, -1, 120, -1, 122, -1, -1, -1, -1, + -1, 128, 1741, 31, 32, 1744, -1, 35, 36, -1, + 315, 1616, 1617, -1, -1, 79, 80, -1, -1, 1624, + 361, 49, -1, 364, -1, -1, -1, -1, -1, -1, + 157, -1, 159, 1638, -1, -1, -1, 101, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 111, -1, 176, + 355, -1, 179, 180, -1, 119, 361, -1, 185, 186, + -1, -1, -1, -1, 191, -1, 193, 1672, 195, -1, + -1, 1676, -1, -1, 1679, -1, 104, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 220, -1, -1, 223, -1, 225, -1, + 1705, 1706, -1, -1, -1, 6, -1, 8, 9, -1, + 1715, -1, -1, -1, -1, -1, 243, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 254, -1, -1, + 31, 32, -1, -1, 35, 36, 1741, 1742, -1, 1744, + -1, -1, -1, 270, -1, -1, -1, 175, 49, -1, + -1, -1, -1, -1, -1, -1, 184, -1, 285, 286, + -1, -1, -1, 290, -1, -1, -1, -1, -1, -1, + -1, -1, 299, -1, -1, -1, -1, -1, -1, 207, + -1, 308, 1, -1, 311, -1, -1, 251, -1, -1, + 218, 255, 256, 320, -1, -1, -1, 324, 325, 326, + -1, -1, -1, -1, 331, 332, 333, -1, 27, 28, + -1, 30, -1, -1, -1, -1, -1, 281, 345, 346, + -1, -1, -1, 42, 43, -1, 45, 291, 292, -1, + -1, -1, -1, -1, -1, 362, -1, -1, -1, 267, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 73, -1, -1, 76, 77, -1, + -1, -1, 81, -1, -1, -1, -1, 86, -1, -1, + -1, -1, -1, -1, 175, -1, 95, -1, 1883, -1, + -1, 100, -1, 184, -1, -1, -1, 315, -1, -1, + -1, -1, -1, -1, -1, -1, 115, -1, -1, -1, + -1, 120, -1, 122, -1, -1, -1, -1, 127, -1, + 129, 130, 131, -1, 133, 134, 135, 218, 137, 138, + 139, 140, -1, 142, 143, 144, 145, 146, 147, 148, + 149, 150, 151, 361, -1, -1, -1, -1, 157, -1, + 159, 160, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 1958, -1, -1, -1, 176, -1, -1, + 179, 180, -1, -1, -1, -1, 267, 186, -1, -1, + -1, -1, 191, -1, 193, 194, 195, -1, -1, 1984, + 199, -1, -1, -1, -1, 1990, -1, -1, -1, 1994, + -1, -1, 1997, -1, -1, -1, 6, -1, 8, 9, + -1, 220, -1, -1, 223, -1, 225, -1, -1, -1, + -1, 230, -1, -1, 315, -1, -1, -1, -1, -1, + -1, 31, 32, -1, 243, 35, 36, -1, -1, 248, + -1, -1, -1, 334, -1, 254, -1, -1, -1, 49, + -1, -1, -1, 1, -1, -1, 347, -1, -1, -1, + -1, 270, -1, -1, -1, -1, 357, -1, 359, -1, + 361, -1, -1, -1, -1, -1, 285, 286, -1, 27, + 28, 290, 30, -1, 6, -1, 8, 9, -1, -1, + 299, -1, -1, -1, 42, 43, -1, 45, -1, 308, + -1, -1, 311, -1, -1, -1, -1, -1, -1, 31, + 32, 320, -1, 35, 36, 324, 325, 326, -1, -1, + -1, -1, 331, 332, 333, 73, -1, 49, 76, 77, + -1, -1, -1, 81, -1, -1, 345, 346, 86, -1, + -1, -1, -1, -1, -1, -1, -1, 95, -1, 358, + -1, -1, 100, 362, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 115, -1, -1, + -1, -1, 120, -1, 122, 175, -1, -1, -1, 127, + -1, 129, 130, 131, 184, 133, 134, 135, -1, 137, + 138, 139, 140, -1, 142, 143, 144, 145, 146, 147, + 148, 149, 150, 151, -1, -1, -1, -1, -1, 157, + -1, 159, 160, -1, -1, -1, -1, -1, 218, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 176, -1, + -1, 179, 180, -1, -1, -1, -1, -1, 186, -1, + -1, -1, -1, 191, -1, 193, 194, 195, -1, -1, + -1, 199, -1, 175, 6, -1, 8, 9, -1, -1, + -1, -1, 184, -1, -1, -1, -1, 267, -1, -1, + -1, -1, 220, -1, -1, 223, -1, 225, -1, 31, + 32, -1, 230, 35, 36, -1, -1, -1, -1, -1, + -1, -1, 214, -1, -1, 243, 218, 49, -1, -1, + 248, 6, -1, 8, 9, -1, 254, -1, -1, -1, + -1, -1, -1, -1, -1, 315, -1, -1, -1, -1, + -1, -1, 270, -1, -1, -1, 31, 32, -1, -1, + 35, 36, -1, -1, 334, -1, -1, 285, 286, -1, + -1, -1, 290, -1, 49, 267, -1, 347, -1, -1, + -1, 299, -1, -1, -1, -1, -1, 357, -1, 359, + 308, 361, 6, 311, 8, 9, -1, -1, -1, -1, + -1, -1, 320, -1, -1, 19, 324, 325, 326, -1, + -1, -1, -1, 331, 332, 333, -1, 31, 32, -1, + -1, 35, 36, 315, -1, -1, -1, 345, 346, 104, + 6, -1, 8, 9, -1, 49, -1, -1, -1, -1, + 358, -1, -1, -1, 362, 6, -1, 8, 9, -1, + -1, -1, -1, 175, -1, 31, 32, -1, 350, 35, + 36, -1, 184, -1, -1, 6, -1, 8, 9, 361, + 31, 32, -1, 49, 35, 36, -1, 6, 19, 8, + 9, -1, -1, -1, -1, -1, -1, -1, 49, -1, + 31, 32, 214, -1, 35, 36, 218, -1, -1, -1, + 175, -1, 31, 32, -1, -1, 35, 36, 49, 184, + 6, -1, 8, 9, -1, -1, -1, -1, -1, -1, + 49, 6, -1, 8, 9, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 31, 32, -1, -1, 35, + 36, -1, -1, 218, -1, 267, 31, 32, -1, -1, + 35, 36, 6, 49, 8, 9, -1, -1, 280, -1, + -1, 175, -1, -1, 49, -1, -1, -1, -1, -1, + 184, -1, -1, -1, -1, -1, -1, 31, 32, -1, + -1, 35, 36, -1, -1, -1, -1, 72, -1, -1, + -1, -1, 267, 315, -1, 49, -1, 173, -1, 175, + -1, -1, -1, -1, 218, -1, -1, -1, 184, -1, + -1, -1, 173, -1, 175, -1, -1, -1, -1, 6, + -1, 8, 9, 184, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 175, -1, -1, -1, -1, 361, + 315, -1, 218, 184, 31, 32, 175, -1, 35, 36, + -1, -1, -1, 267, -1, 184, -1, 218, -1, -1, + -1, -1, 49, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 218, -1, 175, + -1, -1, -1, -1, -1, 214, 361, -1, 184, 218, + 175, 267, -1, -1, 6, -1, 8, 9, -1, 184, + -1, 315, -1, -1, -1, -1, 267, -1, -1, -1, + -1, -1, -1, -1, -1, 6, -1, 8, 9, 31, + 32, 175, 218, 35, 36, -1, 267, -1, -1, -1, + 184, -1, -1, 218, -1, -1, -1, 49, 267, 315, + 31, 32, -1, -1, 35, 36, -1, 361, -1, -1, + -1, -1, -1, -1, 315, 251, -1, -1, 49, -1, + -1, -1, -1, -1, 218, 6, -1, 8, 9, -1, + -1, 267, -1, -1, 315, -1, -1, -1, -1, -1, + -1, 168, 267, -1, -1, 361, 315, -1, 175, -1, + 31, 32, -1, -1, 35, 36, -1, 184, 252, -1, + 361, -1, -1, -1, -1, -1, -1, -1, 49, -1, + -1, -1, -1, 267, -1, 6, -1, 8, 9, 315, + 361, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 315, 218, 361, -1, -1, -1, -1, -1, -1, -1, + 31, 32, -1, -1, 35, 36, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 168, -1, 49, -1, + -1, 315, -1, 175, -1, 361, -1, -1, -1, -1, + -1, -1, 184, 1, -1, -1, 361, -1, -1, -1, + 267, 9, -1, -1, 175, -1, -1, -1, -1, -1, + -1, -1, -1, 184, -1, -1, -1, -1, -1, 27, + 28, -1, 30, -1, -1, -1, 218, 361, -1, -1, + -1, -1, -1, -1, -1, 43, -1, 45, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 218, 315, -1, + -1, -1, -1, -1, 175, -1, -1, -1, -1, -1, + -1, -1, -1, 184, -1, 73, -1, -1, 76, 77, + -1, -1, -1, 81, -1, 267, -1, -1, 86, -1, + -1, -1, -1, -1, -1, -1, -1, 95, -1, 20, + -1, -1, 100, 24, 361, -1, 267, 218, -1, -1, + -1, -1, -1, -1, 175, -1, -1, 115, -1, -1, + -1, -1, 120, 184, 122, -1, -1, -1, -1, -1, + 128, -1, -1, 315, -1, -1, -1, -1, -1, -1, + -1, 62, -1, 64, 65, -1, 67, 68, 69, -1, + -1, -1, -1, -1, 315, -1, 267, 218, -1, 157, + -1, 159, -1, -1, -1, -1, -1, -1, -1, 20, + 91, -1, -1, 24, -1, -1, -1, -1, 176, 361, + -1, 179, 180, -1, -1, -1, -1, -1, 186, -1, + -1, -1, -1, 191, -1, 193, -1, 195, -1, -1, + 361, -1, -1, -1, 315, -1, 267, -1, 129, -1, + -1, 62, -1, 64, 65, -1, 67, 68, 69, -1, + -1, -1, 220, -1, -1, 223, -1, 225, -1, -1, + -1, -1, -1, -1, 155, -1, -1, 158, -1, -1, + 91, -1, -1, -1, -1, 243, -1, -1, -1, -1, + 361, 172, -1, 174, 315, -1, 254, -1, -1, -1, + -1, -1, 183, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 270, -1, -1, -1, -1, -1, -1, -1, + 201, -1, -1, -1, 205, 136, -1, 285, 286, -1, + 211, -1, 290, -1, -1, 216, 217, -1, -1, -1, + 361, 299, -1, -1, 155, -1, -1, -1, 229, -1, + 308, -1, -1, 311, -1, -1, -1, -1, -1, -1, + 241, 172, 320, 174, 20, -1, 324, 325, 326, -1, + -1, -1, 183, 331, 332, 333, -1, -1, -1, 260, + -1, -1, -1, -1, -1, -1, -1, 345, 346, -1, + 201, -1, -1, -1, 205, -1, -1, -1, -1, 20, + 211, -1, 283, -1, -1, 216, 217, 288, 64, 65, + -1, -1, 68, 69, -1, -1, -1, -1, 229, -1, + 301, -1, -1, -1, -1, -1, -1, -1, 309, -1, + -1, -1, -1, -1, 90, -1, -1, -1, -1, -1, + -1, -1, -1, 64, 65, -1, -1, 68, 69, 260, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 340, + -1, -1, 343, -1, -1, -1, -1, -1, 349, -1, + 351, -1, 283, -1, -1, -1, -1, 288, 359, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 301, -1, -1, -1, -1, -1, -1, -1, 309, 155, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 172, -1, 174, -1, + -1, -1, -1, -1, -1, -1, -1, 183, -1, 340, + -1, -1, 343, -1, 155, -1, -1, -1, 349, -1, + 351, -1, -1, -1, -1, 201, -1, -1, 359, 205, + -1, 172, -1, 174, -1, -1, -1, -1, -1, -1, + 216, 217, 183, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 27, 28, -1, 30, -1, + 201, -1, -1, -1, 205, -1, -1, -1, -1, -1, + -1, 43, -1, 45, -1, 216, 217, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 73, -1, -1, 76, 77, -1, 283, -1, 81, + -1, -1, 288, -1, 86, -1, -1, 68, -1, -1, + -1, -1, -1, 95, -1, 301, -1, -1, 100, -1, + -1, -1, -1, 309, -1, -1, -1, -1, -1, -1, + 91, 92, 283, 115, -1, -1, -1, 288, 120, -1, + 122, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 301, -1, -1, -1, 340, -1, -1, 343, 309, 120, + -1, -1, -1, -1, -1, 351, -1, -1, -1, 27, + 28, -1, 30, 359, -1, 157, -1, 159, -1, -1, + -1, -1, -1, -1, -1, 43, -1, 45, -1, 340, + -1, -1, 343, -1, 176, -1, -1, 179, 180, -1, + 351, -1, -1, -1, 186, -1, -1, -1, 359, 191, + -1, 193, -1, 195, -1, 73, -1, -1, 76, 77, + 181, -1, -1, 81, -1, -1, -1, -1, 86, -1, + -1, -1, -1, -1, -1, -1, -1, 95, 220, -1, + 201, 223, 100, 225, 205, -1, -1, -1, -1, -1, + 211, 212, -1, -1, -1, -1, -1, 115, -1, -1, + -1, 243, 120, -1, 122, -1, -1, 228, -1, -1, + -1, -1, 254, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 270, -1, + -1, -1, -1, -1, -1, -1, 257, -1, -1, 157, + -1, 159, -1, 285, 286, -1, -1, -1, 290, -1, + -1, -1, -1, -1, -1, -1, -1, 299, 176, -1, + -1, 179, 180, -1, -1, -1, 308, -1, 186, 311, + -1, -1, -1, 191, -1, 193, -1, 195, 320, -1, + -1, -1, 324, 325, 326, -1, -1, -1, 309, 331, + 332, 333, 313, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 220, 345, 346, 223, 327, 225, -1, -1, + 27, 28, -1, 30, -1, -1, -1, -1, -1, 340, + 362, 342, -1, -1, -1, 243, 43, -1, 45, -1, + -1, 352, -1, -1, 355, -1, 254, -1, -1, -1, + -1, 362, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 270, -1, -1, -1, 73, -1, -1, 76, + 77, -1, -1, -1, 81, -1, -1, 285, 286, 86, + -1, -1, 290, -1, -1, -1, -1, -1, 95, -1, + -1, 299, -1, 100, -1, -1, -1, -1, -1, -1, + 308, -1, -1, 311, -1, -1, -1, -1, 115, -1, + -1, -1, 320, 120, -1, 122, 324, 325, 326, -1, + -1, -1, -1, 331, 332, 333, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 345, 346, -1, + -1, -1, -1, -1, 27, 28, -1, 30, -1, -1, + 157, -1, 159, -1, 362, -1, -1, -1, -1, -1, + 43, -1, 45, -1, -1, -1, -1, -1, -1, 176, + -1, -1, 179, 180, -1, -1, -1, -1, -1, 186, + -1, -1, -1, -1, 191, -1, 193, -1, 195, -1, + 73, -1, -1, 76, 77, -1, -1, -1, 81, -1, + -1, -1, -1, 86, -1, -1, -1, -1, -1, -1, + -1, -1, 95, 220, -1, -1, 223, 100, 225, -1, + -1, 228, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 115, -1, -1, -1, 243, 120, -1, 122, + -1, -1, -1, -1, -1, -1, 68, 254, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 270, -1, -1, -1, -1, -1, 91, + 92, -1, -1, -1, 157, -1, 159, -1, 285, 286, + -1, -1, -1, 290, -1, -1, -1, -1, -1, -1, + -1, -1, 299, 176, -1, -1, 179, 180, 120, -1, + -1, 308, -1, 186, 311, -1, -1, -1, 191, -1, + 193, -1, 195, 320, -1, -1, -1, 324, 325, 326, + -1, -1, -1, -1, 331, 332, 333, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 220, 345, 346, + 223, -1, 225, -1, -1, 228, -1, -1, -1, -1, + -1, 27, 28, -1, 30, -1, -1, -1, -1, 181, + 243, -1, -1, -1, -1, -1, -1, 43, -1, 45, + -1, 254, -1, -1, -1, -1, -1, -1, -1, 201, + -1, -1, -1, 205, -1, -1, -1, 270, -1, 211, + 212, -1, -1, -1, -1, -1, -1, 73, -1, -1, + 76, 77, 285, 286, -1, 81, 228, 290, -1, -1, + 86, -1, -1, -1, -1, -1, 299, -1, -1, 95, + -1, -1, -1, -1, 100, 308, -1, -1, 311, -1, + -1, -1, -1, -1, -1, 257, -1, 320, -1, 115, + -1, 324, 325, 326, 120, -1, 122, -1, 331, 332, + 333, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 345, 346, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 157, -1, 159, -1, -1, -1, 309, -1, -1, + -1, 313, -1, -1, -1, -1, -1, -1, -1, -1, + 176, -1, -1, 179, 180, 327, -1, -1, -1, -1, + 186, -1, -1, -1, -1, 191, -1, 193, 340, 195, + 342, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 352, -1, -1, 355, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 220, -1, -1, 223, -1, 225, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 243, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 254, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 270, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 285, + 286, -1, -1, -1, 290, -1, -1, -1, -1, -1, + -1, -1, -1, 299, -1, -1, -1, -1, -1, -1, + -1, -1, 308, -1, -1, 311, -1, -1, -1, -1, + -1, -1, -1, -1, 320, -1, -1, -1, 324, 325, + 326, -1, -1, -1, -1, 331, 332, 333, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 345, + 346 +}; + +/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const yytype_uint16 yystos[] = +{ + 0, 185, 369, 370, 371, 375, 376, 123, 0, 375, + 128, 372, 373, 152, 384, 362, 373, 265, 371, 375, + 123, 108, 451, 266, 374, 373, 375, 362, 123, 263, + 614, 362, 4, 385, 362, 123, 377, 96, 386, 452, + 615, 4, 300, 29, 417, 166, 453, 82, 354, 904, + 378, 362, 300, 300, 360, 455, 6, 8, 9, 31, + 32, 35, 36, 49, 175, 184, 218, 267, 315, 361, + 957, 958, 962, 963, 964, 965, 968, 969, 977, 979, + 981, 982, 957, 362, 20, 380, 432, 387, 362, 362, + 300, 213, 457, 31, 31, 965, 968, 9, 214, 943, + 364, 219, 188, 238, 950, 616, 362, 94, 192, 1, + 236, 314, 316, 388, 1, 164, 418, 419, 454, 362, + 300, 281, 459, 364, 958, 958, 980, 981, 114, 621, + 379, 265, 381, 381, 362, 362, 362, 362, 200, 420, + 1, 543, 456, 362, 300, 297, 518, 959, 367, 958, + 983, 984, 362, 617, 382, 390, 389, 1, 50, 85, + 106, 107, 113, 121, 395, 396, 397, 398, 400, 403, + 404, 405, 406, 412, 303, 421, 422, 362, 163, 298, + 612, 458, 362, 300, 908, 909, 958, 954, 958, 365, + 366, 942, 35, 36, 622, 1, 9, 362, 618, 619, + 632, 633, 63, 109, 110, 196, 302, 383, 5, 5, + 5, 5, 309, 399, 432, 432, 321, 362, 397, 5, + 407, 244, 430, 422, 224, 296, 437, 438, 439, 440, + 442, 544, 547, 551, 969, 985, 613, 460, 362, 365, + 943, 365, 984, 958, 958, 1, 9, 627, 632, 620, + 300, 362, 363, 634, 27, 28, 30, 43, 45, 73, + 76, 77, 81, 86, 95, 100, 115, 120, 122, 157, + 159, 176, 179, 180, 186, 191, 193, 195, 220, 223, + 225, 243, 254, 270, 285, 286, 290, 299, 308, 311, + 320, 324, 325, 326, 331, 332, 333, 345, 346, 636, + 637, 638, 639, 643, 644, 663, 694, 695, 696, 697, + 698, 699, 700, 701, 706, 707, 711, 724, 725, 730, + 733, 737, 740, 743, 746, 747, 748, 749, 754, 755, + 756, 766, 770, 776, 778, 795, 797, 802, 805, 808, + 812, 815, 822, 825, 830, 831, 833, 844, 850, 852, + 885, 362, 362, 362, 362, 362, 265, 391, 359, 394, + 952, 432, 432, 432, 5, 93, 432, 432, 5, 167, + 971, 166, 271, 311, 312, 441, 362, 439, 5, 5, + 970, 971, 551, 269, 461, 519, 909, 623, 628, 362, + 362, 779, 977, 977, 977, 977, 104, 734, 835, 958, + 816, 958, 49, 958, 826, 771, 772, 977, 731, 834, + 977, 977, 757, 958, 744, 958, 645, 253, 265, 977, + 19, 955, 7, 42, 364, 897, 931, 958, 975, 957, + 977, 977, 977, 104, 207, 958, 741, 958, 1, 160, + 194, 199, 248, 767, 768, 9, 31, 911, 924, 928, + 929, 952, 958, 986, 339, 339, 777, 977, 977, 8, + 49, 671, 972, 1, 46, 450, 845, 846, 849, 975, + 979, 8, 972, 977, 810, 977, 31, 32, 295, 832, + 1, 880, 881, 958, 104, 738, 835, 958, 958, 977, + 977, 977, 362, 637, 127, 640, 89, 392, 393, 362, + 362, 112, 226, 318, 319, 413, 414, 415, 963, 32, + 401, 402, 32, 5, 5, 423, 330, 446, 59, 447, + 545, 548, 552, 462, 520, 1, 128, 624, 625, 627, + 633, 1, 353, 629, 143, 793, 228, 262, 780, 173, + 799, 173, 796, 173, 764, 835, 130, 736, 19, 735, + 958, 943, 74, 75, 821, 823, 958, 943, 274, 344, + 773, 774, 775, 952, 134, 732, 18, 977, 294, 836, + 271, 947, 350, 758, 764, 943, 137, 745, 72, 197, + 648, 649, 9, 31, 813, 814, 986, 364, 931, 897, + 931, 18, 20, 35, 36, 37, 38, 39, 42, 51, + 52, 53, 227, 234, 261, 361, 936, 937, 938, 939, + 941, 40, 41, 664, 280, 726, 103, 329, 887, 888, + 241, 713, 715, 953, 958, 978, 238, 19, 140, 742, + 72, 768, 769, 977, 950, 950, 347, 357, 142, 635, + 636, 334, 336, 22, 923, 144, 794, 947, 799, 675, + 972, 146, 693, 672, 238, 517, 979, 19, 124, 348, + 979, 714, 716, 953, 713, 42, 198, 230, 873, 874, + 876, 878, 202, 197, 943, 116, 835, 149, 739, 173, + 958, 116, 854, 641, 139, 669, 306, 222, 415, 22, + 56, 416, 22, 402, 408, 424, 98, 608, 171, 448, + 579, 580, 553, 5, 521, 985, 626, 114, 636, 48, + 947, 958, 48, 66, 800, 930, 958, 10, 11, 12, + 13, 34, 194, 62, 91, 129, 211, 260, 753, 761, + 762, 763, 765, 952, 953, 19, 834, 958, 977, 177, + 943, 958, 132, 824, 354, 899, 772, 448, 448, 24, + 187, 215, 364, 897, 836, 943, 806, 97, 322, 323, + 759, 136, 760, 958, 958, 834, 958, 56, 646, 162, + 341, 651, 897, 931, 118, 214, 986, 976, 365, 365, + 19, 23, 946, 42, 939, 897, 897, 897, 897, 897, + 432, 932, 40, 934, 933, 335, 670, 51, 54, 55, + 234, 235, 727, 728, 729, 961, 963, 977, 889, 886, + 702, 715, 26, 19, 958, 956, 978, 834, 958, 769, + 943, 9, 9, 31, 914, 977, 930, 912, 986, 924, + 958, 197, 781, 803, 693, 676, 357, 678, 849, 72, + 72, 19, 712, 716, 26, 708, 202, 944, 809, 876, + 198, 432, 977, 881, 72, 951, 173, 834, 958, 951, + 197, 665, 666, 667, 432, 963, 963, 56, 32, 241, + 409, 1, 44, 57, 61, 166, 246, 271, 276, 284, + 362, 425, 426, 427, 5, 443, 444, 1, 5, 449, + 70, 88, 108, 203, 210, 271, 281, 282, 355, 362, + 432, 581, 583, 584, 585, 586, 587, 588, 589, 590, + 595, 362, 582, 584, 587, 68, 201, 237, 257, 273, + 279, 309, 328, 352, 355, 356, 362, 432, 537, 540, + 554, 557, 561, 568, 570, 571, 574, 605, 463, 970, + 362, 362, 362, 156, 158, 317, 630, 781, 798, 47, + 945, 753, 32, 753, 753, 753, 321, 31, 979, 232, + 512, 512, 897, 64, 65, 68, 69, 155, 172, 174, + 183, 201, 216, 217, 283, 288, 301, 343, 351, 432, + 536, 537, 952, 158, 834, 42, 837, 953, 834, 899, + 900, 827, 278, 278, 289, 215, 897, 837, 943, 873, + 760, 952, 177, 837, 177, 650, 358, 652, 953, 986, + 983, 939, 40, 939, 897, 898, 939, 42, 897, 931, + 935, 940, 941, 935, 665, 728, 108, 611, 19, 977, + 280, 891, 392, 720, 944, 978, 19, 943, 837, 177, + 977, 931, 173, 928, 347, 357, 336, 977, 42, 62, + 128, 783, 786, 873, 62, 679, 948, 979, 673, 231, + 239, 241, 341, 848, 960, 968, 977, 966, 967, 969, + 979, 966, 849, 719, 952, 944, 719, 875, 147, 811, + 944, 42, 940, 879, 952, 1, 310, 882, 958, 834, + 837, 177, 49, 855, 861, 856, 857, 977, 642, 635, + 228, 5, 963, 321, 411, 239, 410, 222, 434, 271, + 955, 944, 944, 31, 321, 432, 260, 445, 444, 5, + 608, 432, 271, 272, 603, 603, 432, 432, 608, 432, + 21, 433, 238, 546, 161, 178, 5, 549, 358, 607, + 206, 293, 559, 985, 575, 555, 558, 432, 559, 432, + 433, 161, 178, 205, 340, 572, 573, 962, 432, 465, + 522, 156, 158, 263, 775, 952, 873, 251, 958, 753, + 753, 897, 897, 985, 211, 297, 607, 153, 154, 985, + 206, 293, 24, 67, 229, 349, 750, 836, 953, 310, + 837, 177, 287, 902, 903, 828, 135, 807, 24, 155, + 834, 977, 834, 977, 651, 653, 138, 358, 362, 647, + 979, 365, 939, 941, 897, 40, 72, 961, 171, 892, + 703, 717, 977, 978, 978, 834, 915, 958, 913, 920, + 977, 948, 786, 787, 42, 145, 804, 677, 128, 679, + 231, 847, 979, 720, 125, 718, 972, 720, 635, 877, + 977, 851, 259, 836, 834, 40, 958, 879, 943, 117, + 858, 669, 304, 432, 411, 432, 944, 1, 5, 33, + 161, 428, 968, 973, 432, 432, 59, 60, 431, 432, + 5, 9, 189, 211, 276, 307, 435, 987, 985, 985, + 5, 432, 433, 5, 596, 240, 317, 604, 5, 968, + 974, 357, 985, 165, 550, 551, 550, 361, 19, 336, + 606, 432, 6, 8, 556, 979, 305, 538, 538, 942, + 22, 16, 120, 259, 569, 87, 101, 102, 251, 362, + 432, 466, 467, 468, 472, 523, 953, 202, 782, 151, + 801, 211, 212, 470, 471, 361, 47, 979, 837, 310, + 156, 839, 979, 979, 817, 901, 864, 953, 47, 153, + 154, 297, 837, 836, 837, 836, 654, 655, 941, 958, + 895, 890, 49, 84, 169, 205, 340, 894, 354, 705, + 977, 837, 928, 951, 142, 931, 173, 786, 42, 635, + 948, 358, 686, 687, 680, 674, 188, 949, 972, 709, + 635, 862, 863, 977, 837, 837, 861, 329, 860, 857, + 949, 105, 859, 5, 432, 126, 268, 307, 436, 987, + 432, 973, 973, 5, 5, 5, 307, 19, 598, 5, + 471, 949, 19, 602, 432, 551, 985, 562, 576, 22, + 560, 83, 539, 573, 962, 962, 432, 433, 208, 209, + 473, 464, 178, 168, 477, 19, 91, 173, 211, 310, + 354, 362, 530, 571, 574, 952, 631, 768, 957, 432, + 42, 198, 783, 788, 789, 791, 751, 839, 840, 42, + 818, 905, 906, 951, 958, 829, 158, 249, 866, 277, + 277, 247, 658, 659, 656, 48, 66, 49, 84, 205, + 72, 893, 723, 977, 704, 916, 958, 958, 948, 785, + 688, 687, 635, 358, 681, 682, 245, 610, 194, 354, + 721, 148, 883, 869, 953, 958, 949, 853, 977, 949, + 5, 5, 985, 84, 272, 597, 591, 952, 310, 841, + 967, 84, 609, 973, 606, 26, 565, 566, 14, 577, + 979, 20, 21, 985, 479, 480, 985, 478, 533, 525, + 532, 524, 529, 531, 962, 64, 65, 68, 69, 90, + 155, 172, 174, 183, 201, 216, 217, 283, 288, 301, + 343, 351, 535, 537, 952, 362, 977, 198, 944, 42, + 791, 635, 635, 953, 819, 943, 99, 275, 355, 907, + 133, 843, 865, 977, 977, 56, 662, 665, 42, 58, + 162, 341, 661, 668, 658, 192, 896, 896, 961, 895, + 961, 961, 961, 977, 177, 248, 722, 142, 347, 951, + 784, 786, 691, 979, 685, 960, 682, 263, 723, 710, + 871, 878, 249, 977, 862, 977, 429, 952, 62, 212, + 592, 594, 170, 173, 600, 601, 118, 944, 189, 15, + 578, 470, 480, 970, 977, 977, 232, 542, 960, 542, + 960, 960, 527, 211, 297, 607, 528, 153, 154, 526, + 206, 293, 24, 67, 229, 349, 944, 790, 752, 310, + 864, 906, 958, 635, 837, 837, 660, 897, 975, 657, + 961, 961, 895, 895, 895, 72, 723, 263, 917, 958, + 786, 41, 689, 432, 683, 938, 432, 722, 953, 870, + 150, 884, 125, 62, 593, 594, 338, 948, 602, 967, + 563, 432, 951, 182, 469, 481, 432, 35, 36, 221, + 258, 541, 19, 534, 541, 960, 361, 960, 960, 47, + 792, 635, 753, 838, 42, 867, 661, 22, 662, 961, + 432, 931, 347, 692, 228, 635, 690, 18, 228, 635, + 684, 960, 910, 986, 249, 635, 71, 974, 974, 609, + 953, 5, 567, 971, 432, 169, 476, 68, 91, 92, + 120, 181, 201, 205, 211, 212, 228, 257, 309, 313, + 327, 340, 342, 352, 355, 482, 483, 484, 490, 491, + 493, 494, 495, 496, 497, 498, 499, 502, 507, 508, + 513, 960, 977, 960, 635, 839, 953, 820, 897, 895, + 910, 918, 921, 691, 304, 955, 304, 923, 872, 974, + 118, 599, 958, 971, 985, 119, 204, 475, 607, 78, + 206, 232, 233, 293, 500, 500, 190, 509, 293, 514, + 20, 21, 232, 233, 501, 433, 181, 492, 432, 503, + 504, 432, 432, 432, 362, 483, 258, 985, 985, 305, + 158, 131, 842, 48, 925, 931, 968, 979, 635, 953, + 564, 432, 119, 170, 474, 361, 500, 500, 501, 433, + 432, 433, 432, 432, 513, 432, 957, 79, 80, 101, + 111, 119, 251, 255, 256, 281, 291, 292, 485, 120, + 968, 985, 228, 241, 539, 868, 926, 977, 928, 922, + 5, 566, 985, 432, 432, 432, 433, 228, 258, 516, + 985, 576, 305, 252, 506, 958, 505, 489, 488, 170, + 182, 170, 182, 170, 182, 251, 228, 635, 48, 173, + 919, 925, 985, 985, 251, 985, 539, 350, 510, 168, + 515, 958, 515, 487, 486, 251, 926, 958, 142, 957, + 285, 511, 515, 515, 48, 951, 168, 958, 926, 958, + 48, 347, 926, 927, 48, 931, 926, 48, 926 +}; + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + + +/* Like YYERROR except do call yyerror. This remains here temporarily + to ease the transition to the new meaning of YYERROR, for GCC. + Once GCC version 2 has supplanted version 1, this can go. However, + YYFAIL appears to be in use. Nevertheless, it is formally deprecated + in Bison 2.4.2's NEWS entry, where a plan to phase it out is + discussed. */ + +#define YYFAIL goto yyerrlab +#if defined YYFAIL + /* This is here to suppress warnings from the GCC cpp's + -Wunused-macros. Normally we don't worry about that warning, but + some users do, and we want to make it easy for users to remove + YYFAIL uses, which will produce warnings from Bison 2.5. */ +#endif + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY && yylen == 1) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + yytoken = YYTRANSLATE (yychar); \ + YYPOPSTACK (1); \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ +while (YYID (0)) + + +#define YYTERROR 1 +#define YYERRCODE 256 + + +/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. + If N is 0, then set CURRENT to the empty location which ends + the previous symbol: RHS[0] (always defined). */ + +#define YYRHSLOC(Rhs, K) ((Rhs)[K]) +#ifndef YYLLOC_DEFAULT +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (YYID (N)) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ + while (YYID (0)) +#endif + + +/* YY_LOCATION_PRINT -- Print the location on the stream. + This macro was not mandated originally: define only if we know + we won't break user code: when these are the locations we know. */ + +#ifndef YY_LOCATION_PRINT +# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL +# define YY_LOCATION_PRINT(File, Loc) \ + fprintf (File, "%d.%d-%d.%d", \ + (Loc).first_line, (Loc).first_column, \ + (Loc).last_line, (Loc).last_column) +# else +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif +#endif + + +/* YYLEX -- calling `yylex' with the right arguments. */ + +#ifdef YYLEX_PARAM +# define YYLEX yylex (YYLEX_PARAM) +#else +# define YYLEX yylex () +#endif + +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (YYID (0)) + +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (YYID (0)) + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +#else +static void +yy_symbol_value_print (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; +#endif +{ + if (!yyvaluep) + return; +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# else + YYUSE (yyoutput); +# endif + switch (yytype) + { + default: + break; + } +} + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +#else +static void +yy_symbol_print (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; +#endif +{ + if (yytype < YYNTOKENS) + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); + else + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + + yy_symbol_value_print (yyoutput, yytype, yyvaluep); + YYFPRINTF (yyoutput, ")"); +} + +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) +#else +static void +yy_stack_print (yybottom, yytop) + yytype_int16 *yybottom; + yytype_int16 *yytop; +#endif +{ + YYFPRINTF (stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } + YYFPRINTF (stderr, "\n"); +} + +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (YYID (0)) + + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_reduce_print (YYSTYPE *yyvsp, int yyrule) +#else +static void +yy_reduce_print (yyvsp, yyrule) + YYSTYPE *yyvsp; + int yyrule; +#endif +{ + int yynrhs = yyr2[yyrule]; + int yyi; + unsigned long int yylno = yyrline[yyrule]; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + YYFPRINTF (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], + &(yyvsp[(yyi + 1) - (yynrhs)]) + ); + YYFPRINTF (stderr, "\n"); + } +} + +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyvsp, Rule); \ +} while (YYID (0)) + +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +int yydebug; +#else /* !YYDEBUG */ +# define YYDPRINTF(Args) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !YYDEBUG */ + + +/* YYINITDEPTH -- initial size of the parser's stacks. */ +#ifndef YYINITDEPTH +# define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). + + Do not make this value too large; the results are undefined if + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ + +#ifndef YYMAXDEPTH +# define YYMAXDEPTH 10000 +#endif + + + +#if YYERROR_VERBOSE + +# ifndef yystrlen +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen strlen +# else +/* Return the length of YYSTR. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static YYSIZE_T +yystrlen (const char *yystr) +#else +static YYSIZE_T +yystrlen (yystr) + const char *yystr; +#endif +{ + YYSIZE_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) + continue; + return yylen; +} +# endif +# endif + +# ifndef yystpcpy +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static char * +yystpcpy (char *yydest, const char *yysrc) +#else +static char * +yystpcpy (yydest, yysrc) + char *yydest; + const char *yysrc; +#endif +{ + char *yyd = yydest; + const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# endif +# endif + +# ifndef yytnamerr +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary + quotes and backslashes, so that it's suitable for yyerror. The + heuristic is that double-quoting is unnecessary unless the string + contains an apostrophe, a comma, or backslash (other than + backslash-backslash). YYSTR is taken from yytname. If YYRES is + null, do not copy; instead, return the length of what the result + would have been. */ +static YYSIZE_T +yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + YYSIZE_T yyn = 0; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } + + if (! yyres) + return yystrlen (yystr); + + return yystpcpy (yyres, yystr) - yyres; +} +# endif + +/* Copy into YYRESULT an error message about the unexpected token + YYCHAR while in state YYSTATE. Return the number of bytes copied, + including the terminating null byte. If YYRESULT is null, do not + copy anything; just return the number of bytes that would be + copied. As a special case, return 0 if an ordinary "syntax error" + message will do. Return YYSIZE_MAXIMUM if overflow occurs during + size calculation. */ +static YYSIZE_T +yysyntax_error (char *yyresult, int yystate, int yychar) +{ + int yyn = yypact[yystate]; + + if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) + return 0; + else + { + int yytype = YYTRANSLATE (yychar); + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + int yysize_overflow = 0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + int yyx; + +# if 0 + /* This is so xgettext sees the translatable formats that are + constructed on the fly. */ + YY_("syntax error, unexpected %s"); + YY_("syntax error, unexpected %s, expecting %s"); + YY_("syntax error, unexpected %s, expecting %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); +# endif + char *yyfmt; + char const *yyf; + static char const yyunexpected[] = "syntax error, unexpected %s"; + static char const yyexpecting[] = ", expecting %s"; + static char const yyor[] = " or %s"; + char yyformat[sizeof yyunexpected + + sizeof yyexpecting - 1 + + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) + * (sizeof yyor - 1))]; + char const *yyprefix = yyexpecting; + + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yycount = 1; + + yyarg[0] = yytname[yytype]; + yyfmt = yystpcpy (yyformat, yyunexpected); + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + yyformat[sizeof yyunexpected - 1] = '\0'; + break; + } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + yyfmt = yystpcpy (yyfmt, yyprefix); + yyprefix = yyor; + } + + yyf = YY_(yyformat); + yysize1 = yysize + yystrlen (yyf); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + + if (yysize_overflow) + return YYSIZE_MAXIMUM; + + if (yyresult) + { + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + char *yyp = yyresult; + int yyi = 0; + while ((*yyp = *yyf) != '\0') + { + if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyf += 2; + } + else + { + yyp++; + yyf++; + } + } + } + return yysize; + } +} +#endif /* YYERROR_VERBOSE */ + + +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) +#else +static void +yydestruct (yymsg, yytype, yyvaluep) + const char *yymsg; + int yytype; + YYSTYPE *yyvaluep; +#endif +{ + YYUSE (yyvaluep); + + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + + switch (yytype) + { + + default: + break; + } +} + +/* Prevent warnings from -Wmissing-prototypes. */ +#ifdef YYPARSE_PARAM +#if defined __STDC__ || defined __cplusplus +int yyparse (void *YYPARSE_PARAM); +#else +int yyparse (); +#endif +#else /* ! YYPARSE_PARAM */ +#if defined __STDC__ || defined __cplusplus +int yyparse (void); +#else +int yyparse (); +#endif +#endif /* ! YYPARSE_PARAM */ + + +/* The lookahead symbol. */ +int yychar; + +/* The semantic value of the lookahead symbol. */ +YYSTYPE yylval; + +/* Number of syntax errors so far. */ +int yynerrs; + + + +/*-------------------------. +| yyparse or yypush_parse. | +`-------------------------*/ + +#ifdef YYPARSE_PARAM +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (void *YYPARSE_PARAM) +#else +int +yyparse (YYPARSE_PARAM) + void *YYPARSE_PARAM; +#endif +#else /* ! YYPARSE_PARAM */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (void) +#else +int +yyparse () + +#endif +#endif +{ + + + int yystate; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + + /* The stacks and their tools: + `yyss': related to states. + `yyvs': related to semantic values. + + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss; + yytype_int16 *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; + + YYSIZE_T yystacksize; + + int yyn; + int yyresult; + /* Lookahead token as an internal (translated) token number. */ + int yytoken; + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; + + yytoken = 0; + yyss = yyssa; + yyvs = yyvsa; + yystacksize = YYINITDEPTH; + + YYDPRINTF ((stderr, "Starting parse\n")); + + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ + + /* Initialize stack pointers. + Waste one element of value and location stack + so that they stay on the same level as the state stack. + The wasted elements are never initialized. */ + yyssp = yyss; + yyvsp = yyvs; + + goto yysetstate; + +/*------------------------------------------------------------. +| yynewstate -- Push a new state, which is found in yystate. | +`------------------------------------------------------------*/ + yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. So pushing a state here evens the stacks. */ + yyssp++; + + yysetstate: + *yyssp = yystate; + + if (yyss + yystacksize - 1 <= yyssp) + { + /* Get the current used size of the three stacks, in elements. */ + YYSIZE_T yysize = yyssp - yyss + 1; + +#ifdef yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; + } +#else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyexhaustedlab; +# else + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + goto yyexhaustedlab; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif +#endif /* no yyoverflow */ + + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + + YYDPRINTF ((stderr, "Stack size increased to %lu\n", + (unsigned long int) yystacksize)); + + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } + + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + + if (yystate == YYFINAL) + YYACCEPT; + + goto yybackup; + +/*-----------. +| yybackup. | +`-----------*/ +yybackup: + + /* Do appropriate processing given the current state. Read a + lookahead token if we need one and don't already have one. */ + + /* First try to decide what to do without reference to lookahead token. */ + yyn = yypact[yystate]; + if (yyn == YYPACT_NINF) + goto yydefault; + + /* Not known => get a lookahead token if don't already have one. */ + + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token: ")); + yychar = YYLEX; + } + + if (yychar <= YYEOF) + { + yychar = yytoken = YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else + { + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + } + + /* If the proper action on seeing token YYTOKEN is to reduce or to + detect an error, take that action. */ + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) + goto yydefault; + yyn = yytable[yyn]; + if (yyn <= 0) + { + if (yyn == 0 || yyn == YYTABLE_NINF) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + /* Shift the lookahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + + /* Discard the shifted token. */ + yychar = YYEMPTY; + + yystate = yyn; + *++yyvsp = yylval; + + goto yynewstate; + + +/*-----------------------------------------------------------. +| yydefault -- do the default action for the current state. | +`-----------------------------------------------------------*/ +yydefault: + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + +/*-----------------------------. +| yyreduce -- Do a reduction. | +`-----------------------------*/ +yyreduce: + /* yyn is the number of a rule to reduce with. */ + yylen = yyr2[yyn]; + + /* If YYLEN is nonzero, implement the default value of the action: + `$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; + + + YY_REDUCE_PRINT (yyn); + switch (yyn) + { + case 2: + +/* Line 1464 of yacc.c */ +#line 309 "htcobol.y" + { gen_main_rtn(); ;} + break; + + case 3: + +/* Line 1464 of yacc.c */ +#line 312 "htcobol.y" + { pgm_segment++; (yyval.ival)=1; ;} + break; + + case 4: + +/* Line 1464 of yacc.c */ +#line 313 "htcobol.y" + { (yyval.ival)=1 ; ;} + break; + + case 5: + +/* Line 1464 of yacc.c */ +#line 314 "htcobol.y" + { (yyval.ival)=1 ; ;} + break; + + case 6: + +/* Line 1464 of yacc.c */ +#line 323 "htcobol.y" + { pgm_segment++ ; (yyval.ival) = 1; ;} + break; + + case 7: + +/* Line 1464 of yacc.c */ +#line 324 "htcobol.y" + { pgm_segment++ ; nested_flag = 1; ;} + break; + + case 8: + +/* Line 1464 of yacc.c */ +#line 324 "htcobol.y" + { (yyval.ival) = 1; ;} + break; + + case 9: + +/* Line 1464 of yacc.c */ +#line 325 "htcobol.y" + {pgm_segment++ ; nested_flag = 1; (yyval.ival) = 1; ;} + break; + + case 10: + +/* Line 1464 of yacc.c */ +#line 337 "htcobol.y" + { clear_symtab(); clear_offsets(); + curr_division= CDIV_IDENT; ;} + break; + + case 11: + +/* Line 1464 of yacc.c */ +#line 340 "htcobol.y" + { curr_division = CDIV_COMMENT; ;} + break; + + case 13: + +/* Line 1464 of yacc.c */ +#line 356 "htcobol.y" + { + curr_division = CDIV_IDENT; + ;} + break; + + case 14: + +/* Line 1464 of yacc.c */ +#line 360 "htcobol.y" + { + curr_division = CINITIAL; + if (pgm_header((yyvsp[(7) - (7)].str)) != 0) { + yyerror("Invalid character(s) in PROGRAM-ID name"); + /* YYABORT; */ + } + ;} + break; + + case 15: + +/* Line 1464 of yacc.c */ +#line 368 "htcobol.y" + { + define_special_fields(); + ;} + break; + + case 18: + +/* Line 1464 of yacc.c */ +#line 375 "htcobol.y" + { initial_flag=1; ;} + break; + + case 19: + +/* Line 1464 of yacc.c */ +#line 376 "htcobol.y" + { UNIMPLEMENTED("PROGRAM-ID ... COMMON clause") ;} + break; + + case 21: + +/* Line 1464 of yacc.c */ +#line 379 "htcobol.y" + { ;} + break; + + case 24: + +/* Line 1464 of yacc.c */ +#line 386 "htcobol.y" + { curr_division = CDIV_COMMENT1; ;} + break; + + case 25: + +/* Line 1464 of yacc.c */ +#line 387 "htcobol.y" + { curr_division = CDIV_COMMENT1; ;} + break; + + case 26: + +/* Line 1464 of yacc.c */ +#line 388 "htcobol.y" + { curr_division = CDIV_COMMENT1; ;} + break; + + case 27: + +/* Line 1464 of yacc.c */ +#line 389 "htcobol.y" + { curr_division = CDIV_COMMENT1; ;} + break; + + case 28: + +/* Line 1464 of yacc.c */ +#line 390 "htcobol.y" + { curr_division = CDIV_COMMENT1; ;} + break; + + case 29: + +/* Line 1464 of yacc.c */ +#line 397 "htcobol.y" + { + curr_division = CDIV_ENVIR; + ;} + break; + + case 30: + +/* Line 1464 of yacc.c */ +#line 402 "htcobol.y" + { + curr_division = CINITIAL; + ;} + break; + + case 34: + +/* Line 1464 of yacc.c */ +#line 415 "htcobol.y" + { ;} + break; + + case 35: + +/* Line 1464 of yacc.c */ +#line 416 "htcobol.y" + { ;} + break; + + case 36: + +/* Line 1464 of yacc.c */ +#line 420 "htcobol.y" + { envdiv_bypass_save_sw=1; ;} + break; + + case 37: + +/* Line 1464 of yacc.c */ +#line 422 "htcobol.y" + { envdiv_bypass_save_sw=0; ;} + break; + + case 38: + +/* Line 1464 of yacc.c */ +#line 424 "htcobol.y" + { envdiv_bypass_save_sw=1; ;} + break; + + case 39: + +/* Line 1464 of yacc.c */ +#line 426 "htcobol.y" + { envdiv_bypass_save_sw=0; ;} + break; + + case 41: + +/* Line 1464 of yacc.c */ +#line 428 "htcobol.y" + { yyerror("invalid format in CONFIGURATION SECTION"); ;} + break; + + case 45: + +/* Line 1464 of yacc.c */ +#line 437 "htcobol.y" + { ;} + break; + + case 46: + +/* Line 1464 of yacc.c */ +#line 438 "htcobol.y" + { ;} + break; + + case 47: + +/* Line 1464 of yacc.c */ +#line 441 "htcobol.y" + { stabs_on_sw = 1; ;} + break; + + case 48: + +/* Line 1464 of yacc.c */ +#line 442 "htcobol.y" + { ;} + break; + + case 51: + +/* Line 1464 of yacc.c */ +#line 447 "htcobol.y" + { yyerror("invalid format in SPECIAL-NAMES clause");;} + break; + + case 61: + +/* Line 1464 of yacc.c */ +#line 467 "htcobol.y" + { + currency_symbol = (yyvsp[(4) - (4)].lval)->name[0]; + ;} + break; + + case 64: + +/* Line 1464 of yacc.c */ +#line 476 "htcobol.y" + {;} + break; + + case 65: + +/* Line 1464 of yacc.c */ +#line 479 "htcobol.y" + {;} + break; + + case 66: + +/* Line 1464 of yacc.c */ +#line 480 "htcobol.y" + {;} + break; + + case 67: + +/* Line 1464 of yacc.c */ +#line 483 "htcobol.y" + {;} + break; + + case 68: + +/* Line 1464 of yacc.c */ +#line 484 "htcobol.y" + {;} + break; + + case 69: + +/* Line 1464 of yacc.c */ +#line 488 "htcobol.y" + { + decimal_comma=1; ;} + break; + + case 70: + +/* Line 1464 of yacc.c */ +#line 493 "htcobol.y" + { screen_status_field=(yyvsp[(4) - (4)].sval); ;} + break; + + case 71: + +/* Line 1464 of yacc.c */ +#line 497 "htcobol.y" + { cursor_field=(yyvsp[(3) - (3)].sval); ;} + break; + + case 74: + +/* Line 1464 of yacc.c */ +#line 504 "htcobol.y" + {if ((yyvsp[(1) - (3)].sval)->name[0] != 'S' || (yyvsp[(1) - (3)].sval)->name[1] != 'W') + yyerror("Invalid switch name"); + define_switch_field((yyvsp[(3) - (3)].sval), (yyvsp[(1) - (3)].sval));;} + break; + + case 75: + +/* Line 1464 of yacc.c */ +#line 508 "htcobol.y" + { close_fields();;} + break; + + case 76: + +/* Line 1464 of yacc.c */ +#line 511 "htcobol.y" + {save_switch_value((yyvsp[(4) - (4)].sval), 1);;} + break; + + case 78: + +/* Line 1464 of yacc.c */ +#line 515 "htcobol.y" + {save_switch_value((yyvsp[(4) - (4)].sval), 0);;} + break; + + case 82: + +/* Line 1464 of yacc.c */ +#line 524 "htcobol.y" + { + (yyvsp[(2) - (4)].sval)->defined=1; + UNIMPLEMENTED("Alphabet clause") + ;} + break; + + case 83: + +/* Line 1464 of yacc.c */ +#line 530 "htcobol.y" + { ;} + break; + + case 84: + +/* Line 1464 of yacc.c */ +#line 531 "htcobol.y" + { ;} + break; + + case 85: + +/* Line 1464 of yacc.c */ +#line 532 "htcobol.y" + { ;} + break; + + case 86: + +/* Line 1464 of yacc.c */ +#line 533 "htcobol.y" + { ;} + break; + + case 89: + +/* Line 1464 of yacc.c */ +#line 540 "htcobol.y" + { ;} + break; + + case 90: + +/* Line 1464 of yacc.c */ +#line 541 "htcobol.y" + { ;} + break; + + case 91: + +/* Line 1464 of yacc.c */ +#line 542 "htcobol.y" + { ;} + break; + + case 94: + +/* Line 1464 of yacc.c */ +#line 552 "htcobol.y" + { ;} + break; + + case 96: + +/* Line 1464 of yacc.c */ +#line 556 "htcobol.y" + { ;} + break; + + case 97: + +/* Line 1464 of yacc.c */ +#line 557 "htcobol.y" + { yyerror("INPUT-OUTPUT SECTION format wrong"); ;} + break; + + case 98: + +/* Line 1464 of yacc.c */ +#line 560 "htcobol.y" + { ;} + break; + + case 100: + +/* Line 1464 of yacc.c */ +#line 563 "htcobol.y" + { ;} + break; + + case 103: + +/* Line 1464 of yacc.c */ +#line 576 "htcobol.y" + { + (yyvsp[(3) - (3)].sval)->type='F'; /* mark as file variable */ + curr_file=(yyvsp[(3) - (3)].sval); + (yyvsp[(3) - (3)].sval)->pic=0; /* suppose not indexed yet */ + (yyvsp[(3) - (3)].sval)->defined=1; + (yyvsp[(3) - (3)].sval)->parent=NULL; /* assume no STATUS yet + this is "file status" var in files */ + (yyvsp[(3) - (3)].sval)->organization = 2; + (yyvsp[(3) - (3)].sval)->access_mode = 1; + (yyvsp[(3) - (3)].sval)->times=-1; + (yyvsp[(3) - (3)].sval)->alternate=NULL; /* reset alternate key list */ + (yyvsp[(3) - (3)].sval)->flags.optional=(yyvsp[(2) - (3)].ival); /* according to keyword */ + (yyvsp[(3) - (3)].sval)->refmod_redef.declarative=NULL; /* no declarative yet */ + ;} + break; + + case 104: + +/* Line 1464 of yacc.c */ +#line 591 "htcobol.y" + { + if ((curr_file->organization==ORG_INDEXED) && + !(curr_file->ix_desc)) { + yyerror("indexed file must have a record key"); + YYABORT; + } + ;} + break; + + case 107: + +/* Line 1464 of yacc.c */ +#line 605 "htcobol.y" + { curr_file->organization=(yyvsp[(3) - (3)].ival); ;} + break; + + case 108: + +/* Line 1464 of yacc.c */ +#line 606 "htcobol.y" + { curr_file->filenamevar=(yyvsp[(3) - (3)].sval);;} + break; + + case 109: + +/* Line 1464 of yacc.c */ +#line 608 "htcobol.y" + { + /*{ curr_file->access_mode=$4; }*/ + if (curr_file->access_mode < 5) { + curr_file->access_mode=(yyvsp[(4) - (4)].ival); + } + else { + curr_file->access_mode = (yyvsp[(4) - (4)].ival) + 5; + } + ;} + break; + + case 110: + +/* Line 1464 of yacc.c */ +#line 617 "htcobol.y" + { curr_file->parent=(yyvsp[(4) - (4)].sval); ;} + break; + + case 111: + +/* Line 1464 of yacc.c */ +#line 618 "htcobol.y" + { curr_file->ix_desc=(yyvsp[(4) - (4)].sval); ;} + break; + + case 112: + +/* Line 1464 of yacc.c */ +#line 619 "htcobol.y" + { curr_file->ix_desc=(yyvsp[(4) - (4)].sval); ;} + break; + + case 113: + +/* Line 1464 of yacc.c */ +#line 621 "htcobol.y" + { add_alternate_key((yyvsp[(5) - (6)].sval),(yyvsp[(6) - (6)].ival)); ;} + break; + + case 115: + +/* Line 1464 of yacc.c */ +#line 623 "htcobol.y" + { yyerror("invalid clause in select"); ;} + break; + + case 118: + +/* Line 1464 of yacc.c */ +#line 630 "htcobol.y" + { ;} + break; + + case 120: + +/* Line 1464 of yacc.c */ +#line 633 "htcobol.y" + { (yyval.sval)=NULL; ;} + break; + + case 121: + +/* Line 1464 of yacc.c */ +#line 634 "htcobol.y" + { (yyval.sval)=(yyvsp[(1) - (1)].sval); ;} + break; + + case 122: + +/* Line 1464 of yacc.c */ +#line 635 "htcobol.y" + { (yyval.sval)=(yyvsp[(2) - (2)].sval); ;} + break; + + case 123: + +/* Line 1464 of yacc.c */ +#line 637 "htcobol.y" + { + curr_file->access_mode = curr_file->access_mode + 5; + (yyval.sval)=(yyvsp[(2) - (2)].sval); + ;} + break; + + case 124: + +/* Line 1464 of yacc.c */ +#line 641 "htcobol.y" + { yyerror("Invalid ASSIGN clause in SELECT statement"); ;} + break; + + case 125: + +/* Line 1464 of yacc.c */ +#line 644 "htcobol.y" + { (yyval.ival)=1; ;} + break; + + case 126: + +/* Line 1464 of yacc.c */ +#line 645 "htcobol.y" + { (yyval.ival)=0; ;} + break; + + case 127: + +/* Line 1464 of yacc.c */ +#line 648 "htcobol.y" + { (yyval.ival)=1; ;} + break; + + case 128: + +/* Line 1464 of yacc.c */ +#line 649 "htcobol.y" + { (yyval.ival)=0; ;} + break; + + case 132: + +/* Line 1464 of yacc.c */ +#line 656 "htcobol.y" + { ;} + break; + + case 134: + +/* Line 1464 of yacc.c */ +#line 660 "htcobol.y" + { ;} + break; + + case 138: + +/* Line 1464 of yacc.c */ +#line 668 "htcobol.y" + { (yyval.ival)=1; ;} + break; + + case 139: + +/* Line 1464 of yacc.c */ +#line 669 "htcobol.y" + { (yyval.ival)=2; ;} + break; + + case 140: + +/* Line 1464 of yacc.c */ +#line 670 "htcobol.y" + { (yyval.ival)=3; ;} + break; + + case 141: + +/* Line 1464 of yacc.c */ +#line 671 "htcobol.y" + { (yyval.ival)=4; ;} + break; + + case 142: + +/* Line 1464 of yacc.c */ +#line 672 "htcobol.y" + { yyerror("invalid option, %s",(yyvsp[(1) - (1)].sval)->name); ;} + break; + + case 143: + +/* Line 1464 of yacc.c */ +#line 675 "htcobol.y" + { (yyval.ival)=1; ;} + break; + + case 144: + +/* Line 1464 of yacc.c */ +#line 676 "htcobol.y" + { (yyval.ival)=2; ;} + break; + + case 145: + +/* Line 1464 of yacc.c */ +#line 677 "htcobol.y" + { (yyval.ival)=3; ;} + break; + + case 146: + +/* Line 1464 of yacc.c */ +#line 679 "htcobol.y" + { yyerror("invalid access option, %s", (yyvsp[(1) - (1)].sval)->name); ;} + break; + + case 148: + +/* Line 1464 of yacc.c */ +#line 684 "htcobol.y" + { UNIMPLEMENTED("I-O-CONTROL paragraph") ;} + break; + + case 155: + +/* Line 1464 of yacc.c */ +#line 699 "htcobol.y" + { ;} + break; + + case 156: + +/* Line 1464 of yacc.c */ +#line 700 "htcobol.y" + { ;} + break; + + case 157: + +/* Line 1464 of yacc.c */ +#line 701 "htcobol.y" + { ;} + break; + + case 161: + +/* Line 1464 of yacc.c */ +#line 711 "htcobol.y" + { ;} + break; + + case 163: + +/* Line 1464 of yacc.c */ +#line 714 "htcobol.y" + { ;} + break; + + case 170: + +/* Line 1464 of yacc.c */ +#line 729 "htcobol.y" + { (yyval.sval) = (yyvsp[(1) - (1)].sval); ;} + break; + + case 171: + +/* Line 1464 of yacc.c */ +#line 730 "htcobol.y" + { (yyval.sval) = (yyvsp[(2) - (2)].sval); ;} + break; + + case 172: + +/* Line 1464 of yacc.c */ +#line 731 "htcobol.y" + { yyerror("string expected"); ;} + break; + + case 173: + +/* Line 1464 of yacc.c */ +#line 734 "htcobol.y" + { (yyval.sval) = (struct sym *)chain_var((yyvsp[(1) - (1)].sval)); ;} + break; + + case 174: + +/* Line 1464 of yacc.c */ +#line 735 "htcobol.y" + { (yyval.sval) = (struct sym *)chain_var((yyvsp[(2) - (2)].sval)); ;} + break; + + case 175: + +/* Line 1464 of yacc.c */ +#line 736 "htcobol.y" + { yyerror("variable expected"); ;} + break; + + case 176: + +/* Line 1464 of yacc.c */ +#line 745 "htcobol.y" + { curr_division = CDIV_DATA; ;} + break; + + case 177: + +/* Line 1464 of yacc.c */ +#line 751 "htcobol.y" + { curr_division = CINITIAL; ;} + break; + + case 179: + +/* Line 1464 of yacc.c */ +#line 758 "htcobol.y" + { curr_field=NULL; ;} + break; + + case 180: + +/* Line 1464 of yacc.c */ +#line 759 "htcobol.y" + { close_fields(); ;} + break; + + case 182: + +/* Line 1464 of yacc.c */ +#line 766 "htcobol.y" + { curr_field=NULL; ;} + break; + + case 183: + +/* Line 1464 of yacc.c */ +#line 767 "htcobol.y" + { close_fields(); ;} + break; + + case 185: + +/* Line 1464 of yacc.c */ +#line 774 "htcobol.y" + { at_linkage=1; curr_field=NULL; has_linkage++; ;} + break; + + case 186: + +/* Line 1464 of yacc.c */ +#line 775 "htcobol.y" + { close_fields(); at_linkage=0; ;} + break; + + case 188: + +/* Line 1464 of yacc.c */ +#line 791 "htcobol.y" + { ;} + break; + + case 192: + +/* Line 1464 of yacc.c */ +#line 800 "htcobol.y" + { /*curr_division = CDIV_FD;*/ ;} + break; + + case 193: + +/* Line 1464 of yacc.c */ +#line 802 "htcobol.y" + { + (yyvsp[(3) - (3)].sval)->type='W'; + (yyvsp[(3) - (3)].sval)->picstr = 0; + (yyvsp[(3) - (3)].sval)->parent = 0; + (yyvsp[(3) - (3)].sval)->clone = 0; + (yyvsp[(3) - (3)].sval)->times = -1; + curr_division = CDIV_PROC; + UNIMPLEMENTED("Report Section") + ;} + break; + + case 194: + +/* Line 1464 of yacc.c */ +#line 812 "htcobol.y" + { + curr_division = CDIV_DATA; + ;} + break; + + case 195: + +/* Line 1464 of yacc.c */ +#line 816 "htcobol.y" + { + /* update_report_field($4); */ + /* define_field(1,$4); */ + ;} + break; + + case 198: + +/* Line 1464 of yacc.c */ +#line 824 "htcobol.y" + { ;} + break; + + case 199: + +/* Line 1464 of yacc.c */ +#line 825 "htcobol.y" + { ;} + break; + + case 200: + +/* Line 1464 of yacc.c */ +#line 826 "htcobol.y" + { ;} + break; + + case 201: + +/* Line 1464 of yacc.c */ +#line 827 "htcobol.y" + { ;} + break; + + case 224: + +/* Line 1464 of yacc.c */ +#line 876 "htcobol.y" + { (yyvsp[(2) - (2)].sval)->defined=1; ;} + break; + + case 227: + +/* Line 1464 of yacc.c */ +#line 884 "htcobol.y" + { + if ((yyvsp[(2) - (2)].sval) == NULL) { + (yyvsp[(2) - (2)].sval) = alloc_filler(); + picix=piccnt=v_flag=n_flag=decimals=pscale=0; + picture[picix]=0; + } + define_field((yyvsp[(1) - (2)].ival),(yyvsp[(2) - (2)].sval)); + curr_division = CDIV_DATA; + ;} + break; + + case 228: + +/* Line 1464 of yacc.c */ +#line 894 "htcobol.y" + { + update_report_field((yyvsp[(2) - (5)].sval)); + curr_division = CDIV_DATA; + ;} + break; + + case 231: + +/* Line 1464 of yacc.c */ +#line 904 "htcobol.y" + { ;} + break; + + case 232: + +/* Line 1464 of yacc.c */ +#line 905 "htcobol.y" + { ;} + break; + + case 233: + +/* Line 1464 of yacc.c */ +#line 906 "htcobol.y" + { ;} + break; + + case 234: + +/* Line 1464 of yacc.c */ +#line 907 "htcobol.y" + { ;} + break; + + case 235: + +/* Line 1464 of yacc.c */ +#line 908 "htcobol.y" + { ;} + break; + + case 236: + +/* Line 1464 of yacc.c */ +#line 909 "htcobol.y" + { ;} + break; + + case 237: + +/* Line 1464 of yacc.c */ +#line 910 "htcobol.y" + { ;} + break; + + case 238: + +/* Line 1464 of yacc.c */ +#line 911 "htcobol.y" + { ;} + break; + + case 239: + +/* Line 1464 of yacc.c */ +#line 912 "htcobol.y" + { ;} + break; + + case 240: + +/* Line 1464 of yacc.c */ +#line 913 "htcobol.y" + { ;} + break; + + case 241: + +/* Line 1464 of yacc.c */ +#line 914 "htcobol.y" + { ;} + break; + + case 242: + +/* Line 1464 of yacc.c */ +#line 917 "htcobol.y" + { ;} + break; + + case 243: + +/* Line 1464 of yacc.c */ +#line 920 "htcobol.y" + { ;} + break; + + case 244: + +/* Line 1464 of yacc.c */ +#line 921 "htcobol.y" + { ;} + break; + + case 245: + +/* Line 1464 of yacc.c */ +#line 922 "htcobol.y" + { curr_division = CDIV_PROC; ;} + break; + + case 246: + +/* Line 1464 of yacc.c */ +#line 923 "htcobol.y" + { curr_division = CDIV_DATA; ;} + break; + + case 247: + +/* Line 1464 of yacc.c */ +#line 924 "htcobol.y" + { ;} + break; + + case 248: + +/* Line 1464 of yacc.c */ +#line 925 "htcobol.y" + { curr_division = CDIV_PROC; ;} + break; + + case 249: + +/* Line 1464 of yacc.c */ +#line 926 "htcobol.y" + { curr_division = CDIV_DATA; ;} + break; + + case 250: + +/* Line 1464 of yacc.c */ +#line 927 "htcobol.y" + { ;} + break; + + case 251: + +/* Line 1464 of yacc.c */ +#line 928 "htcobol.y" + { ;} + break; + + case 252: + +/* Line 1464 of yacc.c */ +#line 929 "htcobol.y" + { ;} + break; + + case 253: + +/* Line 1464 of yacc.c */ +#line 930 "htcobol.y" + { ;} + break; + + case 254: + +/* Line 1464 of yacc.c */ +#line 931 "htcobol.y" + { curr_division = CDIV_PROC; ;} + break; + + case 255: + +/* Line 1464 of yacc.c */ +#line 932 "htcobol.y" + { curr_division = CDIV_DATA; ;} + break; + + case 256: + +/* Line 1464 of yacc.c */ +#line 933 "htcobol.y" + { ;} + break; + + case 257: + +/* Line 1464 of yacc.c */ +#line 934 "htcobol.y" + { curr_division = CDIV_PROC; ;} + break; + + case 258: + +/* Line 1464 of yacc.c */ +#line 935 "htcobol.y" + { curr_division = CDIV_DATA; ;} + break; + + case 259: + +/* Line 1464 of yacc.c */ +#line 936 "htcobol.y" + { ;} + break; + + case 260: + +/* Line 1464 of yacc.c */ +#line 937 "htcobol.y" + { ;} + break; + + case 261: + +/* Line 1464 of yacc.c */ +#line 940 "htcobol.y" + { ;} + break; + + case 262: + +/* Line 1464 of yacc.c */ +#line 941 "htcobol.y" + { ;} + break; + + case 263: + +/* Line 1464 of yacc.c */ +#line 945 "htcobol.y" + { + curr_division = CDIV_PIC; + ;} + break; + + case 264: + +/* Line 1464 of yacc.c */ +#line 948 "htcobol.y" + { curr_division = CDIV_DATA; ;} + break; + + case 265: + +/* Line 1464 of yacc.c */ +#line 951 "htcobol.y" + { ;} + break; + + case 266: + +/* Line 1464 of yacc.c */ +#line 952 "htcobol.y" + { ;} + break; + + case 269: + +/* Line 1464 of yacc.c */ +#line 961 "htcobol.y" + { ;} + break; + + case 270: + +/* Line 1464 of yacc.c */ +#line 962 "htcobol.y" + { ;} + break; + + case 271: + +/* Line 1464 of yacc.c */ +#line 963 "htcobol.y" + { ;} + break; + + case 272: + +/* Line 1464 of yacc.c */ +#line 964 "htcobol.y" + { ;} + break; + + case 277: + +/* Line 1464 of yacc.c */ +#line 973 "htcobol.y" + { ;} + break; + + case 278: + +/* Line 1464 of yacc.c */ +#line 976 "htcobol.y" + { (yyval.ival)=(yyvsp[(2) - (3)].ival); ;} + break; + + case 279: + +/* Line 1464 of yacc.c */ +#line 977 "htcobol.y" + { (yyval.ival)=(yyvsp[(3) - (4)].ival); ;} + break; + + case 280: + +/* Line 1464 of yacc.c */ +#line 978 "htcobol.y" + { (yyval.ival)=(yyvsp[(3) - (4)].ival); ;} + break; + + case 281: + +/* Line 1464 of yacc.c */ +#line 979 "htcobol.y" + { (yyval.ival)=(yyvsp[(2) - (3)].ival); ;} + break; + + case 282: + +/* Line 1464 of yacc.c */ +#line 982 "htcobol.y" + { (yyval.ival)=0; ;} + break; + + case 283: + +/* Line 1464 of yacc.c */ +#line 983 "htcobol.y" + { (yyval.ival)=0; ;} + break; + + case 284: + +/* Line 1464 of yacc.c */ +#line 984 "htcobol.y" + { (yyval.ival)=1; ;} + break; + + case 285: + +/* Line 1464 of yacc.c */ +#line 985 "htcobol.y" + { (yyval.ival)=2; ;} + break; + + case 287: + +/* Line 1464 of yacc.c */ +#line 989 "htcobol.y" + { ;} + break; + + case 288: + +/* Line 1464 of yacc.c */ +#line 990 "htcobol.y" + { ;} + break; + + case 289: + +/* Line 1464 of yacc.c */ +#line 993 "htcobol.y" + { curr_division = CDIV_PROC; ;} + break; + + case 290: + +/* Line 1464 of yacc.c */ +#line 995 "htcobol.y" + { curr_division = CDIV_DATA; ;} + break; + + case 291: + +/* Line 1464 of yacc.c */ +#line 996 "htcobol.y" + { ;} + break; + + case 292: + +/* Line 1464 of yacc.c */ +#line 997 "htcobol.y" + { curr_division = CDIV_PROC; ;} + break; + + case 293: + +/* Line 1464 of yacc.c */ +#line 998 "htcobol.y" + { curr_division = CDIV_DATA; ;} + break; + + case 294: + +/* Line 1464 of yacc.c */ +#line 999 "htcobol.y" + { ;} + break; + + case 295: + +/* Line 1464 of yacc.c */ +#line 1001 "htcobol.y" + { ;} + break; + + case 296: + +/* Line 1464 of yacc.c */ +#line 1002 "htcobol.y" + { ;} + break; + + case 298: + +/* Line 1464 of yacc.c */ +#line 1005 "htcobol.y" + { ;} + break; + + case 299: + +/* Line 1464 of yacc.c */ +#line 1008 "htcobol.y" + { ;} + break; + + case 301: + +/* Line 1464 of yacc.c */ +#line 1011 "htcobol.y" + { ;} + break; + + case 303: + +/* Line 1464 of yacc.c */ +#line 1014 "htcobol.y" + { ;} + break; + + case 305: + +/* Line 1464 of yacc.c */ +#line 1017 "htcobol.y" + { ;} + break; + + case 306: + +/* Line 1464 of yacc.c */ +#line 1018 "htcobol.y" + { ;} + break; + + case 308: + +/* Line 1464 of yacc.c */ +#line 1021 "htcobol.y" + { ;} + break; + + case 309: + +/* Line 1464 of yacc.c */ +#line 1024 "htcobol.y" + { ;} + break; + + case 310: + +/* Line 1464 of yacc.c */ +#line 1025 "htcobol.y" + { ;} + break; + + case 312: + +/* Line 1464 of yacc.c */ +#line 1028 "htcobol.y" + { ;} + break; + + case 313: + +/* Line 1464 of yacc.c */ +#line 1031 "htcobol.y" + { ;} + break; + + case 314: + +/* Line 1464 of yacc.c */ +#line 1032 "htcobol.y" + { ;} + break; + + case 315: + +/* Line 1464 of yacc.c */ +#line 1035 "htcobol.y" + { ;} + break; + + case 316: + +/* Line 1464 of yacc.c */ +#line 1036 "htcobol.y" + { ;} + break; + + case 317: + +/* Line 1464 of yacc.c */ +#line 1037 "htcobol.y" + { ;} + break; + + case 320: + +/* Line 1464 of yacc.c */ +#line 1051 "htcobol.y" + { + screen_io_enable++; + curr_field=NULL; + HTG_prg_uses_term = 1; + ;} + break; + + case 321: + +/* Line 1464 of yacc.c */ +#line 1056 "htcobol.y" + { close_fields(); ;} + break; + + case 325: + +/* Line 1464 of yacc.c */ +#line 1069 "htcobol.y" + { + if ((yyvsp[(2) - (2)].sval) == NULL) { + (yyvsp[(2) - (2)].sval) = alloc_filler(); + } + picix=piccnt=v_flag=n_flag=decimals=pscale=0; + picture[picix]=0; + define_field((yyvsp[(1) - (2)].ival),(yyvsp[(2) - (2)].sval)); + ;} + break; + + case 326: + +/* Line 1464 of yacc.c */ +#line 1077 "htcobol.y" + { update_screen_field((yyvsp[(2) - (5)].sval),(yyvsp[(4) - (5)].sival)); ;} + break; + + case 327: + +/* Line 1464 of yacc.c */ +#line 1080 "htcobol.y" + { curr_division = CDIV_PROC; ;} + break; + + case 328: + +/* Line 1464 of yacc.c */ +#line 1083 "htcobol.y" + { curr_division = CDIV_DATA; + scr_set_line((yyvsp[(1) - (6)].sival),(yyvsp[(6) - (6)].sval),(yyvsp[(5) - (6)].ival)); (yyval.sival)=(yyvsp[(1) - (6)].sival); ;} + break; + + case 329: + +/* Line 1464 of yacc.c */ +#line 1085 "htcobol.y" + { curr_division = CDIV_PROC; ;} + break; + + case 330: + +/* Line 1464 of yacc.c */ +#line 1088 "htcobol.y" + { curr_division = CDIV_DATA; + scr_set_column((yyvsp[(1) - (6)].sival),(yyvsp[(6) - (6)].sval),(yyvsp[(5) - (6)].ival)); (yyval.sival)=(yyvsp[(1) - (6)].sival); ;} + break; + + case 331: + +/* Line 1464 of yacc.c */ +#line 1091 "htcobol.y" + { (yyvsp[(1) - (3)].sival)->attr |= (yyvsp[(3) - (3)].ival); (yyval.sival)=(yyvsp[(1) - (3)].sival); ;} + break; + + case 332: + +/* Line 1464 of yacc.c */ +#line 1092 "htcobol.y" + { curr_division = CDIV_PROC; ;} + break; + + case 333: + +/* Line 1464 of yacc.c */ +#line 1093 "htcobol.y" + { curr_division = CDIV_DATA; + (yyvsp[(1) - (5)].sival)->color = NULL; + (yyvsp[(1) - (5)].sival)->foreground = (yyvsp[(5) - (5)].sval); (yyval.sival)=(yyvsp[(1) - (5)].sival); ;} + break; + + case 334: + +/* Line 1464 of yacc.c */ +#line 1096 "htcobol.y" + { curr_division = CDIV_PROC; ;} + break; + + case 335: + +/* Line 1464 of yacc.c */ +#line 1097 "htcobol.y" + { curr_division = CDIV_DATA; + (yyvsp[(1) - (5)].sival)->color = NULL; + (yyvsp[(1) - (5)].sival)->background = (yyvsp[(5) - (5)].sval); (yyval.sival)=(yyvsp[(1) - (5)].sival); ;} + break; + + case 336: + +/* Line 1464 of yacc.c */ +#line 1100 "htcobol.y" + { curr_division = CDIV_PROC; ;} + break; + + case 337: + +/* Line 1464 of yacc.c */ +#line 1101 "htcobol.y" + { curr_division = CDIV_DATA; + (yyvsp[(1) - (5)].sival)->foreground = NULL; + (yyvsp[(1) - (5)].sival)->background = NULL; + (yyvsp[(1) - (5)].sival)->color = (yyvsp[(5) - (5)].sval); (yyval.sival)=(yyvsp[(1) - (5)].sival); ;} + break; + + case 339: + +/* Line 1464 of yacc.c */ +#line 1108 "htcobol.y" + { curr_field->value = (yyvsp[(3) - (3)].lval); (yyval.sival)=(yyvsp[(1) - (3)].sival); ;} + break; + + case 341: + +/* Line 1464 of yacc.c */ +#line 1110 "htcobol.y" + { curr_division = CDIV_PROC; ;} + break; + + case 342: + +/* Line 1464 of yacc.c */ +#line 1111 "htcobol.y" + { curr_division = CDIV_DATA; + (yyvsp[(1) - (4)].sival)->size = (yyvsp[(4) - (4)].sval); (yyval.sival)=(yyvsp[(1) - (4)].sival); ;} + break; + + case 343: + +/* Line 1464 of yacc.c */ +#line 1113 "htcobol.y" + { (yyval.sival) = alloc_scr_info(); ;} + break; + + case 344: + +/* Line 1464 of yacc.c */ +#line 1116 "htcobol.y" + { curr_division = CDIV_PROC; ;} + break; + + case 345: + +/* Line 1464 of yacc.c */ +#line 1117 "htcobol.y" + { + curr_division = CDIV_DATA; + (yyvsp[(0) - (3)].sival)->from = (yyvsp[(0) - (3)].sival)->to = (yyvsp[(3) - (3)].sval); + ;} + break; + + case 346: + +/* Line 1464 of yacc.c */ +#line 1121 "htcobol.y" + { curr_division = CDIV_PROC; ;} + break; + + case 347: + +/* Line 1464 of yacc.c */ +#line 1123 "htcobol.y" + { + curr_division = CDIV_DATA; + (yyvsp[(0) - (4)].sival)->from = (yyvsp[(3) - (4)].sval); (yyvsp[(0) - (4)].sival)->to = (yyvsp[(4) - (4)].sval); + ;} + break; + + case 348: + +/* Line 1464 of yacc.c */ +#line 1127 "htcobol.y" + { curr_division = CDIV_PROC; ;} + break; + + case 349: + +/* Line 1464 of yacc.c */ +#line 1128 "htcobol.y" + { + curr_division = CDIV_DATA; + (yyvsp[(0) - (3)].sival)->from = NULL; (yyvsp[(0) - (3)].sival)->to = (yyvsp[(3) - (3)].sval); + ;} + break; + + case 350: + +/* Line 1464 of yacc.c */ +#line 1134 "htcobol.y" + { (yyval.sval)=NULL; ;} + break; + + case 351: + +/* Line 1464 of yacc.c */ +#line 1135 "htcobol.y" + { (yyval.sval) = (yyvsp[(2) - (2)].sval); ;} + break; + + case 352: + +/* Line 1464 of yacc.c */ +#line 1138 "htcobol.y" + { (yyval.ival) = SCR_BLANK_SCREEN; ;} + break; + + case 353: + +/* Line 1464 of yacc.c */ +#line 1139 "htcobol.y" + { (yyval.ival) = SCR_BLANK_LINE; ;} + break; + + case 354: + +/* Line 1464 of yacc.c */ +#line 1140 "htcobol.y" + { (yyval.ival) = SCR_ERASE_EOL; ;} + break; + + case 355: + +/* Line 1464 of yacc.c */ +#line 1141 "htcobol.y" + { (yyval.ival) = SCR_ERASE_EOS; ;} + break; + + case 356: + +/* Line 1464 of yacc.c */ +#line 1142 "htcobol.y" + { (yyval.ival) = SCR_ERASE_EOL; ;} + break; + + case 357: + +/* Line 1464 of yacc.c */ +#line 1143 "htcobol.y" + { (yyval.ival) = SCR_BELL; ;} + break; + + case 358: + +/* Line 1464 of yacc.c */ +#line 1144 "htcobol.y" + { (yyval.ival) = (yyvsp[(1) - (1)].ival); ;} + break; + + case 359: + +/* Line 1464 of yacc.c */ +#line 1145 "htcobol.y" + { (yyval.ival) = SCR_FULL; ;} + break; + + case 360: + +/* Line 1464 of yacc.c */ +#line 1146 "htcobol.y" + { (yyval.ival) = SCR_REQUIRED; ;} + break; + + case 361: + +/* Line 1464 of yacc.c */ +#line 1147 "htcobol.y" + { (yyval.ival) = SCR_SECURE; ;} + break; + + case 362: + +/* Line 1464 of yacc.c */ +#line 1148 "htcobol.y" + { (yyval.ival) = SCR_AUTO; ;} + break; + + case 363: + +/* Line 1464 of yacc.c */ +#line 1149 "htcobol.y" + { (yyval.ival) = SCR_JUST_RIGHT; ;} + break; + + case 364: + +/* Line 1464 of yacc.c */ +#line 1150 "htcobol.y" + { (yyval.ival) = SCR_JUST_LEFT; ;} + break; + + case 365: + +/* Line 1464 of yacc.c */ +#line 1151 "htcobol.y" + { (yyval.ival) = SCR_BLINK; ;} + break; + + case 366: + +/* Line 1464 of yacc.c */ +#line 1152 "htcobol.y" + { (yyval.ival) = SCR_REVERSE_VIDEO; ;} + break; + + case 367: + +/* Line 1464 of yacc.c */ +#line 1153 "htcobol.y" + { (yyval.ival) = SCR_UNDERLINE; ;} + break; + + case 368: + +/* Line 1464 of yacc.c */ +#line 1154 "htcobol.y" + { (yyval.ival) = SCR_LOWLIGHT; ;} + break; + + case 369: + +/* Line 1464 of yacc.c */ +#line 1155 "htcobol.y" + { (yyval.ival) = SCR_HIGHLIGHT; ;} + break; + + case 370: + +/* Line 1464 of yacc.c */ +#line 1156 "htcobol.y" + { (yyval.ival) = SCR_BLANK_WHEN_ZERO; ;} + break; + + case 371: + +/* Line 1464 of yacc.c */ +#line 1157 "htcobol.y" + { (yyval.ival) = SCR_NOECHO; ;} + break; + + case 372: + +/* Line 1464 of yacc.c */ +#line 1158 "htcobol.y" + { (yyval.ival) = SCR_UPDATE; ;} + break; + + case 373: + +/* Line 1464 of yacc.c */ +#line 1159 "htcobol.y" + { (yyval.ival) = SCR_NO_ADVANCING; ;} + break; + + case 374: + +/* Line 1464 of yacc.c */ +#line 1160 "htcobol.y" + { (yyval.ival) = SCR_UPPER; ;} + break; + + case 375: + +/* Line 1464 of yacc.c */ +#line 1161 "htcobol.y" + { (yyval.ival) = SCR_LOWER; ;} + break; + + case 376: + +/* Line 1464 of yacc.c */ +#line 1165 "htcobol.y" + { (yyval.ival) = SCR_BLANK_SCREEN; ;} + break; + + case 377: + +/* Line 1464 of yacc.c */ +#line 1166 "htcobol.y" + { (yyval.ival) = SCR_BLANK_LINE; ;} + break; + + case 378: + +/* Line 1464 of yacc.c */ +#line 1167 "htcobol.y" + { (yyval.ival) = SCR_ERASE_EOL; ;} + break; + + case 379: + +/* Line 1464 of yacc.c */ +#line 1168 "htcobol.y" + { (yyval.ival) = SCR_ERASE_EOS; ;} + break; + + case 380: + +/* Line 1464 of yacc.c */ +#line 1169 "htcobol.y" + { (yyval.ival) = SCR_ERASE_EOL; ;} + break; + + case 381: + +/* Line 1464 of yacc.c */ +#line 1170 "htcobol.y" + { (yyval.ival) = SCR_BELL; ;} + break; + + case 382: + +/* Line 1464 of yacc.c */ +#line 1171 "htcobol.y" + { (yyval.ival) = (yyvsp[(1) - (1)].ival); ;} + break; + + case 383: + +/* Line 1464 of yacc.c */ +#line 1172 "htcobol.y" + { (yyval.ival) = SCR_FULL; ;} + break; + + case 384: + +/* Line 1464 of yacc.c */ +#line 1173 "htcobol.y" + { (yyval.ival) = SCR_REQUIRED; ;} + break; + + case 385: + +/* Line 1464 of yacc.c */ +#line 1174 "htcobol.y" + { (yyval.ival) = SCR_SECURE; ;} + break; + + case 386: + +/* Line 1464 of yacc.c */ +#line 1175 "htcobol.y" + { (yyval.ival) = SCR_AUTO; ;} + break; + + case 387: + +/* Line 1464 of yacc.c */ +#line 1176 "htcobol.y" + { (yyval.ival) = SCR_JUST_RIGHT; ;} + break; + + case 388: + +/* Line 1464 of yacc.c */ +#line 1177 "htcobol.y" + { (yyval.ival) = SCR_JUST_LEFT; ;} + break; + + case 389: + +/* Line 1464 of yacc.c */ +#line 1178 "htcobol.y" + { (yyval.ival) = SCR_BLINK; ;} + break; + + case 390: + +/* Line 1464 of yacc.c */ +#line 1179 "htcobol.y" + { (yyval.ival) = SCR_REVERSE_VIDEO; ;} + break; + + case 391: + +/* Line 1464 of yacc.c */ +#line 1180 "htcobol.y" + { (yyval.ival) = SCR_UNDERLINE; ;} + break; + + case 392: + +/* Line 1464 of yacc.c */ +#line 1181 "htcobol.y" + { (yyval.ival) = SCR_LOWLIGHT; ;} + break; + + case 393: + +/* Line 1464 of yacc.c */ +#line 1182 "htcobol.y" + { (yyval.ival) = SCR_HIGHLIGHT; ;} + break; + + case 394: + +/* Line 1464 of yacc.c */ +#line 1183 "htcobol.y" + { (yyval.ival) = SCR_BLANK_WHEN_ZERO; ;} + break; + + case 395: + +/* Line 1464 of yacc.c */ +#line 1184 "htcobol.y" + { (yyval.ival) = SCR_NOECHO; ;} + break; + + case 396: + +/* Line 1464 of yacc.c */ +#line 1185 "htcobol.y" + { (yyval.ival) = SCR_UPDATE; ;} + break; + + case 397: + +/* Line 1464 of yacc.c */ +#line 1186 "htcobol.y" + { (yyval.ival) = SCR_NO_ADVANCING; ;} + break; + + case 398: + +/* Line 1464 of yacc.c */ +#line 1187 "htcobol.y" + { (yyval.ival) = SCR_UPPER; ;} + break; + + case 399: + +/* Line 1464 of yacc.c */ +#line 1188 "htcobol.y" + { (yyval.ival) = SCR_LOWER; ;} + break; + + case 400: + +/* Line 1464 of yacc.c */ +#line 1189 "htcobol.y" + { (yyval.ival) = 0; fg = (yyvsp[(2) - (2)].ival); ;} + break; + + case 401: + +/* Line 1464 of yacc.c */ +#line 1190 "htcobol.y" + { (yyval.ival) = 0; bg = (yyvsp[(2) - (2)].ival); ;} + break; + + case 402: + +/* Line 1464 of yacc.c */ +#line 1195 "htcobol.y" + { (yyval.ival) = SCR_SIGN_LEADING | (yyvsp[(3) - (3)].ival); ;} + break; + + case 403: + +/* Line 1464 of yacc.c */ +#line 1197 "htcobol.y" + { (yyval.ival) = (yyvsp[(3) - (3)].ival); ;} + break; + + case 404: + +/* Line 1464 of yacc.c */ +#line 1200 "htcobol.y" + { (yyval.ival) = SCR_SIGN_SEPARATE; ;} + break; + + case 405: + +/* Line 1464 of yacc.c */ +#line 1201 "htcobol.y" + { (yyval.ival) = 0; ;} + break; + + case 410: + +/* Line 1464 of yacc.c */ +#line 1212 "htcobol.y" + { (yyval.ival) = 1; ;} + break; + + case 411: + +/* Line 1464 of yacc.c */ +#line 1213 "htcobol.y" + { (yyval.ival) = 1; ;} + break; + + case 412: + +/* Line 1464 of yacc.c */ +#line 1214 "htcobol.y" + { (yyval.ival) = -1; ;} + break; + + case 413: + +/* Line 1464 of yacc.c */ +#line 1215 "htcobol.y" + { (yyval.ival) = -1; ;} + break; + + case 414: + +/* Line 1464 of yacc.c */ +#line 1216 "htcobol.y" + { (yyval.ival) = 0; ;} + break; + + case 417: + +/* Line 1464 of yacc.c */ +#line 1229 "htcobol.y" + { curr_division = CDIV_FD; ;} + break; + + case 418: + +/* Line 1464 of yacc.c */ +#line 1231 "htcobol.y" + { curr_division = CDIV_DATA; ;} + break; + + case 419: + +/* Line 1464 of yacc.c */ +#line 1233 "htcobol.y" + { + curr_field=NULL; + if ((yyvsp[(4) - (7)].sval)->filenamevar == NULL) { + yyerror("External file name not defined for file %s", (yyvsp[(4) - (7)].sval)->name); + } + ;} + break; + + case 420: + +/* Line 1464 of yacc.c */ +#line 1240 "htcobol.y" + { + close_fields(); + alloc_file_entry((yyvsp[(4) - (9)].sval)); + gen_fdesc((yyvsp[(4) - (9)].sval),(yyvsp[(9) - (9)].sval)); + ;} + break; + + case 421: + +/* Line 1464 of yacc.c */ +#line 1245 "htcobol.y" + { curr_division = CDIV_FD; ;} + break; + + case 422: + +/* Line 1464 of yacc.c */ +#line 1246 "htcobol.y" + { curr_division = CDIV_DATA; ;} + break; + + case 423: + +/* Line 1464 of yacc.c */ +#line 1248 "htcobol.y" + { + (yyvsp[(4) - (7)].sval)->organization=2; + curr_field=NULL; + ;} + break; + + case 424: + +/* Line 1464 of yacc.c */ +#line 1253 "htcobol.y" + { + close_fields(); + alloc_file_entry((yyvsp[(4) - (9)].sval)); + (yyvsp[(4) - (9)].sval)->sort_file = 1; + gen_fdesc((yyvsp[(4) - (9)].sval),(yyvsp[(9) - (9)].sval)); + ;} + break; + + case 425: + +/* Line 1464 of yacc.c */ +#line 1259 "htcobol.y" + { yyerror("missing or invalid file description entry"); ;} + break; + + case 427: + +/* Line 1464 of yacc.c */ +#line 1263 "htcobol.y" + { (yyval.sval)=(yyvsp[(1) - (1)].sval); ;} + break; + + case 428: + +/* Line 1464 of yacc.c */ +#line 1265 "htcobol.y" + { + if (((yyvsp[(2) - (2)].sval) != NULL) && ((yyvsp[(2) - (2)].sval)->level == 1)) { + /* multiple 01 records (for a file descriptor) */ + (yyvsp[(2) - (2)].sval)->redefines=(yyvsp[(1) - (2)].sval); + (yyval.sval)=(yyvsp[(2) - (2)].sval); + } + else + (yyval.sval)=(yyvsp[(1) - (2)].sval); + ;} + break; + + case 429: + +/* Line 1464 of yacc.c */ +#line 1280 "htcobol.y" + { + picix=piccnt=v_flag=n_flag=decimals=pscale=0; + if ((yyvsp[(1) - (2)].ival) == 78) { + yyerror("level 78 not supported"); + } + if ((yyvsp[(2) - (2)].sval)==NULL) { + define_field((yyvsp[(1) - (2)].ival),alloc_filler()); + } + else { + define_field((yyvsp[(1) - (2)].ival),(yyvsp[(2) - (2)].sval)); + } + ;} + break; + + case 430: + +/* Line 1464 of yacc.c */ +#line 1293 "htcobol.y" + { + (yyval.sval)=(yyvsp[(2) - (5)].sval); + if (((yyval.sval) == NULL) || ((yyval.sval)->level != 66)) + update_field(curr_field); + ;} + break; + + case 434: + +/* Line 1464 of yacc.c */ +#line 1306 "htcobol.y" + { curr_division = CDIV_PROC; /* parsing variable */ ;} + break; + + case 435: + +/* Line 1464 of yacc.c */ +#line 1308 "htcobol.y" + { + curr_division = CDIV_DATA; + if ((yyvsp[(-2) - (3)].sval) != NULL) { + (yyvsp[(-2) - (3)].sval)->redefines = lookup_for_redefines((yyvsp[(3) - (3)].sval)); + } + else { + yywarn("cannot redefine an unnamed field"); + } + ;} + break; + + case 436: + +/* Line 1464 of yacc.c */ +#line 1319 "htcobol.y" + { (yyval.sval)=(yyvsp[(1) - (1)].sval); ;} + break; + + case 437: + +/* Line 1464 of yacc.c */ +#line 1320 "htcobol.y" + { (yyval.sval)=(yyvsp[(1) - (1)].sval); ;} + break; + + case 441: + +/* Line 1464 of yacc.c */ +#line 1326 "htcobol.y" + { + curr_field->flags.separate_sign = ((yyvsp[(1) - (1)].ival) & SCR_SIGN_SEPARATE) ? 1 : 0; + curr_field->flags.leading_sign = ((yyvsp[(1) - (1)].ival) & SCR_SIGN_LEADING) ? 1 : 0; ;} + break; + + case 443: + +/* Line 1464 of yacc.c */ +#line 1330 "htcobol.y" + {curr_field->flags.sync=1;;} + break; + + case 444: + +/* Line 1464 of yacc.c */ +#line 1331 "htcobol.y" + {if ((yyvsp[(2) - (2)].ival) != 2) curr_field->flags.just_r=1;;} + break; + + case 445: + +/* Line 1464 of yacc.c */ +#line 1332 "htcobol.y" + {save_named_sect(curr_field);;} + break; + + case 446: + +/* Line 1464 of yacc.c */ +#line 1333 "htcobol.y" + {;} + break; + + case 447: + +/* Line 1464 of yacc.c */ +#line 1334 "htcobol.y" + { curr_field->flags.blank=1; ;} + break; + + case 448: + +/* Line 1464 of yacc.c */ +#line 1335 "htcobol.y" + { curr_division = CDIV_PROC /* for parsing variable */; ;} + break; + + case 449: + +/* Line 1464 of yacc.c */ +#line 1337 "htcobol.y" + { curr_division = CDIV_DATA; + update_renames_field((yyvsp[(3) - (4)].sval), (yyvsp[(4) - (4)].sval));;} + break; + + case 450: + +/* Line 1464 of yacc.c */ +#line 1341 "htcobol.y" + {(yyval.ival)=0;;} + break; + + case 451: + +/* Line 1464 of yacc.c */ +#line 1342 "htcobol.y" + {(yyval.ival)=2;;} + break; + + case 452: + +/* Line 1464 of yacc.c */ +#line 1343 "htcobol.y" + {(yyval.ival)=1;;} + break; + + case 453: + +/* Line 1464 of yacc.c */ +#line 1345 "htcobol.y" + { (yyval.sval) = NULL;;} + break; + + case 454: + +/* Line 1464 of yacc.c */ +#line 1346 "htcobol.y" + { (yyval.sval) = (yyvsp[(2) - (2)].sval);;} + break; + + case 455: + +/* Line 1464 of yacc.c */ +#line 1352 "htcobol.y" + { curr_field->times = (yyvsp[(2) - (3)].ival); curr_field->occurs_flg++; ;} + break; + + case 457: + +/* Line 1464 of yacc.c */ +#line 1355 "htcobol.y" + { curr_division = CDIV_PROC; /* needed for parsing variable */ ;} + break; + + case 458: + +/* Line 1464 of yacc.c */ +#line 1357 "htcobol.y" + { + curr_division = CDIV_DATA; + create_occurs_info((yyvsp[(2) - (9)].ival),(yyvsp[(4) - (9)].ival),(yyvsp[(9) - (9)].sval)); + ;} + break; + + case 460: + +/* Line 1464 of yacc.c */ +#line 1365 "htcobol.y" + { + (yyvsp[(4) - (4)].sval)->level=0; + if ((yyvsp[(1) - (4)].ival) == ASCENDING) { + (yyvsp[(4) - (4)].sval)->level=-1; + } + if ((yyvsp[(1) - (4)].ival) == DESCENDING) { + (yyvsp[(4) - (4)].sval)->level=-2; + } + (yyval.sval)=(yyvsp[(4) - (4)].sval); + ;} + break; + + case 461: + +/* Line 1464 of yacc.c */ +#line 1375 "htcobol.y" + { (yyval.sval)=NULL; ;} + break; + + case 462: + +/* Line 1464 of yacc.c */ +#line 1379 "htcobol.y" + { + /*define_implicit_field($4, $1, curr_field->times);*/ + /* Fix Me: Does not work, thus dup vars can be defined + if ($4->defined) { + yyerror("variable redefined, '%s'",$4->name); + $4->defined=1; + } + else { + define_implicit_field($4, $1, curr_field->times); + } */ + ;} + break; + + case 464: + +/* Line 1464 of yacc.c */ +#line 1394 "htcobol.y" + { + define_implicit_field((yyvsp[(1) - (1)].sval), (yyvsp[(-2) - (1)].sval), curr_field->times); + /* Fix Me: Does not work, thus dup vars can be defined + if ($4->defined) { + yyerror("variable redefined, '%s'",$4->name); + $4->defined=1; + } + else { + define_implicit_field($4, $1, curr_field->times); + } */ + ;} + break; + + case 465: + +/* Line 1464 of yacc.c */ +#line 1406 "htcobol.y" + { + define_implicit_field((yyvsp[(2) - (2)].sval),(yyvsp[(-2) - (2)].sval),curr_field->times); + ;} + break; + + case 466: + +/* Line 1464 of yacc.c */ +#line 1414 "htcobol.y" + { set_usage(curr_field, (yyvsp[(3) - (3)].ival)); ;} + break; + + case 467: + +/* Line 1464 of yacc.c */ +#line 1417 "htcobol.y" + { (yyval.ival)=(yyvsp[(1) - (1)].ival); ;} + break; + + case 468: + +/* Line 1464 of yacc.c */ +#line 1418 "htcobol.y" + { (yyval.ival)=USAGE_DISPLAY; ;} + break; + + case 469: + +/* Line 1464 of yacc.c */ +#line 1419 "htcobol.y" + { (yyval.ival)=USAGE_POINTER; ;} + break; + + case 475: + +/* Line 1464 of yacc.c */ +#line 1436 "htcobol.y" + { set_variable_values((yyvsp[(1) - (1)].lval),(yyvsp[(1) - (1)].lval)); ;} + break; + + case 476: + +/* Line 1464 of yacc.c */ +#line 1438 "htcobol.y" + { + set_variable_values((yyvsp[(1) - (3)].lval),(yyvsp[(3) - (3)].lval)); + ;} + break; + + case 477: + +/* Line 1464 of yacc.c */ +#line 1447 "htcobol.y" + { + curr_division = CDIV_PIC; + /* first pic char found */ + picix=piccnt=v_flag=n_flag=decimals=pscale=0; + picture[picix]=0; + ;} + break; + + case 478: + +/* Line 1464 of yacc.c */ +#line 1454 "htcobol.y" + { + /* finish picture */ + picture[picix+2]=0; + curr_field->decimals=decimals; + curr_field->pscale=pscale; + if (curr_field->type == DTYPE_DISPLAY && piccnt > 18) { + yyerror("Maximum elementary numeric item size of %s > 18 digits exceeded", curr_field->name); + } + if (curr_field->type == DTYPE_ALPHANUMERIC && piccnt > 12750) { + yyerror("Maximum elementary alphanumeric item size of %s > 12750 exceeded", curr_field->name); + } + ;} + break; + + case 481: + +/* Line 1464 of yacc.c */ +#line 1472 "htcobol.y" + { + if (!save_pic_char ( (yyvsp[(1) - (2)].ival), (yyvsp[(2) - (2)].ival) )) { + yyerror("invalid char in picture"); + YYERROR; + } + ;} + break; + + case 482: + +/* Line 1464 of yacc.c */ +#line 1480 "htcobol.y" + { (yyval.ival) = 1; ;} + break; + + case 483: + +/* Line 1464 of yacc.c */ +#line 1481 "htcobol.y" + { (yyval.ival) = (yyvsp[(1) - (1)].ival); ;} + break; + + case 488: + +/* Line 1464 of yacc.c */ +#line 1492 "htcobol.y" + { (yyvsp[(0) - (2)].sval)->type = 'K'; ;} + break; + + case 489: + +/* Line 1464 of yacc.c */ +#line 1493 "htcobol.y" + { (yyvsp[(0) - (2)].sval)->type = 'J'; ;} + break; + + case 500: + +/* Line 1464 of yacc.c */ +#line 1511 "htcobol.y" + { + /* unimplemented - clause ignored */ + ;} + break; + + case 501: + +/* Line 1464 of yacc.c */ +#line 1518 "htcobol.y" + { + if ((yyvsp[(4) - (5)].lval) != NULL) { + UNIMPLEMENTED ("RECORD CONTAINS integer1 TO integer2 CHARACTERS clause") + /* unimplemented */ + } + ;} + break; + + case 502: + +/* Line 1464 of yacc.c */ +#line 1527 "htcobol.y" + { + if ((yyvsp[(9) - (9)].sval) != NULL) { + set_rec_varying_info( (yyvsp[(-2) - (9)].sval),(yyvsp[(6) - (9)].lval),(yyvsp[(7) - (9)].lval),(yyvsp[(9) - (9)].sval) ); + } + else { + yyerror("clause \'DEPENDING ON data-name-1\' is missing"); + } + ;} + break; + + case 503: + +/* Line 1464 of yacc.c */ +#line 1537 "htcobol.y" + { /* obsolete */ ;} + break; + + case 504: + +/* Line 1464 of yacc.c */ +#line 1541 "htcobol.y" + { + if ((yyvsp[(-2) - (5)].sval)->filenamevar != NULL) { + yyerror("Re-defining file name defined in SELECT statement"); + } + else { + (yyvsp[(-2) - (5)].sval)->filenamevar = (yyvsp[(5) - (5)].sval); + } + ;} + break; + + case 505: + +/* Line 1464 of yacc.c */ +#line 1551 "htcobol.y" + { /* obsolete */ ;} + break; + + case 506: + +/* Line 1464 of yacc.c */ +#line 1554 "htcobol.y" + { save_report( (yyvsp[(2) - (2)].sval),(yyvsp[(0) - (2)].sval) ); ;} + break; + + case 507: + +/* Line 1464 of yacc.c */ +#line 1558 "htcobol.y" + { UNIMPLEMENTED ("Code-set is alphabet") /* unimplemented */ ;} + break; + + case 508: + +/* Line 1464 of yacc.c */ +#line 1565 "htcobol.y" + { UNIMPLEMENTED ("Linage is clause") /* unimplemented */ ;} + break; + + case 510: + +/* Line 1464 of yacc.c */ +#line 1568 "htcobol.y" + { /* unimplemented */ ;} + break; + + case 512: + +/* Line 1464 of yacc.c */ +#line 1571 "htcobol.y" + { /* unimplemented */ ;} + break; + + case 514: + +/* Line 1464 of yacc.c */ +#line 1574 "htcobol.y" + { /* unimplemented */ ;} + break; + + case 521: + +/* Line 1464 of yacc.c */ +#line 1584 "htcobol.y" + { ;} + break; + + case 522: + +/* Line 1464 of yacc.c */ +#line 1585 "htcobol.y" + { ;} + break; + + case 527: + +/* Line 1464 of yacc.c */ +#line 1593 "htcobol.y" + { ;} + break; + + case 528: + +/* Line 1464 of yacc.c */ +#line 1595 "htcobol.y" + { (yyval.sval) = NULL; ;} + break; + + case 529: + +/* Line 1464 of yacc.c */ +#line 1596 "htcobol.y" + { (yyval.sval) = (yyvsp[(3) - (3)].sval); ;} + break; + + case 530: + +/* Line 1464 of yacc.c */ +#line 1599 "htcobol.y" + { (yyval.lval) = NULL; ;} + break; + + case 531: + +/* Line 1464 of yacc.c */ +#line 1600 "htcobol.y" + { (yyval.lval) = (yyvsp[(2) - (2)].lval); ;} + break; + + case 534: + +/* Line 1464 of yacc.c */ +#line 1607 "htcobol.y" + { (yyval.lval) = NULL; ;} + break; + + case 535: + +/* Line 1464 of yacc.c */ +#line 1608 "htcobol.y" + { (yyval.lval) = (yyvsp[(2) - (2)].lval); ;} + break; + + case 558: + +/* Line 1464 of yacc.c */ +#line 1672 "htcobol.y" + { + curr_division = CDIV_PROC; + ;} + break; + + case 559: + +/* Line 1464 of yacc.c */ +#line 1676 "htcobol.y" + { + proc_header((yyvsp[(4) - (5)].ival)); + ;} + break; + + case 560: + +/* Line 1464 of yacc.c */ +#line 1681 "htcobol.y" + { + /* close procedure_division sections & paragraphs */ + close_section(); /* this also closes paragraph */ + resolve_labels(); + proc_trail((yyvsp[(4) - (8)].ival)); + ;} + break; + + case 564: + +/* Line 1464 of yacc.c */ +#line 1693 "htcobol.y" + { close_section(); open_section((yyvsp[(1) - (1)].sval)); ;} + break; + + case 565: + +/* Line 1464 of yacc.c */ +#line 1694 "htcobol.y" + { close_paragr(); open_paragr((yyvsp[(1) - (1)].sval)); ;} + break; + + case 566: + +/* Line 1464 of yacc.c */ +#line 1695 "htcobol.y" + {free_expr_list(); stabs_line();;} + break; + + case 568: + +/* Line 1464 of yacc.c */ +#line 1697 "htcobol.y" + { yyerror("unknown or wrong statement"); ;} + break; + + case 570: + +/* Line 1464 of yacc.c */ +#line 1698 "htcobol.y" + { ;} + break; + + case 571: + +/* Line 1464 of yacc.c */ +#line 1703 "htcobol.y" + { + decl_lbl=loc_label++; + gen_jmplabel(decl_lbl); + ;} + break; + + case 572: + +/* Line 1464 of yacc.c */ +#line 1710 "htcobol.y" + { + gen_dstlabel(decl_lbl); + ;} + break; + + case 577: + +/* Line 1464 of yacc.c */ +#line 1722 "htcobol.y" + { close_paragr(); open_paragr((yyvsp[(1) - (1)].sval)); ;} + break; + + case 578: + +/* Line 1464 of yacc.c */ +#line 1723 "htcobol.y" + {free_expr_list(); stabs_line();;} + break; + + case 580: + +/* Line 1464 of yacc.c */ +#line 1724 "htcobol.y" + { yyerror("unknown or wrong statement"); ;} + break; + + case 582: + +/* Line 1464 of yacc.c */ +#line 1730 "htcobol.y" + { + close_section(); + open_section((yyvsp[(1) - (1)].sval)); + ;} + break; + + case 584: + +/* Line 1464 of yacc.c */ +#line 1735 "htcobol.y" + { yyerror("section name expected"); ;} + break; + + case 585: + +/* Line 1464 of yacc.c */ +#line 1739 "htcobol.y" + { /* mark_decl_list($6); */ ;} + break; + + case 586: + +/* Line 1464 of yacc.c */ +#line 1740 "htcobol.y" + { yyerror("use statement expected"); ;} + break; + + case 591: + +/* Line 1464 of yacc.c */ +#line 1748 "htcobol.y" + { (yyval.glistval)=(yyvsp[(1) - (1)].glistval); ;} + break; + + case 592: + +/* Line 1464 of yacc.c */ +#line 1750 "htcobol.y" + { + (yyval.glistval)=NULL; + UNIMPLEMENTED ("Declaratives open-mode clause") + /* unimplemented */ + ;} + break; + + case 593: + +/* Line 1464 of yacc.c */ +#line 1761 "htcobol.y" + { + struct sym *lab=(yyvsp[(1) - (3)].sval); + if (lab->defined != 0) { + lab = install(lab->name,SYTB_LAB,2); + } + lab->defined = 1; + (yyval.sval)=lab; + ;} + break; + + case 594: + +/* Line 1464 of yacc.c */ +#line 1772 "htcobol.y" + { + struct sym *lab=(yyvsp[(1) - (2)].sval); + if (lab->defined != 0) { + if ((lab=lookup_label(lab,curr_section))==NULL) { + lab = install((yyvsp[(1) - (2)].sval)->name,SYTB_LAB,2); + } + } + lab->parent = curr_section; + lab->defined=1; + (yyval.sval)=lab; + ;} + break; + + case 597: + +/* Line 1464 of yacc.c */ +#line 1794 "htcobol.y" + { ;} + break; + + case 642: + +/* Line 1464 of yacc.c */ +#line 1843 "htcobol.y" + { stabs_line(); ;} + break; + + case 644: + +/* Line 1464 of yacc.c */ +#line 1853 "htcobol.y" + { gen_dstlabel((yyvsp[(1) - (1)].dval)); ;} + break; + + case 646: + +/* Line 1464 of yacc.c */ +#line 1855 "htcobol.y" + { (yyval.dval)=gen_passlabel(); gen_dstlabel((yyvsp[(1) - (2)].dval)); ;} + break; + + case 647: + +/* Line 1464 of yacc.c */ +#line 1857 "htcobol.y" + { gen_dstlabel((yyvsp[(3) - (4)].dval)); ;} + break; + + case 651: + +/* Line 1464 of yacc.c */ +#line 1866 "htcobol.y" + { (yyval.ival) = gen_evaluate_start(); ;} + break; + + case 652: + +/* Line 1464 of yacc.c */ +#line 1868 "htcobol.y" + { compute_subject_set_size((yyvsp[(3) - (3)].ssbjval)); ;} + break; + + case 653: + +/* Line 1464 of yacc.c */ +#line 1871 "htcobol.y" + { release_sel_subject((yyvsp[(2) - (6)].ival),(yyvsp[(3) - (6)].ssbjval)); ;} + break; + + case 656: + +/* Line 1464 of yacc.c */ +#line 1878 "htcobol.y" + { (yyval.sval)=NULL; /* to store non-numeric symbols */ ;} + break; + + case 657: + +/* Line 1464 of yacc.c */ +#line 1879 "htcobol.y" + { (yyval.ssbjval)=save_sel_subject((yyvsp[(2) - (2)].ival),NULL,(yyvsp[(1) - (2)].sval)); ;} + break; + + case 658: + +/* Line 1464 of yacc.c */ +#line 1881 "htcobol.y" + { (yyval.sval)=NULL; /* to store non-numeric symbols */ ;} + break; + + case 659: + +/* Line 1464 of yacc.c */ +#line 1883 "htcobol.y" + { (yyval.ssbjval)=save_sel_subject((yyvsp[(4) - (4)].ival),(yyvsp[(1) - (4)].ssbjval),(yyvsp[(3) - (4)].sval)); ;} + break; + + case 660: + +/* Line 1464 of yacc.c */ +#line 1887 "htcobol.y" + { + if (push_expr((yyvsp[(1) - (1)].sval))) + (yyval.ival)=SSUBJ_EXPR; + else { + (yyvsp[(0) - (1)].sval) = (yyvsp[(1) - (1)].sval); + (yyval.ival)=SSUBJ_STR; + } + ;} + break; + + case 661: + +/* Line 1464 of yacc.c */ +#line 1895 "htcobol.y" + { push_condition(); (yyval.ival)=SSUBJ_COND; ;} + break; + + case 662: + +/* Line 1464 of yacc.c */ +#line 1896 "htcobol.y" + { (yyval.ival)=SSUBJ_TRUE; ;} + break; + + case 663: + +/* Line 1464 of yacc.c */ +#line 1897 "htcobol.y" + { (yyval.ival)=SSUBJ_FALSE; ;} + break; + + case 664: + +/* Line 1464 of yacc.c */ +#line 1900 "htcobol.y" + { (yyval.ival) = loc_label++; /* mark end of "when" case */ ;} + break; + + case 665: + +/* Line 1464 of yacc.c */ +#line 1901 "htcobol.y" + { (yyval.ssbjval)=(yyvsp[(-1) - (2)].ssbjval); /* store inherited subject set */ ;} + break; + + case 666: + +/* Line 1464 of yacc.c */ +#line 1904 "htcobol.y" + { (yyval.ival)=gen_end_when((yyvsp[(-2) - (5)].ival),(yyvsp[(2) - (5)].ival),(yyvsp[(5) - (5)].ival)); ;} + break; + + case 667: + +/* Line 1464 of yacc.c */ +#line 1905 "htcobol.y" + { (yyval.ival) = loc_label++; ;} + break; + + case 668: + +/* Line 1464 of yacc.c */ +#line 1906 "htcobol.y" + { (yyval.ssbjval)=(yyvsp[(-1) - (3)].ssbjval); ;} + break; + + case 669: + +/* Line 1464 of yacc.c */ +#line 1908 "htcobol.y" + { gen_bypass_when_case((yyvsp[(1) - (5)].ival)); ;} + break; + + case 670: + +/* Line 1464 of yacc.c */ +#line 1910 "htcobol.y" + { (yyval.ival)=gen_end_when((yyvsp[(-2) - (7)].ival),(yyvsp[(3) - (7)].ival),(yyvsp[(7) - (7)].ival)); ;} + break; + + case 671: + +/* Line 1464 of yacc.c */ +#line 1913 "htcobol.y" + { (yyval.sval) = NULL; ;} + break; + + case 672: + +/* Line 1464 of yacc.c */ +#line 1915 "htcobol.y" + { + gen_when_check(0,(yyvsp[(0) - (2)].ssbjval),(yyvsp[(2) - (2)].ival),(yyvsp[(-1) - (2)].ival),(yyvsp[(1) - (2)].sval)); + (yyval.ival)=0; + ;} + break; + + case 673: + +/* Line 1464 of yacc.c */ +#line 1920 "htcobol.y" + { (yyval.sval) = NULL; ;} + break; + + case 674: + +/* Line 1464 of yacc.c */ +#line 1922 "htcobol.y" + { + gen_when_check((yyvsp[(1) - (4)].ival)+1,(yyvsp[(0) - (4)].ssbjval),(yyvsp[(4) - (4)].ival),(yyvsp[(-1) - (4)].ival),(yyvsp[(3) - (4)].sval)); + (yyval.ival)=(yyvsp[(1) - (4)].ival)+1; + ;} + break; + + case 675: + +/* Line 1464 of yacc.c */ +#line 1926 "htcobol.y" + { (yyval.ival)=-1; ;} + break; + + case 676: + +/* Line 1464 of yacc.c */ +#line 1929 "htcobol.y" + { (yyval.ival)=SOBJ_ANY; ;} + break; + + case 677: + +/* Line 1464 of yacc.c */ +#line 1930 "htcobol.y" + { (yyval.ival)=SOBJ_TRUE; ;} + break; + + case 678: + +/* Line 1464 of yacc.c */ +#line 1931 "htcobol.y" + { (yyval.ival)=SOBJ_FALSE; ;} + break; + + case 679: + +/* Line 1464 of yacc.c */ +#line 1933 "htcobol.y" + { + if (push_expr((yyvsp[(2) - (2)].sval))) { + if ((yyvsp[(1) - (2)].ival)) + (yyval.ival)=SOBJ_NEGEXPR; + else + (yyval.ival)=SOBJ_EXPR; + } + else { + /* non-numeric comparation */ + (yyvsp[(0) - (2)].sval) = (yyvsp[(2) - (2)].sval); + if ((yyvsp[(1) - (2)].ival)) + (yyval.ival)=SOBJ_NEGSTR; + else + (yyval.ival)=SOBJ_STR; + } + ;} + break; + + case 680: + +/* Line 1464 of yacc.c */ +#line 1950 "htcobol.y" + { + if (push_expr((yyvsp[(4) - (4)].sval)) && push_expr((yyvsp[(2) - (4)].sval))) { + if ((yyvsp[(1) - (4)].ival)) + (yyval.ival)=SOBJ_NEGRANGE; + else + (yyval.ival)=SOBJ_RANGE; + } + else { + yyerror("ranges only accepted for numeric variables"); + } + ;} + break; + + case 681: + +/* Line 1464 of yacc.c */ +#line 1962 "htcobol.y" + { + gen_condition((yyvsp[(2) - (2)].sval)); + if ((yyvsp[(1) - (2)].ival)) + (yyval.ival)=SOBJ_NEGCOND; + else + (yyval.ival)=SOBJ_COND; + ;} + break; + + case 682: + +/* Line 1464 of yacc.c */ +#line 1972 "htcobol.y" + { (yyval.ival) = 0; ;} + break; + + case 683: + +/* Line 1464 of yacc.c */ +#line 1973 "htcobol.y" + { (yyval.ival) = 1; ;} + break; + + case 684: + +/* Line 1464 of yacc.c */ +#line 1978 "htcobol.y" + { (yyval.dval)=gen_testif(); ;} + break; + + case 685: + +/* Line 1464 of yacc.c */ +#line 1980 "htcobol.y" + { (yyval.dval)=(yyvsp[(3) - (5)].dval); ;} + break; + + case 686: + +/* Line 1464 of yacc.c */ +#line 1988 "htcobol.y" + { stabs_line(); ;} + break; + + case 688: + +/* Line 1464 of yacc.c */ +#line 1989 "htcobol.y" + { stabs_line(); ;} + break; + + case 690: + +/* Line 1464 of yacc.c */ +#line 1996 "htcobol.y" + { (yyval.ival)=0; ;} + break; + + case 691: + +/* Line 1464 of yacc.c */ +#line 1997 "htcobol.y" + { (yyval.ival)=1; ;} + break; + + case 696: + +/* Line 1464 of yacc.c */ +#line 2007 "htcobol.y" + { + (yyval.dval)=loc_label++; /* determine END label name */ + gen_marklabel(); + /* yydebug=1; */ + ;} + break; + + case 697: + +/* Line 1464 of yacc.c */ +#line 2013 "htcobol.y" + { + (yyval.dval)=loc_label++; /* determine search loop start label */ + if ((yyvsp[(3) - (3)].sval) == NULL) { + (yyvsp[(3) - (3)].sval)=determine_table_index_name((yyvsp[(1) - (3)].sval)); + if ((yyvsp[(3) - (3)].sval) == NULL) { + yyerror("Unable to determine search index for table '%s'", (yyvsp[(1) - (3)].sval)->name); + } + } + gen_jmplabel((yyval.dval)); /* generate GOTO search loop start */ + ;} + break; + + case 698: + +/* Line 1464 of yacc.c */ +#line 2024 "htcobol.y" + { + gen_jmplabel((yyvsp[(2) - (5)].dval)); /* generate GOTO END */ + gen_dstlabel((yyvsp[(4) - (5)].dval)); /* generate search loop start label */ + (yyval.dval) = (yyvsp[(2) - (5)].dval); + ;} + break; + + case 699: + +/* Line 1464 of yacc.c */ +#line 2030 "htcobol.y" + { + /* increment loop index, check for end */ + gen_SearchLoopCheck((yyvsp[(5) - (7)].dval), (yyvsp[(3) - (7)].sval), (yyvsp[(1) - (7)].sval)); + + gen_jmplabel((yyvsp[(4) - (7)].dval)); /* generate goto search loop start label */ + gen_dstlabel((yyvsp[(2) - (7)].dval)); /* generate END label */ + ;} + break; + + case 700: + +/* Line 1464 of yacc.c */ +#line 2040 "htcobol.y" + { + lbend=loc_label++; /* determine END label name */ + gen_marklabel(); + + lbstart=loc_label++; /* determine search_all loop start label */ + + (yyval.sval)=determine_table_index_name((yyvsp[(1) - (1)].sval)); + if ((yyval.sval) == NULL) { + yyerror("Unable to determine search index for table '%s'", (yyvsp[(1) - (1)].sval)->name); + } + else { + /* Initilize and store search table index boundaries */ + Initialize_SearchAll_Boundaries((yyvsp[(1) - (1)].sval), (yyval.sval)); + } + + gen_jmplabel(lbstart); /* generate GOTO search_all loop start */ + ;} + break; + + case 701: + +/* Line 1464 of yacc.c */ +#line 2058 "htcobol.y" + { + gen_jmplabel(lbend); /* generate GOTO END */ + gen_dstlabel(lbstart); /* generate search loop start label */ + ;} + break; + + case 702: + +/* Line 1464 of yacc.c */ +#line 2063 "htcobol.y" + { + /* adjust loop index, check for end */ + gen_SearchAllLoopCheck((yyvsp[(3) - (5)].dval), (yyvsp[(2) - (5)].sval), (yyvsp[(1) - (5)].sval), curr_field, lbstart, lbend); + ;} + break; + + case 703: + +/* Line 1464 of yacc.c */ +#line 2070 "htcobol.y" + { (yyval.sval)=(yyvsp[(2) - (2)].sval); ;} + break; + + case 704: + +/* Line 1464 of yacc.c */ +#line 2071 "htcobol.y" + { (yyval.sval)=NULL; ;} + break; + + case 705: + +/* Line 1464 of yacc.c */ +#line 2076 "htcobol.y" + { + (yyval.dval)=loc_label++; /* determine ATEND label name */ + gen_dstlabel((yyval.dval)); /* determine ATEND label name */ + ;} + break; + + case 706: + +/* Line 1464 of yacc.c */ +#line 2081 "htcobol.y" + { + (yyval.dval)=(yyvsp[(3) - (4)].dval); + ;} + break; + + case 707: + +/* Line 1464 of yacc.c */ +#line 2085 "htcobol.y" + { + (yyval.dval)=loc_label++; /* determine ATEND label name */ + gen_dstlabel((yyval.dval)); /* determine ATEND label name */ + ;} + break; + + case 708: + +/* Line 1464 of yacc.c */ +#line 2092 "htcobol.y" + { (yyval.dval)=(yyvsp[(1) - (1)].dval); ;} + break; + + case 709: + +/* Line 1464 of yacc.c */ +#line 2093 "htcobol.y" + { (yyval.dval)=(yyvsp[(1) - (2)].dval); ;} + break; + + case 710: + +/* Line 1464 of yacc.c */ +#line 2098 "htcobol.y" + { (yyval.dval)=gen_testif(); ;} + break; + + case 711: + +/* Line 1464 of yacc.c */ +#line 2100 "htcobol.y" + { + (yyval.dval) = (yyvsp[(0) - (4)].dval); + gen_jmplabel((yyval.dval)); /* generate GOTO END */ + gen_dstlabel((yyvsp[(3) - (4)].dval)); + ;} + break; + + case 714: + +/* Line 1464 of yacc.c */ +#line 2122 "htcobol.y" + { gen_compare((yyvsp[(1) - (3)].sval),(yyvsp[(2) - (3)].ival),(yyvsp[(3) - (3)].sval)); ;} + break; + + case 717: + +/* Line 1464 of yacc.c */ +#line 2130 "htcobol.y" + { curr_field = NULL; ;} + break; + + case 718: + +/* Line 1464 of yacc.c */ +#line 2132 "htcobol.y" + { (yyval.dval)=gen_testif(); ;} + break; + + case 719: + +/* Line 1464 of yacc.c */ +#line 2134 "htcobol.y" + { + gen_jmplabel(lbend); /* generate GOTO END */ + gen_dstlabel((yyvsp[(4) - (5)].dval)); + ;} + break; + + case 722: + +/* Line 1464 of yacc.c */ +#line 2151 "htcobol.y" + { + if ((yyvsp[(3) - (5)].ival) != EQUAL) + yyerror("Only = conditional allowed in search all statement"); + if (curr_field == NULL) + curr_field = (yyvsp[(1) - (5)].sval); + gen_compare((yyvsp[(1) - (5)].sval),(yyvsp[(3) - (5)].ival),(yyvsp[(5) - (5)].sval)); + ;} + break; + + case 723: + +/* Line 1464 of yacc.c */ +#line 2159 "htcobol.y" + { + if ((yyvsp[(3) - (5)].ival) != EQUAL) + yyerror("Only = conditional allowed in search all statement"); + if (curr_field == NULL) + curr_field = (yyvsp[(1) - (5)].sval); + gen_compare((yyvsp[(1) - (5)].sval),(yyvsp[(3) - (5)].ival),(struct sym *)(yyvsp[(5) - (5)].lval)); + ;} + break; + + case 724: + +/* Line 1464 of yacc.c */ +#line 2166 "htcobol.y" + { (yyval.dval)=gen_andstart(); ;} + break; + + case 725: + +/* Line 1464 of yacc.c */ +#line 2167 "htcobol.y" + { gen_dstlabel((yyvsp[(3) - (4)].dval)); ;} + break; + + case 728: + +/* Line 1464 of yacc.c */ +#line 2175 "htcobol.y" + { gen_unlock((yyvsp[(2) - (2)].sval)); ;} + break; + + case 729: + +/* Line 1464 of yacc.c */ +#line 2178 "htcobol.y" + { gen_tcob_proto1( (yyvsp[(2) - (2)].sval) ); ;} + break; + + case 730: + +/* Line 1464 of yacc.c */ +#line 2179 "htcobol.y" + { gen_tcob_proto2( (yyvsp[(2) - (3)].sval),(yyvsp[(3) - (3)].sval) ); ;} + break; + + case 731: + +/* Line 1464 of yacc.c */ +#line 2182 "htcobol.y" + { ;} + break; + + case 732: + +/* Line 1464 of yacc.c */ +#line 2183 "htcobol.y" + { ;} + break; + + case 736: + +/* Line 1464 of yacc.c */ +#line 2195 "htcobol.y" + { gen_cancel((yyvsp[(2) - (2)].sval)); ;} + break; + + case 737: + +/* Line 1464 of yacc.c */ +#line 2196 "htcobol.y" + { gen_cancel(NULL); ;} + break; + + case 738: + +/* Line 1464 of yacc.c */ +#line 2202 "htcobol.y" + { sort_keys_append((yyvsp[(2) - (3)].sval), (yyvsp[(3) - (3)].glistval)); ;} + break; + + case 739: + +/* Line 1464 of yacc.c */ +#line 2204 "htcobol.y" + { gen_sort((yyvsp[(2) - (5)].sval)); ;} + break; + + case 740: + +/* Line 1464 of yacc.c */ +#line 2206 "htcobol.y" + { gen_sort_using((yyvsp[(2) - (7)].sval), (yyvsp[(7) - (7)].snval)); ;} + break; + + case 741: + +/* Line 1464 of yacc.c */ +#line 2208 "htcobol.y" + { + if ((yyvsp[(9) - (9)].snval) != NULL) { + gen_sort_giving((yyvsp[(2) - (9)].sval), (yyvsp[(9) - (9)].snval)); + } + ;} + break; + + case 742: + +/* Line 1464 of yacc.c */ +#line 2215 "htcobol.y" + { (yyval.snval)=(yyvsp[(2) - (2)].snval); ;} + break; + + case 745: + +/* Line 1464 of yacc.c */ +#line 2225 "htcobol.y" + { sort_keys_append((yyvsp[(2) - (3)].sval), (yyvsp[(3) - (3)].glistval)); ;} + break; + + case 746: + +/* Line 1464 of yacc.c */ +#line 2227 "htcobol.y" + { gen_sort((yyvsp[(2) - (6)].sval)); ;} + break; + + case 747: + +/* Line 1464 of yacc.c */ +#line 2229 "htcobol.y" + { + if ((yyvsp[(8) - (8)].snval) != NULL) { + gen_sort_using((yyvsp[(2) - (8)].sval), (yyvsp[(8) - (8)].snval)); + } + ;} + break; + + case 748: + +/* Line 1464 of yacc.c */ +#line 2235 "htcobol.y" + { + if ((yyvsp[(10) - (10)].snval) != NULL) { + gen_sort_giving((yyvsp[(2) - (10)].sval), (yyvsp[(10) - (10)].snval)); + } + ;} + break; + + case 749: + +/* Line 1464 of yacc.c */ +#line 2244 "htcobol.y" + { sort_keys_append((yyvsp[(2) - (3)].sval), (yyvsp[(3) - (3)].glistval)); ;} + break; + + case 750: + +/* Line 1464 of yacc.c */ +#line 2246 "htcobol.y" + { gen_sort((yyvsp[(2) - (6)].sval)); ;} + break; + + case 751: + +/* Line 1464 of yacc.c */ +#line 2250 "htcobol.y" + { (yyval.glistval)=sort_keys_list_append(NULL, (yyvsp[(1) - (1)].glistval)); ;} + break; + + case 752: + +/* Line 1464 of yacc.c */ +#line 2251 "htcobol.y" + { (yyval.glistval)=sort_keys_list_append((yyvsp[(1) - (2)].glistval), (yyvsp[(2) - (2)].glistval)); ;} + break; + + case 753: + +/* Line 1464 of yacc.c */ +#line 2255 "htcobol.y" + { (yyval.glistval)=sort_keys_list_append(NULL, (yyvsp[(1) - (1)].glistval)); ;} + break; + + case 754: + +/* Line 1464 of yacc.c */ +#line 2256 "htcobol.y" + { (yyval.glistval)=sort_keys_list_append((yyvsp[(1) - (2)].glistval), (yyvsp[(2) - (2)].glistval)); ;} + break; + + case 755: + +/* Line 1464 of yacc.c */ +#line 2261 "htcobol.y" + { (yyval.glistval)=sort_key_list_create((yyvsp[(4) - (4)].glistval), (yyvsp[(2) - (4)].ival)); ;} + break; + + case 756: + +/* Line 1464 of yacc.c */ +#line 2266 "htcobol.y" + { (yyval.glistval)=sort_key_list_create((yyvsp[(4) - (4)].glistval), (yyvsp[(2) - (4)].ival)); ;} + break; + + case 757: + +/* Line 1464 of yacc.c */ +#line 2270 "htcobol.y" + { (yyval.glistval) = gvar_list_append(NULL, (yyvsp[(1) - (1)].sval), source_lineno); ;} + break; + + case 758: + +/* Line 1464 of yacc.c */ +#line 2271 "htcobol.y" + { (yyval.glistval) = gvar_list_append((yyvsp[(1) - (2)].glistval), (yyvsp[(2) - (2)].sval), source_lineno); ;} + break; + + case 759: + +/* Line 1464 of yacc.c */ +#line 2275 "htcobol.y" + { (yyval.glistval) = gvar_list_append(NULL, (yyvsp[(1) - (1)].sval), source_lineno); ;} + break; + + case 760: + +/* Line 1464 of yacc.c */ +#line 2276 "htcobol.y" + { (yyval.glistval) = gvar_list_append((yyvsp[(1) - (2)].glistval), (yyvsp[(2) - (2)].sval), source_lineno); ;} + break; + + case 762: + +/* Line 1464 of yacc.c */ +#line 2281 "htcobol.y" + { + UNIMPLEMENTED ("SORT with duplicates in order clause") + /* unimplemented */ + ;} + break; + + case 764: + +/* Line 1464 of yacc.c */ +#line 2289 "htcobol.y" + { UNIMPLEMENTED ("SORT/MERGE collating sequence clause") /* unimplemented */ ;} + break; + + case 765: + +/* Line 1464 of yacc.c */ +#line 2294 "htcobol.y" + { (yyval.snval)=NULL; ;} + break; + + case 766: + +/* Line 1464 of yacc.c */ +#line 2295 "htcobol.y" + { (yyval.snval)=(yyvsp[(2) - (2)].snval); ;} + break; + + case 767: + +/* Line 1464 of yacc.c */ +#line 2298 "htcobol.y" + { (yyval.snval)=NULL; ;} + break; + + case 768: + +/* Line 1464 of yacc.c */ +#line 2299 "htcobol.y" + { (yyval.snval)=(yyvsp[(2) - (2)].snval); ;} + break; + + case 769: + +/* Line 1464 of yacc.c */ +#line 2302 "htcobol.y" + { (yyval.snval) = alloc_sortfile_node((yyvsp[(1) - (1)].sval)); ;} + break; + + case 770: + +/* Line 1464 of yacc.c */ +#line 2304 "htcobol.y" + { + (yyvsp[(1) - (2)].snval)->next = alloc_sortfile_node((yyvsp[(2) - (2)].sval)); (yyval.snval)=(yyvsp[(1) - (2)].snval); + ;} + break; + + case 771: + +/* Line 1464 of yacc.c */ +#line 2311 "htcobol.y" + { gen_moves((yyvsp[(2) - (4)].sval), (yyvsp[(4) - (4)].glistval)); ;} + break; + + case 772: + +/* Line 1464 of yacc.c */ +#line 2312 "htcobol.y" + { gen_movecorr((yyvsp[(3) - (5)].sval), (yyvsp[(5) - (5)].sval)); ;} + break; + + case 773: + +/* Line 1464 of yacc.c */ +#line 2313 "htcobol.y" + { gen_movelength((yyvsp[(4) - (6)].sval), (yyvsp[(6) - (6)].sval)); ;} + break; + + case 774: + +/* Line 1464 of yacc.c */ +#line 2314 "htcobol.y" + { yyerror("Expected variable"); ;} + break; + + case 775: + +/* Line 1464 of yacc.c */ +#line 2319 "htcobol.y" + { gen_initializes((yyvsp[(2) - (3)].glistval)); ;} + break; + + case 776: + +/* Line 1464 of yacc.c */ +#line 2320 "htcobol.y" + { yyerror("INITIALIZE: expected a variable name");;} + break; + + case 778: + +/* Line 1464 of yacc.c */ +#line 2324 "htcobol.y" + { UNIMPLEMENTED ("INITIALIZE ... REPLACING clause") ;} + break; + + case 781: + +/* Line 1464 of yacc.c */ +#line 2331 "htcobol.y" + { /* not implimented */ ;} + break; + + case 782: + +/* Line 1464 of yacc.c */ +#line 2334 "htcobol.y" + { ;} + break; + + case 783: + +/* Line 1464 of yacc.c */ +#line 2335 "htcobol.y" + { ;} + break; + + case 784: + +/* Line 1464 of yacc.c */ +#line 2336 "htcobol.y" + { ;} + break; + + case 785: + +/* Line 1464 of yacc.c */ +#line 2337 "htcobol.y" + { ;} + break; + + case 786: + +/* Line 1464 of yacc.c */ +#line 2338 "htcobol.y" + { ;} + break; + + case 788: + +/* Line 1464 of yacc.c */ +#line 2344 "htcobol.y" + { yyerror(err_msg_bad_form, "COMPUTE");;} + break; + + case 789: + +/* Line 1464 of yacc.c */ +#line 2348 "htcobol.y" + { + if ((yyvsp[(2) - (4)].ival) != EQUAL) + yyerror("= expected"); + else if ((yyvsp[(4) - (4)].mose) == NULL) + gen_compute1((yyvsp[(1) - (4)].mval), (yyvsp[(3) - (4)].sval)); + else + gen_compute2((yyvsp[(1) - (4)].mval), (yyvsp[(3) - (4)].sval), (yyvsp[(4) - (4)].mose)); + delete_mathvar_info((yyvsp[(1) - (4)].mval)); + if ((yyvsp[(4) - (4)].mose) != NULL) + tmose = NULL; + ;} + break; + + case 793: + +/* Line 1464 of yacc.c */ +#line 2368 "htcobol.y" + { yyerror(err_msg_bad_form, "ADD");;} + break; + + case 794: + +/* Line 1464 of yacc.c */ +#line 2372 "htcobol.y" + { + gen_add1((yyvsp[(1) - (4)].mval), (yyvsp[(3) - (4)].mval), (yyvsp[(4) - (4)].mose)); + delete_mathvar_info((yyvsp[(1) - (4)].mval)); + delete_mathvar_info((yyvsp[(3) - (4)].mval)); + if ((yyvsp[(4) - (4)].mose) != NULL) + tmose = NULL; + ;} + break; + + case 795: + +/* Line 1464 of yacc.c */ +#line 2380 "htcobol.y" + { + gen_add2((yyvsp[(1) - (5)].mval), (yyvsp[(4) - (5)].mval), (yyvsp[(2) - (5)].sval), (yyvsp[(5) - (5)].mose)); + delete_mathvar_info((yyvsp[(1) - (5)].mval)); + delete_mathvar_info((yyvsp[(4) - (5)].mval)); + if ((yyvsp[(5) - (5)].mose) != NULL) + tmose = NULL; + ;} + break; + + case 796: + +/* Line 1464 of yacc.c */ +#line 2388 "htcobol.y" + { + gen_addcorr1((yyvsp[(2) - (6)].mval), (yyvsp[(4) - (6)].mval), (yyvsp[(5) - (6)].ival), (yyvsp[(6) - (6)].mose)); + delete_mathvar_info((yyvsp[(2) - (6)].mval)); + delete_mathvar_info((yyvsp[(4) - (6)].mval)); + if ((yyvsp[(6) - (6)].mose) != NULL) + tmose = NULL; + ;} + break; + + case 797: + +/* Line 1464 of yacc.c */ +#line 2397 "htcobol.y" + { (yyval.sval) = NULL; ;} + break; + + case 798: + +/* Line 1464 of yacc.c */ +#line 2398 "htcobol.y" + { (yyval.sval) = (yyvsp[(2) - (2)].sval); ;} + break; + + case 802: + +/* Line 1464 of yacc.c */ +#line 2409 "htcobol.y" + { yyerror(err_msg_bad_form, "SUBTRACT");;} + break; + + case 803: + +/* Line 1464 of yacc.c */ +#line 2413 "htcobol.y" + { + gen_subtract1((yyvsp[(1) - (4)].mval), (yyvsp[(3) - (4)].mval), (yyvsp[(4) - (4)].mose)); + delete_mathvar_info((yyvsp[(1) - (4)].mval)); + delete_mathvar_info((yyvsp[(3) - (4)].mval)); + if ((yyvsp[(4) - (4)].mose) != NULL) + tmose = NULL; + ;} + break; + + case 804: + +/* Line 1464 of yacc.c */ +#line 2421 "htcobol.y" + { + assert_numeric_sy((yyvsp[(3) - (6)].sval)); + gen_subtract2((yyvsp[(1) - (6)].mval), (yyvsp[(5) - (6)].mval), (yyvsp[(3) - (6)].sval), (yyvsp[(6) - (6)].mose)); + delete_mathvar_info((yyvsp[(1) - (6)].mval)); + delete_mathvar_info((yyvsp[(5) - (6)].mval)); + if ((yyvsp[(6) - (6)].mose) != NULL) + tmose = NULL; + ;} + break; + + case 805: + +/* Line 1464 of yacc.c */ +#line 2430 "htcobol.y" + { + gen_subtractcorr1((yyvsp[(2) - (6)].mval), (yyvsp[(4) - (6)].mval), (yyvsp[(5) - (6)].ival), (yyvsp[(6) - (6)].mose)); + delete_mathvar_info((yyvsp[(2) - (6)].mval)); + delete_mathvar_info((yyvsp[(4) - (6)].mval)); + if ((yyvsp[(6) - (6)].mose) != NULL) + tmose = NULL; + ;} + break; + + case 809: + +/* Line 1464 of yacc.c */ +#line 2446 "htcobol.y" + { yyerror(err_msg_bad_form, "MULTIPLY");;} + break; + + case 810: + +/* Line 1464 of yacc.c */ +#line 2450 "htcobol.y" + { + assert_numeric_sy((yyvsp[(1) - (6)].sval)); + assert_numeric_sy((yyvsp[(3) - (6)].sval)); + gen_multiply2((yyvsp[(5) - (6)].mval), (yyvsp[(1) - (6)].sval), (yyvsp[(3) - (6)].sval), (yyvsp[(6) - (6)].mose)); + delete_mathvar_info((yyvsp[(5) - (6)].mval)); + if ((yyvsp[(6) - (6)].mose) != NULL) + tmose = NULL; + ;} + break; + + case 811: + +/* Line 1464 of yacc.c */ +#line 2459 "htcobol.y" + { + assert_numeric_sy((yyvsp[(1) - (4)].sval)); + gen_multiply1((yyvsp[(3) - (4)].mval), (yyvsp[(1) - (4)].sval), (yyvsp[(4) - (4)].mose)); + delete_mathvar_info((yyvsp[(3) - (4)].mval)); + if ((yyvsp[(4) - (4)].mose) != NULL) + tmose = NULL; + ;} + break; + + case 815: + +/* Line 1464 of yacc.c */ +#line 2476 "htcobol.y" + { yyerror(err_msg_bad_form, "DIVIDE");;} + break; + + case 816: + +/* Line 1464 of yacc.c */ +#line 2480 "htcobol.y" + { + assert_numeric_sy((yyvsp[(1) - (6)].sval)); + assert_numeric_sy((yyvsp[(3) - (6)].sval)); + gen_divide2((yyvsp[(5) - (6)].mval), (yyvsp[(1) - (6)].sval), (yyvsp[(3) - (6)].sval), (yyvsp[(6) - (6)].mose)); + delete_mathvar_info((yyvsp[(5) - (6)].mval)); + if ((yyvsp[(6) - (6)].mose) != NULL) + tmose = NULL; + ;} + break; + + case 817: + +/* Line 1464 of yacc.c */ +#line 2489 "htcobol.y" + { + assert_numeric_sy((yyvsp[(1) - (9)].sval)); + assert_numeric_sy((yyvsp[(3) - (9)].sval)); + assert_numeric_dest_sy((yyvsp[(5) - (9)].sval)); + gen_divide4((yyvsp[(1) - (9)].sval), (yyvsp[(3) - (9)].sval), (yyvsp[(5) - (9)].sval), (yyvsp[(8) - (9)].sval), (yyvsp[(6) - (9)].ival), (yyvsp[(9) - (9)].mose)); + if ((yyvsp[(9) - (9)].mose) != NULL) + tmose = NULL; + ;} + break; + + case 818: + +/* Line 1464 of yacc.c */ +#line 2498 "htcobol.y" + { + assert_numeric_sy((yyvsp[(1) - (9)].sval)); + assert_numeric_sy((yyvsp[(3) - (9)].sval)); + assert_numeric_dest_sy((yyvsp[(5) - (9)].sval)); + gen_divide4((yyvsp[(3) - (9)].sval), (yyvsp[(1) - (9)].sval), (yyvsp[(5) - (9)].sval), (yyvsp[(8) - (9)].sval), (yyvsp[(6) - (9)].ival), (yyvsp[(9) - (9)].mose)); + if ((yyvsp[(9) - (9)].mose) != NULL) + tmose = NULL; + ;} + break; + + case 819: + +/* Line 1464 of yacc.c */ +#line 2507 "htcobol.y" + { + assert_numeric_sy((yyvsp[(1) - (6)].sval)); + assert_numeric_sy((yyvsp[(3) - (6)].sval)); + gen_divide2((yyvsp[(5) - (6)].mval), (yyvsp[(3) - (6)].sval), (yyvsp[(1) - (6)].sval), (yyvsp[(6) - (6)].mose)); + delete_mathvar_info((yyvsp[(5) - (6)].mval)); + if ((yyvsp[(6) - (6)].mose) != NULL) + tmose = NULL; + ;} + break; + + case 820: + +/* Line 1464 of yacc.c */ +#line 2516 "htcobol.y" + { + assert_numeric_sy((yyvsp[(1) - (4)].sval)); + gen_divide1((yyvsp[(3) - (4)].mval), (yyvsp[(1) - (4)].sval), (yyvsp[(4) - (4)].mose)); + delete_mathvar_info((yyvsp[(3) - (4)].mval)); + if ((yyvsp[(4) - (4)].mose) != NULL) + tmose = NULL; + ;} + break; + + case 826: + +/* Line 1464 of yacc.c */ +#line 2534 "htcobol.y" + { yyerror(err_msg_bad_form, "ACCEPT");;} + break; + + case 827: + +/* Line 1464 of yacc.c */ +#line 2537 "htcobol.y" + { gen_accept_from_inkey((yyvsp[(2) - (5)].sval)); ;} + break; + + case 828: + +/* Line 1464 of yacc.c */ +#line 2538 "htcobol.y" + { gen_accept_from_inkey((yyvsp[(2) - (6)].sval)); ;} + break; + + case 829: + +/* Line 1464 of yacc.c */ +#line 2539 "htcobol.y" + { gen_accept_from_cmdline((yyvsp[(2) - (5)].sval)); ;} + break; + + case 830: + +/* Line 1464 of yacc.c */ +#line 2540 "htcobol.y" + { gen_accept_from_escapekey((yyvsp[(2) - (5)].sval)); ;} + break; + + case 831: + +/* Line 1464 of yacc.c */ +#line 2542 "htcobol.y" + { + save_literal((yyvsp[(5) - (6)].lval),'X'); + (yyvsp[(5) - (6)].lval)->all=0; + gen_accept_env_var((yyvsp[(2) - (6)].sval), (yyvsp[(5) - (6)].lval)); + ;} + break; + + case 832: + +/* Line 1464 of yacc.c */ +#line 2550 "htcobol.y" + { + gen_accept_from_chron((yyvsp[(2) - (5)].sval), (yyvsp[(4) - (5)].ival), 0); + ;} + break; + + case 833: + +/* Line 1464 of yacc.c */ +#line 2556 "htcobol.y" + { +/* walter acrescentei co ao final de todo gen_accept( */ +/* gen_accept($2, $3, 1); */ + co = ((bg * 8) + fg); + gen_accept((yyvsp[(2) - (4)].sval), (yyvsp[(3) - (4)].ival), 1, co); + ;} + break; + + case 834: + +/* Line 1464 of yacc.c */ +#line 2563 "htcobol.y" + { + screen_io_enable++; + HTG_prg_uses_term = 1; +/* gen_accept($2, $3, 1); */ + co = ((bg * 8) + fg); + gen_accept((yyvsp[(2) - (5)].sval), (yyvsp[(3) - (5)].ival), 1, co); + ;} + break; + + case 835: + +/* Line 1464 of yacc.c */ +#line 2570 "htcobol.y" + { + gen_store_fnres((yyvsp[(7) - (7)].sval)); + (yyval.dval) = gen_check_zero(); + ;} + break; + + case 836: + +/* Line 1464 of yacc.c */ +#line 2574 "htcobol.y" + { gen_dstlabel((yyvsp[(8) - (9)].dval)); ;} + break; + + case 842: + +/* Line 1464 of yacc.c */ +#line 2586 "htcobol.y" + { yyerror(err_msg_bad_form, "DISPLAY");;} + break; + + case 843: + +/* Line 1464 of yacc.c */ +#line 2591 "htcobol.y" + { gen_display_line((yyvsp[(3) - (5)].ival), (yyvsp[(4) - (5)].ival), 0); ;} + break; + + case 844: + +/* Line 1464 of yacc.c */ +#line 2595 "htcobol.y" + { +/* walter acrescentei co ao final de todo gen_accept( */ +/* gen_accept($2, $3, 1); */ + co = ((bg * 8) + fg); + gen_display_screen((yyvsp[(3) - (4)].ival), co); ;} + break; + + case 845: + +/* Line 1464 of yacc.c */ +#line 2602 "htcobol.y" + { put_disp_list((yyvsp[(1) - (1)].sval)); ;} + break; + + case 846: + +/* Line 1464 of yacc.c */ +#line 2603 "htcobol.y" + { put_disp_list((yyvsp[(3) - (3)].sval)); ;} + break; + + case 847: + +/* Line 1464 of yacc.c */ +#line 2606 "htcobol.y" + { (yyval.ival) = 1; ;} + break; + + case 848: + +/* Line 1464 of yacc.c */ +#line 2607 "htcobol.y" + { (yyval.ival) = 1; ;} + break; + + case 849: + +/* Line 1464 of yacc.c */ +#line 2608 "htcobol.y" + { (yyval.ival) = 2; ;} + break; + + case 850: + +/* Line 1464 of yacc.c */ +#line 2611 "htcobol.y" + { (yyval.ival) = 0; ;} + break; + + case 851: + +/* Line 1464 of yacc.c */ +#line 2612 "htcobol.y" + { (yyval.ival) = (yyvsp[(1) - (4)].ival) | SCR_NO_ADVANCING; ;} + break; + + case 852: + +/* Line 1464 of yacc.c */ +#line 2613 "htcobol.y" + { (yyval.ival) = (yyvsp[(1) - (3)].ival) | SCR_ERASE_EOL; ;} + break; + + case 853: + +/* Line 1464 of yacc.c */ +#line 2614 "htcobol.y" + { (yyval.ival) = (yyvsp[(1) - (4)].ival) | SCR_ERASE_EOS; ;} + break; + + case 854: + +/* Line 1464 of yacc.c */ +#line 2615 "htcobol.y" + { (yyval.ival) = (yyvsp[(1) - (4)].ival) | SCR_ERASE_EOL; ;} + break; + + case 855: + +/* Line 1464 of yacc.c */ +#line 2616 "htcobol.y" + { (yyval.ival) = (yyvsp[(1) - (4)].ival) | SCR_ERASE_EOS; ;} + break; + + case 858: + +/* Line 1464 of yacc.c */ +#line 2629 "htcobol.y" + { + screen_io_enable++; + HTG_prg_uses_term = 1; + push_expr((yyvsp[(3) - (3)].sval)); + gen_gotoy_expr(); + ;} + break; + + case 859: + +/* Line 1464 of yacc.c */ +#line 2638 "htcobol.y" + { + screen_io_enable++; + HTG_prg_uses_term = 1; + push_expr((yyvsp[(3) - (3)].sval)); + gen_gotox_expr(); + ;} + break; + + case 860: + +/* Line 1464 of yacc.c */ +#line 2645 "htcobol.y" + { + screen_io_enable++; + HTG_prg_uses_term = 1; + push_expr((yyvsp[(2) - (2)].sval)); + gen_gotox_expr(); + ;} + break; + + case 861: + +/* Line 1464 of yacc.c */ +#line 2654 "htcobol.y" + { + screen_io_enable++; + HTG_prg_uses_term = 1; + scr_push_display_position((yyvsp[(2) - (2)].lval)); + ;} + break; + + case 862: + +/* Line 1464 of yacc.c */ +#line 2660 "htcobol.y" + { + screen_io_enable++; + HTG_prg_uses_term = 1; + scr_push_display_position((yyvsp[(2) - (2)].sval)); + ;} + break; + + case 863: + +/* Line 1464 of yacc.c */ +#line 2668 "htcobol.y" + { fg = 0; bg = 0; (yyval.ival) = 0; ;} + break; + + case 864: + +/* Line 1464 of yacc.c */ +#line 2669 "htcobol.y" + { (yyval.ival) = (yyvsp[(1) - (2)].ival) | (yyvsp[(2) - (2)].ival); ;} + break; + + case 865: + +/* Line 1464 of yacc.c */ +#line 2672 "htcobol.y" + { (yyval.ival) = (yyvsp[(2) - (2)].ival); ;} + break; + + case 866: + +/* Line 1464 of yacc.c */ +#line 2673 "htcobol.y" + { (yyval.ival) = 0; ;} + break; + + case 867: + +/* Line 1464 of yacc.c */ +#line 2674 "htcobol.y" + { (yyval.ival) = 0; ;} + break; + + case 868: + +/* Line 1464 of yacc.c */ +#line 2675 "htcobol.y" + { (yyval.ival) = 0; ;} + break; + + case 869: + +/* Line 1464 of yacc.c */ +#line 2682 "htcobol.y" + { HTG_prg_uses_fileio = 1; ;} + break; + + case 870: + +/* Line 1464 of yacc.c */ +#line 2683 "htcobol.y" + { yyerror(err_msg_bad_form, "OPEN");;} + break; + + case 871: + +/* Line 1464 of yacc.c */ +#line 2686 "htcobol.y" + { ;} + break; + + case 872: + +/* Line 1464 of yacc.c */ +#line 2687 "htcobol.y" + { ;} + break; + + case 873: + +/* Line 1464 of yacc.c */ +#line 2691 "htcobol.y" + { (yyval.ival)=1; ;} + break; + + case 874: + +/* Line 1464 of yacc.c */ +#line 2692 "htcobol.y" + { (yyval.ival)=2; ;} + break; + + case 875: + +/* Line 1464 of yacc.c */ +#line 2693 "htcobol.y" + { (yyval.ival)=3; ;} + break; + + case 876: + +/* Line 1464 of yacc.c */ +#line 2694 "htcobol.y" + { (yyval.ival)=4; ;} + break; + + case 877: + +/* Line 1464 of yacc.c */ +#line 2695 "htcobol.y" + { yyerror("invalid OPEN mode"); ;} + break; + + case 878: + +/* Line 1464 of yacc.c */ +#line 2698 "htcobol.y" + { gen_open((yyvsp[(0) - (1)].ival), (yyvsp[(1) - (1)].sval)); ;} + break; + + case 879: + +/* Line 1464 of yacc.c */ +#line 2699 "htcobol.y" + { gen_open((yyvsp[(0) - (3)].ival), (yyvsp[(3) - (3)].sval)); ;} + break; + + case 881: + +/* Line 1464 of yacc.c */ +#line 2706 "htcobol.y" + { yyerror(err_msg_bad_form, "CLOSE");;} + break; + + case 884: + +/* Line 1464 of yacc.c */ +#line 2713 "htcobol.y" + { gen_close((yyvsp[(1) - (2)].sval)); ;} + break; + + case 885: + +/* Line 1464 of yacc.c */ +#line 2717 "htcobol.y" + { + (yyval.ival)=0; + UNIMPLEMENTED ("CLOSE options clause") + ;} + break; + + case 886: + +/* Line 1464 of yacc.c */ +#line 2721 "htcobol.y" + { (yyval.ival)=(yyvsp[(1) - (1)].ival); ;} + break; + + case 887: + +/* Line 1464 of yacc.c */ +#line 2724 "htcobol.y" + { ;} + break; + + case 888: + +/* Line 1464 of yacc.c */ +#line 2725 "htcobol.y" + { ;} + break; + + case 889: + +/* Line 1464 of yacc.c */ +#line 2726 "htcobol.y" + { ;} + break; + + case 890: + +/* Line 1464 of yacc.c */ +#line 2727 "htcobol.y" + { ;} + break; + + case 891: + +/* Line 1464 of yacc.c */ +#line 2728 "htcobol.y" + { ;} + break; + + case 892: + +/* Line 1464 of yacc.c */ +#line 2731 "htcobol.y" + { (yyval.ival)=1; ;} + break; + + case 893: + +/* Line 1464 of yacc.c */ +#line 2732 "htcobol.y" + { (yyval.ival)=2; ;} + break; + + case 894: + +/* Line 1464 of yacc.c */ +#line 2733 "htcobol.y" + { (yyval.ival)=0; ;} + break; + + case 896: + +/* Line 1464 of yacc.c */ +#line 2740 "htcobol.y" + { yyerror(err_msg_bad_form, "RETURN");;} + break; + + case 897: + +/* Line 1464 of yacc.c */ +#line 2746 "htcobol.y" + { + if (gen_reads((yyvsp[(1) - (3)].sval), (yyvsp[(3) - (3)].sval), NULL, 1, 4, 0) != 0) { + YYABORT; + } + ;} + break; + + case 898: + +/* Line 1464 of yacc.c */ +#line 2755 "htcobol.y" + { + if (gen_reads((yyvsp[(1) - (4)].sval), (yyvsp[(3) - (4)].sval), NULL, 1, 5, 0) != 0) { + YYABORT; + } + else { + ginfo_container4((yyvsp[(4) - (4)].gic)); + gic = NULL; + } + ;} + break; + + case 899: + +/* Line 1464 of yacc.c */ +#line 2769 "htcobol.y" + { ;} + break; + + case 900: + +/* Line 1464 of yacc.c */ +#line 2770 "htcobol.y" + { yyerror(err_msg_bad_form, "READ");;} + break; + + case 901: + +/* Line 1464 of yacc.c */ +#line 2779 "htcobol.y" + { + if (gen_reads((yyvsp[(1) - (6)].sval), (yyvsp[(4) - (6)].sval), (yyvsp[(6) - (6)].sval), (yyvsp[(2) - (6)].ival), 0, (yyvsp[(5) - (6)].ival)) != 0) { + YYABORT; + } + else { + gen_perform_decl((yyvsp[(1) - (6)].sval)); + } + ;} + break; + + case 902: + +/* Line 1464 of yacc.c */ +#line 2794 "htcobol.y" + { + if (gen_reads((yyvsp[(1) - (7)].sval), (yyvsp[(4) - (7)].sval), (yyvsp[(6) - (7)].sval), (yyvsp[(2) - (7)].ival), 1, (yyvsp[(5) - (7)].ival)) != 0) { + YYABORT; + } + else { + ginfo_container4((yyvsp[(7) - (7)].gic)); + gen_perform_decl((yyvsp[(1) - (7)].sval)); + gic = NULL; + } + ;} + break; + + case 903: + +/* Line 1464 of yacc.c */ +#line 2811 "htcobol.y" + { + if (gen_reads((yyvsp[(1) - (7)].sval), (yyvsp[(4) - (7)].sval), (yyvsp[(6) - (7)].sval), (yyvsp[(2) - (7)].ival), 2, (yyvsp[(5) - (7)].ival)) != 0) { + YYABORT; + } + else { + gen_test_invalid_keys ((yyvsp[(7) - (7)].iks), (yyvsp[(1) - (7)].sval), 23); + gen_perform_decl((yyvsp[(1) - (7)].sval)); + } + ;} + break; + + case 904: + +/* Line 1464 of yacc.c */ +#line 2822 "htcobol.y" + { (yyval.ival) = 0; ;} + break; + + case 905: + +/* Line 1464 of yacc.c */ +#line 2823 "htcobol.y" + { (yyval.ival) = 1; ;} + break; + + case 906: + +/* Line 1464 of yacc.c */ +#line 2824 "htcobol.y" + { (yyval.ival) = 2; ;} + break; + + case 907: + +/* Line 1464 of yacc.c */ +#line 2827 "htcobol.y" + { (yyval.sval) = NULL; ;} + break; + + case 908: + +/* Line 1464 of yacc.c */ +#line 2828 "htcobol.y" + { (yyval.sval) = (yyvsp[(2) - (2)].sval); ;} + break; + + case 909: + +/* Line 1464 of yacc.c */ +#line 2831 "htcobol.y" + { (yyval.sval) = NULL; ;} + break; + + case 910: + +/* Line 1464 of yacc.c */ +#line 2832 "htcobol.y" + { (yyval.sval) = (yyvsp[(3) - (3)].sval); ;} + break; + + case 911: + +/* Line 1464 of yacc.c */ +#line 2836 "htcobol.y" + { + ginfo_container2((yyvsp[(3) - (3)].gic), 2); + (yyval.gic)=ginfo_container3((yyvsp[(3) - (3)].gic), 2); + ;} + break; + + case 912: + +/* Line 1464 of yacc.c */ +#line 2841 "htcobol.y" + { + ginfo_container2((yyvsp[(2) - (2)].gic), 1); + (yyval.gic)=ginfo_container3((yyvsp[(2) - (2)].gic), 1); + ;} + break; + + case 913: + +/* Line 1464 of yacc.c */ +#line 2846 "htcobol.y" + { + ginfo_container2((yyvsp[(1) - (1)].gic), 1); + (yyval.gic)=ginfo_container3((yyvsp[(1) - (1)].gic), 1); + ;} + break; + + case 914: + +/* Line 1464 of yacc.c */ +#line 2851 "htcobol.y" + { + ginfo_container2((yyvsp[(2) - (4)].gic), 1); + ;} + break; + + case 915: + +/* Line 1464 of yacc.c */ +#line 2855 "htcobol.y" + { + ginfo_container2((yyvsp[(6) - (6)].gic), 2); + (yyval.gic)=ginfo_container3((yyvsp[(6) - (6)].gic), 3); + ;} + break; + + case 916: + +/* Line 1464 of yacc.c */ +#line 2860 "htcobol.y" + { + ginfo_container2((yyvsp[(1) - (3)].gic), 1); + ;} + break; + + case 917: + +/* Line 1464 of yacc.c */ +#line 2864 "htcobol.y" + { + ginfo_container2((yyvsp[(5) - (5)].gic), 2); + (yyval.gic)=ginfo_container3((yyvsp[(5) - (5)].gic), 3); + ;} + break; + + case 918: + +/* Line 1464 of yacc.c */ +#line 2871 "htcobol.y" + { + if ( gic == NULL ) { + gic=ginfo_container0(); + } + (yyval.gic)=ginfo_container1(gic); + stabs_line(); + ;} + break; + + case 919: + +/* Line 1464 of yacc.c */ +#line 2879 "htcobol.y" + { + (yyval.gic)=(yyvsp[(2) - (3)].gic); + ;} + break; + + case 920: + +/* Line 1464 of yacc.c */ +#line 2884 "htcobol.y" + { (yyval.iks) = gen_invalid_keys ((yyvsp[(1) - (1)].ike), NULL); ;} + break; + + case 921: + +/* Line 1464 of yacc.c */ +#line 2885 "htcobol.y" + { (yyval.iks) = gen_invalid_keys (NULL, (yyvsp[(1) - (1)].ike)); ;} + break; + + case 922: + +/* Line 1464 of yacc.c */ +#line 2886 "htcobol.y" + { (yyval.iks) = gen_invalid_keys ((yyvsp[(1) - (2)].ike), (yyvsp[(2) - (2)].ike)); ;} + break; + + case 923: + +/* Line 1464 of yacc.c */ +#line 2889 "htcobol.y" + { (yyval.ike) = gen_before_invalid_key (); ;} + break; + + case 924: + +/* Line 1464 of yacc.c */ +#line 2890 "htcobol.y" + { (yyval.ike) = gen_after_invalid_key ((yyvsp[(3) - (4)].ike)); ;} + break; + + case 925: + +/* Line 1464 of yacc.c */ +#line 2893 "htcobol.y" + { (yyval.ike) = gen_before_invalid_key (); ;} + break; + + case 926: + +/* Line 1464 of yacc.c */ +#line 2894 "htcobol.y" + { (yyval.ike) = gen_after_invalid_key ((yyvsp[(4) - (5)].ike)); ;} + break; + + case 931: + +/* Line 1464 of yacc.c */ +#line 2909 "htcobol.y" + { + gen_release((yyvsp[(2) - (3)].sval), (yyvsp[(3) - (3)].sval)); + ;} + break; + + case 932: + +/* Line 1464 of yacc.c */ +#line 2914 "htcobol.y" + { (yyval.sval) = NULL; ;} + break; + + case 933: + +/* Line 1464 of yacc.c */ +#line 2915 "htcobol.y" + { (yyval.sval) = (yyvsp[(2) - (2)].sval); ;} + break; + + case 934: + +/* Line 1464 of yacc.c */ +#line 2922 "htcobol.y" + { + if ((yyvsp[(2) - (4)].sval)->level != 1) + yyerror("variable %s could not be used for WRITE", (yyvsp[(2) - (4)].sval)->name); + gen_write((yyvsp[(2) - (4)].sval), (yyvsp[(4) - (4)].sval), (yyvsp[(3) - (4)].sval), write_advancing_sw); + ;} + break; + + case 935: + +/* Line 1464 of yacc.c */ +#line 2928 "htcobol.y" + {gen_test_invalid_keys ((yyvsp[(6) - (7)].iks), (yyvsp[(2) - (7)].sval), 22);;} + break; + + case 936: + +/* Line 1464 of yacc.c */ +#line 2931 "htcobol.y" + { (yyval.sval) = NULL; ;} + break; + + case 937: + +/* Line 1464 of yacc.c */ +#line 2932 "htcobol.y" + { (yyval.sval) = (yyvsp[(2) - (2)].sval); ;} + break; + + case 938: + +/* Line 1464 of yacc.c */ +#line 2935 "htcobol.y" + { (yyval.sval) = NULL; write_advancing_sw = 0; ;} + break; + + case 939: + +/* Line 1464 of yacc.c */ +#line 2937 "htcobol.y" + { + /* gen_loadvar($3); */ + (yyval.sval) = (yyvsp[(3) - (4)].sval); + write_advancing_sw = (yyvsp[(1) - (4)].ival); + ;} + break; + + case 940: + +/* Line 1464 of yacc.c */ +#line 2943 "htcobol.y" + { + write_advancing_sw = -(yyvsp[(1) - (3)].ival); + (yyval.sval) = NULL; + ;} + break; + + case 943: + +/* Line 1464 of yacc.c */ +#line 2957 "htcobol.y" + { + if ((yyvsp[(2) - (3)].sval)->level != 1) + yyerror("variable %s could not be used for REWRITE", (yyvsp[(2) - (3)].sval)->name); + gen_rewrite((yyvsp[(2) - (3)].sval), (yyvsp[(3) - (3)].sval)); + ;} + break; + + case 944: + +/* Line 1464 of yacc.c */ +#line 2963 "htcobol.y" + {gen_test_invalid_keys ((yyvsp[(5) - (6)].iks), (yyvsp[(2) - (6)].sval), 22);;} + break; + + case 947: + +/* Line 1464 of yacc.c */ +#line 2973 "htcobol.y" + { gen_delete((yyvsp[(2) - (3)].sval)); ;} + break; + + case 948: + +/* Line 1464 of yacc.c */ +#line 2975 "htcobol.y" + {gen_test_invalid_keys ((yyvsp[(5) - (6)].iks), (yyvsp[(2) - (6)].sval), 23);;} + break; + + case 951: + +/* Line 1464 of yacc.c */ +#line 2986 "htcobol.y" + {gen_test_invalid_keys ((yyvsp[(3) - (3)].iks), (yyvsp[(2) - (3)].sval), 23);;} + break; + + case 953: + +/* Line 1464 of yacc.c */ +#line 2990 "htcobol.y" + { gen_start((yyvsp[(1) - (1)].sval),0,NULL); (yyval.sval) = (yyvsp[(1) - (1)].sval);;} + break; + + case 954: + +/* Line 1464 of yacc.c */ +#line 2991 "htcobol.y" + { gen_start((yyvsp[(1) - (5)].sval),(yyvsp[(4) - (5)].ival),(yyvsp[(5) - (5)].sval)); (yyval.sval) = (yyvsp[(1) - (5)].sval);;} + break; + + case 957: + +/* Line 1464 of yacc.c */ +#line 3005 "htcobol.y" + { gen_goto((yyvsp[(3) - (3)].lstval)); ;} + break; + + case 958: + +/* Line 1464 of yacc.c */ +#line 3007 "htcobol.y" + { + if (is_numeric_sy((yyvsp[(6) - (6)].sval))) + gen_goto_depending((yyvsp[(3) - (6)].lstval), (yyvsp[(6) - (6)].sval)); + else yyerror("variable '%s' must be numeric", (yyvsp[(6) - (6)].sval)->name); + ;} + break; + + case 959: + +/* Line 1464 of yacc.c */ +#line 3013 "htcobol.y" + { (yyval.lstval) = insert_list(NULL, (yyvsp[(1) - (1)].sval)); ;} + break; + + case 960: + +/* Line 1464 of yacc.c */ +#line 3016 "htcobol.y" + { (yyval.lstval) = insert_list(NULL, (yyvsp[(1) - (1)].sval)); ;} + break; + + case 961: + +/* Line 1464 of yacc.c */ +#line 3017 "htcobol.y" + { (yyval.lstval) = insert_list((yyvsp[(1) - (2)].lstval), (yyvsp[(2) - (2)].sval)); ;} + break; + + case 962: + +/* Line 1464 of yacc.c */ +#line 3018 "htcobol.y" + { (yyval.lstval) = insert_list((yyvsp[(1) - (3)].lstval), (yyvsp[(3) - (3)].sval)); ;} + break; + + case 963: + +/* Line 1464 of yacc.c */ +#line 3023 "htcobol.y" + { curr_call_mode=CM_REF; ;} + break; + + case 964: + +/* Line 1464 of yacc.c */ +#line 3028 "htcobol.y" + { (yyval.ival) = loc_label++; /* exception check */ ;} + break; + + case 965: + +/* Line 1464 of yacc.c */ +#line 3029 "htcobol.y" + { (yyval.ival) = loc_label++; /* not exception check */ ;} + break; + + case 966: + +/* Line 1464 of yacc.c */ +#line 3030 "htcobol.y" + { + (yyval.ival) = emt_call((struct lit *)(yyvsp[(4) - (8)].sval), (yyvsp[(5) - (8)].ival), (yyvsp[(7) - (8)].ival), (yyvsp[(8) - (8)].ival), (yyvsp[(6) - (8)].sval)); + /* gen_store_fnres($6); */ + /* If paramater is a variable then dynamic link libs are required */ +/* + if ($4->litflag == 0 ) { + HTG_prg_uses_dcall = 1; + } +*/ + ;} + break; + + case 967: + +/* Line 1464 of yacc.c */ +#line 3041 "htcobol.y" + { check_call_except((yyvsp[(10) - (11)].ival), (yyvsp[(11) - (11)].ival), (yyvsp[(7) - (11)].ival), (yyvsp[(8) - (11)].ival), (yyvsp[(9) - (11)].ival)); ;} + break; + + case 969: + +/* Line 1464 of yacc.c */ +#line 3043 "htcobol.y" + { yyerror(err_msg_bad_form, "CALL"); ;} + break; + + case 970: + +/* Line 1464 of yacc.c */ +#line 3046 "htcobol.y" + { curr_call_convention = 0; ;} + break; + + case 971: + +/* Line 1464 of yacc.c */ +#line 3047 "htcobol.y" + { curr_call_convention = 0; ;} + break; + + case 972: + +/* Line 1464 of yacc.c */ +#line 3048 "htcobol.y" + { curr_call_convention = 1; ;} + break; + + case 973: + +/* Line 1464 of yacc.c */ +#line 3056 "htcobol.y" + { + emt_call_loadlib((struct lit *)(yyvsp[(2) - (2)].sval)); + ;} + break; + + case 975: + +/* Line 1464 of yacc.c */ +#line 3060 "htcobol.y" + { yyerror(err_msg_bad_form, "CALL-LOADLIB"); ;} + break; + + case 976: + +/* Line 1464 of yacc.c */ +#line 3064 "htcobol.y" + { ;} + break; + + case 977: + +/* Line 1464 of yacc.c */ +#line 3065 "htcobol.y" + { ;} + break; + + case 978: + +/* Line 1464 of yacc.c */ +#line 3070 "htcobol.y" + { curr_call_mode=CM_CHAIN; ;} + break; + + case 979: + +/* Line 1464 of yacc.c */ +#line 3072 "htcobol.y" + { (yyval.ival) = loc_label++; /* exception check */ ;} + break; + + case 980: + +/* Line 1464 of yacc.c */ +#line 3073 "htcobol.y" + { (yyval.ival) = gen_chain((yyvsp[(3) - (5)].sval),(yyvsp[(4) - (5)].ival),(yyvsp[(5) - (5)].ival)); ;} + break; + + case 981: + +/* Line 1464 of yacc.c */ +#line 3075 "htcobol.y" + {/* check_call_except($9,$10,$6,$7,$8);*/ ;} + break; + + case 983: + +/* Line 1464 of yacc.c */ +#line 3077 "htcobol.y" + { yyerror(err_msg_bad_form, "CHAIN"); ;} + break; + + case 984: + +/* Line 1464 of yacc.c */ +#line 3082 "htcobol.y" + { gen_exit(0); ;} + break; + + case 985: + +/* Line 1464 of yacc.c */ +#line 3083 "htcobol.y" + { gen_exit(0); ;} + break; + + case 986: + +/* Line 1464 of yacc.c */ +#line 3084 "htcobol.y" + { gen_exit(1); ;} + break; + + case 987: + +/* Line 1464 of yacc.c */ +#line 3089 "htcobol.y" + { gen_stoprun(); ;} + break; + + case 988: + +/* Line 1464 of yacc.c */ +#line 3091 "htcobol.y" + { + struct sym *sy; +/* walter acrescentei 0 ao final */ + gen_display_line(2, SCR_NO_ADVANCING, 0); + sy = define_temp_field(DTYPE_ALPHANUMERIC,1); +/* walter acrescentei 0 ao final + gen_accept(sy, 0, 1); */ + gen_accept(sy, 0, 1, 0); + ;} + break; + + case 989: + +/* Line 1464 of yacc.c */ +#line 3103 "htcobol.y" + { + save_literal((yyvsp[(1) - (1)].lval),'X'); + (yyvsp[(1) - (1)].lval)->all=0; + put_disp_list((struct sym *)(yyvsp[(1) - (1)].lval)); + ;} + break; + + case 990: + +/* Line 1464 of yacc.c */ +#line 3109 "htcobol.y" + { + save_literal((yyvsp[(1) - (1)].lval),'X'); + (yyvsp[(1) - (1)].lval)->all=0; + put_disp_list((struct sym *)(yyvsp[(1) - (1)].lval)); + ;} + break; + + case 991: + +/* Line 1464 of yacc.c */ +#line 3118 "htcobol.y" + { gen_goback(); ;} + break; + + case 992: + +/* Line 1464 of yacc.c */ +#line 3122 "htcobol.y" + { + (yyval.mval) = create_mathvar_info(NULL, (yyvsp[(1) - (3)].sval), (yyvsp[(2) - (3)].ival)); + ;} + break; + + case 993: + +/* Line 1464 of yacc.c */ +#line 3126 "htcobol.y" + { + (yyval.mval) = create_mathvar_info((yyvsp[(1) - (4)].mval), (yyvsp[(2) - (4)].sval), (yyvsp[(3) - (4)].ival)); + ;} + break; + + case 994: + +/* Line 1464 of yacc.c */ +#line 3132 "htcobol.y" + { + (yyval.mval) = create_mathvar_info(NULL, (yyvsp[(1) - (2)].sval), 0); + ;} + break; + + case 995: + +/* Line 1464 of yacc.c */ +#line 3136 "htcobol.y" + { + (yyval.mval) = create_mathvar_info((yyvsp[(1) - (3)].mval), (yyvsp[(2) - (3)].sval), 0); + ;} + break; + + case 996: + +/* Line 1464 of yacc.c */ +#line 3142 "htcobol.y" + { (yyval.ival)=0; ;} + break; + + case 997: + +/* Line 1464 of yacc.c */ +#line 3143 "htcobol.y" + { (yyval.ival)=1; ;} + break; + + case 998: + +/* Line 1464 of yacc.c */ +#line 3148 "htcobol.y" + { + (yyval.mose)=NULL; + ;} + break; + + case 999: + +/* Line 1464 of yacc.c */ +#line 3153 "htcobol.y" + { + (yyval.mose)=math_on_size_error4((yyvsp[(4) - (4)].mose), 2); + ;} + break; + + case 1000: + +/* Line 1464 of yacc.c */ +#line 3158 "htcobol.y" + { + (yyval.mose)=math_on_size_error4((yyvsp[(3) - (3)].mose), 1); + ;} + break; + + case 1001: + +/* Line 1464 of yacc.c */ +#line 3164 "htcobol.y" + { + (yyvsp[(3) - (6)].mose)->lbl1=(yyvsp[(3) - (6)].mose)->ose; + ;} + break; + + case 1002: + +/* Line 1464 of yacc.c */ +#line 3168 "htcobol.y" + { + (yyval.mose)=math_on_size_error4((yyvsp[(8) - (8)].mose), 3); + ;} + break; + + case 1003: + +/* Line 1464 of yacc.c */ +#line 3175 "htcobol.y" + { + if ( tmose == NULL ) { + tmose=math_on_size_error0(); + (yyval.mose)=math_on_size_error1(tmose); + } + else { + (yyval.mose)=math_on_size_error1(tmose); + } + stabs_line(); + ;} + break; + + case 1004: + +/* Line 1464 of yacc.c */ +#line 3186 "htcobol.y" + { + math_on_size_error2(tmose); + (yyval.mose)=(yyvsp[(2) - (3)].mose); + ;} + break; + + case 1012: + +/* Line 1464 of yacc.c */ +#line 3210 "htcobol.y" + { gen_set_list((yyvsp[(1) - (4)].sval),SET_TO,(yyvsp[(4) - (4)].sval),0,(yyvsp[(3) - (4)].ival)); ;} + break; + + case 1013: + +/* Line 1464 of yacc.c */ +#line 3212 "htcobol.y" + { gen_set_list((yyvsp[(1) - (4)].sval),SET_UP_BY,(yyvsp[(4) - (4)].sval),0,0); ;} + break; + + case 1014: + +/* Line 1464 of yacc.c */ +#line 3214 "htcobol.y" + { gen_set_list((yyvsp[(1) - (4)].sval),SET_DOWN_BY,(yyvsp[(4) - (4)].sval),0,0); ;} + break; + + case 1015: + +/* Line 1464 of yacc.c */ +#line 3216 "htcobol.y" + { gen_set((yyvsp[(2) - (5)].sval),SET_TO,(yyvsp[(5) - (5)].sval),(yyvsp[(1) - (5)].ival),(yyvsp[(4) - (5)].ival)); ;} + break; + + case 1016: + +/* Line 1464 of yacc.c */ +#line 3221 "htcobol.y" + { (yyval.sval) = (yyvsp[(1) - (1)].sval); ;} + break; + + case 1017: + +/* Line 1464 of yacc.c */ +#line 3222 "htcobol.y" + { (yyval.sval) = (struct sym *)chain_var((yyvsp[(1) - (1)].sval)); ;} + break; + + case 1018: + +/* Line 1464 of yacc.c */ +#line 3226 "htcobol.y" + { (yyval.sval) = (yyvsp[(1) - (1)].sval); ;} + break; + + case 1019: + +/* Line 1464 of yacc.c */ +#line 3227 "htcobol.y" + { (yyval.sval) = NULL; ;} + break; + + case 1020: + +/* Line 1464 of yacc.c */ +#line 3231 "htcobol.y" + { (yyval.sval) = (yyvsp[(1) - (1)].sval); ;} + break; + + case 1021: + +/* Line 1464 of yacc.c */ +#line 3232 "htcobol.y" + { (yyval.sval) = (struct sym *)define_num_lit(1); ;} + break; + + case 1022: + +/* Line 1464 of yacc.c */ +#line 3233 "htcobol.y" + { (yyval.sval) = (struct sym *)spe_lit_ZE; ;} + break; + + case 1023: + +/* Line 1464 of yacc.c */ +#line 3234 "htcobol.y" + { (yyval.sval) = NULL; ;} + break; + + case 1024: + +/* Line 1464 of yacc.c */ +#line 3236 "htcobol.y" + { + (yyval.sval) = (struct sym *)1; + /* no (struct sym *) may have this value! */ + ;} + break; + + case 1025: + +/* Line 1464 of yacc.c */ +#line 3243 "htcobol.y" + { (yyval.ival) = 0; ;} + break; + + case 1026: + +/* Line 1464 of yacc.c */ +#line 3244 "htcobol.y" + { (yyval.ival) = 1; ;} + break; + + case 1027: + +/* Line 1464 of yacc.c */ +#line 3251 "htcobol.y" + { + gen_stringcmd( (yyvsp[(2) - (5)].sfval), (yyvsp[(4) - (5)].sval), (yyvsp[(5) - (5)].sval) ); + ;} + break; + + case 1029: + +/* Line 1464 of yacc.c */ +#line 3262 "htcobol.y" + { + gen_unstring( (yyvsp[(2) - (7)].sval), (yyvsp[(3) - (7)].udval), (yyvsp[(5) - (7)].udstval), (yyvsp[(6) - (7)].sval), (yyvsp[(7) - (7)].sval) ); + ;} + break; + + case 1031: + +/* Line 1464 of yacc.c */ +#line 3269 "htcobol.y" + { (yyval.udval)=(yyvsp[(3) - (3)].udval); ;} + break; + + case 1032: + +/* Line 1464 of yacc.c */ +#line 3270 "htcobol.y" + { (yyval.udval)=NULL; ;} + break; + + case 1033: + +/* Line 1464 of yacc.c */ +#line 3273 "htcobol.y" + { (yyval.udval)=alloc_unstring_delimited((yyvsp[(1) - (2)].ival),(yyvsp[(2) - (2)].sval)); ;} + break; + + case 1034: + +/* Line 1464 of yacc.c */ +#line 3274 "htcobol.y" + { + struct unstring_delimited *ud; + ud=alloc_unstring_delimited((yyvsp[(3) - (4)].ival),(yyvsp[(4) - (4)].sval)); + ud->next = (yyvsp[(1) - (4)].udval); + (yyval.udval)=ud; + ;} + break; + + case 1035: + +/* Line 1464 of yacc.c */ +#line 3282 "htcobol.y" + { (yyval.udstval)=(yyvsp[(1) - (1)].udstval); ;} + break; + + case 1036: + +/* Line 1464 of yacc.c */ +#line 3284 "htcobol.y" + { + (yyvsp[(3) - (3)].udstval)->next = (yyvsp[(1) - (3)].udstval); + (yyval.udstval) = (yyvsp[(3) - (3)].udstval); + ;} + break; + + case 1037: + +/* Line 1464 of yacc.c */ +#line 3290 "htcobol.y" + { + (yyval.udstval) = alloc_unstring_dest( (yyvsp[(1) - (3)].sval), (yyvsp[(2) - (3)].sval), (yyvsp[(3) - (3)].sval) ); + ;} + break; + + case 1038: + +/* Line 1464 of yacc.c */ +#line 3295 "htcobol.y" + { (yyval.sval)=NULL; ;} + break; + + case 1039: + +/* Line 1464 of yacc.c */ +#line 3296 "htcobol.y" + { (yyval.sval)=(yyvsp[(3) - (3)].sval); ;} + break; + + case 1040: + +/* Line 1464 of yacc.c */ +#line 3299 "htcobol.y" + { (yyval.sval)=NULL; ;} + break; + + case 1041: + +/* Line 1464 of yacc.c */ +#line 3300 "htcobol.y" + { (yyval.sval)=(yyvsp[(3) - (3)].sval); ;} + break; + + case 1042: + +/* Line 1464 of yacc.c */ +#line 3303 "htcobol.y" + { (yyval.sval)=NULL; ;} + break; + + case 1043: + +/* Line 1464 of yacc.c */ +#line 3304 "htcobol.y" + { (yyval.sval)=(yyvsp[(3) - (3)].sval); ;} + break; + + case 1044: + +/* Line 1464 of yacc.c */ +#line 3307 "htcobol.y" + { (yyval.ival)=0; ;} + break; + + case 1045: + +/* Line 1464 of yacc.c */ +#line 3308 "htcobol.y" + { (yyval.ival)=1; ;} + break; + + case 1046: + +/* Line 1464 of yacc.c */ +#line 3311 "htcobol.y" + { curr_division = CDIV_EXCEPTION; ;} + break; + + case 1047: + +/* Line 1464 of yacc.c */ +#line 3314 "htcobol.y" + { curr_division = CDIV_PROC; ;} + break; + + case 1048: + +/* Line 1464 of yacc.c */ +#line 3317 "htcobol.y" + { (yyval.ival) = begin_on_except(); ;} + break; + + case 1049: + +/* Line 1464 of yacc.c */ +#line 3318 "htcobol.y" + { gen_jmplabel((yyvsp[(0) - (4)].dval)); (yyval.ival)=(yyvsp[(3) - (4)].ival); ;} + break; + + case 1050: + +/* Line 1464 of yacc.c */ +#line 3319 "htcobol.y" + { (yyval.ival) = 0; ;} + break; + + case 1053: + +/* Line 1464 of yacc.c */ +#line 3326 "htcobol.y" + { (yyval.ival) = begin_on_except(); ;} + break; + + case 1054: + +/* Line 1464 of yacc.c */ +#line 3327 "htcobol.y" + { gen_jmplabel((yyvsp[(-1) - (5)].dval)); (yyval.ival)=(yyvsp[(4) - (5)].ival); ;} + break; + + case 1055: + +/* Line 1464 of yacc.c */ +#line 3328 "htcobol.y" + { (yyval.ival) = 0; ;} + break; + + case 1056: + +/* Line 1464 of yacc.c */ +#line 3331 "htcobol.y" + { (yyval.dval) = gen_at_end(1); ;} + break; + + case 1057: + +/* Line 1464 of yacc.c */ +#line 3332 "htcobol.y" + { gen_dstlabel((yyvsp[(3) - (4)].dval)); ;} + break; + + case 1059: + +/* Line 1464 of yacc.c */ +#line 3336 "htcobol.y" + { (yyval.dval) = gen_at_end(0); ;} + break; + + case 1060: + +/* Line 1464 of yacc.c */ +#line 3337 "htcobol.y" + { gen_dstlabel((yyvsp[(4) - (5)].dval)); ;} + break; + + case 1062: + +/* Line 1464 of yacc.c */ +#line 3342 "htcobol.y" + {(yyval.iks) = gen_invalid_keys((yyvsp[(1) - (1)].ike), NULL);;} + break; + + case 1063: + +/* Line 1464 of yacc.c */ +#line 3343 "htcobol.y" + {(yyval.iks) = gen_invalid_keys(NULL, (yyvsp[(1) - (1)].ike));;} + break; + + case 1064: + +/* Line 1464 of yacc.c */ +#line 3345 "htcobol.y" + {(yyval.iks) = gen_invalid_keys((yyvsp[(1) - (2)].ike), (yyvsp[(2) - (2)].ike));;} + break; + + case 1065: + +/* Line 1464 of yacc.c */ +#line 3346 "htcobol.y" + { (yyval.iks) = NULL;;} + break; + + case 1066: + +/* Line 1464 of yacc.c */ +#line 3349 "htcobol.y" + { (yyval.ike) = gen_before_invalid_key(); ;} + break; + + case 1067: + +/* Line 1464 of yacc.c */ +#line 3350 "htcobol.y" + { (yyval.ike) = gen_after_invalid_key((yyvsp[(3) - (4)].ike)); ;} + break; + + case 1068: + +/* Line 1464 of yacc.c */ +#line 3353 "htcobol.y" + { (yyval.ike) = gen_before_invalid_key(); ;} + break; + + case 1069: + +/* Line 1464 of yacc.c */ +#line 3354 "htcobol.y" + { (yyval.ike) = gen_after_invalid_key((yyvsp[(4) - (5)].ike)); ;} + break; + + case 1072: + +/* Line 1464 of yacc.c */ +#line 3361 "htcobol.y" + { (yyval.sval) = (yyvsp[(3) - (3)].sval); ;} + break; + + case 1073: + +/* Line 1464 of yacc.c */ +#line 3362 "htcobol.y" + { (yyval.sval) = NULL; ;} + break; + + case 1074: + +/* Line 1464 of yacc.c */ +#line 3365 "htcobol.y" + { (yyval.sfval) = (yyvsp[(1) - (1)].sfval); ;} + break; + + case 1075: + +/* Line 1464 of yacc.c */ +#line 3366 "htcobol.y" + { + (yyvsp[(3) - (3)].sfval)->next = (yyvsp[(1) - (3)].sfval); + (yyval.sfval) = (yyvsp[(3) - (3)].sfval); + ;} + break; + + case 1076: + +/* Line 1464 of yacc.c */ +#line 3370 "htcobol.y" + { yyerror("variable expected"); ;} + break; + + case 1077: + +/* Line 1464 of yacc.c */ +#line 3373 "htcobol.y" + { + /* Item with no DELIMITED BY section implies use delimiter of next item */ + (yyval.sfval) = alloc_string_from( (yyvsp[(1) - (1)].sval), (struct sym *)-1 ); + ;} + break; + + case 1078: + +/* Line 1464 of yacc.c */ +#line 3377 "htcobol.y" + { + (yyval.sfval) = alloc_string_from( (yyvsp[(1) - (4)].sval), (yyvsp[(4) - (4)].sval) ); + ;} + break; + + case 1079: + +/* Line 1464 of yacc.c */ +#line 3382 "htcobol.y" + { (yyval.sval)=(yyvsp[(1) - (1)].sval); ;} + break; + + case 1080: + +/* Line 1464 of yacc.c */ +#line 3383 "htcobol.y" + { (yyval.sval)=NULL; ;} + break; + + case 1081: + +/* Line 1464 of yacc.c */ +#line 3384 "htcobol.y" + { yyerror("SIZE or identifier expected"); ;} + break; + + case 1086: + +/* Line 1464 of yacc.c */ +#line 3399 "htcobol.y" + { gen_inspect((yyvsp[(2) - (3)].sval),(void *)(yyvsp[(3) - (3)].tlval),0); ;} + break; + + case 1087: + +/* Line 1464 of yacc.c */ +#line 3400 "htcobol.y" + { gen_inspect((yyvsp[(2) - (5)].sval),(void *)(yyvsp[(5) - (5)].repval),1); ;} + break; + + case 1088: + +/* Line 1464 of yacc.c */ +#line 3403 "htcobol.y" + { gen_inspect((yyvsp[(2) - (3)].sval),(void *)(yyvsp[(3) - (3)].cvval),2); ;} + break; + + case 1089: + +/* Line 1464 of yacc.c */ +#line 3407 "htcobol.y" + { + (yyval.cvval) = alloc_converting_struct((yyvsp[(2) - (5)].sval),(yyvsp[(4) - (5)].sval),(yyvsp[(5) - (5)].baval)); + ;} + break; + + case 1090: + +/* Line 1464 of yacc.c */ +#line 3412 "htcobol.y" + { (yyval.tlval)=(yyvsp[(2) - (2)].tlval); ;} + break; + + case 1091: + +/* Line 1464 of yacc.c */ +#line 3413 "htcobol.y" + { (yyval.tlval)=NULL; ;} + break; + + case 1092: + +/* Line 1464 of yacc.c */ +#line 3417 "htcobol.y" + { + (yyval.tlval) = alloc_tallying_list((yyvsp[(1) - (4)].tlval),(yyvsp[(2) - (4)].sval),(yyvsp[(4) - (4)].tfval)); ;} + break; + + case 1093: + +/* Line 1464 of yacc.c */ +#line 3419 "htcobol.y" + { (yyval.tlval) = NULL; ;} + break; + + case 1094: + +/* Line 1464 of yacc.c */ +#line 3423 "htcobol.y" + { + (yyval.tfval) = alloc_tallying_for_list((yyvsp[(1) - (3)].tfval),INSPECT_CHARACTERS,NULL,(yyvsp[(3) - (3)].baval)); ;} + break; + + case 1095: + +/* Line 1464 of yacc.c */ +#line 3426 "htcobol.y" + { + (yyval.tfval) = alloc_tallying_for_list((yyvsp[(1) - (4)].tfval),INSPECT_ALL,(yyvsp[(3) - (4)].sval),(yyvsp[(4) - (4)].baval)); ;} + break; + + case 1096: + +/* Line 1464 of yacc.c */ +#line 3429 "htcobol.y" + { + (yyval.tfval) = alloc_tallying_for_list((yyvsp[(1) - (4)].tfval),INSPECT_LEADING,(yyvsp[(3) - (4)].sval),(yyvsp[(4) - (4)].baval)); ;} + break; + + case 1097: + +/* Line 1464 of yacc.c */ +#line 3431 "htcobol.y" + { (yyval.tfval) = NULL; ;} + break; + + case 1098: + +/* Line 1464 of yacc.c */ +#line 3435 "htcobol.y" + { (yyval.repval) = (yyvsp[(2) - (2)].repval); ;} + break; + + case 1099: + +/* Line 1464 of yacc.c */ +#line 3436 "htcobol.y" + { (yyval.repval) = NULL; ;} + break; + + case 1100: + +/* Line 1464 of yacc.c */ +#line 3440 "htcobol.y" + { + (yyval.repval) = alloc_replacing_list((yyvsp[(1) - (5)].repval),INSPECT_CHARACTERS,NULL,(yyvsp[(4) - (5)].sval),(yyvsp[(5) - (5)].baval)); ;} + break; + + case 1101: + +/* Line 1464 of yacc.c */ +#line 3443 "htcobol.y" + { + (yyval.repval) = alloc_replacing_list((yyvsp[(1) - (3)].repval),(yyvsp[(2) - (3)].ival),(yyvsp[(3) - (3)].rbval),NULL,NULL); ;} + break; + + case 1102: + +/* Line 1464 of yacc.c */ +#line 3445 "htcobol.y" + { (yyval.repval) = NULL; ;} + break; + + case 1103: + +/* Line 1464 of yacc.c */ +#line 3449 "htcobol.y" + { + (yyval.rbval) = alloc_replacing_by_list((yyvsp[(1) - (5)].rbval),(yyvsp[(2) - (5)].sval),(yyvsp[(4) - (5)].sval),(yyvsp[(5) - (5)].baval)); ;} + break; + + case 1104: + +/* Line 1464 of yacc.c */ +#line 3451 "htcobol.y" + { (yyval.rbval) = NULL; ;} + break; + + case 1105: + +/* Line 1464 of yacc.c */ +#line 3454 "htcobol.y" + { (yyval.ival) = INSPECT_ALL; ;} + break; + + case 1106: + +/* Line 1464 of yacc.c */ +#line 3455 "htcobol.y" + { (yyval.ival) = INSPECT_LEADING; ;} + break; + + case 1107: + +/* Line 1464 of yacc.c */ +#line 3456 "htcobol.y" + { (yyval.ival) = INSPECT_TRAILING; ;} + break; + + case 1108: + +/* Line 1464 of yacc.c */ +#line 3457 "htcobol.y" + { (yyval.ival) = INSPECT_FIRST; ;} + break; + + case 1109: + +/* Line 1464 of yacc.c */ +#line 3462 "htcobol.y" + { (yyval.baval) = alloc_inspect_before_after((yyvsp[(1) - (4)].baval),1,(yyvsp[(4) - (4)].sval)); ;} + break; + + case 1110: + +/* Line 1464 of yacc.c */ +#line 3465 "htcobol.y" + { (yyval.baval) = alloc_inspect_before_after((yyvsp[(1) - (4)].baval),2,(yyvsp[(4) - (4)].sval)); ;} + break; + + case 1111: + +/* Line 1464 of yacc.c */ +#line 3466 "htcobol.y" + { (yyval.baval) = alloc_inspect_before_after(NULL,0,NULL); ;} + break; + + case 1114: + +/* Line 1464 of yacc.c */ +#line 3474 "htcobol.y" + { (yyval.sval) = (yyvsp[(1) - (1)].sval); ;} + break; + + case 1115: + +/* Line 1464 of yacc.c */ +#line 3475 "htcobol.y" + { (yyval.sval) = + (struct sym *)create_expr('*',(struct expr *)(yyvsp[(1) - (3)].sval),(struct expr *)(yyvsp[(3) - (3)].sval)); ;} + break; + + case 1116: + +/* Line 1464 of yacc.c */ +#line 3477 "htcobol.y" + { (yyval.sval) = + (struct sym *)create_expr('/',(struct expr *)(yyvsp[(1) - (3)].sval),(struct expr *)(yyvsp[(3) - (3)].sval)); ;} + break; + + case 1117: + +/* Line 1464 of yacc.c */ +#line 3479 "htcobol.y" + { (yyval.sval) = + (struct sym *)create_expr('+',(struct expr *)(yyvsp[(1) - (3)].sval),(struct expr *)(yyvsp[(3) - (3)].sval)); ;} + break; + + case 1118: + +/* Line 1464 of yacc.c */ +#line 3481 "htcobol.y" + { (yyval.sval) = + (struct sym *)create_expr('-',(struct expr *)(yyvsp[(1) - (3)].sval),(struct expr *)(yyvsp[(3) - (3)].sval)); ;} + break; + + case 1119: + +/* Line 1464 of yacc.c */ +#line 3483 "htcobol.y" + { (yyval.sval) = + (struct sym *)create_expr('^',(struct expr *)(yyvsp[(1) - (3)].sval),(struct expr *)(yyvsp[(3) - (3)].sval)); ;} + break; + + case 1120: + +/* Line 1464 of yacc.c */ +#line 3485 "htcobol.y" + { (yyval.sval)=(yyvsp[(2) - (3)].sval); ;} + break; + + case 1121: + +/* Line 1464 of yacc.c */ +#line 3490 "htcobol.y" + { (yyval.sval) = (struct sym *)-1; ;} + break; + + case 1122: + +/* Line 1464 of yacc.c */ +#line 3491 "htcobol.y" + { (yyval.sval) = (yyvsp[(1) - (1)].sval); ;} + break; + + case 1123: + +/* Line 1464 of yacc.c */ +#line 3494 "htcobol.y" + { (yyval.ival)=0; ;} + break; + + case 1124: + +/* Line 1464 of yacc.c */ +#line 3495 "htcobol.y" + { (yyval.ival)=0; /* to save how many parameters */ ;} + break; + + case 1125: + +/* Line 1464 of yacc.c */ +#line 3496 "htcobol.y" + { (yyval.ival)=CALL; ;} + break; + + case 1126: + +/* Line 1464 of yacc.c */ +#line 3497 "htcobol.y" + { (yyval.ival)=(yyvsp[(2) - (5)].ival); ;} + break; + + case 1127: + +/* Line 1464 of yacc.c */ +#line 3500 "htcobol.y" + { (yyval.sval)=0; ;} + break; + + case 1128: + +/* Line 1464 of yacc.c */ +#line 3501 "htcobol.y" + { (yyval.sval)=(yyvsp[(2) - (2)].sval); ;} + break; + + case 1129: + +/* Line 1464 of yacc.c */ +#line 3502 "htcobol.y" + { (yyval.sval)=(yyvsp[(2) - (2)].sval); ;} + break; + + case 1131: + +/* Line 1464 of yacc.c */ +#line 3507 "htcobol.y" + { (yyval.ival)=0; ;} + break; + + case 1132: + +/* Line 1464 of yacc.c */ +#line 3508 "htcobol.y" + { gen_save_usings((yyvsp[(2) - (2)].glistval)); (yyval.ival)=1; ;} + break; + + case 1133: + +/* Line 1464 of yacc.c */ +#line 3509 "htcobol.y" + { gen_save_chainings((yyvsp[(2) - (2)].glistval)); (yyval.ival)=2; ;} + break; + + case 1134: + +/* Line 1464 of yacc.c */ +#line 3514 "htcobol.y" + { if ((yyvsp[(0) - (3)].ival) == USING) + gen_save_using((yyvsp[(3) - (3)].sval)); + else if ((yyvsp[(0) - (3)].ival) == CALL) { + gen_push_using((yyvsp[(3) - (3)].sval)); + } + ;} + break; + + case 1135: + +/* Line 1464 of yacc.c */ +#line 3521 "htcobol.y" + { if ((yyvsp[(0) - (1)].ival) == USING) + gen_save_using((yyvsp[(1) - (1)].sval)); + else if ((yyvsp[(0) - (1)].ival) == CALL) { + gen_push_using((yyvsp[(1) - (1)].sval)); + } + ;} + break; + + case 1136: + +/* Line 1464 of yacc.c */ +#line 3529 "htcobol.y" + {(yyval.sval)=(yyvsp[(1) - (1)].sval); + if ((yyval.sval)->litflag==1) { + struct lit *lp=(struct lit *)(yyval.sval); + lp->call_mode=curr_call_mode; + } + else + (yyval.sval)->call_mode=curr_call_mode; + ;} + break; + + case 1137: + +/* Line 1464 of yacc.c */ +#line 3539 "htcobol.y" + { if ( curr_call_mode == CM_CHAIN ) + yyerror("parameter types not allowed on CHAIN"); + else + { + (yyval.sval)=(yyvsp[(3) - (3)].sval); + curr_call_mode=(yyvsp[(2) - (3)].ival); + if ((yyval.sval)->litflag==1) { + struct lit *lp=(struct lit *)(yyval.sval); + lp->call_mode=curr_call_mode; + } + else + (yyval.sval)->call_mode=curr_call_mode; + } + ;} + break; + + case 1138: + +/* Line 1464 of yacc.c */ +#line 3559 "htcobol.y" + {(yyval.ival)=CM_REF;;} + break; + + case 1139: + +/* Line 1464 of yacc.c */ +#line 3560 "htcobol.y" + {(yyval.ival)=CM_VAL;;} + break; + + case 1140: + +/* Line 1464 of yacc.c */ +#line 3561 "htcobol.y" + {(yyval.ival)=CM_CONT;;} + break; + + case 1141: + +/* Line 1464 of yacc.c */ +#line 3566 "htcobol.y" + { gen_push_using((yyvsp[(3) - (3)].sval)); ;} + break; + + case 1142: + +/* Line 1464 of yacc.c */ +#line 3567 "htcobol.y" + { gen_push_using((yyvsp[(1) - (1)].sval)); ;} + break; + + case 1143: + +/* Line 1464 of yacc.c */ +#line 3570 "htcobol.y" + {(yyval.sval)=(yyvsp[(1) - (1)].sval);(yyval.sval)->call_mode=CM_REF;;} + break; + + case 1144: + +/* Line 1464 of yacc.c */ +#line 3573 "htcobol.y" + { + gen_perform_thru((yyvsp[(1) - (2)].sval),(yyvsp[(2) - (2)].sval)); + (yyval.sval) = ((yyvsp[(2) - (2)].sval) == NULL) ? (yyvsp[(1) - (2)].sval) : (yyvsp[(2) - (2)].sval); + ;} + break; + + case 1145: + +/* Line 1464 of yacc.c */ +#line 3578 "htcobol.y" + { (yyval.sval) = NULL; ;} + break; + + case 1146: + +/* Line 1464 of yacc.c */ +#line 3580 "htcobol.y" + { + gen_push_int((yyvsp[(1) - (2)].sval)); + (yyval.dval)=gen_marklabel(); + gen_perform_test_counter((yyval.dval)); + ;} + break; + + case 1147: + +/* Line 1464 of yacc.c */ +#line 3586 "htcobol.y" + { + gen_perform_times((yyvsp[(3) - (4)].dval)); + ;} + break; + + case 1148: + +/* Line 1464 of yacc.c */ +#line 3589 "htcobol.y" + { (yyval.sval) = NULL; ;} + break; + + case 1149: + +/* Line 1464 of yacc.c */ +#line 3591 "htcobol.y" + { + if ((yyvsp[(1) - (2)].ival) == 2) { + (yyval.ddval).lb2=gen_passlabel(); + } + (yyval.ddval).lb1=gen_marklabel(); + ;} + break; + + case 1150: + +/* Line 1464 of yacc.c */ +#line 3598 "htcobol.y" + { + (yyval.ddval).lb1=gen_orstart(); + if ((yyvsp[(1) - (4)].ival) == 2) { + (yyval.ddval).lb2=gen_passlabel(); + gen_dstlabel((yyvsp[(3) - (4)].ddval).lb2); + } + ;} + break; + + case 1151: + +/* Line 1464 of yacc.c */ +#line 3606 "htcobol.y" + { + if ((yyvsp[(1) - (6)].ival) == 2) { + gen_jmplabel((yyvsp[(3) - (6)].ddval).lb1); + gen_dstlabel((yyvsp[(5) - (6)].ddval).lb2); + gen_jmplabel((yyvsp[(3) - (6)].ddval).lb2); + gen_dstlabel((yyvsp[(5) - (6)].ddval).lb1); + } + else { + gen_jmplabel((yyvsp[(3) - (6)].ddval).lb1); + gen_dstlabel((yyvsp[(5) - (6)].ddval).lb1); + } + ;} + break; + + case 1152: + +/* Line 1464 of yacc.c */ +#line 3618 "htcobol.y" + { (yyval.sval) = NULL; ;} + break; + + case 1153: + +/* Line 1464 of yacc.c */ +#line 3620 "htcobol.y" + { + /* + Check if initailization of the 'VARYING identifier' is required. + Initailization of the 'VARYING identifier' is not neccessary if + it is the same as the 'FROM identifier'. + */ + if ((yyvsp[(5) - (8)].sval)->litflag == '1') { + gen_move((yyvsp[(5) - (8)].sval),(yyvsp[(3) - (8)].sval)); + } + else { + if(strcmp((yyvsp[(5) - (8)].sval)->name, (yyvsp[(3) - (8)].sval)->name) != 0) { + gen_move((yyvsp[(5) - (8)].sval),(yyvsp[(3) - (8)].sval)); + } + } + /* BEFORE=1 AFTER=2 */ + if ((yyvsp[(1) - (8)].ival) == 2) { + (yyval.ddval).lb2=gen_passlabel(); + } + (yyval.ddval).lb1=gen_marklabel(); + ;} + break; + + case 1154: + +/* Line 1464 of yacc.c */ +#line 3641 "htcobol.y" + { + (yyval.dval)=gen_orstart(); + /* BEFORE=1 AFTER=2 */ + if ((yyvsp[(1) - (10)].ival) == 2) { + gen_add((yyvsp[(7) - (10)].sval),(yyvsp[(3) - (10)].sval),0); + gen_dstlabel((yyvsp[(9) - (10)].ddval).lb2); + } + ;} + break; + + case 1155: + +/* Line 1464 of yacc.c */ +#line 3651 "htcobol.y" + { + int i; + struct perf_info *rf; + /*struct perform_info *rpi;*/ + char *vn; + + /* Check for duplicate variables in VARYING/AFTER */ + if ((yyvsp[(12) - (13)].pfvals) != NULL) { + if ((vn = check_perform_variables((yyvsp[(3) - (13)].sval), (yyvsp[(12) - (13)].pfvals))) != NULL) { + yyerror("Duplicate variable '%s' in VARYING/AFTER clause", vn); + } + } + + if ((yyvsp[(1) - (13)].ival) == 2) { + if ((yyvsp[(12) - (13)].pfvals) != NULL) { + for (i=5; i>=0; i--) { + rf = (yyvsp[(12) - (13)].pfvals)->pf[i]; + if (rf != NULL) { + gen_jmplabel(rf->ljmp); + gen_dstlabel(rf->lend); + } + } + } + gen_jmplabel((yyvsp[(9) - (13)].ddval).lb1); + gen_dstlabel((yyvsp[(11) - (13)].dval)); + } + else { + if ((yyvsp[(12) - (13)].pfvals) != NULL) { + for (i=5; i>=0; i--) { + rf = (yyvsp[(12) - (13)].pfvals)->pf[i]; + if (rf != NULL) { + gen_add(rf->pname1, rf->pname2, 0); + gen_jmplabel(rf->ljmp); + gen_dstlabel(rf->lend); + } + } + } + gen_add((yyvsp[(7) - (13)].sval),(yyvsp[(3) - (13)].sval),0); + gen_jmplabel((yyvsp[(9) - (13)].ddval).lb1); + gen_dstlabel((yyvsp[(11) - (13)].dval)); + } + ;} + break; + + case 1156: + +/* Line 1464 of yacc.c */ +#line 3693 "htcobol.y" + { (yyval.sval) = NULL; ;} + break; + + case 1157: + +/* Line 1464 of yacc.c */ +#line 3695 "htcobol.y" + { + gen_perform_thru((yyvsp[(1) - (2)].sval),(yyvsp[(2) - (2)].sval)); + (yyval.sval) = NULL; + ;} + break; + + case 1158: + +/* Line 1464 of yacc.c */ +#line 3700 "htcobol.y" + { + (yyval.dval)=gen_marklabel(); + /* BEFORE=1 AFTER=2 */ + if ((yyvsp[(3) - (4)].ival) == 2) { + gen_perform_thru((yyvsp[(1) - (4)].sval),(yyvsp[(2) - (4)].sval)); + } + ;} + break; + + case 1159: + +/* Line 1464 of yacc.c */ +#line 3708 "htcobol.y" + { + unsigned long lbl; + lbl=gen_orstart(); + /* BEFORE=1 AFTER=2 */ + if ((yyvsp[(3) - (6)].ival) == 1) { + gen_perform_thru((yyvsp[(1) - (6)].sval),(yyvsp[(2) - (6)].sval)); + } + gen_jmplabel((yyvsp[(5) - (6)].dval)); + gen_dstlabel(lbl); + ;} + break; + + case 1160: + +/* Line 1464 of yacc.c */ +#line 3719 "htcobol.y" + { + unsigned long lbl; + gen_push_int((yyvsp[(3) - (4)].sval)); + lbl = gen_marklabel(); + gen_perform_test_counter(lbl); + gen_perform_thru((yyvsp[(1) - (4)].sval),(yyvsp[(2) - (4)].sval)); + gen_perform_times(lbl); + ;} + break; + + case 1161: + +/* Line 1464 of yacc.c */ +#line 3729 "htcobol.y" + { + /* + Check if initailization of the 'VARYING identifier' is required. + Initailization of the 'VARYING identifier' is not neccessary if + it is the same as the 'FROM identifier'. + */ + if ((yyvsp[(7) - (10)].sval)->litflag == '1') { + gen_move((yyvsp[(7) - (10)].sval),(yyvsp[(5) - (10)].sval)); + } + else { + if(strcmp((yyvsp[(7) - (10)].sval)->name, (yyvsp[(5) - (10)].sval)->name) != 0) { + gen_move((yyvsp[(7) - (10)].sval),(yyvsp[(5) - (10)].sval)); + } + } + if ((yyvsp[(3) - (10)].ival) == 2) { + (yyval.ddval).lb2=gen_passlabel(); + } + (yyval.ddval).lb1 = gen_marklabel(); + ;} + break; + + case 1162: + +/* Line 1464 of yacc.c */ +#line 3749 "htcobol.y" + { + (yyval.dval) = gen_orstart(); + /* BEFORE=1 AFTER=2 */ + if ((yyvsp[(3) - (12)].ival) == 2) { + gen_add((yyvsp[(9) - (12)].sval),(yyvsp[(5) - (12)].sval), 0); + gen_dstlabel((yyvsp[(11) - (12)].ddval).lb2); + } + ;} + break; + + case 1163: + +/* Line 1464 of yacc.c */ +#line 3758 "htcobol.y" + { + int i; + struct perf_info *rf; + /*struct perform_info *rpi;*/ + char *vn = NULL; + + /* Check for duplicate varaibles in VARYING/AFTER */ + if ((yyvsp[(14) - (14)].pfvals) != NULL) { + if ((vn = check_perform_variables((yyvsp[(5) - (14)].sval), (yyvsp[(14) - (14)].pfvals))) != NULL) { + yyerror("Duplicate variable '%s' in VARYING/AFTER clause", vn); + } + } + gen_perform_thru((yyvsp[(1) - (14)].sval),(yyvsp[(2) - (14)].sval)); + /* BEFORE=1 AFTER=2 */ + if ((yyvsp[(3) - (14)].ival) == 2) { + if ((yyvsp[(14) - (14)].pfvals) != NULL) { + for (i=5; i>=0; i--) { + rf = (yyvsp[(14) - (14)].pfvals)->pf[i]; + if (rf != NULL) { + gen_jmplabel(rf->ljmp); + gen_dstlabel(rf->lend); + } + } + } + gen_jmplabel((yyvsp[(11) - (14)].dval)); + gen_dstlabel((yyvsp[(13) - (14)].dval)); + } + else { + if ((yyvsp[(14) - (14)].pfvals) != NULL) { + for (i=5; i>=0; i--) { + rf = (yyvsp[(14) - (14)].pfvals)->pf[i]; + if (rf != NULL) { + gen_add(rf->pname1, rf->pname2, 0); + gen_jmplabel(rf->ljmp); + gen_dstlabel(rf->lend); + } + } + } + gen_add((yyvsp[(9) - (14)].sval),(yyvsp[(5) - (14)].sval),0); + gen_jmplabel((yyvsp[(11) - (14)].dval)); + gen_dstlabel((yyvsp[(13) - (14)].dval)); + } + (yyval.sval) = NULL; + ;} + break; + + case 1164: + +/* Line 1464 of yacc.c */ +#line 3805 "htcobol.y" + { (yyval.sval) = NULL; ;} + break; + + case 1165: + +/* Line 1464 of yacc.c */ +#line 3806 "htcobol.y" + { (yyval.sval) = (yyvsp[(2) - (2)].sval);;} + break; + + case 1166: + +/* Line 1464 of yacc.c */ +#line 3808 "htcobol.y" + { (yyval.ival)=1; perform_after_sw=1; ;} + break; + + case 1167: + +/* Line 1464 of yacc.c */ +#line 3810 "htcobol.y" + { + (yyval.ival)=(yyvsp[(3) - (3)].ival); + perform_after_sw=(yyvsp[(3) - (3)].ival); + ;} + break; + + case 1168: + +/* Line 1464 of yacc.c */ +#line 3815 "htcobol.y" + { (yyval.pfvals)=NULL; ;} + break; + + case 1169: + +/* Line 1464 of yacc.c */ +#line 3817 "htcobol.y" + { + (yyval.pfvals)=create_perform_info(); + (yyval.pfvals)->pf[0] = (yyvsp[(2) - (2)].pfval); + (yyval.pfvals)=(yyval.pfvals); + ;} + break; + + case 1170: + +/* Line 1464 of yacc.c */ +#line 3823 "htcobol.y" + { + (yyval.pfvals)=create_perform_info(); + (yyval.pfvals)->pf[0] = (yyvsp[(2) - (4)].pfval); + (yyval.pfvals)->pf[1] = (yyvsp[(4) - (4)].pfval); + (yyval.pfvals)=(yyval.pfvals); + ;} + break; + + case 1171: + +/* Line 1464 of yacc.c */ +#line 3831 "htcobol.y" + { + (yyval.pfvals)=create_perform_info(); + (yyval.pfvals)->pf[0] = (yyvsp[(2) - (6)].pfval); + (yyval.pfvals)->pf[1] = (yyvsp[(4) - (6)].pfval); + (yyval.pfvals)->pf[2] = (yyvsp[(6) - (6)].pfval); + (yyval.pfvals)=(yyval.pfvals); + ;} + break; + + case 1172: + +/* Line 1464 of yacc.c */ +#line 3840 "htcobol.y" + { + (yyval.pfvals)=create_perform_info(); + (yyval.pfvals)->pf[0] = (yyvsp[(2) - (8)].pfval); + (yyval.pfvals)->pf[1] = (yyvsp[(4) - (8)].pfval); + (yyval.pfvals)->pf[2] = (yyvsp[(6) - (8)].pfval); + (yyval.pfvals)->pf[3] = (yyvsp[(8) - (8)].pfval); + (yyval.pfvals)=(yyval.pfvals); + ;} + break; + + case 1173: + +/* Line 1464 of yacc.c */ +#line 3850 "htcobol.y" + { + (yyval.pfvals)=create_perform_info(); + (yyval.pfvals)->pf[0] = (yyvsp[(2) - (10)].pfval); + (yyval.pfvals)->pf[1] = (yyvsp[(4) - (10)].pfval); + (yyval.pfvals)->pf[2] = (yyvsp[(6) - (10)].pfval); + (yyval.pfvals)->pf[3] = (yyvsp[(8) - (10)].pfval); + (yyval.pfvals)->pf[4] = (yyvsp[(10) - (10)].pfval); + (yyval.pfvals)=(yyval.pfvals); + ;} + break; + + case 1174: + +/* Line 1464 of yacc.c */ +#line 3861 "htcobol.y" + { + (yyval.pfvals)=create_perform_info(); + (yyval.pfvals)->pf[0] = (yyvsp[(2) - (12)].pfval); + (yyval.pfvals)->pf[1] = (yyvsp[(4) - (12)].pfval); + (yyval.pfvals)->pf[2] = (yyvsp[(6) - (12)].pfval); + (yyval.pfvals)->pf[3] = (yyvsp[(8) - (12)].pfval); + (yyval.pfvals)->pf[4] = (yyvsp[(10) - (12)].pfval); + (yyval.pfvals)->pf[5] = (yyvsp[(12) - (12)].pfval); + (yyval.pfvals)=(yyval.pfvals); + ;} + break; + + case 1175: + +/* Line 1464 of yacc.c */ +#line 3874 "htcobol.y" + { + /* + Check if initailization of the 'VARYING identifier' is required. + Initailization of the 'VARYING identifier' is not neccessary if + it is the same as the 'FROM identifier'. + */ + if ((yyvsp[(3) - (6)].sval)->litflag == '1') { + gen_move((yyvsp[(3) - (6)].sval),(yyvsp[(1) - (6)].sval)); + } + else { + if(strcmp((yyvsp[(3) - (6)].sval)->name, (yyvsp[(1) - (6)].sval)->name) != 0) { + gen_move((yyvsp[(3) - (6)].sval),(yyvsp[(1) - (6)].sval)); + } + } + /* BEFORE=1 AFTER=2 */ + if (perform_after_sw == 2) { + (yyval.ddval).lb2=gen_passlabel(); + } + (yyval.ddval).lb1 = gen_marklabel(); + ;} + break; + + case 1176: + +/* Line 1464 of yacc.c */ +#line 3895 "htcobol.y" + { + unsigned long lbl; + lbl=gen_orstart(); + /* BEFORE=1 AFTER=2 */ + if (perform_after_sw == 2) { + gen_add((yyvsp[(5) - (8)].sval),(yyvsp[(1) - (8)].sval),0); + gen_dstlabel((yyvsp[(7) - (8)].ddval).lb2); + (yyval.pfval) = create_perf_info((yyvsp[(5) - (8)].sval), (yyvsp[(1) - (8)].sval), (yyvsp[(7) - (8)].ddval).lb1, lbl); + } + else { + (yyval.pfval) = create_perf_info((yyvsp[(5) - (8)].sval), (yyvsp[(1) - (8)].sval), (yyvsp[(7) - (8)].ddval).lb1, lbl); + } + ;} + break; + + case 1177: + +/* Line 1464 of yacc.c */ +#line 3909 "htcobol.y" + {stabs_line();;} + break; + + case 1179: + +/* Line 1464 of yacc.c */ +#line 3915 "htcobol.y" + { (yyval.ival)=1; ;} + break; + + case 1180: + +/* Line 1464 of yacc.c */ +#line 3916 "htcobol.y" + { (yyval.ival)=2; ;} + break; + + case 1181: + +/* Line 1464 of yacc.c */ +#line 3920 "htcobol.y" + { + if ((yyvsp[(2) - (2)].ival) & COND_UNARY) { + if ((yyvsp[(2) - (2)].ival) & COND_CLASS) { + gen_class_check((yyvsp[(1) - (2)].sval),(yyvsp[(2) - (2)].ival)); + } + else { + struct sym *sy = (struct sym *)save_special_literal('0','9', "%ZEROS%"); + gen_compare((yyvsp[(1) - (2)].sval),(yyvsp[(2) - (2)].ival)&~COND_UNARY,sy); + } + } + ;} + break; + + case 1182: + +/* Line 1464 of yacc.c */ +#line 3932 "htcobol.y" + { + if ((yyvsp[(2) - (4)].ival) & COND_UNARY) { + if ((int)(yyvsp[(4) - (4)].sval) != -1) { + yyerror("class or sign conditions are unary"); + } + } + else { + if ((int)(yyvsp[(4) - (4)].sval) == -1) { + yyerror("expression expected in a binary condition"); + } + else { + gen_compare((yyvsp[(1) - (4)].sval),(yyvsp[(2) - (4)].ival),(yyvsp[(4) - (4)].sval)); + } + } + (yyval.condval).sy=(yyvsp[(1) - (4)].sval); /* for implied operands */ + (yyval.condval).oper=(yyvsp[(2) - (4)].ival); + ;} + break; + + case 1183: + +/* Line 1464 of yacc.c */ +#line 3949 "htcobol.y" + { gen_not(); (yyval.condval)=(yyvsp[(2) - (2)].condval); ;} + break; + + case 1184: + +/* Line 1464 of yacc.c */ +#line 3952 "htcobol.y" + { (yyval.dval)=gen_andstart(); ;} + break; + + case 1185: + +/* Line 1464 of yacc.c */ +#line 3954 "htcobol.y" + { gen_dstlabel((yyvsp[(3) - (4)].dval)); (yyval.condval)=(yyvsp[(4) - (4)].condval); ;} + break; + + case 1186: + +/* Line 1464 of yacc.c */ +#line 3957 "htcobol.y" + { (yyval.dval)=gen_orstart(); ;} + break; + + case 1187: + +/* Line 1464 of yacc.c */ +#line 3959 "htcobol.y" + { gen_dstlabel((yyvsp[(3) - (4)].dval)); (yyval.condval)=(yyvsp[(4) - (4)].condval); ;} + break; + + case 1188: + +/* Line 1464 of yacc.c */ +#line 3960 "htcobol.y" + { (yyval.condval) = (yyvsp[(2) - (3)].condval); ;} + break; + + case 1189: + +/* Line 1464 of yacc.c */ +#line 3962 "htcobol.y" + { + /*if ($1->level != 88) + yyerror("condition unknown");*/ + gen_condition((yyvsp[(1) - (1)].sval)); + (yyval.condval).sy=NULL; + (yyval.condval).oper=0; + ;} + break; + + case 1190: + +/* Line 1464 of yacc.c */ +#line 3971 "htcobol.y" + { (yyval.condval) = (yyvsp[(1) - (1)].condval); ;} + break; + + case 1191: + +/* Line 1464 of yacc.c */ +#line 3973 "htcobol.y" + { + if ((yyvsp[(-2) - (2)].condval).sy == NULL) { + yyerror("invalid implied condition"); + } + else { + gen_compare((yyvsp[(-2) - (2)].condval).sy,(yyvsp[(1) - (2)].ival),(yyvsp[(2) - (2)].sval)); + } + (yyval.condval).sy = (yyvsp[(-2) - (2)].condval).sy; + (yyval.condval).oper = (yyvsp[(1) - (2)].ival); + ;} + break; + + case 1192: + +/* Line 1464 of yacc.c */ +#line 3984 "htcobol.y" + { /* implied both the first operand and the operator */ + if (((yyvsp[(-2) - (1)].condval).sy == NULL)|| + ((yyvsp[(-2) - (1)].condval).oper & COND_UNARY)) { + yyerror("invalid implied condition"); + } + else { + gen_compare((yyvsp[(-2) - (1)].condval).sy,(yyvsp[(-2) - (1)].condval).oper,(yyvsp[(1) - (1)].sval)); + } + (yyval.condval).sy = (yyvsp[(-2) - (1)].condval).sy; + (yyval.condval).oper = (yyvsp[(-2) - (1)].condval).oper; + ;} + break; + + case 1193: + +/* Line 1464 of yacc.c */ +#line 3997 "htcobol.y" + { (yyval.ival)=GREATER; ;} + break; + + case 1194: + +/* Line 1464 of yacc.c */ +#line 3998 "htcobol.y" + { (yyval.ival)=LESS; ;} + break; + + case 1195: + +/* Line 1464 of yacc.c */ +#line 3999 "htcobol.y" + { (yyval.ival)=EQUAL; ;} + break; + + case 1196: + +/* Line 1464 of yacc.c */ +#line 4002 "htcobol.y" + { (yyval.ival)=CLASS_NUMERIC; ;} + break; + + case 1197: + +/* Line 1464 of yacc.c */ +#line 4003 "htcobol.y" + { (yyval.ival)=CLASS_ALPHABETIC; ;} + break; + + case 1198: + +/* Line 1464 of yacc.c */ +#line 4004 "htcobol.y" + { (yyval.ival)=CLASS_ALPHABETIC_LOWER; ;} + break; + + case 1199: + +/* Line 1464 of yacc.c */ +#line 4005 "htcobol.y" + { (yyval.ival)=CLASS_ALPHABETIC_UPPER; ;} + break; + + case 1200: + +/* Line 1464 of yacc.c */ +#line 4008 "htcobol.y" + { (yyval.ival) = (yyvsp[(2) - (2)].ival); ;} + break; + + case 1201: + +/* Line 1464 of yacc.c */ +#line 4009 "htcobol.y" + { (yyval.ival) = (yyvsp[(3) - (3)].ival) ^ 7; ;} + break; + + case 1202: + +/* Line 1464 of yacc.c */ +#line 4010 "htcobol.y" + { (yyval.ival) = (yyvsp[(2) - (4)].ival) | (yyvsp[(4) - (4)].ival); ;} + break; + + case 1203: + +/* Line 1464 of yacc.c */ +#line 4011 "htcobol.y" + { (yyval.ival) = (yyvsp[(1) - (1)].ival); ;} + break; + + case 1204: + +/* Line 1464 of yacc.c */ +#line 4012 "htcobol.y" + { (yyval.ival) = (yyvsp[(3) - (3)].ival) ^ 7; ;} + break; + + case 1205: + +/* Line 1464 of yacc.c */ +#line 4013 "htcobol.y" + { (yyval.ival) = (yyvsp[(1) - (3)].ival) | (yyvsp[(3) - (3)].ival); ;} + break; + + case 1206: + +/* Line 1464 of yacc.c */ +#line 4016 "htcobol.y" + { (yyval.ival) = (yyvsp[(1) - (1)].ival); ;} + break; + + case 1207: + +/* Line 1464 of yacc.c */ +#line 4017 "htcobol.y" + { (yyval.ival) = (yyvsp[(1) - (1)].ival) | COND_UNARY | COND_CLASS; ;} + break; + + case 1208: + +/* Line 1464 of yacc.c */ +#line 4018 "htcobol.y" + { (yyval.ival) = (yyvsp[(1) - (1)].ival) | COND_UNARY; ;} + break; + + case 1209: + +/* Line 1464 of yacc.c */ +#line 4021 "htcobol.y" + { (yyval.ival) = (yyvsp[(1) - (1)].ival); ;} + break; + + case 1210: + +/* Line 1464 of yacc.c */ +#line 4022 "htcobol.y" + { (yyval.ival) = (yyvsp[(2) - (2)].ival) ^ 7; ;} + break; + + case 1211: + +/* Line 1464 of yacc.c */ +#line 4023 "htcobol.y" + { (yyval.ival) = (yyvsp[(1) - (3)].ival) | (yyvsp[(3) - (3)].ival); ;} + break; + + case 1212: + +/* Line 1464 of yacc.c */ +#line 4026 "htcobol.y" + { (yyval.ival) = (yyvsp[(1) - (2)].ival); ;} + break; + + case 1222: + +/* Line 1464 of yacc.c */ +#line 4054 "htcobol.y" + { ;} + break; + + case 1223: + +/* Line 1464 of yacc.c */ +#line 4055 "htcobol.y" + { ;} + break; + + case 1238: + +/* Line 1464 of yacc.c */ +#line 4083 "htcobol.y" + { (yyval.sval) = (yyvsp[(1) - (1)].sval); ;} + break; + + case 1239: + +/* Line 1464 of yacc.c */ +#line 4084 "htcobol.y" + { (yyval.sval) = NULL; ;} + break; + + case 1241: + +/* Line 1464 of yacc.c */ +#line 4087 "htcobol.y" + { ;} + break; + + case 1242: + +/* Line 1464 of yacc.c */ +#line 4090 "htcobol.y" + { (yyval.glistval) = gvar_list_append(NULL, (yyvsp[(1) - (1)].sval), source_lineno); ;} + break; + + case 1243: + +/* Line 1464 of yacc.c */ +#line 4092 "htcobol.y" + { (yyval.glistval) = gvar_list_append((yyvsp[(1) - (3)].glistval), (yyvsp[(3) - (3)].sval), source_lineno); ;} + break; + + case 1244: + +/* Line 1464 of yacc.c */ +#line 4095 "htcobol.y" + { (yyval.glistval) = gvar_list_append(NULL, (yyvsp[(1) - (1)].sval), source_lineno); ;} + break; + + case 1245: + +/* Line 1464 of yacc.c */ +#line 4097 "htcobol.y" + { (yyval.glistval) = gvar_list_append((yyvsp[(1) - (3)].glistval), (yyvsp[(3) - (3)].sval), source_lineno); ;} + break; + + case 1246: + +/* Line 1464 of yacc.c */ +#line 4099 "htcobol.y" + { + /*if (!is_variable($1)) { + yyerror("The symbol \"%s\" is not an allowed argument here", $1->name); + }*/ + (yyval.sval) = (yyvsp[(1) - (1)].sval); ;} + break; + + case 1247: + +/* Line 1464 of yacc.c */ +#line 4104 "htcobol.y" + { (yyval.sval) = (struct sym *)(yyvsp[(1) - (1)].lval);;} + break; + + case 1248: + +/* Line 1464 of yacc.c */ +#line 4105 "htcobol.y" + { + (yyvsp[(2) - (3)].sval)->type = 'f'; /* function type */ + (yyval.ival)=CALL; + ;} + break; + + case 1249: + +/* Line 1464 of yacc.c */ +#line 4109 "htcobol.y" + { + (yyval.sval) = gen_intrinsic_call((struct sym *)(yyvsp[(2) - (6)].sval)); + ;} + break; + + case 1250: + +/* Line 1464 of yacc.c */ +#line 4112 "htcobol.y" + { + (yyvsp[(2) - (2)].sval)->type = 'f'; /* function type */ + (yyval.ival)=CALL; + (yyval.sval) = gen_intrinsic_call((struct sym *)(yyvsp[(2) - (2)].sval)); + ;} + break; + + case 1251: + +/* Line 1464 of yacc.c */ +#line 4119 "htcobol.y" + { (yyval.sval) = (yyvsp[(1) - (1)].sval); ;} + break; + + case 1252: + +/* Line 1464 of yacc.c */ +#line 4120 "htcobol.y" + { (yyval.sval) = (struct sym *)(yyvsp[(1) - (1)].lval); ;} + break; + + case 1253: + +/* Line 1464 of yacc.c */ +#line 4123 "htcobol.y" + { (yyval.sval) = (yyvsp[(1) - (1)].sval); ;} + break; + + case 1254: + +/* Line 1464 of yacc.c */ +#line 4124 "htcobol.y" + { (yyval.sval) = (struct sym *)(yyvsp[(1) - (1)].lval); ;} + break; + + case 1257: + +/* Line 1464 of yacc.c */ +#line 4131 "htcobol.y" + { (yyval.lval)=(yyvsp[(1) - (1)].lval); ;} + break; + + case 1258: + +/* Line 1464 of yacc.c */ +#line 4132 "htcobol.y" + { (yyval.lval)=(yyvsp[(1) - (1)].lval); ;} + break; + + case 1259: + +/* Line 1464 of yacc.c */ +#line 4135 "htcobol.y" + { (yyvsp[(2) - (2)].lval)->all=1; (yyval.lval)=(yyvsp[(2) - (2)].lval); ;} + break; + + case 1260: + +/* Line 1464 of yacc.c */ +#line 4136 "htcobol.y" + { (yyval.lval)=(yyvsp[(2) - (2)].lval); ;} + break; + + case 1261: + +/* Line 1464 of yacc.c */ +#line 4139 "htcobol.y" + { (yyval.lval)=spe_lit_SP; ;} + break; + + case 1262: + +/* Line 1464 of yacc.c */ +#line 4140 "htcobol.y" + { (yyval.lval)=spe_lit_ZE; ;} + break; + + case 1263: + +/* Line 1464 of yacc.c */ +#line 4141 "htcobol.y" + { (yyval.lval)=spe_lit_QU; ;} + break; + + case 1264: + +/* Line 1464 of yacc.c */ +#line 4142 "htcobol.y" + { (yyval.lval)=spe_lit_HV; ;} + break; + + case 1265: + +/* Line 1464 of yacc.c */ +#line 4143 "htcobol.y" + { (yyval.lval)=spe_lit_LV; ;} + break; + + case 1266: + +/* Line 1464 of yacc.c */ +#line 4146 "htcobol.y" + { (yyval.sval) = (yyvsp[(1) - (1)].sval); ;} + break; + + case 1267: + +/* Line 1464 of yacc.c */ +#line 4147 "htcobol.y" + { (yyval.sval) = (struct sym *)(yyvsp[(1) - (1)].lval); ;} + break; + + case 1268: + +/* Line 1464 of yacc.c */ +#line 4150 "htcobol.y" + { save_literal((yyvsp[(1) - (1)].lval),'9'); (yyvsp[(1) - (1)].lval)->all = 0; (yyval.lval)=(yyvsp[(1) - (1)].lval); ;} + break; + + case 1269: + +/* Line 1464 of yacc.c */ +#line 4153 "htcobol.y" + { save_literal((yyvsp[(1) - (1)].lval),'9'); (yyvsp[(1) - (1)].lval)->all=0; (yyval.lval)=(yyvsp[(1) - (1)].lval); ;} + break; + + case 1270: + +/* Line 1464 of yacc.c */ +#line 4154 "htcobol.y" + { save_literal((yyvsp[(1) - (1)].lval),'X'); (yyvsp[(1) - (1)].lval)->all=0; (yyval.lval)=(yyvsp[(1) - (1)].lval); ;} + break; + + case 1271: + +/* Line 1464 of yacc.c */ +#line 4157 "htcobol.y" + { check_decimal_point((yyvsp[(1) - (1)].lval)); (yyval.lval)=(yyvsp[(1) - (1)].lval); ;} + break; + + case 1272: + +/* Line 1464 of yacc.c */ +#line 4158 "htcobol.y" + { check_decimal_point((yyvsp[(2) - (2)].lval)); (yyval.lval)=(yyvsp[(2) - (2)].lval); ;} + break; + + case 1273: + +/* Line 1464 of yacc.c */ +#line 4160 "htcobol.y" + { + check_decimal_point((yyvsp[(2) - (2)].lval)); + invert_literal_sign( (yyvsp[(2) - (2)].lval) ); + (yyval.lval)=(yyvsp[(2) - (2)].lval); + ;} + break; + + case 1274: + +/* Line 1464 of yacc.c */ +#line 4167 "htcobol.y" + { (yyval.sval) = (yyvsp[(1) - (1)].sval); ;} + break; + + case 1275: + +/* Line 1464 of yacc.c */ +#line 4168 "htcobol.y" + { (yyval.sval) = NULL; ;} + break; + + case 1276: + +/* Line 1464 of yacc.c */ +#line 4172 "htcobol.y" + { + if ((yyvsp[(1) - (1)].sval)->defined) + yyerror("variable redefined, %s",(yyvsp[(1) - (1)].sval)->name); + (yyvsp[(1) - (1)].sval)->defined=1; + (yyval.sval)=(yyvsp[(1) - (1)].sval); + ;} + break; + + case 1277: + +/* Line 1464 of yacc.c */ +#line 4178 "htcobol.y" + { (yyval.sval)=alloc_filler(); ;} + break; + + case 1278: + +/* Line 1464 of yacc.c */ +#line 4182 "htcobol.y" + { + if ((yyvsp[(1) - (1)].sval)->occurs_flg == 0 && !in_occurs((yyvsp[(1) - (1)].sval))) // walter + yyerror("\"%s\" is not an indexed variable ", (yyvsp[(1) - (1)].sval)->name); + (yyval.sval)=(yyvsp[(1) - (1)].sval); + ;} + break; + + case 1279: + +/* Line 1464 of yacc.c */ +#line 4207 "htcobol.y" + { (yyval.sval)=(struct sym *)(yyvsp[(1) - (1)].lval); ;} + break; + + case 1280: + +/* Line 1464 of yacc.c */ +#line 4208 "htcobol.y" + {(yyval.sval)=(yyvsp[(1) - (1)].sval); ;} + break; + + case 1281: + +/* Line 1464 of yacc.c */ +#line 4211 "htcobol.y" + { (yyval.sval)=(struct sym *)(yyvsp[(1) - (1)].lval); ;} + break; + + case 1282: + +/* Line 1464 of yacc.c */ +#line 4212 "htcobol.y" + {(yyval.sval)=(yyvsp[(1) - (1)].sval); ;} + break; + + case 1283: + +/* Line 1464 of yacc.c */ +#line 4215 "htcobol.y" + { curr_division = CDIV_SUBSCRIPTS; ;} + break; + + case 1284: + +/* Line 1464 of yacc.c */ +#line 4216 "htcobol.y" + { + curr_division = CDIV_PROC; + (yyval.sval) = (struct sym *)create_subscripted_var( (yyvsp[(1) - (5)].sval), (yyvsp[(4) - (5)].rval) ); + /*check_subscripts($$);*/ + ;} + break; + + case 1285: + +/* Line 1464 of yacc.c */ +#line 4221 "htcobol.y" + { (yyval.sval)=(yyvsp[(1) - (1)].sval); ;} + break; + + case 1286: + +/* Line 1464 of yacc.c */ +#line 4224 "htcobol.y" + { + (yyval.sval)=(struct sym *)create_refmoded_var((yyvsp[(1) - (6)].sval), (yyvsp[(3) - (6)].sval), (yyvsp[(5) - (6)].sval)); check_refmods((struct sym *)(yyval.sval)); + is_var=1; + ;} + break; + + case 1287: + +/* Line 1464 of yacc.c */ +#line 4228 "htcobol.y" + { is_var=1; ;} + break; + + case 1288: + +/* Line 1464 of yacc.c */ +#line 4229 "htcobol.y" + { yyerror("Invalid argument expecting variable"); is_var=2; ;} + break; + + case 1289: + +/* Line 1464 of yacc.c */ +#line 4232 "htcobol.y" + { + if (!is_var) + yyerror("Invalid argument expecting variable"); + is_var=0; + ;} + break; + + case 1290: + +/* Line 1464 of yacc.c */ +#line 4260 "htcobol.y" + { + (yyval.sval)=(yyvsp[(1) - (1)].sval); + if (need_subscripts && (yyvsp[(1) - (1)].sval)->occurs_flg == 0) { +/* verify if the variable is present in the same area of occurs clause */ + if(!in_occurs((yyvsp[(1) - (1)].sval))) { + yyerror("this variable \'%s\' must be subscripted or indexed", (yyvsp[(1) - (1)].sval)->name); + need_subscripts=0; + } + } + ;} + break; + + case 1291: + +/* Line 1464 of yacc.c */ +#line 4271 "htcobol.y" + { curr_division = CDIV_SUBSCRIPTS; ;} + break; + + case 1292: + +/* Line 1464 of yacc.c */ +#line 4273 "htcobol.y" + { + curr_division = CDIV_PROC; + (yyval.sval) = (struct sym *)create_subscripted_var( (yyvsp[(1) - (5)].sval), (yyvsp[(4) - (5)].rval) ); + check_subscripts((yyval.sval)); + ;} + break; + + case 1293: + +/* Line 1464 of yacc.c */ +#line 4281 "htcobol.y" + { + (yyval.sval)=(yyvsp[(1) - (1)].sval); + if ((yyvsp[(1) - (1)].sval)->clone != 0) + yyerror("this variable \'%s\' must be qualified", (yyvsp[(1) - (1)].sval)->name); + ;} + break; + + case 1294: + +/* Line 1464 of yacc.c */ +#line 4287 "htcobol.y" + { + (yyval.sval)=lookup_parent((yyvsp[(1) - (3)].sval),(yyvsp[(3) - (3)].sval)); + if ((yyval.sval) == NULL) { + yyerror("this variable \'%s\' is not defined in '%s'", (yyvsp[(1) - (3)].sval)->name, (yyvsp[(3) - (3)].sval)->name); + (yyval.sval)=(yyvsp[(1) - (3)].sval); + } + ;} + break; + + case 1295: + +/* Line 1464 of yacc.c */ +#line 4297 "htcobol.y" + { + if (((yyvsp[(1) - (1)].sval)->defined == 0) && ((yyvsp[(1) - (1)].sval)->type == 0)) + { + yyerror("Undefined variable \'%s\' found", (yyvsp[(1) - (1)].sval)->name); + } + (yyval.sval)=(yyvsp[(1) - (1)].sval); + ;} + break; + + case 1296: + +/* Line 1464 of yacc.c */ +#line 4304 "htcobol.y" + { need_subscripts=1; (yyval.sval)=(yyvsp[(1) - (1)].sval); ;} + break; + + case 1297: + +/* Line 1464 of yacc.c */ +#line 4307 "htcobol.y" + { (yyval.rval) = (yyvsp[(1) - (1)].rval); ;} + break; + + case 1298: + +/* Line 1464 of yacc.c */ +#line 4308 "htcobol.y" + { (yyval.rval) = add_subscript( (yyvsp[(1) - (3)].rval), (yyvsp[(3) - (3)].rval) ); ;} + break; + + case 1299: + +/* Line 1464 of yacc.c */ +#line 4311 "htcobol.y" + { (yyval.rval) = create_subscript( (yyvsp[(1) - (1)].sval) ); ;} + break; + + case 1300: + +/* Line 1464 of yacc.c */ +#line 4312 "htcobol.y" + { (yyval.rval) = add_subscript_item( (yyvsp[(1) - (3)].rval), '+', (yyvsp[(3) - (3)].sval) ); ;} + break; + + case 1301: + +/* Line 1464 of yacc.c */ +#line 4313 "htcobol.y" + { (yyval.rval) = add_subscript_item( (yyvsp[(1) - (3)].rval), '-', (yyvsp[(3) - (3)].sval) ); ;} + break; + + case 1302: + +/* Line 1464 of yacc.c */ +#line 4317 "htcobol.y" + { + char *s; + (yyval.ival)=0; + s=(yyvsp[(1) - (1)].lval)->name; + while (isdigit(*s)) + (yyval.ival) = (yyval.ival) * 10 + *s++ - '0'; + if (*s) + yyerror("only integers accepted here"); + ;} + break; + + case 1303: + +/* Line 1464 of yacc.c */ +#line 4329 "htcobol.y" + { + struct sym *lab=(yyvsp[(1) - (3)].sval); + struct sym *sec=(yyvsp[(3) - (3)].sval); + if (sec->defined == 0) { + sec->defined = 2; + sec->parent = NULL; + } else { + if ((sec=lookup_label((yyvsp[(3) - (3)].sval),NULL))==NULL) { + sec = install((yyvsp[(3) - (3)].sval)->name,SYTB_LAB,2); + sec->defined=2; + sec->parent = NULL; + } + } + + if (lab->defined == 0) { + lab->defined = 2; + lab->parent = (yyvsp[(3) - (3)].sval); + } else { + if ((lab=lookup_label((yyvsp[(1) - (3)].sval),(yyvsp[(3) - (3)].sval)))==NULL) { + lab = install((yyvsp[(1) - (3)].sval)->name,SYTB_LAB,2); + lab->defined=2; + lab->parent = (yyvsp[(3) - (3)].sval); + } + } + (yyval.sval) = lab; + ;} + break; + + case 1304: + +/* Line 1464 of yacc.c */ +#line 4356 "htcobol.y" + { + struct sym *lab=(yyvsp[(1) - (1)].sval); + if (lab->defined == 0) { + lab->defined = 2; + lab->parent = curr_section; + } + else { + if ((lab=lookup_label(lab,curr_section))==NULL) { + lab = install((yyvsp[(1) - (1)].sval)->name,SYTB_LAB,2); + lab->defined=2; + lab->parent = curr_section; + } + } + (yyval.sval) = lab; + ;} + break; + + case 1305: + +/* Line 1464 of yacc.c */ +#line 4371 "htcobol.y" + {(yyval.sval)=define_label((struct sym *)(yyvsp[(1) - (1)].lval),1,NULL,0);;} + break; + + case 1306: + +/* Line 1464 of yacc.c */ +#line 4372 "htcobol.y" + {(yyval.sval)=define_label((struct sym *)(yyvsp[(1) - (3)].lval),1,(struct sym *)(yyvsp[(3) - (3)].lval),1);;} + break; + + case 1307: + +/* Line 1464 of yacc.c */ +#line 4373 "htcobol.y" + {(yyval.sval)=define_label((struct sym *)(yyvsp[(1) - (3)].lval),1,(yyvsp[(3) - (3)].sval),0);;} + break; + + + +/* Line 1464 of yacc.c */ +#line 12262 "htcobol.tab.c" + default: break; + } + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + + *++yyvsp = yyval; + + /* Now `shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ + + yyn = yyr1[yyn]; + + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yytable[yystate]; + else + yystate = yydefgoto[yyn - YYNTOKENS]; + + goto yynewstate; + + +/*------------------------------------. +| yyerrlab -- here on detecting error | +`------------------------------------*/ +yyerrlab: + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) + { + ++yynerrs; +#if ! YYERROR_VERBOSE + yyerror (YY_("syntax error")); +#else + { + YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); + if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) + { + YYSIZE_T yyalloc = 2 * yysize; + if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) + yyalloc = YYSTACK_ALLOC_MAXIMUM; + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yyalloc); + if (yymsg) + yymsg_alloc = yyalloc; + else + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + } + } + + if (0 < yysize && yysize <= yymsg_alloc) + { + (void) yysyntax_error (yymsg, yystate, yychar); + yyerror (yymsg); + } + else + { + yyerror (YY_("syntax error")); + if (yysize != 0) + goto yyexhaustedlab; + } + } +#endif + } + + + + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ + + if (yychar <= YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", + yytoken, &yylval); + yychar = YYEMPTY; + } + } + + /* Else will try to reuse lookahead token after shifting the error + token. */ + goto yyerrlab1; + + +/*---------------------------------------------------. +| yyerrorlab -- error raised explicitly by YYERROR. | +`---------------------------------------------------*/ +yyerrorlab: + + /* Pacify compilers like GCC when the user code never invokes + YYERROR and the label yyerrorlab therefore never appears in user + code. */ + if (/*CONSTCOND*/ 0) + goto yyerrorlab; + + /* Do not reclaim the symbols of the rule which action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + yystate = *yyssp; + goto yyerrlab1; + + +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +yyerrlab1: + yyerrstatus = 3; /* Each real token shifted decrements this. */ + + for (;;) + { + yyn = yypact[yystate]; + if (yyn != YYPACT_NINF) + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; + + + yydestruct ("Error: popping", + yystos[yystate], yyvsp); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } + + *++yyvsp = yylval; + + + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + + yystate = yyn; + goto yynewstate; + + +/*-------------------------------------. +| yyacceptlab -- YYACCEPT comes here. | +`-------------------------------------*/ +yyacceptlab: + yyresult = 0; + goto yyreturn; + +/*-----------------------------------. +| yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +yyabortlab: + yyresult = 1; + goto yyreturn; + +#if !defined(yyoverflow) || YYERROR_VERBOSE +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + yyerror (YY_("memory exhausted")); + yyresult = 2; + /* Fall through. */ +#endif + +yyreturn: + if (yychar != YYEMPTY) + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval); + /* Do not reclaim the symbols of the rule which action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + yystos[*yyssp], yyvsp); + YYPOPSTACK (1); + } +#ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); +#endif +#if YYERROR_VERBOSE + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); +#endif + /* Make sure YYID is used. */ + return YYID (yyresult); +} + + + +/* Line 1684 of yacc.c */ +#line 4379 "htcobol.y" + + +/* +** Yacc auxiliary routines +*/ + +/* *********************************************** + * hterror is called where yyerror is normally * + * called within the parser, but it also passes* + * an error number and severity. The error * + * number identifies the longer description of * + * the error message in the compiler document- * + * ation. The severity is used to set the * + * return code that the compiler will return. * + ***********************************************/ +void hterror(int erno, int severity, char *s,...) +{ +HTG_temporary_error_code = erno; +HTG_temporary_severity = severity; + +yyerror(s); + +HTG_temporary_error_code = 256; +HTG_temporary_severity = 8; +return; +} + +void yywarn(char *s,...) +{ + va_list ap; + va_start (ap, s); + HTG_temporary_severity = 4; + yyerror(s, ap); + va_end(ap); + HTG_temporary_severity = 8; +} + + +extern FILE *o_lst; + +void yyerror(char *s,...) +{ + char buff1[BUFSIZ], buff2[BUFSIZ]; + const char *label; + va_list argptr; + int slen=0; + + /* Determine the type of the error */ + switch (HTG_temporary_severity) + { + case TCOB_SEVERITY_INFO: + label = "info: "; + break; + + case TCOB_SEVERITY_WARN: + label = "warning: "; + if (HTG_RETURN_CODE < 4) + HTG_RETURN_CODE = 4; + wrncnt++; + break; + + case TCOB_SEVERITY_ERROR: + label = "error: "; + if (HTG_RETURN_CODE < 8) + HTG_RETURN_CODE = 8; + errcnt++; + break; + + default: + label = "error: "; + if (HTG_RETURN_CODE < HTG_temporary_severity) + HTG_RETURN_CODE = HTG_temporary_severity; + errcnt++; + break; + } + /* Build the error message */ + va_start(argptr,s); + vsprintf (buff1, s, argptr); + va_end (argptr); + + /* Display the error */ + slen = strlen(yytext); + if (slen != 0) { + sprintf (buff2, "%s:%6d: %s%s, on or before \'%s\'\n", + source_filename, source_lineno, label, buff1, yytext); + } + else { + sprintf (buff2, "%s:%6d: %s%s\n", + source_filename, source_lineno, label, buff1); + } + fputs (buff2, stderr); + if (HTG_list_flag) + fputs (buff2, o_lst); + +} + +static void +assert_numeric_sy (struct sym *sy) +{ + if (!is_numeric_sy(sy)) + yyerror("invalid (non numeric) variable or literal \'%s\' used in arithmetic verb", sy->name); +} + +static void +assert_numeric_dest_sy (struct sym *sy) +{ + if (!is_numeric_dest_sy(sy)) + yyerror("invalid destination variable \'%s\' used in arithmetic verb", sy->name); +} + diff --git a/compiler/htcobol.tab.h b/compiler/htcobol.tab.h new file mode 100644 index 0000000..fa792ff --- /dev/null +++ b/compiler/htcobol.tab.h @@ -0,0 +1,455 @@ +/* A Bison parser, made by GNU Bison 2.4.2. */ + +/* Skeleton interface for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2006, 2009-2010 Free Software + Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + LOW_PREC = 258, + IDSTRING = 259, + STRING = 260, + VARIABLE = 261, + VARCOND = 262, + SUBSCVAR = 263, + LABELSTR = 264, + CMD_LINE = 265, + ENVIRONMENT_VARIABLE = 266, + INKEY = 267, + ESCKEY = 268, + CHAR = 269, + MULTIPLIER = 270, + USAGENUM = 271, + ZERONUM = 272, + CONDITIONAL = 273, + TO = 274, + IS = 275, + ARE = 276, + THRU = 277, + THAN = 278, + NO = 279, + COMMENTING = 280, + DIRECTION = 281, + READ = 282, + WRITE = 283, + INPUT_OUTPUT = 284, + RELEASE = 285, + NLITERAL = 286, + CLITERAL = 287, + PORTNUM = 288, + DATE_TIME = 289, + POW_OP = 290, + OR = 291, + AND = 292, + NOT = 293, + ACCEPT = 294, + ACCESS = 295, + ADD = 296, + ADDRESS = 297, + ADVANCING = 298, + AFTER = 299, + ALL = 300, + ALPHABET = 301, + ALPHABETIC = 302, + ALPHABETIC_LOWER = 303, + ALPHABETIC_UPPER = 304, + ALPHANUMERIC = 305, + ALPHANUMERIC_EDITED = 306, + ALSO = 307, + ALTERNATE = 308, + ANY = 309, + AREA = 310, + AREAS = 311, + ASSIGN = 312, + AT = 313, + AUTHOR = 314, + AUTO = 315, + BACKGROUNDCOLOR = 316, + BEFORE = 317, + BELL = 318, + BLANK = 319, + BLINK = 320, + BLOCK = 321, + BOTTOM = 322, + BY = 323, + CALL = 324, + CALL_CONV_C = 325, + CALL_CONV_STDCALL = 326, + CALL_LOADLIB = 327, + CANCEL = 328, + CENTER = 329, + CF = 330, + CH = 331, + CHAIN = 332, + CHAINING = 333, + CHARACTER = 334, + CHARACTERS = 335, + CLASS = 336, + CLOSE = 337, + CODE = 338, + CODE_SET = 339, + COLLATING = 340, + COLOR = 341, + COLUMN = 342, + COLUMNS = 343, + COMMA = 344, + COMMON = 345, + COMPUTE = 346, + CONFIGURATION = 347, + CONSOLE = 348, + CONTAINS = 349, + CONTENT = 350, + CONTINUE = 351, + CONTROL = 352, + CONTROLS = 353, + CONVERTING = 354, + CORRESPONDING = 355, + COUNT = 356, + CURRENCY = 357, + CURSOR = 358, + DATA = 359, + DATE_COMPILED = 360, + DATE_WRITTEN = 361, + DE = 362, + DEBUGGING = 363, + DECIMAL_POINT = 364, + DECLARATIVES = 365, + DELETE = 366, + DELIMITED = 367, + DELIMITER = 368, + DEPENDING = 369, + DETAIL = 370, + DISPLAY = 371, + DISPLAY_SCREEN = 372, + DIVIDE = 373, + DIVISION = 374, + DOWN = 375, + DUPLICATES = 376, + DYNAMIC = 377, + ELSE = 378, + END = 379, + END_ACCEPT = 380, + END_ADD = 381, + END_CALL = 382, + END_CALL_LOADLIB = 383, + END_CHAIN = 384, + END_COMPUTE = 385, + END_DELETE = 386, + END_DISPLAY = 387, + END_DIVIDE = 388, + END_EVALUATE = 389, + END_IF = 390, + END_MULTIPLY = 391, + END_OF_PAGE = 392, + END_PERFORM = 393, + END_READ = 394, + END_RETURN = 395, + END_REWRITE = 396, + END_SEARCH = 397, + END_START = 398, + END_STRINGCMD = 399, + END_SUBTRACT = 400, + END_UNSTRING = 401, + END_WRITE = 402, + ENVIRONMENT = 403, + EOL = 404, + EOS = 405, + ERASE = 406, + ERROR_TOK = 407, + EVALUATE = 408, + EXCEPTION = 409, + EXIT = 410, + EXTEND = 411, + EXTERNAL = 412, + FALSE_TOK = 413, + FD = 414, + FILE_CONTROL = 415, + FILE_ID = 416, + FILE_TOK = 417, + FILLER = 418, + FINAL = 419, + FIRST = 420, + FOOTING = 421, + FOR = 422, + FOREGROUNDCOLOR = 423, + FROM = 424, + FULL = 425, + FUNCTION = 426, + GENERATE = 427, + GIVING = 428, + GLOBAL = 429, + GO = 430, + GOBACK = 431, + GROUP = 432, + HEADING = 433, + HIGHLIGHT = 434, + HIGHVALUES = 435, + IDENTIFICATION = 436, + IF = 437, + IGNORE = 438, + IN = 439, + INDEXED = 440, + INDICATE = 441, + INITIALIZE = 442, + INITIAL_TOK = 443, + INITIATE = 444, + INPUT = 445, + INSPECT = 446, + INSTALLATION = 447, + INTO = 448, + INVALID = 449, + I_O = 450, + I_O_CONTROL = 451, + JUSTIFIED = 452, + KEY = 453, + LABEL = 454, + LAST = 455, + LEADING = 456, + LEFT = 457, + LENGTH = 458, + LIMIT = 459, + LIMITS = 460, + LINAGE = 461, + LINE = 462, + LINES = 463, + LINKAGE = 464, + LISTSEP = 465, + LOCK = 466, + LOWER = 467, + LOWLIGHT = 468, + LOWVALUES = 469, + LPAR = 470, + MERGE = 471, + MINUS = 472, + MODE = 473, + MOVE = 474, + MULTIPLE = 475, + MULTIPLY = 476, + NATIVE = 477, + NEGATIVE = 478, + NEXT = 479, + NOECHO = 480, + NOTEXCEP = 481, + NULL_TOK = 482, + NUMBER = 483, + NUMBERS = 484, + NUMERIC = 485, + NUMERIC_EDITED = 486, + OBJECT_COMPUTER = 487, + OCCURS = 488, + OF = 489, + OFF = 490, + OMITTED = 491, + ON = 492, + ONLY = 493, + OPEN = 494, + OPTIONAL = 495, + ORDER = 496, + ORGANIZATION = 497, + OTHER = 498, + OUTPUT = 499, + OVERFLOW_TOK = 500, + PADDING = 501, + PAGE = 502, + PAGE_COUNTER = 503, + PARAGRAPH = 504, + PERFORM = 505, + PF = 506, + PH = 507, + PICTURE = 508, + PLUS = 509, + POINTER = 510, + POSITION = 511, + POSITIVE = 512, + PREVIOUS = 513, + PROCEDURE = 514, + PROCEED = 515, + PROGRAM = 516, + PROGRAM_ID = 517, + QUOTES = 518, + RANDOM = 519, + RD = 520, + READY = 521, + RECORD = 522, + RECORDS = 523, + REDEFINES = 524, + REEL = 525, + REFERENCE = 526, + RELATIVE = 527, + REMAINDER = 528, + REMOVAL = 529, + RENAMES = 530, + REPLACING = 531, + REPORT = 532, + REPORTS = 533, + REQUIRED = 534, + RESERVE = 535, + RESET = 536, + RETURN = 537, + RETURNING = 538, + REVERSEVIDEO = 539, + REWIND = 540, + REWRITE = 541, + RF = 542, + RH = 543, + RIGHT = 544, + ROUNDED = 545, + RUN = 546, + SAME = 547, + SCREEN = 548, + SD = 549, + SEARCH = 550, + SECTION = 551, + SECURE = 552, + SECURITY = 553, + SELECT = 554, + SENTENCE = 555, + SEPARATE = 556, + SEQUENCE = 557, + SEQUENTIAL = 558, + SET = 559, + SIGN = 560, + SIZE = 561, + SORT = 562, + SORT_MERGE = 563, + SOURCE = 564, + SOURCE_COMPUTER = 565, + SPACES = 566, + SPECIAL_NAMES = 567, + STANDARD = 568, + STANDARD_1 = 569, + STANDARD_2 = 570, + START = 571, + STATUS = 572, + STD_ERROR = 573, + STD_OUTPUT = 574, + STOP = 575, + STRINGCMD = 576, + SUBTRACT = 577, + SUM = 578, + SYNCHRONIZED = 579, + TALLYING = 580, + TAPE = 581, + TCOBPROTO1 = 582, + TCOBPROTO2 = 583, + TERMINATE = 584, + TEST = 585, + THEN = 586, + TIMES = 587, + TOKDUMMY = 588, + TOP = 589, + TRACE = 590, + TRAILING = 591, + TRUE_TOK = 592, + TYPE = 593, + UNDERLINE = 594, + UNIT = 595, + UNLOCK = 596, + UNSTRING = 597, + UNTIL = 598, + UP = 599, + UPDATE = 600, + UPON = 601, + UPPER = 602, + USAGE = 603, + USE = 604, + USING = 605, + VALUE = 606, + VALUES = 607, + VARYING = 608, + WHEN = 609, + WITH = 610, + WORKING_STORAGE = 611, + ZERO = 612, + PERIOD_TOK = 613 + }; +#endif + + + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef union YYSTYPE +{ + +/* Line 1685 of yacc.c */ +#line 119 "htcobol.y" + + struct sym *sval; /* symbol */ + int ival; /* int */ + struct coord_pair pval; /* lin,col */ + struct lit *lval; /* literal */ + unsigned long dval; /* label definition, compacted */ + struct ddval { /* dual label definition */ + int lb1,lb2; + } ddval; + char *str; + struct vref *rval; /* variable reference (with subscripts) */ + struct refmod *rmval; /* variable with RefMod specifier */ + struct string_from *sfval; /* variable list in string statement */ + struct unstring_delimited *udval; + struct unstring_destinations *udstval; + struct tallying_list *tlval; + struct tallying_for_list *tfval; + struct replacing_list *repval; + struct replacing_by_list *rbval; + struct converting_struct *cvval; + struct inspect_before_after *baval; + struct scr_info *sival; + struct perf_info *pfval; + struct perform_info *pfvals; + struct sortfile_node *snval; + struct selsubject *ssbjval; + struct math_var *mval; /* math variables container list */ + struct math_ose *mose; /* math ON SIZE ERROR variables container */ + struct ginfo *gic; /* generic container */ + struct invalid_keys *iks; /* [NOT] INVALID KEY */ + struct invalid_key_element *ike; /* [NOT] INVALID KEY */ + struct condition condval; + struct list *lstval; /* generic container list */ + struct gvar_list *glistval; /* generic variable list */ + + + +/* Line 1685 of yacc.c */ +#line 447 "htcobol.tab.h" +} YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +#endif + +extern YYSTYPE yylval; + + diff --git a/compiler/htcobol.tab.o b/compiler/htcobol.tab.o new file mode 100644 index 0000000..a2698a0 Binary files /dev/null and b/compiler/htcobol.tab.o differ diff --git a/compiler/htcobol.y b/compiler/htcobol.y new file mode 100644 index 0000000..bc5d9dc --- /dev/null +++ b/compiler/htcobol.y @@ -0,0 +1,4487 @@ +/* + * Copyright (C) 1999-2003 Rildo Pragana, + * Bernard Giroud, David Essex, Jim Noeth. + * Copyright (C) 1991,1993 Rildo Pragana. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA +*/ + +/* +** Parser for Cobol Compiler +** + */ + +%{ +//#define YYDEBUG 1 +#define YYMAXDEPTH 1000 + +#include +#include +#include + +#include +#if defined(SunOS) +va_list __builtin_va_alist; +#endif + +#include + +#include "htcoboly.h" +#include "htcoblib.h" +#include "htglobals.h" + +/* #if 1 */ +#if USE_PARSER_TEST_MODE +#define UNIMPLEMENTED(xyz) +#else +#define UNIMPLEMENTED(xyz) yyerror("`%s' is not currently implemented", xyz); +#endif + +// walter +int fg=0, bg=0, co=0; +//struct lit *init_alphab=NULL, *init_alpha=NULL, *init_num=NULL, *init_numedt=NULL, *init_alphaedt=NULL; +// fim walter +extern int screen_io_enable,scr_line,scr_column; +extern int decimal_comma; +extern char currency_symbol; +extern int has_linkage; +extern int module_flag; +extern int nested_flag; +extern FILE *lexin; +extern FILE *o_src; +extern struct sym *screen_status_field; /* pointer to the screen status */ +extern struct sym *cursor_field; /* pointer to the cursor field */ +extern struct sym *curr_paragr,*curr_section; +extern struct sym *curr_field; +extern short curr_call_mode; +extern short curr_call_convention; +extern struct sym *pgm_id; +extern unsigned stack_offset; /* offset das variaveis na pilha */ +extern unsigned global_offset; /* offset das variaveis globais (DATA) */ +extern int paragr_num; +extern int loc_label; +extern char picture[]; +extern int picix,piccnt,decimals,sign,v_flag,n_flag,pscale; +extern int at_linkage,stack_plus; +extern char *toktext; +extern int yylex(void); +extern struct index_to_table_list *index2table; +extern int pgm_segment; +extern int initial_flag; +extern struct lit *spe_lit_ZE; +extern struct lit *spe_lit_SP; +extern struct lit *spe_lit_LV; +extern struct lit *spe_lit_HV; +extern struct lit *spe_lit_QU; + +struct sym *curr_file; +struct sym *alloc_filler( void ); +int curr_division=0; +int need_subscripts=0; +static int is_var=0; +extern char *yytext; +extern int envdiv_bypass_save_sw; + +extern int stabs_on_sw; +extern int HTG_prg_uses_fileio; +extern int HTG_prg_uses_term; +/* extern int HTG_prg_uses_dcall; */ + +unsigned long lbend, lbstart; +unsigned int perform_after_sw; + +int write_advancing_sw; +int decl_lbl; + +/* struct math_var *vl1, *vl2; */ +struct math_ose *tmose=NULL; +struct ginfo *gic=NULL; + +static void assert_numeric_sy (struct sym *sy); +static void assert_numeric_dest_sy (struct sym *sy); + +static char err_msg_bad_form[] = "ill-formed %s statement"; +%} + +%union { + struct sym *sval; /* symbol */ + int ival; /* int */ + struct coord_pair pval; /* lin,col */ + struct lit *lval; /* literal */ + unsigned long dval; /* label definition, compacted */ + struct ddval { /* dual label definition */ + int lb1,lb2; + } ddval; + char *str; + struct vref *rval; /* variable reference (with subscripts) */ + struct refmod *rmval; /* variable with RefMod specifier */ + struct string_from *sfval; /* variable list in string statement */ + struct unstring_delimited *udval; + struct unstring_destinations *udstval; + struct tallying_list *tlval; + struct tallying_for_list *tfval; + struct replacing_list *repval; + struct replacing_by_list *rbval; + struct converting_struct *cvval; + struct inspect_before_after *baval; + struct scr_info *sival; + struct perf_info *pfval; + struct perform_info *pfvals; + struct sortfile_node *snval; + struct selsubject *ssbjval; + struct math_var *mval; /* math variables container list */ + struct math_ose *mose; /* math ON SIZE ERROR variables container */ + struct ginfo *gic; /* generic container */ + struct invalid_keys *iks; /* [NOT] INVALID KEY */ + struct invalid_key_element *ike; /* [NOT] INVALID KEY */ + struct condition condval; + struct list *lstval; /* generic container list */ + struct gvar_list *glistval; /* generic variable list */ +} + +%nonassoc LOW_PREC + +%token IDSTRING +%token STRING VARIABLE VARCOND SUBSCVAR +%token LABELSTR CMD_LINE ENVIRONMENT_VARIABLE INKEY ESCKEY +%token CHAR MULTIPLIER +%token USAGENUM ZERONUM CONDITIONAL +%token TO IS ARE THRU THAN NO +%token COMMENTING DIRECTION READ WRITE INPUT_OUTPUT RELEASE +%token NLITERAL CLITERAL +%token PORTNUM DATE_TIME + +%left '+' '-' +%left '*' '/' +%left POW_OP + +%left OR +%left AND +%right NOT + +%token ACCEPT ACCESS ADD ADDRESS ADVANCING AFTER ALL ALPHABET +%token ALPHABETIC ALPHABETIC_LOWER ALPHABETIC_UPPER ALPHANUMERIC +%token ALPHANUMERIC_EDITED ALSO ALTERNATE ANY AREA AREAS ASSIGN +%token AT AUTHOR AUTO +%token BACKGROUNDCOLOR BEFORE BELL BLANK BLINK BLOCK BOTTOM BY +%token CALL CALL_CONV_C CALL_CONV_STDCALL CALL_LOADLIB CANCEL CENTER CF CH +%token CHAIN CHAINING CHARACTER CHARACTERS CLASS CLOSE +%token CODE CODE_SET COLLATING COLOR COLUMN COLUMNS COMMA COMMON COMPUTE CONFIGURATION +%token CONSOLE CONTAINS CONTENT CONTINUE CONTROL CONTROLS CONVERTING +%token CORRESPONDING COUNT CURRENCY CURSOR +%token DATA DATE_COMPILED DATE_WRITTEN DE DEBUGGING DECIMAL_POINT +%token DECLARATIVES DELETE DELIMITED DELIMITER DEPENDING DETAIL DISPLAY +%token DISPLAY_SCREEN DIVIDE DIVISION DOWN DUPLICATES DYNAMIC +%token ELSE END END_ACCEPT END_ADD END_CALL END_CALL_LOADLIB END_CHAIN END_COMPUTE END_DELETE +%token END_DISPLAY END_DIVIDE END_EVALUATE END_IF END_MULTIPLY END_OF_PAGE +%token END_PERFORM END_READ END_RETURN END_REWRITE END_SEARCH END_START +%token END_STRINGCMD END_SUBTRACT END_UNSTRING END_WRITE ENVIRONMENT +%token EOL EOS ERASE ERROR_TOK EVALUATE EXCEPTION EXIT EXTEND +%token EXTERNAL +%token FALSE_TOK FD FILE_CONTROL FILE_ID FILE_TOK FILLER FINAL FIRST +%token FOOTING FOR FOREGROUNDCOLOR FROM FULL FUNCTION +%token GENERATE GIVING GLOBAL GO GOBACK GROUP +%token HEADING HIGHLIGHT HIGHVALUES +%token IDENTIFICATION IF IGNORE IN INDEXED INDICATE INITIALIZE INITIAL_TOK +%token INITIATE INPUT INSPECT INSTALLATION INTO INVALID I_O I_O_CONTROL +%token JUSTIFIED +%token KEY +%token LABEL LAST LEADING LEFT LENGTH LIMIT LIMITS LINAGE LINE LINES LINKAGE LISTSEP +%token LOCK LOWER LOWLIGHT LOWVALUES LPAR +%token MERGE MINUS MODE MOVE MULTIPLE MULTIPLY +%token NATIVE NEGATIVE NEXT NOECHO NOT NOTEXCEP NULL_TOK NUMBER NUMBERS +%token NUMERIC NUMERIC_EDITED +%token OBJECT_COMPUTER OCCURS OF OFF OMITTED ON ONLY OPEN OPTIONAL ORDER +%token ORGANIZATION OTHER OUTPUT OVERFLOW_TOK +%token PADDING PAGE PAGE_COUNTER PARAGRAPH PERFORM PF PH PICTURE PLUS POINTER POSITION +%token POSITIVE PREVIOUS PROCEDURE PROCEED PROGRAM PROGRAM_ID +%token QUOTES +%token RANDOM RD READY RECORD RECORDS REDEFINES REEL REFERENCE RELATIVE +%token REMAINDER REMOVAL RENAMES REPLACING REPORT REPORTS REQUIRED RESERVE RESET +%token RETURN RETURNING REVERSEVIDEO REWIND REWRITE RF RH RIGHT ROUNDED RUN +%token SAME SCREEN SD SEARCH SECTION SECURE SECURITY SELECT SENTENCE SEPARATE +%token SEQUENCE SEQUENTIAL SET SIGN SIZE SORT SORT_MERGE SOURCE SOURCE_COMPUTER +%token SPACES SPECIAL_NAMES STANDARD STANDARD_1 STANDARD_2 START STATUS +%token STD_ERROR STD_OUTPUT STOP STRINGCMD SUBTRACT SUM SYNCHRONIZED +%token TALLYING TAPE TCOBPROTO1 TCOBPROTO2 TERMINATE TEST THEN TIMES TOKDUMMY +%token TOP TRACE TRAILING TRUE_TOK TYPE +%token UNDERLINE UNIT UNLOCK UNSTRING UNTIL UP UPDATE UPON UPPER USAGE USE USING +%token VALUE VALUES VARYING +%token WHEN WITH WORKING_STORAGE +%token ZERO + +%right OF +%nonassoc PERIOD_TOK + +%type sync_options +%type organization_options access_options open_mode +%type integer cond_op conditional before_after +%type IF ELSE usage read_next_opt +%type multiplier_opt using_options using_parameters +%type if_part +%type anystring name name_var gname gname_opt def_name_opt def_name procedure_section +%type field_description label filename data_name noallname paragraph assign_clause +%type literal gliteral without_all_literal all_literal special_literal +%type nliteral +%type perform_thru_opt write_options +%type read_into_opt write_from_opt release_from_opt +%type variable perform_range perform_options name_or_lit delimited_by +%type string_with_pointer +%type switches_details +%type all_opt with_duplicates with_test_opt optional_opt +%type subscript subscripts +%type string_from_list string_from +%type unstring_count_opt unstring_delim_opt unstring_tallying +%type unstring_delimited_vars unstring_delimited +%type unstring_destinations unstring_dest_var +%type inspect_before_after +%type tallying_list tallying_clause +%type tallying_for_list +%type replacing_kind plus_minus_opt +%type replacing_list replacing_clause +%type replacing_by_list +%type converting_clause +%type var_or_nliteral read_key_opt +%type screen_clauses +%type /*screen_attribs */screen_attrib sign_clause separate_opt screen_attribx +%type report_clause_column_is report_clause_column_orientation +%type variable_indexed search_varying_opt key_is_opt +%type search search_all search_when search_when_list search_at_end +%type parm_type sign_condition class_condition +%type intrinsic_parm_list intrinsic_parm +%type parm_list parameter expr expr_opt +%type cond_name thru_gname_opt +%type perform_after +%type perform_after_opt +%type ext_cond extended_cond_op +%type returning_options +%type sort_file_list sort_input sort_output merge_using +%type not_opt selection_subject selection_object when_case +%type selection_subject_set +%type screen_to_name +%type signed_nliteral +%type sentence_or_nothing when_case_list +%type rounded_opt +%type var_list_name var_list_gname +%type on_size_error_opt on_size_error +%type address_of_opt display_upon display_line_options +%type set_variable set_variable_or_nlit set_target add_to_opt +%type name_list string_list +%type condition implied_op_condition +%type qualified_var unqualified_var +/*%type end_program_opt program_sequence nested_program*/ +%type program_sequences program_sequence +%type from_rec_varying to_rec_varying +%type depend_rec_varying +%type file_description redefines_var +%type on_exception_or_overflow on_not_exception +%type on_end read_at_end_opt +%type read_invalid_key_opt +%type read_invalid_key read_not_invalid_key +%type invalid_key_opt +%type invalid_key_sentence not_invalid_key_sentence +%type start_body +%type accept_display_options accept_display_option +%type with_lock_opt close_options_opt +%type goto_label_list goto_label +%type gname_list name_var_list use_phrase_option +%type sort_keys sort_key sort_keys_names sort_keys_idx sort_key_idx sort_keys_names_idx + +%% + +/************ Parser for Cobol Source **************/ +/* + COMPILATION UNIT STRUCTURE +*/ +root_: program_sequences { gen_main_rtn(); } + ; +program_sequences: + program { pgm_segment++; $$=1; } + | program_sequence { $$=1 ; } + | program_sequence program { $$=1 ; } +/* + program_sequence program_sequence end_program_opt + { pgm_segment++; if (!($1|$3)) yyerror("END PROGRAM expected"); $$=$3; } + | program_sequence program_sequence + { pgm_segment++; if ($1) yyerror("too many END PROGRAM"); $$=1; } +*/ + ; +program_sequence: + program end_program { pgm_segment++ ; $$ = 1; } + | program { pgm_segment++ ; nested_flag = 1; } program_sequence end_program { $$ = 1; } + | program_sequence program end_program {pgm_segment++ ; nested_flag = 1; $$ = 1; } +/* + | program_sequence program { yyerror("aaaaaaa"); $$ = 1; } + | program program_sequence { yyerror("aaaaaaaaaa") ; $$ = 1; } +*/ + ; +/*end_program_opt: + * nothing * { $$=0; } + | end_program { $$=1; } + ;*/ +end_program: + END PROGRAM + { clear_symtab(); clear_offsets(); + curr_division= CDIV_IDENT; } + IDSTRING + { curr_division = CDIV_COMMENT; } + ; +/* + * MAIN PROGRAM STRUCTURE + */ +program: + identification_division + environment_division_opt + data_division_opt + procedure_division_opt + ; +/* + * IDENTIFICATION DIVISION + */ +identification_division: IDENTIFICATION DIVISION PERIOD_TOK + PROGRAM_ID PERIOD_TOK + { + curr_division = CDIV_IDENT; + } + IDSTRING + { + curr_division = CINITIAL; + if (pgm_header($7) != 0) { + yyerror("Invalid character(s) in PROGRAM-ID name"); + /* YYABORT; */ + } + } + programid_opts_opt PERIOD_TOK + { + define_special_fields(); + } + identification_division_options_opt + ; +programid_opts_opt: + /*nothing */ + | is_opt INITIAL_TOK programid_program_opt { initial_flag=1; } + | is_opt COMMON programid_program_opt { UNIMPLEMENTED("PROGRAM-ID ... COMMON clause") } + ; +programid_program_opt: + | PROGRAM { } + ; +identification_division_options_opt: + /*nothing */ + | identification_division_options_opt identification_division_option + ; +identification_division_option: + AUTHOR PERIOD_TOK { curr_division = CDIV_COMMENT1; } + | DATE_WRITTEN PERIOD_TOK { curr_division = CDIV_COMMENT1; } + | DATE_COMPILED PERIOD_TOK { curr_division = CDIV_COMMENT1; } + | INSTALLATION PERIOD_TOK { curr_division = CDIV_COMMENT1; } + | SECURITY PERIOD_TOK { curr_division = CDIV_COMMENT1; } + ; +/* + * ENVIRONMENT DIVISION + */ +environment_division_opt: + ENVIRONMENT DIVISION PERIOD_TOK + { + curr_division = CDIV_ENVIR; + } + configuration_opt + input_output_opt + { + curr_division = CINITIAL; + } + | /*nothing */ + ; +/* + * CONFIGURATION SECTION + */ +configuration_opt: + CONFIGURATION SECTION PERIOD_TOK configuration_section + | /*nothing */ + ; +configuration_section: + configuration_section configuration_option { } + | /* nothing */ { } + ; +configuration_option: + SOURCE_COMPUTER PERIOD_TOK + { envdiv_bypass_save_sw=1; } + STRING debug_mode_opt PERIOD_TOK + { envdiv_bypass_save_sw=0; } + | OBJECT_COMPUTER PERIOD_TOK + { envdiv_bypass_save_sw=1; } + STRING program_collating_opt PERIOD_TOK + { envdiv_bypass_save_sw=0; } + | SPECIAL_NAMES PERIOD_TOK special_names_opt + | error { yyerror("invalid format in CONFIGURATION SECTION"); } + ; +program_collating_opt: + PROGRAM collating_sequence + | /* nothing */ + ; +collating_sequence: + collating_opt SEQUENCE is_opt STRING + ; +collating_opt: COLLATING { } + | /* nothing */ { } + ; +debug_mode_opt: + with_opt DEBUGGING MODE { stabs_on_sw = 1; } + | /* nothing */ { } + ; +special_names_opt: + /* nothing */ + | special_names PERIOD_TOK + | error { yyerror("invalid format in SPECIAL-NAMES clause");} + ; +special_names: + special_name + | special_names special_name + ; +special_name: + /*special_name_opt*/ + /*symbolic_characters_opt*/ + switches_details_list + | alphabet_details /* parsed but unimplemented */ + | currency_details + | decimal_point_details + | screen_status_details + | cursor_details + | special_name_class +/* | error { yyerror("invalid format in SPECIAL-NAMES clause");} */ +/* | DATA DIVISION { yyerror("missing period in SPECIAL-NAMES clause");} */ + ; +currency_details: + CURRENCY sign_opt is_opt CLITERAL { + currency_symbol = $4->name[0]; + } + ; +sign_opt: + SIGN + | /* nothing */ + ; +special_name_class: + CLASS STRING is_opt special_name_class_item_list {} + ; +special_name_class_item_list: + special_name_class_item {} + | special_name_class_item_list special_name_class_item {} + ; +special_name_class_item: + CLITERAL {} + | CLITERAL THRU CLITERAL {} + ; + +decimal_point_details: + DECIMAL_POINT is_opt COMMA { + decimal_comma=1; } + ; +screen_status_details: + DISPLAY_SCREEN STATUS is_opt STRING + { screen_status_field=$4; } + ; +cursor_details: + CURSOR is_opt STRING + { cursor_field=$3; } + ; +switches_details_list: + | switches_details_list switches_details + ; +switches_details: + STRING is_opt STRING + {if ($1->name[0] != 'S' || $1->name[1] != 'W') + yyerror("Invalid switch name"); + define_switch_field($3, $1);} + switch_on_opt switch_off_opt + { close_fields();} + ; +switch_on_opt: + ON status_opt is_opt STRING {save_switch_value($4, 1);} + | /* nothing */ + ; +switch_off_opt: + OFF status_opt is_opt STRING {save_switch_value($4, 0);} + | /* nothing */ + ; +status_opt: + STATUS + | /* nothing */ + ; +alphabet_details: + ALPHABET STRING is_opt alphabet_type + { + $2->defined=1; + UNIMPLEMENTED("Alphabet clause") + } + ; +alphabet_type: + NATIVE { } + | STANDARD_1 { } + | STANDARD_2 { } + | alphabet_literal_list { } + ; +alphabet_literal_list: + alphabet_literal_item + | alphabet_literal_list alphabet_literal_item + ; +alphabet_literal_item: + without_all_literal { } + | without_all_literal THRU without_all_literal { } + | without_all_literal alphabet_also_list { } + ; +alphabet_also_list: + ALSO without_all_literal + | alphabet_also_list ALSO without_all_literal + ; +/* + * INPUT OUTPUT SECTION + */ +input_output_opt: + INPUT_OUTPUT SECTION PERIOD_TOK input_output_section { } + | /*nothing */ + ; +input_output_section: + file_control_paragraph i_o_control_paragraph { } + | error { yyerror("INPUT-OUTPUT SECTION format wrong"); } + ; +file_control_paragraph: + FILE_CONTROL PERIOD_TOK file_control { } + ; +i_o_control_paragraph: /* nothing */ + | I_O_CONTROL PERIOD_TOK i_o_control_opt { } + ; + +/* + * FILE CONTROL ENTRY + */ +file_control: + file_select + | file_control file_select + ; + +file_select: + SELECT optional_opt def_name + { + $3->type='F'; /* mark as file variable */ + curr_file=$3; + $3->pic=0; /* suppose not indexed yet */ + $3->defined=1; + $3->parent=NULL; /* assume no STATUS yet + this is "file status" var in files */ + $3->organization = 2; + $3->access_mode = 1; + $3->times=-1; + $3->alternate=NULL; /* reset alternate key list */ + $3->flags.optional=$2; /* according to keyword */ + $3->refmod_redef.declarative=NULL; /* no declarative yet */ + } + select_clauses PERIOD_TOK + { + if ((curr_file->organization==ORG_INDEXED) && + !(curr_file->ix_desc)) { + yyerror("indexed file must have a record key"); + YYABORT; + } + } + ; +select_clauses: + select_clauses select_clause + | /* nothing */ + ; +select_clause: + organization_opt is_opt organization_options + { curr_file->organization=$3; } + | ASSIGN to_opt assign_clause { curr_file->filenamevar=$3;} + | ACCESS mode_opt is_opt access_options + { + /*{ curr_file->access_mode=$4; }*/ + if (curr_file->access_mode < 5) { + curr_file->access_mode=$4; + } + else { + curr_file->access_mode = $4 + 5; + } + } + | file_opt STATUS is_opt STRING { curr_file->parent=$4; } + | RECORD key_opt is_opt STRING { curr_file->ix_desc=$4; } + | RELATIVE key_opt is_opt STRING { curr_file->ix_desc=$4; } + | ALTERNATE RECORD key_opt is_opt STRING + with_duplicates { add_alternate_key($5,$6); } + | RESERVE NLITERAL areas_opt + | error { yyerror("invalid clause in select"); } + ; +file_opt: + FILE_TOK + | /* nothing */ + ; +organization_opt: + ORGANIZATION { } + | /* nothing */ + ; +assign_clause: PORTNUM { $$=NULL; } + | filename { $$=$1; } + | PORTNUM filename { $$=$2; } + | EXTERNAL filename + { + curr_file->access_mode = curr_file->access_mode + 5; + $$=$2; + } + | error { yyerror("Invalid ASSIGN clause in SELECT statement"); } + ; +with_duplicates: + with_opt DUPLICATES { $$=1; } + | /* nothing */ { $$=0; } + ; +optional_opt: + OPTIONAL { $$=1; } + | /* nothing */ { $$=0; } + ; +areas_opt: AREA + | AREAS + | /* nothing */ + ; +is_opt: + IS { } + | /* nothing */ + ; +are_opt: + ARE { } + | /* nothing */ + ; +mode_opt: + MODE + | /* nothing */ + ; +organization_options: + INDEXED { $$=1; } + | SEQUENTIAL { $$=2; } + | RELATIVE { $$=3; } + | LINE SEQUENTIAL { $$=4; } + | anystring { yyerror("invalid option, %s",$1->name); } + ; +access_options: + SEQUENTIAL { $$=1; } + | DYNAMIC { $$=2; } + | RANDOM { $$=3; } + | anystring + { yyerror("invalid access option, %s", $1->name); } + ; + +/* I-O CONTROL paragraph */ +i_o_control_opt: /* nothing */ + | i_o_control_list PERIOD_TOK { UNIMPLEMENTED("I-O-CONTROL paragraph") } + + ; +i_o_control_list: + i_o_control_clause + | i_o_control_list i_o_control_clause + ; +i_o_control_clause: + i_o_control_same_clause + | i_o_control_multiple_file_tape_clause + ; +i_o_control_same_clause: + SAME same_clause_options are_opta for_opt string_list + ; +same_clause_options: /* nothing */ + | RECORD { } + | SORT { } + | SORT_MERGE { } + ; +i_o_control_multiple_file_tape_clause: + MULTIPLE FILE_TOK tape_opt contains_opt i_o_control_multiple_file_list + ; +i_o_control_multiple_file_list: + i_o_control_multiple_file + | i_o_control_multiple_file_list i_o_control_multiple_file + ; +i_o_control_multiple_file: + STRING i_o_control_multiple_file_position_opt { } + ; +i_o_control_multiple_file_position_opt: + | POSITION integer { } + ; +tape_opt: + TAPE + | /* nothing */ + ; +are_opta: + AREA + | /* nothing */ + ; +for_opt: + FOR + | /* nothing */ + ; +string_list: + STRING { $$ = $1; } + | string_list STRING { $$ = $2; } + | error { yyerror("string expected"); } + ; +name_list: + variable { $$ = (struct sym *)chain_var($1); } + | name_list variable { $$ = (struct sym *)chain_var($2); } + | error { yyerror("variable expected"); } + ; +/* end enviroment division */ + +/* + * DATA DIVISION + */ +data_division_opt: + DATA DIVISION PERIOD_TOK + { curr_division = CDIV_DATA; } + file_section_opt + working_storage_opt + linkage_section_opt + report_section_opt + screen_section_opt + { curr_division = CINITIAL; } + | /* nothing */ +; +/* + * FILE SECTION + */ +file_section_opt: + FILE_TOK SECTION PERIOD_TOK { curr_field=NULL; } + file_section { close_fields(); } + | /* nothing */ + ; +/* + * WORKING STORAGE SECTION + */ +working_storage_opt: + WORKING_STORAGE SECTION PERIOD_TOK { curr_field=NULL; } + working_storage_section { close_fields(); } + | /* nothing */ + ; +/* + * LINKAGE SECTION + */ +linkage_section_opt: + LINKAGE SECTION PERIOD_TOK { at_linkage=1; curr_field=NULL; has_linkage++; } + linkage_section { close_fields(); at_linkage=0; } + | /* nothing */ + ; + +/* + * COMMUNICATION SECTION + */ + +/* Not Implemented */ + +/* + * REPORT SECTION + */ +/* Work in progress - not finished */ +report_section_opt: + REPORT SECTION PERIOD_TOK + report_sections { } + | /* nothing */ + ; +report_sections: + report_sections report_section + | /* nothing */ + ; +report_section: + RD + { /*curr_division = CDIV_FD;*/ } + STRING + { + $3->type='W'; + $3->picstr = 0; + $3->parent = 0; + $3->clone = 0; + $3->times = -1; + curr_division = CDIV_PROC; + UNIMPLEMENTED("Report Section") + } + report_controls PERIOD_TOK + { + curr_division = CDIV_DATA; + } + report_description + { + /* update_report_field($4); */ + /* define_field(1,$4); */ + } + ; +report_controls: /* nothing */ + | report_controls report_control + ; +report_control: is_opt GLOBAL { } + | CODE gliteral { } + | report_controls_control { } + | report_controls_page { } + ; +report_controls_control: + control_is_are final_opt report_break_list + ; +report_controls_page: + PAGE limit_is_are_opt integer line_lines_opt + heading_opt + first_detail_opt last_detail_opt + footing_opt + ; +heading_opt: /* nothing */ + | HEADING is_opt integer + ; +line_lines_opt: + lines_opt + | LINE + ; +lines_opt: + /* nothing */ + | LINES + ; +control_is_are: + CONTROL is_opt + | CONTROLS are_opt + ; +limit_is_are_opt: + /* nothing */ + | LIMIT IS + | LIMITS ARE + ; +footing_opt: + /* nothing */ + | FOOTING is_opt integer + ; +last_detail_opt: + /* nothing */ + | LAST DETAIL is_opt integer + ; +first_detail_opt: + /* nothing */ + | FIRST DETAIL is_opt integer + ; +final_opt: + /* nothing */ + | FINAL + ; +report_break_list: + /* nothing */ + | report_break_list name { $2->defined=1; } + ; +report_description: + report_item + | report_description report_item + ; +report_item: + integer def_name_opt + { + if ($2 == NULL) { + $2 = alloc_filler(); + picix=piccnt=v_flag=n_flag=decimals=pscale=0; + picture[picix]=0; + } + define_field($1,$2); + curr_division = CDIV_DATA; + } + report_clauses PERIOD_TOK + { + update_report_field($2); + curr_division = CDIV_DATA; + } + ; +report_clauses: + report_clause + | report_clauses report_clause + ; +report_clause: + report_clause_line { } + | report_clause_next_group { } + | report_clause_type { } + | report_clause_usage_display { } + | report_clause_picture { } + | report_clause_sign_is { } + | report_clause_justified { } + | report_clause_blank_zero { } + | report_clause_column { } + | report_clause_svs { } + | report_clause_group_indicate { } + ; +report_clause_type: + TYPE is_opt report_clause_type2 { } + ; +report_clause_type2: + REPORT HEADING { } + | PAGE HEADING { } + | CONTROL HEADING { curr_division = CDIV_PROC; } + name_final_opt { curr_division = CDIV_DATA; } + | DETAIL { } + | CONTROL FOOTING { curr_division = CDIV_PROC; } + name_final_opt { curr_division = CDIV_DATA; } + | PAGE FOOTING { } + | REPORT FOOTING { } + | RH { } + | PH { } + | CH { curr_division = CDIV_PROC; } + name_final_opt { curr_division = CDIV_DATA; } + | DE { } + | CF { curr_division = CDIV_PROC; } + name_final_opt { curr_division = CDIV_DATA; } + | PF { } + | RF { } + ; +report_clause_sign_is: + SIGN is_opt leading_trailing SEPARATE character_opt { } + | leading_trailing SEPARATE character_opt { } + ; +report_clause_picture: + PICTURE + { + curr_division = CDIV_PIC; + } + is_opt picture { curr_division = CDIV_DATA; } + ; +report_clause_usage_display: + USAGE is_opt DISPLAY { } + | DISPLAY { } + ; +report_clause_justified: + JUSTIFIED right_opt + ; +report_clause_next_group: + NEXT GROUP is_opt integer_on_next_page + ; +report_clause_line: + report_clause_line_is integer ON NEXT PAGE { } + | report_clause_line_is integer NEXT PAGE { } + | report_clause_line_is integer { } + | report_clause_line_is PLUS integer { } + ; +report_clause_line_is: + LINE is_are_opt + | LINE NUMBER is_opt + | LINE NUMBERS are_opt + | LINES are_opt + ; +report_clause_column: + report_clause_column_is integer { } + ; +report_clause_column_is: + COLUMN report_clause_column_orientation is_are_opt { $$=$2; } + | COLUMN NUMBER report_clause_column_orientation is_opt { $$=$3; } + | COLUMN NUMBERS report_clause_column_orientation are_opt { $$=$3; } + | COLUMNS report_clause_column_orientation are_opt { $$=$2; } + ; +report_clause_column_orientation: + /* nothing */ { $$=0; } + | LEFT { $$=0; } + | CENTER { $$=1; } + | RIGHT { $$=2; } + ; +is_are_opt: + /* nothing */ + | IS { } + | ARE { } + ; +report_clause_svs: SOURCE + { curr_division = CDIV_PROC; } + is_opt gname_page_counter + { curr_division = CDIV_DATA; } + | VALUE is_opt literal { } + | SUM { curr_division = CDIV_PROC; } + gname_list { curr_division = CDIV_DATA; } + upon_opt reset_opt { } + ; +gname_page_counter: gname { } + | PAGE_COUNTER { } + ; +report_clause_group_indicate: + | GROUP indicate_opt { } + ; +report_clause_blank_zero: + BLANK when_opt ZERO { } + ; +indicate_opt: + | INDICATE { } + ; +upon_opt: + | UPON gname_list { } + ; +reset_opt: + | RESET gname { } + | RESET FINAL { } + ; +number_opt: + | NUMBER { } + ; +leading_trailing: + LEADING { } + | TRAILING { } + ; +right_opt: + | RIGHT { } + ; +name_final_opt: + gname { } + | FINAL { } + ; +integer_on_next_page: + integer { } + | PLUS integer { } + | NEXT PAGE { } + ; +of_opt: + OF + | /* nothing */ + ; +/* end report section */ + +/* + * SCREEN SECTION + */ + +screen_section_opt: + SCREEN SECTION PERIOD_TOK + { + screen_io_enable++; + curr_field=NULL; + HTG_prg_uses_term = 1; + } + screen_section { close_fields(); } + | /* nothing */ + ; + +/* + * SCREEN SECTION DESCRIPTION ENTRY + */ +screen_section: + screen_section screen_item + | /* nothing */ + ; +screen_item: + integer def_name_opt + { + if ($2 == NULL) { + $2 = alloc_filler(); + } + picix=piccnt=v_flag=n_flag=decimals=pscale=0; + picture[picix]=0; + define_field($1,$2); + } + screen_clauses PERIOD_TOK { update_screen_field($2,$4); } + ; +screen_clauses: + screen_clauses LINE { curr_division = CDIV_PROC; } + number_is_opt + plus_minus_opt + name_or_lit { curr_division = CDIV_DATA; + scr_set_line($1,$6,$5); $$=$1; } + | screen_clauses COLUMN { curr_division = CDIV_PROC; } + number_is_opt + plus_minus_opt + name_or_lit { curr_division = CDIV_DATA; + scr_set_column($1,$6,$5); $$=$1; } + | screen_clauses + with_opt screen_attrib { $1->attr |= $3; $$=$1; } + | screen_clauses with_opt FOREGROUNDCOLOR { curr_division = CDIV_PROC; } + name_or_lit { curr_division = CDIV_DATA; + $1->color = NULL; + $1->foreground = $5; $$=$1; } + | screen_clauses with_opt BACKGROUNDCOLOR { curr_division = CDIV_PROC; } + name_or_lit { curr_division = CDIV_DATA; + $1->color = NULL; + $1->background = $5; $$=$1; } + | screen_clauses with_opt COLOR { curr_division = CDIV_PROC; } + name_or_lit { curr_division = CDIV_DATA; + $1->foreground = NULL; + $1->background = NULL; + $1->color = $5; $$=$1; } + | screen_clauses + screen_source_destination + | screen_clauses + value_is_are gliteral { curr_field->value = $3; $$=$1; } + | screen_clauses pictures + | screen_clauses SIZE { curr_division = CDIV_PROC; } + name_or_lit { curr_division = CDIV_DATA; + $1->size = $4; $$=$1; } + | /* nothing */ { $$ = alloc_scr_info(); } + ; +screen_source_destination: + USING { curr_division = CDIV_PROC; } + name_or_lit { + curr_division = CDIV_DATA; + $0->from = $0->to = $3; + } + | FROM { curr_division = CDIV_PROC; } + name_or_lit + screen_to_name { + curr_division = CDIV_DATA; + $0->from = $3; $0->to = $4; + } + | TO { curr_division = CDIV_PROC; } + name { + curr_division = CDIV_DATA; + $0->from = NULL; $0->to = $3; + } + ; +screen_to_name: + /* nothing */ { $$=NULL; } + | TO name { $$ = $2; } + ; +screen_attrib: + BLANK SCREEN { $$ = SCR_BLANK_SCREEN; } + | BLANK LINE { $$ = SCR_BLANK_LINE; } + | ERASE EOL { $$ = SCR_ERASE_EOL; } + | ERASE EOS { $$ = SCR_ERASE_EOS; } + | ERASE { $$ = SCR_ERASE_EOL; } + | with_opt BELL { $$ = SCR_BELL; } + | sign_clause { $$ = $1; } + | FULL { $$ = SCR_FULL; } + | REQUIRED { $$ = SCR_REQUIRED; } + | SECURE { $$ = SCR_SECURE; } + | AUTO { $$ = SCR_AUTO; } + | JUSTIFIED RIGHT { $$ = SCR_JUST_RIGHT; } + | JUSTIFIED LEFT { $$ = SCR_JUST_LEFT; } + | BLINK { $$ = SCR_BLINK; } + | REVERSEVIDEO { $$ = SCR_REVERSE_VIDEO; } + | UNDERLINE { $$ = SCR_UNDERLINE; } + | LOWLIGHT { $$ = SCR_LOWLIGHT; } + | HIGHLIGHT { $$ = SCR_HIGHLIGHT; } + | BLANK when_opt ZERO { $$ = SCR_BLANK_WHEN_ZERO; } + | with_opt NOECHO { $$ = SCR_NOECHO; } + | with_opt UPDATE { $$ = SCR_UPDATE; } + | with_opt NO ADVANCING { $$ = SCR_NO_ADVANCING; } + | UPPER { $$ = SCR_UPPER; } + | LOWER { $$ = SCR_LOWER; } + ; +/* wakter */ +screen_attribx: + BLANK SCREEN { $$ = SCR_BLANK_SCREEN; } + | BLANK LINE { $$ = SCR_BLANK_LINE; } + | ERASE EOL { $$ = SCR_ERASE_EOL; } + | ERASE EOS { $$ = SCR_ERASE_EOS; } + | ERASE { $$ = SCR_ERASE_EOL; } + | with_opt BELL { $$ = SCR_BELL; } + | sign_clause { $$ = $1; } + | FULL { $$ = SCR_FULL; } + | REQUIRED { $$ = SCR_REQUIRED; } + | SECURE { $$ = SCR_SECURE; } + | AUTO { $$ = SCR_AUTO; } + | JUSTIFIED RIGHT { $$ = SCR_JUST_RIGHT; } + | JUSTIFIED LEFT { $$ = SCR_JUST_LEFT; } + | BLINK { $$ = SCR_BLINK; } + | REVERSEVIDEO { $$ = SCR_REVERSE_VIDEO; } + | UNDERLINE { $$ = SCR_UNDERLINE; } + | LOWLIGHT { $$ = SCR_LOWLIGHT; } + | HIGHLIGHT { $$ = SCR_HIGHLIGHT; } + | BLANK when_opt ZERO { $$ = SCR_BLANK_WHEN_ZERO; } + | with_opt NOECHO { $$ = SCR_NOECHO; } + | with_opt UPDATE { $$ = SCR_UPDATE; } + | with_opt NO ADVANCING { $$ = SCR_NO_ADVANCING; } + | UPPER { $$ = SCR_UPPER; } + | LOWER { $$ = SCR_LOWER; } + | FOREGROUNDCOLOR integer { $$ = 0; fg = $2; } + | BACKGROUNDCOLOR integer { $$ = 0; bg = $2; } + ; +/* fim walter */ +sign_clause: + sign_is_opt LEADING separate_opt + { $$ = SCR_SIGN_LEADING | $3; } + | sign_is_opt TRAILING separate_opt + { $$ = $3; } + ; +separate_opt: + SEPARATE character_opt { $$ = SCR_SIGN_SEPARATE; } + | /* nothing */ { $$ = 0; } + ; +character_opt: + CHARACTER + | /* nothing */ + ; +sign_is_opt: + SIGN is_opt + | is_opt + ; +plus_minus_opt: + PLUS { $$ = 1; } + | '+' { $$ = 1; } + | MINUS { $$ = -1; } + | '-' { $$ = -1; } + | /* nothing */ { $$ = 0; } + ; +number_is_opt: + NUMBER is_opt + | /* nothing */ + ; +/* end screen section */ + +/* + * File description entry + */ +file_section: + file_section FD + { curr_division = CDIV_FD; } + STRING + { curr_division = CDIV_DATA; } + file_description_fd_clauses PERIOD_TOK + { + curr_field=NULL; + if ($4->filenamevar == NULL) { + yyerror("External file name not defined for file %s", $4->name); + } + } + file_description + { + close_fields(); + alloc_file_entry($4); + gen_fdesc($4,$9); + } + | file_section SD { curr_division = CDIV_FD; } + STRING { curr_division = CDIV_DATA; } + file_description_sd_clauses PERIOD_TOK + { + $4->organization=2; + curr_field=NULL; + } + file_description + { + close_fields(); + alloc_file_entry($4); + $4->sort_file = 1; + gen_fdesc($4,$9); + } + | error { yyerror("missing or invalid file description entry"); } + | /* nothing */ + ; +file_description: + field_description { $$=$1; } + | file_description field_description + { + if (($2 != NULL) && ($2->level == 1)) { + /* multiple 01 records (for a file descriptor) */ + $2->redefines=$1; + $$=$2; + } + else + $$=$1; + } + ; +/* + * DATA DESCRIPTION ENTRY + */ +field_description: + integer def_name_opt + { + picix=piccnt=v_flag=n_flag=decimals=pscale=0; + if ($1 == 78) { + yyerror("level 78 not supported"); + } + if ($2==NULL) { + define_field($1,alloc_filler()); + } + else { + define_field($1,$2); + } + } + data_clauses PERIOD_TOK + { + $$=$2; + if (($$ == NULL) || ($$->level != 66)) + update_field(curr_field); + } + ; +data_clauses: + /* nothing */ + | data_clauses data_clause + | data_clauses redefines_clause + ; +redefines_clause: + REDEFINES + { curr_division = CDIV_PROC; /* parsing variable */ } + redefines_var + { + curr_division = CDIV_DATA; + if ($-2 != NULL) { + $-2->redefines = lookup_for_redefines($3); + } + else { + yywarn("cannot redefine an unnamed field"); + } + } + ; +redefines_var: + VARIABLE { $$=$1; } + | SUBSCVAR { $$=$1; } + ; +data_clause: + array_options + | pictures + | usage_option + | sign_clause { + curr_field->flags.separate_sign = ($1 & SCR_SIGN_SEPARATE) ? 1 : 0; + curr_field->flags.leading_sign = ($1 & SCR_SIGN_LEADING) ? 1 : 0; } + | value_option + | SYNCHRONIZED sync_options {curr_field->flags.sync=1;} + | JUSTIFIED sync_options {if ($2 != 2) curr_field->flags.just_r=1;} + | is_opt EXTERNAL {save_named_sect(curr_field);} + | is_opt GLOBAL {} + | BLANK when_opt ZERO { curr_field->flags.blank=1; } + | RENAMES { curr_division = CDIV_PROC /* for parsing variable */; } + variable thru_gname_opt + { curr_division = CDIV_DATA; + update_renames_field($3, $4);} + ; +sync_options: + /* nothing */ {$$=0;} + | LEFT {$$=2;} + | RIGHT {$$=1;} + ; +thru_gname_opt: /* nothing */ { $$ = NULL;} + | THRU variable { $$ = $2;} + ; + +/* OCCURS clause */ +array_options: + OCCURS integer times_opt + { curr_field->times = $2; curr_field->occurs_flg++; } + indexed_by_opt + | OCCURS integer TO integer times_opt DEPENDING + { curr_division = CDIV_PROC; /* needed for parsing variable */ } + on_opt gname + { + curr_division = CDIV_DATA; + create_occurs_info($2,$4,$9); + } + indexed_by_opt + ; +key_is_opt: + DIRECTION key_opt is_opt STRING + { + $4->level=0; + if ($1 == ASCENDING) { + $4->level=-1; + } + if ($1 == DESCENDING) { + $4->level=-2; + } + $$=$4; + } + | { $$=NULL; } + ; +indexed_by_opt: + key_is_opt INDEXED by_opt index_name_list + { + /*define_implicit_field($4, $1, curr_field->times);*/ + /* Fix Me: Does not work, thus dup vars can be defined + if ($4->defined) { + yyerror("variable redefined, '%s'",$4->name); + $4->defined=1; + } + else { + define_implicit_field($4, $1, curr_field->times); + } */ + } + | /* nothing */ + ; +index_name_list: + def_name + { + define_implicit_field($1, $-2, curr_field->times); + /* Fix Me: Does not work, thus dup vars can be defined + if ($4->defined) { + yyerror("variable redefined, '%s'",$4->name); + $4->defined=1; + } + else { + define_implicit_field($4, $1, curr_field->times); + } */ + } + | index_name_list def_name + { + define_implicit_field($2,$-2,curr_field->times); + } + ; + +/* USAGE clause */ + +usage_option : + usage_opt is_opt usage { set_usage(curr_field, $3); } + ; +usage: + USAGENUM { $$=$1; } + | DISPLAY { $$=USAGE_DISPLAY; } + | POINTER { $$=USAGE_POINTER; } + ; + +/* VALUE clause */ + +value_option: + value_is_are value_list + ; +value_is_are: + VALUE is_opt + | VALUES are_opt + ; +value_list: + value + | value_list comma_opt value + ; +value: + gliteral { set_variable_values($1,$1); } + | gliteral THRU gliteral + { + set_variable_values($1,$3); + } + ; + +/* Pictures clause */ + +pictures: + PICTURE + { + curr_division = CDIV_PIC; + /* first pic char found */ + picix=piccnt=v_flag=n_flag=decimals=pscale=0; + picture[picix]=0; + } + is_opt picture + { + /* finish picture */ + picture[picix+2]=0; + curr_field->decimals=decimals; + curr_field->pscale=pscale; + if (curr_field->type == DTYPE_DISPLAY && piccnt > 18) { + yyerror("Maximum elementary numeric item size of %s > 18 digits exceeded", curr_field->name); + } + if (curr_field->type == DTYPE_ALPHANUMERIC && piccnt > 12750) { + yyerror("Maximum elementary alphanumeric item size of %s > 12750 exceeded", curr_field->name); + } + } + ; +picture: /* nothing */ + | picture pic_elem + ; +pic_elem: + CHAR multiplier_opt + { + if (!save_pic_char ( $1, $2 )) { + yyerror("invalid char in picture"); + YYERROR; + } + } + ; +multiplier_opt: + /* nothing */ { $$ = 1; } + | MULTIPLIER { $$ = $1; } + ; + + /* File description entry */ +file_description_fd_clauses: + | file_description_fd_clauses file_description_fd_clause + ; +file_description_sd_clauses: + | file_description_sd_clauses file_description_sd_clause + ; +file_description_fd_clause: + is_opt EXTERNAL { $0->type = 'K'; } + | is_opt GLOBAL { $0->type = 'J'; } + | file_description_clause_block + | file_description_clause_record + | file_description_clause_label + | file_description_clause_value + | file_description_clause_data + | file_description_clause_report + | file_description_clause_linage + | file_description_clause_code_set + ; +file_description_sd_clause: + file_description_clause_record + | file_description_clause_data + ; + +file_description_clause_block: + BLOCK contains_opt integer + to_integer_opt chars_or_recs_opt + { + /* unimplemented - clause ignored */ + } + ; +file_description_clause_record: + RECORD contains_opt integer + to_rec_varying character_opts + { + if ($4 != NULL) { + UNIMPLEMENTED ("RECORD CONTAINS integer1 TO integer2 CHARACTERS clause") + /* unimplemented */ + } + } + | RECORD is_opt VARYING in_opt size_opt + from_rec_varying to_rec_varying character_opts + depend_rec_varying + { + if ($9 != NULL) { + set_rec_varying_info( $-2,$6,$7,$9 ); + } + else { + yyerror("clause \'DEPENDING ON data-name-1\' is missing"); + } + } + ; +file_description_clause_label: + LABEL record_is_are std_or_omitt { /* obsolete */ } + ; +file_description_clause_value: + VALUE OF FILE_ID is_opt filename + { + if ($-2->filenamevar != NULL) { + yyerror("Re-defining file name defined in SELECT statement"); + } + else { + $-2->filenamevar = $5; + } + } + ; +file_description_clause_data: + DATA record_is_are var_strings { /* obsolete */ } + ; +file_description_clause_report: + report_is_are STRING { save_report( $2,$0 ); } + ; +file_description_clause_code_set: + CODE_SET is_opt STRING + { UNIMPLEMENTED ("Code-set is alphabet") /* unimplemented */ } + ; +file_description_clause_linage: + LINAGE is_opt data_name lines_opt + file_description_clause_linage_footing + file_description_clause_linage_top + file_description_clause_linage_bottom + { UNIMPLEMENTED ("Linage is clause") /* unimplemented */ } + ; +file_description_clause_linage_footing: + | with_opt FOOTING at_opt data_name { /* unimplemented */ } + ; +file_description_clause_linage_top: + | lines_at_opt TOP data_name { /* unimplemented */ } + ; +file_description_clause_linage_bottom: + | lines_at_opt BOTTOM data_name { /* unimplemented */ } + ; +lines_at_opt: /* nothing */ + | LINES + | LINES AT + | AT + ; +report_is_are: REPORT is_opt + | REPORTS are_opt + ; +var_strings: STRING { } + | var_strings STRING { } + ; +chars_or_recs_opt: + /* nothing */ + | CHARACTERS + | RECORDS + ; +to_integer_opt: /* nothing */ + | TO integer { } + ; +depend_rec_varying: { $$ = NULL; } + | DEPENDING on_opt STRING { $$ = $3; } + ; +from_rec_varying: + /* nothing */ { $$ = NULL; } + | from_opt nliteral { $$ = $2; } + ; +from_opt: + FROM + | /* nothing */ + ; +to_rec_varying: + /* nothing */ { $$ = NULL; } + | TO nliteral { $$ = $2; } + ; +record_is_are: + RECORD is_opt + | RECORDS are_opt + ; +std_or_omitt: + STANDARD + | OMITTED + ; +usage_opt: + /* nothing */ + | USAGE + ; +times_opt: + /* nothing */ + | TIMES + ; +when_opt: + /* nothing */ + | WHEN + ; +contains_opt: + /* nothing */ + | CONTAINS + ; +character_opts: + /* nothing */ + | CHARACTERS + ; +order_opt: + /* nothing */ + | ORDER + ; +data_opt: + /* nothing */ + | DATA + ; +/* + * DATA DIVISION - working storage section + */ +working_storage_section: + working_storage_section + field_description + | /* nothing */ + ; +/* + * DATA DIVISION - linkage section + */ +linkage_section: + /* nothing */ + | linkage_section + field_description + ; +/* +procedure_division: + | procedure_division procedure_decl + ; +*/ +/* + * PROCEDURE DIVISION + */ +procedure_division_opt: + PROCEDURE DIVISION + { + curr_division = CDIV_PROC; + } + using_parameters PERIOD_TOK + { + proc_header($4); + } + declaratives_opt + procedure_division + { + /* close procedure_division sections & paragraphs */ + close_section(); /* this also closes paragraph */ + resolve_labels(); + proc_trail($4); + } + | /* nothing */ + ; +procedure_division: + | procedure_division procedure_decl + ; +procedure_decl: + procedure_section { close_section(); open_section($1); } + | paragraph { close_paragr(); open_paragr($1); } + | {free_expr_list(); stabs_line();} statements PERIOD_TOK +/* | {free_expr_list(); stabs_line();} statements */ + | error { yyerror("unknown or wrong statement"); } PERIOD_TOK + | PERIOD_TOK { } + ; +/* Procedure Division Declaratives */ +declaratives_opt: + DECLARATIVES PERIOD_TOK + { + decl_lbl=loc_label++; + gen_jmplabel(decl_lbl); + } + declaratives_procedure + declaratives_division + END DECLARATIVES PERIOD_TOK + { + gen_dstlabel(decl_lbl); + } + | /* nothing */ + ; +declaratives_division: + | declaratives_division declaratives_decl +/* | declaratives_division procedure_decl */ + ; + +declaratives_decl: + declaratives_procedure + | paragraph { close_paragr(); open_paragr($1); } + | {free_expr_list(); stabs_line();} statements PERIOD_TOK + | error { yyerror("unknown or wrong statement"); } PERIOD_TOK +/* | PERIOD_TOK { } */ + ; + +declaratives_procedure: + procedure_section + { + close_section(); + open_section($1); + } + use_phrase + | error { yyerror("section name expected"); } + ; +use_phrase: + USE AFTER use_phrase_exception_error PROCEDURE on_opt use_phrase_option PERIOD_TOK + { /* mark_decl_list($6); */ } + | error { yyerror("use statement expected"); } + ; +use_phrase_exception_error: EXCEPTION + | ERROR_TOK + | STANDARD EXCEPTION + | STANDARD ERROR_TOK + ; +use_phrase_option: + gname_list { $$=$1; } + | open_mode + { + $$=NULL; + UNIMPLEMENTED ("Declaratives open-mode clause") + /* unimplemented */ + } + ; + +/* Procedure division sections and paragraphs */ + +procedure_section: + LABELSTR SECTION PERIOD_TOK + { + struct sym *lab=$1; + if (lab->defined != 0) { + lab = install(lab->name,SYTB_LAB,2); + } + lab->defined = 1; + $$=lab; + } + ; +paragraph: + LABELSTR dot_or_eos + { + struct sym *lab=$1; + if (lab->defined != 0) { + if ((lab=lookup_label(lab,curr_section))==NULL) { + lab = install($1->name,SYTB_LAB,2); + } + } + lab->parent = curr_section; + lab->defined=1; + $$=lab; + } + ; +dot_or_eos: + '.' + | PERIOD_TOK + ; + +/* + * PROCEDURE DIVISION - COBOL verbs + */ + +statement_list: + statements { } + ; +statements: + statement + | statements statement + ; +statement: + move_statement + | initialize_statement + | compute_statement + | add_statement + | subtract_statement + | multiply_statement + | divide_statement + | accept_statement + | display_statement + | open_statement + | close_statement + | read_statement + | return_statement + | release_statement + | write_statement + | rewrite_statement + | delete_statement + | start_statement + | perform_statement + | goto_statement + | exit_statement + | stop_statement + | call_statement + | call_loadlib_statement + | chain_statement + | set_statement + | sort_statement + | merge_statement + | inspect_statement + | string_statement + | unstring_statement + | initiate_statement + | generate_statement + | terminate_statement + | proto_statement + | trace_statement + | goback_statement + | cancel_statement + | unlock_statement + | if_statement + | evaluate_statement + | search_statement + | CONTINUE { stabs_line(); } +/* + | NEXT SENTENCE { stabs_line(); } +*/ + ; + +perform_statement: + PERFORM perform_options + ; +if_statement: + if_part { gen_dstlabel($1); } end_if_opt + | if_part ELSE + { $$=gen_passlabel(); gen_dstlabel($1); } + /* sentence { gen_dstlabel($3); } */ + conditional_statement { gen_dstlabel($3); } + end_if_opt + ; +search_statement: + SEARCH search end_search_opt + | SEARCH ALL search_all end_search_opt + ; +evaluate_statement: + EVALUATE + { $$ = gen_evaluate_start(); } + selection_subject_set + { compute_subject_set_size($3); } + when_case_list + end_evaluate_or_eos + { release_sel_subject($2,$3); } + ; +end_evaluate_or_eos: + END_EVALUATE + | PERIOD_TOK + ; +selection_subject_set: + { $$=NULL; /* to store non-numeric symbols */ } + selection_subject { $$=save_sel_subject($2,NULL,$1); } + | selection_subject_set ALSO + { $$=NULL; /* to store non-numeric symbols */ } + selection_subject + { $$=save_sel_subject($4,$1,$3); } + ; +selection_subject: + expr /* this already includes identifiers and literals */ + { + if (push_expr($1)) + $$=SSUBJ_EXPR; + else { + $0 = $1; + $$=SSUBJ_STR; + } + } + | condition { push_condition(); $$=SSUBJ_COND; } + | TRUE_TOK { $$=SSUBJ_TRUE; } + | FALSE_TOK { $$=SSUBJ_FALSE; } + ; +when_case_list: + WHEN { $$ = loc_label++; /* mark end of "when" case */ } + { $$=$-1; /* store inherited subject set */ } + when_case + sentence_or_nothing + { $$=gen_end_when($-2,$2,$5); } + | when_case_list WHEN { $$ = loc_label++; } + { $$=$-1; } + when_case + { gen_bypass_when_case($1); } + sentence_or_nothing + { $$=gen_end_when($-2,$3,$7); } + ; +when_case: + { $$ = NULL; } + selection_object + { + gen_when_check(0,$0,$2,$-1,$1); + $$=0; + } + | when_case ALSO + { $$ = NULL; } + selection_object + { + gen_when_check($1+1,$0,$4,$-1,$3); + $$=$1+1; + } + | OTHER { $$=-1; } + ; +selection_object: + ANY { $$=SOBJ_ANY; } + | TRUE_TOK { $$=SOBJ_TRUE; } + | FALSE_TOK { $$=SOBJ_FALSE; } + | not_opt expr + { + if (push_expr($2)) { + if ($1) + $$=SOBJ_NEGEXPR; + else + $$=SOBJ_EXPR; + } + else { + /* non-numeric comparation */ + $0 = $2; + if ($1) + $$=SOBJ_NEGSTR; + else + $$=SOBJ_STR; + } + } + | not_opt expr THRU expr + { + if (push_expr($4) && push_expr($2)) { + if ($1) + $$=SOBJ_NEGRANGE; + else + $$=SOBJ_RANGE; + } + else { + yyerror("ranges only accepted for numeric variables"); + } + } + | not_opt cond_name + { + gen_condition($2); + if ($1) + $$=SOBJ_NEGCOND; + else + $$=SOBJ_COND; + } + ; + +sentence_or_nothing: + /* nothing */ { $$ = 0; } + | conditional_statement { $$ = 1; } + ; + +if_part: + IF condition + { $$=gen_testif(); } + end_then_opt + conditional_statement { $$=$3; } + /* sentence { $$=$3; }*/ + ; + +/* + Fix me: This does not conform to the ANSI85 standard. + However, it does reduce the number of conflicts. +*/ +conditional_statement: { stabs_line(); } statement_list + | { stabs_line(); } NEXT SENTENCE +/* + | { stabs_line(); } CONTINUE +*/ + ; + +not_opt: + /* nothing */ { $$=0; } + | NOT { $$=1; } + ; +end_if_opt: + | END_IF + ; +end_then_opt: + | THEN + ; +search: + variable_indexed + { + $$=loc_label++; /* determine END label name */ + gen_marklabel(); + /* yydebug=1; */ + } + search_varying_opt + { + $$=loc_label++; /* determine search loop start label */ + if ($3 == NULL) { + $3=determine_table_index_name($1); + if ($3 == NULL) { + yyerror("Unable to determine search index for table '%s'", $1->name); + } + } + gen_jmplabel($$); /* generate GOTO search loop start */ + } + search_at_end + { + gen_jmplabel($2); /* generate GOTO END */ + gen_dstlabel($4); /* generate search loop start label */ + $$ = $2; + } + search_when_list + { + /* increment loop index, check for end */ + gen_SearchLoopCheck($5, $3, $1); + + gen_jmplabel($4); /* generate goto search loop start label */ + gen_dstlabel($2); /* generate END label */ + } + ; +search_all: + variable_indexed + { + lbend=loc_label++; /* determine END label name */ + gen_marklabel(); + + lbstart=loc_label++; /* determine search_all loop start label */ + + $$=determine_table_index_name($1); + if ($$ == NULL) { + yyerror("Unable to determine search index for table '%s'", $1->name); + } + else { + /* Initilize and store search table index boundaries */ + Initialize_SearchAll_Boundaries($1, $$); + } + + gen_jmplabel(lbstart); /* generate GOTO search_all loop start */ + } + search_at_end + { + gen_jmplabel(lbend); /* generate GOTO END */ + gen_dstlabel(lbstart); /* generate search loop start label */ + } + search_all_when_list + { + /* adjust loop index, check for end */ + gen_SearchAllLoopCheck($3, $2, $1, curr_field, lbstart, lbend); + } + ; + +search_varying_opt: + VARYING variable { $$=$2; } + | { $$=NULL; } + ; + +search_at_end: + at_opt END + { + $$=loc_label++; /* determine ATEND label name */ + gen_dstlabel($$); /* determine ATEND label name */ + } + statement_list + { + $$=$3; + } + | + { + $$=loc_label++; /* determine ATEND label name */ + gen_dstlabel($$); /* determine ATEND label name */ + } + ; + +search_when_list: + search_when { $$=$1; } + | search_when_list search_when { $$=$1; } + ; +search_when: + WHEN + search_when_conditional + { $$=gen_testif(); } + search_when_statement + { + $$ = $0; + gen_jmplabel($$); /* generate GOTO END */ + gen_dstlabel($3); + } + ; + +search_when_statement: + statement_list + | NEXT SENTENCE +/* + | CONTINUE +*/ + ; + +search_when_conditional: +/* name cond_op name { gen_compare($1,$2,$3); } + | name cond_op nliteral { gen_compare($1,$2,(struct sym *)$3); } + | name extended_cond_op name_or_lit { gen_compare($1,$2,$3); } + | name_or_lit extended_cond_op name { gen_compare($1,$2,$3); } + | nliteral cond_op nliteral { + gen_compare((struct sym *)$1,$2,(struct sym*)$3); } */ + name_or_lit extended_cond_op name_or_lit { gen_compare($1,$2,$3); } + ; + +search_all_when_list: + search_all_when + | search_all_when_list search_all_when + ; +search_all_when: + WHEN { curr_field = NULL; } + search_all_when_conditional + { $$=gen_testif(); } + search_all_when_statement + { + gen_jmplabel(lbend); /* generate GOTO END */ + gen_dstlabel($4); + } + ; + +search_all_when_statement: + statement_list +/* statement */ + | NEXT SENTENCE +/* + | CONTINUE +*/ + ; + +search_all_when_conditional: + variable is_opt CONDITIONAL to_opt variable + { + if ($3 != EQUAL) + yyerror("Only = conditional allowed in search all statement"); + if (curr_field == NULL) + curr_field = $1; + gen_compare($1,$3,$5); + } + | variable is_opt CONDITIONAL to_opt literal + { + if ($3 != EQUAL) + yyerror("Only = conditional allowed in search all statement"); + if (curr_field == NULL) + curr_field = $1; + gen_compare($1,$3,(struct sym *)$5); + } + | search_all_when_conditional AND { $$=gen_andstart(); } + search_all_when_conditional { gen_dstlabel($3); } + ; + +end_search_opt: + | END_SEARCH + ; + +unlock_statement: + UNLOCK name { gen_unlock($2); } + ; +proto_statement: + TCOBPROTO1 gname { gen_tcob_proto1( $2 ); } + | TCOBPROTO2 gname gname { gen_tcob_proto2( $2,$3 ); } + ; +trace_statement: + READY TRACE { } + | RESET TRACE { } + ; +initiate_statement: + INITIATE name + ; +generate_statement: + GENERATE name + ; +terminate_statement: + TERMINATE name + ; +cancel_statement: + CANCEL gname { gen_cancel($2); } + | CANCEL ALL { gen_cancel(NULL); } + ; + +/* MERGE statement */ +merge_statement: + MERGE name sort_keys + { sort_keys_append($2, $3); } + sort_collating_opt + { gen_sort($2); } + merge_using + { gen_sort_using($2, $7); } + sort_output + { + if ($9 != NULL) { + gen_sort_giving($2, $9); + } + } + ; +merge_using: + USING sort_file_list { $$=$2; } + ; + +/* SORT statement */ +sort_statement: + sort_file; + | sort_variable_indexed; + +sort_file: + SORT name sort_keys + { sort_keys_append($2, $3); } + sort_duplicates_opt sort_collating_opt + { gen_sort($2); } + sort_input + { + if ($8 != NULL) { + gen_sort_using($2, $8); + } + } + sort_output + { + if ($10 != NULL) { + gen_sort_giving($2, $10); + } + } + ; + +sort_variable_indexed: // walter + SORT variable_indexed sort_keys_idx + { sort_keys_append($2, $3); } + sort_duplicates_opt sort_collating_opt + { gen_sort($2); } + ; + +sort_keys: + sort_key { $$=sort_keys_list_append(NULL, $1); } + | sort_keys sort_key { $$=sort_keys_list_append($1, $2); } + ; + +sort_keys_idx: + sort_key_idx { $$=sort_keys_list_append(NULL, $1); } + | sort_keys_idx sort_key_idx { $$=sort_keys_list_append($1, $2); } + ; + +sort_key: + on_opt DIRECTION key_opt sort_keys_names + { $$=sort_key_list_create($4, $2); } + ; + +sort_key_idx: + on_opt DIRECTION key_opt sort_keys_names_idx + { $$=sort_key_list_create($4, $2); } + ; + +sort_keys_names: + name { $$ = gvar_list_append(NULL, $1, source_lineno); } + | sort_keys_names name { $$ = gvar_list_append($1, $2, source_lineno); } + ; + +sort_keys_names_idx: + variable_indexed { $$ = gvar_list_append(NULL, $1, source_lineno); } + | sort_keys_names_idx variable_indexed { $$ = gvar_list_append($1, $2, source_lineno); } + ; + +sort_duplicates_opt: + | with_opt DUPLICATES in_opt order_opt + { + UNIMPLEMENTED ("SORT with duplicates in order clause") + /* unimplemented */ + } + ; + +sort_collating_opt: + | collating_sequence + { UNIMPLEMENTED ("SORT/MERGE collating sequence clause") /* unimplemented */ } + ; + +/* SORT and MERGE statement clauses */ +sort_input: + INPUT PROCEDURE is_opt perform_range { $$=NULL; } + | USING sort_file_list { $$=$2; } + ; +sort_output: + OUTPUT PROCEDURE is_opt perform_range { $$=NULL; } + | GIVING sort_file_list { $$=$2; } + ; +sort_file_list: + name { $$ = alloc_sortfile_node($1); } + | sort_file_list name + { + $1->next = alloc_sortfile_node($2); $$=$1; + } + ; + +/* MOVE statement */ +move_statement: + MOVE gname TO name_var_list { gen_moves($2, $4); } + | MOVE CORRESPONDING name_var TO name_var { gen_movecorr($3, $5); } + | MOVE LENGTH OF gname TO name_var { gen_movelength($4, $6); } + | MOVE gname TO { yyerror("Expected variable"); } + ; +/* INITIALIZE statement walter 13-12-05 (_verb) gname_list removi o initialize_replacing_opt*/ +initialize_statement: +/* INITIALIZE gname_list initialize_replacing_opt { gen_initializes_verb($2,init_alphab,init_alpha,init_alphaedt,init_num,init_numedt); } */ + INITIALIZE gname_list initialize_replacing_opt { gen_initializes($2); } + | INITIALIZE { yyerror("INITIALIZE: expected a variable name");} + ; +initialize_replacing_opt: + | REPLACING initialize_replacing_lists + { UNIMPLEMENTED ("INITIALIZE ... REPLACING clause") } + ; +initialize_replacing_lists: + initialize_replacing_list + | initialize_replacing_lists initialize_replacing_list + ; +initialize_replacing_list: + initialize_type_list data_opt BY gname { /* not implimented */ } + ; +initialize_type_list: + ALPHABETIC { } + | ALPHANUMERIC { } + | NUMERIC { } + | ALPHANUMERIC_EDITED { } + | NUMERIC_EDITED { } + ; + +/* Compute statement */ +compute_statement: + COMPUTE compute_body end_compute_opt + | COMPUTE { yyerror(err_msg_bad_form, "COMPUTE");} + ; +compute_body: + var_list_name CONDITIONAL expr on_size_error_opt + { + if ($2 != EQUAL) + yyerror("= expected"); + else if ($4 == NULL) + gen_compute1($1, $3); + else + gen_compute2($1, $3, $4); + delete_mathvar_info($1); + if ($4 != NULL) + tmose = NULL; + } + ; +end_compute_opt: + /* nothing */ + | END_COMPUTE + ; + +/* Add statement */ +add_statement: + ADD add_body end_add_opt + | ADD { yyerror(err_msg_bad_form, "ADD");} + ; +add_body: + var_list_gname TO var_list_name on_size_error_opt + { + gen_add1($1, $3, $4); + delete_mathvar_info($1); + delete_mathvar_info($3); + if ($4 != NULL) + tmose = NULL; + } + | var_list_gname add_to_opt GIVING var_list_name on_size_error_opt + { + gen_add2($1, $4, $2, $5); + delete_mathvar_info($1); + delete_mathvar_info($4); + if ($5 != NULL) + tmose = NULL; + } + | CORRESPONDING var_list_gname TO var_list_name rounded_opt on_size_error_opt + { + gen_addcorr1($2, $4, $5, $6); + delete_mathvar_info($2); + delete_mathvar_info($4); + if ($6 != NULL) + tmose = NULL; + } + ; +add_to_opt: + /* nothing */ { $$ = NULL; } + | TO gname { $$ = $2; } + ; +end_add_opt: + /* nothing */ + | END_ADD + ; + +/* Subtract statement */ + +subtract_statement: + SUBTRACT subtract_body end_subtract_opt + | SUBTRACT { yyerror(err_msg_bad_form, "SUBTRACT");} + ; +subtract_body: + var_list_gname FROM var_list_name on_size_error_opt + { + gen_subtract1($1, $3, $4); + delete_mathvar_info($1); + delete_mathvar_info($3); + if ($4 != NULL) + tmose = NULL; + } + | var_list_gname FROM gname GIVING var_list_name on_size_error_opt + { + assert_numeric_sy($3); + gen_subtract2($1, $5, $3, $6); + delete_mathvar_info($1); + delete_mathvar_info($5); + if ($6 != NULL) + tmose = NULL; + } + | CORRESPONDING var_list_gname FROM var_list_name rounded_opt on_size_error_opt + { + gen_subtractcorr1($2, $4, $5, $6); + delete_mathvar_info($2); + delete_mathvar_info($4); + if ($6 != NULL) + tmose = NULL; + } + ; +end_subtract_opt: + | END_SUBTRACT + ; + +/* Multiply statement */ + +multiply_statement: + MULTIPLY multiply_body end_multiply_opt + | MULTIPLY { yyerror(err_msg_bad_form, "MULTIPLY");} + ; +multiply_body: + gname BY gname GIVING var_list_name on_size_error_opt + { + assert_numeric_sy($1); + assert_numeric_sy($3); + gen_multiply2($5, $1, $3, $6); + delete_mathvar_info($5); + if ($6 != NULL) + tmose = NULL; + } + | gname BY var_list_name on_size_error_opt + { + assert_numeric_sy($1); + gen_multiply1($3, $1, $4); + delete_mathvar_info($3); + if ($4 != NULL) + tmose = NULL; + } + ; +end_multiply_opt: + /* nothing */ + | END_MULTIPLY + ; + +/* Divide statement */ + +divide_statement: + DIVIDE divide_body end_divide_opt + | DIVIDE { yyerror(err_msg_bad_form, "DIVIDE");} + ; +divide_body: + gname BY gname GIVING var_list_name on_size_error_opt + { + assert_numeric_sy($1); + assert_numeric_sy($3); + gen_divide2($5, $1, $3, $6); + delete_mathvar_info($5); + if ($6 != NULL) + tmose = NULL; + } + | gname BY gname GIVING name rounded_opt REMAINDER name on_size_error_opt + { + assert_numeric_sy($1); + assert_numeric_sy($3); + assert_numeric_dest_sy($5); + gen_divide4($1, $3, $5, $8, $6, $9); + if ($9 != NULL) + tmose = NULL; + } + | gname INTO gname GIVING name rounded_opt REMAINDER name on_size_error_opt + { + assert_numeric_sy($1); + assert_numeric_sy($3); + assert_numeric_dest_sy($5); + gen_divide4($3, $1, $5, $8, $6, $9); + if ($9 != NULL) + tmose = NULL; + } + | gname INTO gname GIVING var_list_name on_size_error_opt + { + assert_numeric_sy($1); + assert_numeric_sy($3); + gen_divide2($5, $3, $1, $6); + delete_mathvar_info($5); + if ($6 != NULL) + tmose = NULL; + } + | gname INTO var_list_name on_size_error_opt + { + assert_numeric_sy($1); + gen_divide1($3, $1, $4); + delete_mathvar_info($3); + if ($4 != NULL) + tmose = NULL; + } + ; +end_divide_opt: + /* nothing */ + | END_DIVIDE + ; + +/* Accept statement */ +accept_statement: + accept_hardware /* Accept format 1 (hardware) */ + | accept_chronological /* Accept format 2 (chronological) */ + | accept_screen /* Accept format 3 (screen) */ + | ACCEPT { yyerror(err_msg_bad_form, "ACCEPT");} + ; +accept_hardware: + ACCEPT name FROM INKEY end_accept_opt { gen_accept_from_inkey($2); } + | ACCEPT name FROM INPUT STATUS end_accept_opt { gen_accept_from_inkey($2); } + | ACCEPT name FROM CMD_LINE end_accept_opt { gen_accept_from_cmdline($2); } + | ACCEPT name FROM ESCKEY end_accept_opt { gen_accept_from_escapekey($2); } /* walter */ + | ACCEPT name FROM ENVIRONMENT_VARIABLE CLITERAL end_accept_opt + { + save_literal($5,'X'); + $5->all=0; + gen_accept_env_var($2, $5); + } + ; +accept_chronological: + ACCEPT name FROM DATE_TIME end_accept_opt + { + gen_accept_from_chron($2, $4, 0); + } + ; +accept_screen: + ACCEPT name accept_display_options end_accept_opt + { +/* walter acrescentei co ao final de todo gen_accept( */ +/* gen_accept($2, $3, 1); */ + co = ((bg * 8) + fg); + gen_accept($2, $3, 1, co); + } + | ACCEPT name accept_display_options + on_opt EXCEPTION { + screen_io_enable++; + HTG_prg_uses_term = 1; +/* gen_accept($2, $3, 1); */ + co = ((bg * 8) + fg); + gen_accept($2, $3, 1, co); + } + variable { + gen_store_fnres($7); + $$ = gen_check_zero(); + } + statement_list { gen_dstlabel($8); } + end_accept_opt + ; +end_accept_opt: + /* Nothing */ + | END_ACCEPT + ; + +/* Display statement */ +display_statement: + display_line + | display_screen + | DISPLAY { yyerror(err_msg_bad_form, "DISPLAY");} + ; +display_line: + DISPLAY display_varlist display_upon display_line_options end_display_opt +/* walter acrescentei 0 */ + { gen_display_line($3, $4, 0); } + ; +display_screen: + DISPLAY display_varlist accept_display_options end_display_opt + { +/* walter acrescentei co ao final de todo gen_accept( */ +/* gen_accept($2, $3, 1); */ + co = ((bg * 8) + fg); + gen_display_screen($3, co); } + ; +display_varlist: + gname { put_disp_list($1); } + | display_varlist sep_opt gname { put_disp_list($3); } + ; +display_upon: + UPON CONSOLE { $$ = 1; } + | UPON STD_OUTPUT { $$ = 1; } + | UPON STD_ERROR { $$ = 2; } + ; +display_line_options: + /* nothing */ { $$ = 0; } + | display_line_options with_opt NO ADVANCING { $$ = $1 | SCR_NO_ADVANCING; } + | display_line_options with_opt ERASE { $$ = $1 | SCR_ERASE_EOL; } + | display_line_options with_opt ERASE EOS { $$ = $1 | SCR_ERASE_EOS; } + | display_line_options with_opt ERASE EOL { $$ = $1 | SCR_ERASE_EOL; } + | display_line_options with_opt ERASE SCREEN { $$ = $1 | SCR_ERASE_EOS; } + ; +end_display_opt: + /* Nothing */ + | END_DISPLAY + ; +/* common options for display and accept */ +/*line_position: + | at_opt scr_line scr_position { } + | scr_line_position { } + ;*/ +scr_line: + LINE number_opt expr + { + screen_io_enable++; + HTG_prg_uses_term = 1; + push_expr($3); + gen_gotoy_expr(); + } + ; +scr_position: + COLUMN number_opt expr + { + screen_io_enable++; + HTG_prg_uses_term = 1; + push_expr($3); + gen_gotox_expr(); + } + | POSITION expr + { + screen_io_enable++; + HTG_prg_uses_term = 1; + push_expr($2); + gen_gotox_expr(); + } + ; +scr_line_position: + AT NLITERAL + { + screen_io_enable++; + HTG_prg_uses_term = 1; + scr_push_display_position($2); + } + | AT variable + { + screen_io_enable++; + HTG_prg_uses_term = 1; + scr_push_display_position($2); + } + ; +accept_display_options: +/* walter acrescentei co = 0 */ + /* nothing */ { fg = 0; bg = 0; $$ = 0; } + | accept_display_options accept_display_option { $$ = $1 | $2; } + ; +accept_display_option: + with_opt screen_attribx { $$ = $2; } + | scr_line { $$ = 0; } + | scr_position { $$ = 0; } + | scr_line_position { $$ = 0; } +/* walter + | FOREGROUNDCOLOR integer { $$ = 0; fg = $2; } + | BACKGROUNDCOLOR integer { $$ = 0; bg = $2; } */ + ; +/* Open statement */ +open_statement: + OPEN open_options { HTG_prg_uses_fileio = 1; } + | OPEN { yyerror(err_msg_bad_form, "OPEN");} + ; +open_options: + open_mode open_varlist { } + | open_options open_mode open_varlist { } + ; +/* OPENMD { $$ = $1; } */ +open_mode: + INPUT { $$=1; } + | I_O { $$=2; } + | OUTPUT { $$=3; } + | EXTEND { $$=4; } + | error { yyerror("invalid OPEN mode"); } + ; +open_varlist: + name { gen_open($0, $1); } + | open_varlist sep_opt name { gen_open($0, $3); } + ; + +/* Close statement */ + +close_statement: + CLOSE close_files + | CLOSE { yyerror(err_msg_bad_form, "CLOSE");} + ; +close_files: + close_file + | close_files sep_opt close_file + ; +close_file: + name close_options_opt { gen_close($1); } + ; +close_options_opt: + close_options + { + $$=0; + UNIMPLEMENTED ("CLOSE options clause") + } + | with_lock_opt { $$=$1; } + ; +close_options: + with_opt NO REWIND { } + | REEL { } + | UNIT { } + | REEL for_opt REMOVAL { } + | UNIT for_opt REMOVAL { } + ; +with_lock_opt: + with_opt LOCK { $$=1; } + | with_opt IGNORE LOCK { $$=2; } + | /* nothing */ { $$=0; } + ; + +/* Return statements */ + +return_statement: + RETURN return_body end_return_opt + | RETURN { yyerror(err_msg_bad_form, "RETURN");} + ; +return_body: + name + record_opt + read_into_opt + { + if (gen_reads($1, $3, NULL, 1, 4, 0) != 0) { + YYABORT; + } + } + | name + record_opt + read_into_opt + read_at_end_opt + { + if (gen_reads($1, $3, NULL, 1, 5, 0) != 0) { + YYABORT; + } + else { + ginfo_container4($4); + gic = NULL; + } + } + ; + +/* Read statements */ + +read_statement: + READ read_body end_read_opt { } + | READ { yyerror(err_msg_bad_form, "READ");} + ; +read_body: + name + read_next_opt + record_opt + read_into_opt + with_lock_opt + read_key_opt + { + if (gen_reads($1, $4, $6, $2, 0, $5) != 0) { + YYABORT; + } + else { + gen_perform_decl($1); + } + } + | name + read_next_opt + record_opt + read_into_opt + with_lock_opt + read_key_opt + read_at_end_opt + { + if (gen_reads($1, $4, $6, $2, 1, $5) != 0) { + YYABORT; + } + else { + ginfo_container4($7); + gen_perform_decl($1); + gic = NULL; + } + } + | name + read_next_opt + record_opt + read_into_opt + with_lock_opt + read_key_opt + read_invalid_key_opt + { + if (gen_reads($1, $4, $6, $2, 2, $5) != 0) { + YYABORT; + } + else { + gen_test_invalid_keys ($7, $1, 23); + gen_perform_decl($1); + } + } + ; +read_next_opt: + /* nothing */ { $$ = 0; } + | NEXT { $$ = 1; } + | PREVIOUS { $$ = 2; } + ; +read_into_opt: + /* nothing */ { $$ = NULL; } + | INTO name { $$ = $2; } + ; +read_key_opt: + /* nothing */ { $$ = NULL; } + | KEY is_opt name { $$ = $3; } + ; +read_at_end_opt: + NOT at_opt on_end + { + ginfo_container2($3, 2); + $$=ginfo_container3($3, 2); + } + | AT on_end + { + ginfo_container2($2, 1); + $$=ginfo_container3($2, 1); + } + | on_end + { + ginfo_container2($1, 1); + $$=ginfo_container3($1, 1); + } + | AT on_end NOT at_opt + { + ginfo_container2($2, 1); + } + on_end + { + ginfo_container2($6, 2); + $$=ginfo_container3($6, 3); + } + | on_end NOT at_opt + { + ginfo_container2($1, 1); + } + on_end + { + ginfo_container2($5, 2); + $$=ginfo_container3($5, 3); + } + ; +on_end: + END + { + if ( gic == NULL ) { + gic=ginfo_container0(); + } + $$=ginfo_container1(gic); + stabs_line(); + } + statement_list + { + $$=$2; + } + ; +read_invalid_key_opt: + read_invalid_key { $$ = gen_invalid_keys ($1, NULL); } + | read_not_invalid_key { $$ = gen_invalid_keys (NULL, $1); } + | read_invalid_key read_not_invalid_key { $$ = gen_invalid_keys ($1, $2); } + ; +read_invalid_key: + INVALID key_opt { $$ = gen_before_invalid_key (); } + statement_list { $$ = gen_after_invalid_key ($3); } + ; +read_not_invalid_key: + NOT INVALID key_opt { $$ = gen_before_invalid_key (); } + statement_list { $$ = gen_after_invalid_key ($4); } + ; +end_read_opt: + /* nothing */ + | END_READ + ; +end_return_opt: + /* nothing */ + | END_RETURN + ; + +/* Release statement */ + +release_statement: + RELEASE name release_from_opt + { + gen_release($2, $3); + } + ; +release_from_opt: + /* nothing */ { $$ = NULL; } + | FROM gname { $$ = $2; } + ; + +/* Write statement */ + +write_statement: + WRITE name write_from_opt write_options + { + if ($2->level != 1) + yyerror("variable %s could not be used for WRITE", $2->name); + gen_write($2, $4, $3, write_advancing_sw); + } + invalid_key_opt + end_write_opt {gen_test_invalid_keys ($6, $2, 22);} + ; +write_from_opt: + /* nothing */ { $$ = NULL; } + | FROM gname { $$ = $2; } + ; +write_options: + /* nothing */ { $$ = NULL; write_advancing_sw = 0; } + | before_after advancing_opt gname line_lines_opt + { + /* gen_loadvar($3); */ + $$ = $3; + write_advancing_sw = $1; + } + | before_after advancing_opt PAGE + { + write_advancing_sw = -$1; + $$ = NULL; + } + ; +end_write_opt: + /* nothing */ + | END_WRITE + ; + +/* Rewrite statement */ + +rewrite_statement: + REWRITE name write_from_opt + { + if ($2->level != 1) + yyerror("variable %s could not be used for REWRITE", $2->name); + gen_rewrite($2, $3); + } + invalid_key_opt + end_rewrite_opt {gen_test_invalid_keys ($5, $2, 22);} + ; +end_rewrite_opt: + /* nothing */ + | END_REWRITE + ; + +/* Delete statement */ + +delete_statement: + DELETE name record_opt { gen_delete($2); } + invalid_key_opt + end_delete_opt {gen_test_invalid_keys ($5, $2, 23);} + ; +end_delete_opt: + /* nothing */ + | END_DELETE + ; + +/* Start statement */ + +start_statement: + START start_body + invalid_key_opt {gen_test_invalid_keys ($3, $2, 23);} + end_start_opt + ; +start_body: + name { gen_start($1,0,NULL); $$ = $1;} + | name KEY is_opt cond_op name { gen_start($1,$4,$5); $$ = $1;} + ; +end_start_opt: + /* nothing */ + | END_START + ; + +/* + GO TO statements + Format 1: Unconditional + Format 2: Conditional (DEPENDING ON) + Format 3: Altered (Paragraph-name. GO TO.) - not implemented +*/ +goto_statement: + GO to_opt goto_label { gen_goto($3); } + | GO to_opt goto_label_list DEPENDING on_opt variable + { + if (is_numeric_sy($6)) + gen_goto_depending($3, $6); + else yyerror("variable '%s' must be numeric", $6->name); + } + ; +goto_label: label { $$ = insert_list(NULL, $1); } + ; +goto_label_list: + label { $$ = insert_list(NULL, $1); } + | goto_label_list label { $$ = insert_list($1, $2); } + | goto_label_list LISTSEP label { $$ = insert_list($1, $3); } + ; + +/* CALL statement */ +call_statement: + CALL { curr_call_mode=CM_REF; } + call_convention_opt + gname + using_options + returning_options + { $$ = loc_label++; /* exception check */ } + { $$ = loc_label++; /* not exception check */ } + { + $$ = emt_call((struct lit *)$4, $5, $7, $8, $6); + /* gen_store_fnres($6); */ + /* If paramater is a variable then dynamic link libs are required */ +/* + if ($4->litflag == 0 ) { + HTG_prg_uses_dcall = 1; + } +*/ + } + on_exception_or_overflow + on_not_exception { check_call_except($10, $11, $7, $8, $9); } + end_call_opt + | CALL { yyerror(err_msg_bad_form, "CALL"); } + ; + +call_convention_opt: { curr_call_convention = 0; } + | CALL_CONV_C { curr_call_convention = 0; } + | CALL_CONV_STDCALL { curr_call_convention = 1; } +/* | CALL_CONV_STDCALL { yyerror("STDCALL (WINAPI) convention is not implimented"); }*/ + ; + +/* CALL-LOADLIB statement */ +call_loadlib_statement: + CALL_LOADLIB + gname + { + emt_call_loadlib((struct lit *)$2); + } + end_call_loadlib_opt + | CALL_LOADLIB { yyerror(err_msg_bad_form, "CALL-LOADLIB"); } + ; + +/* END-CALL-LOADLIB */ +end_call_loadlib_opt: END_CALL_LOADLIB { } + | { } + ; + +/* CHAIN statement */ +chain_statement: + CHAIN { curr_call_mode=CM_CHAIN; } + gname + using_options { $$ = loc_label++; /* exception check */ } + { $$ = gen_chain($3,$4,$5); } + on_exception_or_overflow + {/* check_call_except($9,$10,$6,$7,$8);*/ } + end_chain_opt + | CHAIN { yyerror(err_msg_bad_form, "CHAIN"); } + ; + +/* EXIT statement */ +exit_statement: + EXIT { gen_exit(0); } + | EXIT PARAGRAPH { gen_exit(0); } + | EXIT PROGRAM { gen_exit(1); } + ; + +/* Stop statement */ +stop_statement: + STOP RUN { gen_stoprun(); } + | STOP stop_literal + { + struct sym *sy; +/* walter acrescentei 0 ao final */ + gen_display_line(2, SCR_NO_ADVANCING, 0); + sy = define_temp_field(DTYPE_ALPHANUMERIC,1); +/* walter acrescentei 0 ao final + gen_accept(sy, 0, 1); */ + gen_accept(sy, 0, 1, 0); + } + ; +stop_literal: + CLITERAL + { + save_literal($1,'X'); + $1->all=0; + put_disp_list((struct sym *)$1); + } + | NLITERAL + { + save_literal($1,'X'); + $1->all=0; + put_disp_list((struct sym *)$1); + } + ; + +/* Goback statement */ +goback_statement: + GOBACK { gen_goback(); } + ; + +var_list_name: name rounded_opt sep_opt + { + $$ = create_mathvar_info(NULL, $1, $2); + } + | var_list_name name rounded_opt sep_opt + { + $$ = create_mathvar_info($1, $2, $3); + } + ; + +var_list_gname: gname sep_opt + { + $$ = create_mathvar_info(NULL, $1, 0); + } + | var_list_gname gname sep_opt + { + $$ = create_mathvar_info($1, $2, 0); + } + ; + +rounded_opt: + /* Nothing */ { $$=0; } + | ROUNDED { $$=1; } + ; + +on_size_error_opt: + /* nothing */ + { + $$=NULL; + } + | NOT on_opt SIZE + on_size_error + { + $$=math_on_size_error4($4, 2); + } + | on_opt SIZE + on_size_error + { + $$=math_on_size_error4($3, 1); + } + | on_opt SIZE + on_size_error + NOT on_opt SIZE + { + $3->lbl1=$3->ose; + } + on_size_error + { + $$=math_on_size_error4($8, 3); + } + ; + +on_size_error: + ERROR_TOK + { + if ( tmose == NULL ) { + tmose=math_on_size_error0(); + $$=math_on_size_error1(tmose); + } + else { + $$=math_on_size_error1(tmose); + } + stabs_line(); + } + statement_list + { + math_on_size_error2(tmose); + $$=$2; + } + ; + +size_opt: + /* nothing */ + | SIZE + ; +end_call_opt: + /* nothing */ + | END_CALL + ; +end_chain_opt: + /* nothing */ + | END_CHAIN + ; + +/* SET statement */ +set_statement: + SET set_list ; +set_list: + set_target TO address_of_opt set_variable_or_nlit + { gen_set_list($1,SET_TO,$4,0,$3); } + | set_target UP BY var_or_nliteral + { gen_set_list($1,SET_UP_BY,$4,0,0); } + | set_target DOWN BY var_or_nliteral + { gen_set_list($1,SET_DOWN_BY,$4,0,0); } + | address_of_opt variable TO address_of_opt set_variable + { gen_set($2,SET_TO,$5,$1,$4); } + ; + +set_target: +/* variable { $$ = $1; } */ + name_list { $$ = $1; } + | cond_name { $$ = (struct sym *)chain_var($1); } + ; + +set_variable: + variable { $$ = $1; } + | NULL_TOK { $$ = NULL; } + ; + +set_variable_or_nlit: + name_or_lit { $$ = $1; } + | ON { $$ = (struct sym *)define_num_lit(1); } + | OFF { $$ = (struct sym *)spe_lit_ZE; } + | NULL_TOK { $$ = NULL; } + | TRUE_TOK + { + $$ = (struct sym *)1; + /* no (struct sym *) may have this value! */ + } + ; + +address_of_opt: + /* nothing */ { $$ = 0; } + | ADDRESS of_opt { $$ = 1; } + ; + +/* String and Unstring statements */ + +string_statement: + STRINGCMD string_from_list + INTO name string_with_pointer { + gen_stringcmd( $2, $4, $5 ); + } + on_overflow_opt + end_stringcmd_opt + ; +unstring_statement: + UNSTRING name + unstring_delimited + INTO unstring_destinations + string_with_pointer + unstring_tallying { + gen_unstring( $2, $3, $5, $6, $7 ); + } + on_overflow_opt + end_unstring_opt + ; +unstring_delimited: + DELIMITED by_opt unstring_delimited_vars { $$=$3; } + | /* nothing */ { $$=NULL; } + ; +unstring_delimited_vars: + all_opt gname { $$=alloc_unstring_delimited($1,$2); } + | unstring_delimited_vars OR all_opt gname { + struct unstring_delimited *ud; + ud=alloc_unstring_delimited($3,$4); + ud->next = $1; + $$=ud; + } + ; +unstring_destinations: + unstring_dest_var { $$=$1; } + | unstring_destinations sep_opt + unstring_dest_var { + $3->next = $1; + $$ = $3; + } + ; +unstring_dest_var: + name unstring_delim_opt unstring_count_opt { + $$ = alloc_unstring_dest( $1, $2, $3 ); + } + ; +unstring_delim_opt: + /* nothing */ { $$=NULL; } + | DELIMITER in_opt name { $$=$3; } + ; +unstring_count_opt: + /* nothing */ { $$=NULL; } + | COUNT in_opt name { $$=$3; } + ; +unstring_tallying: + /* nothing */ { $$=NULL; } + | TALLYING in_opt name { $$=$3; } + ; +all_opt: + /* nothing */ { $$=0; } + | ALL { $$=1; } + ; +on_overflow_opt: + { curr_division = CDIV_EXCEPTION; } + on_overflow + on_not_overflow + { curr_division = CDIV_PROC; } + ; +on_exception_or_overflow: + on_opt exception_or_overflow { $$ = begin_on_except(); } + statement_list { gen_jmplabel($0); $$=$3; } + | /* nothing */ { $$ = 0; } + ; +exception_or_overflow: + EXCEPTION + | OVERFLOW_TOK + ; +on_not_exception: + NOT on_opt EXCEPTION { $$ = begin_on_except(); } + statement_list { gen_jmplabel($-1); $$=$4; } + | /* nothing */ { $$ = 0; } + ; +on_overflow: + on_opt OVERFLOW_TOK { $$ = gen_at_end(1); } + statement_list { gen_dstlabel($3); } + | /* nothing */ + ; +on_not_overflow: + not_excep on_opt OVERFLOW_TOK { $$ = gen_at_end(0); } + statement_list { gen_dstlabel($4); } + | /* nothing */ + ; + +invalid_key_opt: + invalid_key_sentence {$$ = gen_invalid_keys($1, NULL);} + | not_invalid_key_sentence {$$ = gen_invalid_keys(NULL, $1);} + | invalid_key_sentence not_invalid_key_sentence + {$$ = gen_invalid_keys($1, $2);} + | { $$ = NULL;} + ; +invalid_key_sentence: + INVALID key_opt { $$ = gen_before_invalid_key(); } + statement_list { $$ = gen_after_invalid_key($3); } + ; +not_invalid_key_sentence: + not_excep INVALID key_opt { $$ = gen_before_invalid_key(); } + statement_list { $$ = gen_after_invalid_key($4); } + ; +not_excep: + NOTEXCEP + | NOT + ; +string_with_pointer: + with_opt POINTER name { $$ = $3; } + | /* nothing */ { $$ = NULL; } + ; +string_from_list: + string_from { $$ = $1; } + | string_from_list sep_opt string_from { + $3->next = $1; + $$ = $3; + } + | error { yyerror("variable expected"); } + ; +string_from: + gname { + /* Item with no DELIMITED BY section implies use delimiter of next item */ + $$ = alloc_string_from( $1, (struct sym *)-1 ); + } + | gname DELIMITED by_opt delimited_by { + $$ = alloc_string_from( $1, $4 ); + } + ; +delimited_by: + gname { $$=$1; } + | SIZE { $$=NULL; } + | error { yyerror("SIZE or identifier expected"); } + ; +end_stringcmd_opt: + /* nothing */ + | END_STRINGCMD + ; +end_unstring_opt: + /* nothing */ + | END_UNSTRING + ; + +/* INSPECT statement */ +inspect_statement: + INSPECT + name + tallying_clause { gen_inspect($2,(void *)$3,0); } + replacing_clause { gen_inspect($2,(void *)$5,1); } + | INSPECT + name + converting_clause { gen_inspect($2,(void *)$3,2); } + ; +converting_clause: + CONVERTING + noallname TO noallname inspect_before_after { + $$ = alloc_converting_struct($2,$4,$5); + } + ; +tallying_clause: + TALLYING tallying_list { $$=$2; } + | /* nothing */ { $$=NULL; } + ; +tallying_list: + tallying_list + name FOR tallying_for_list { + $$ = alloc_tallying_list($1,$2,$4); } + | /* nothing */ { $$ = NULL; } + ; +tallying_for_list: + tallying_for_list + CHARACTERS inspect_before_after { + $$ = alloc_tallying_for_list($1,INSPECT_CHARACTERS,NULL,$3); } + | tallying_for_list + ALL noallname inspect_before_after { + $$ = alloc_tallying_for_list($1,INSPECT_ALL,$3,$4); } + | tallying_for_list + LEADING noallname inspect_before_after { + $$ = alloc_tallying_for_list($1,INSPECT_LEADING,$3,$4); } + | /* nothing */ { $$ = NULL; } + ; +replacing_clause: + REPLACING + replacing_list { $$ = $2; } + | /* nothing */ { $$ = NULL; } + ; +replacing_list: + replacing_list + CHARACTERS BY noallname inspect_before_after { + $$ = alloc_replacing_list($1,INSPECT_CHARACTERS,NULL,$4,$5); } + | replacing_list + replacing_kind replacing_by_list { + $$ = alloc_replacing_list($1,$2,$3,NULL,NULL); } + | /* nothing */ { $$ = NULL; } + ; +replacing_by_list: + replacing_by_list + noallname BY noallname inspect_before_after { + $$ = alloc_replacing_by_list($1,$2,$4,$5); } + | /* nothing */ { $$ = NULL; } + ; +replacing_kind: + ALL { $$ = INSPECT_ALL; } + | LEADING { $$ = INSPECT_LEADING; } + | TRAILING { $$ = INSPECT_TRAILING; } + | FIRST { $$ = INSPECT_FIRST; } + ; +inspect_before_after: + inspect_before_after + BEFORE initial_opt noallname + { $$ = alloc_inspect_before_after($1,1,$4); } + | inspect_before_after + AFTER initial_opt noallname + { $$ = alloc_inspect_before_after($1,2,$4); } + | /* nothing */ { $$ = alloc_inspect_before_after(NULL,0,NULL); } + ; +initial_opt: + INITIAL_TOK + | /* nothing */ + ; + +expr: + gname { $$ = $1; } + | expr '*' expr { $$ = + (struct sym *)create_expr('*',(struct expr *)$1,(struct expr *)$3); } + | expr '/' expr { $$ = + (struct sym *)create_expr('/',(struct expr *)$1,(struct expr *)$3); } + | expr '+' expr { $$ = + (struct sym *)create_expr('+',(struct expr *)$1,(struct expr *)$3); } + | expr '-' expr { $$ = + (struct sym *)create_expr('-',(struct expr *)$1,(struct expr *)$3); } + | expr POW_OP expr { $$ = + (struct sym *)create_expr('^',(struct expr *)$1,(struct expr *)$3); } + | '(' expr ')' { $$=$2; } + ; +/* expr_opt will be NULL or a (struct sym *) pointer if the expression + was given, otherwise it will be valued -1 */ +expr_opt: + /* nothing */ { $$ = (struct sym *)-1; } + | expr { $$ = $1; } + ; +using_options: + /* nothing */ { $$=0; } + | USING { $$=0; /* to save how many parameters */ } + dummy { $$=CALL; } + parm_list { $$=$2; } /* modified to signal calling pgm */ + ; +returning_options: + /* nothing */ { $$=0; } + | RETURNING variable { $$=$2; } + | GIVING variable { $$=$2; } + ; +dummy: /* nothing */ ; + +using_parameters: /* defined at procedure division */ + /* nothing */ { $$=0; } + | USING gname_list { gen_save_usings($2); $$=1; } + | CHAINING gname_list { gen_save_chainings($2); $$=2; } + ; + +parm_list: + parm_list sep_opt parameter + { if ($0 == USING) + gen_save_using($3); + else if ($0 == CALL) { + gen_push_using($3); + } + } + | parameter + { if ($0 == USING) + gen_save_using($1); + else if ($0 == CALL) { + gen_push_using($1); + } + } + ; +parameter: + gname {$$=$1; + if ($$->litflag==1) { + struct lit *lp=(struct lit *)$$; + lp->call_mode=curr_call_mode; + } + else + $$->call_mode=curr_call_mode; + } + /*| BY parm_type gname*/ + | by_opt parm_type gname + { if ( curr_call_mode == CM_CHAIN ) + yyerror("parameter types not allowed on CHAIN"); + else + { + $$=$3; + curr_call_mode=$2; + if ($$->litflag==1) { + struct lit *lp=(struct lit *)$$; + lp->call_mode=curr_call_mode; + } + else + $$->call_mode=curr_call_mode; + } + } + /* | OMITTED + { $$=save_special_literal('0','9', "%ZEROS%"); + $$->call_mode=CM_VAL; + } */ + ; +parm_type: + REFERENCE {$$=CM_REF;} + | VALUE {$$=CM_VAL;} + | CONTENT {$$=CM_CONT;} +/* | DESCRIPTOR {$$=CM_CONT;}*/ + ; +intrinsic_parm_list: + intrinsic_parm_list sep_opt intrinsic_parm + { gen_push_using($3); } + | intrinsic_parm { gen_push_using($1); } + ; +intrinsic_parm: + gname {$$=$1;$$->call_mode=CM_REF;} + ; +perform_range: label perform_thru_opt + { + gen_perform_thru($1,$2); + $$ = ($2 == NULL) ? $1 : $2; + } + ; +perform_options: perform_statements END_PERFORM { $$ = NULL; } + | gname TIMES + { + gen_push_int($1); + $$=gen_marklabel(); + gen_perform_test_counter($$); + } + perform_statements + { + gen_perform_times($3); + } + END_PERFORM { $$ = NULL; } + | with_test_opt UNTIL + { + if ($1 == 2) { + $$.lb2=gen_passlabel(); + } + $$.lb1=gen_marklabel(); + } + condition + { + $$.lb1=gen_orstart(); + if ($1 == 2) { + $$.lb2=gen_passlabel(); + gen_dstlabel($3.lb2); + } + } + perform_statements + { + if ($1 == 2) { + gen_jmplabel($3.lb1); + gen_dstlabel($5.lb2); + gen_jmplabel($3.lb2); + gen_dstlabel($5.lb1); + } + else { + gen_jmplabel($3.lb1); + gen_dstlabel($5.lb1); + } + } + END_PERFORM { $$ = NULL; } + | with_test_opt VARYING name FROM gname by_opt gname UNTIL + { + /* + Check if initailization of the 'VARYING identifier' is required. + Initailization of the 'VARYING identifier' is not neccessary if + it is the same as the 'FROM identifier'. + */ + if ($5->litflag == '1') { + gen_move($5,$3); + } + else { + if(strcmp($5->name, $3->name) != 0) { + gen_move($5,$3); + } + } + /* BEFORE=1 AFTER=2 */ + if ($1 == 2) { + $$.lb2=gen_passlabel(); + } + $$.lb1=gen_marklabel(); + } + condition + { + $$=gen_orstart(); + /* BEFORE=1 AFTER=2 */ + if ($1 == 2) { + gen_add($7,$3,0); + gen_dstlabel($9.lb2); + } + } + perform_after_opt + perform_statements + { + int i; + struct perf_info *rf; + /*struct perform_info *rpi;*/ + char *vn; + + /* Check for duplicate variables in VARYING/AFTER */ + if ($12 != NULL) { + if ((vn = check_perform_variables($3, $12)) != NULL) { + yyerror("Duplicate variable '%s' in VARYING/AFTER clause", vn); + } + } + + if ($1 == 2) { + if ($12 != NULL) { + for (i=5; i>=0; i--) { + rf = $12->pf[i]; + if (rf != NULL) { + gen_jmplabel(rf->ljmp); + gen_dstlabel(rf->lend); + } + } + } + gen_jmplabel($9.lb1); + gen_dstlabel($11); + } + else { + if ($12 != NULL) { + for (i=5; i>=0; i--) { + rf = $12->pf[i]; + if (rf != NULL) { + gen_add(rf->pname1, rf->pname2, 0); + gen_jmplabel(rf->ljmp); + gen_dstlabel(rf->lend); + } + } + } + gen_add($7,$3,0); + gen_jmplabel($9.lb1); + gen_dstlabel($11); + } + } + END_PERFORM { $$ = NULL; } + | label perform_thru_opt + { + gen_perform_thru($1,$2); + $$ = NULL; + } + | label perform_thru_opt with_test_opt UNTIL + { + $$=gen_marklabel(); + /* BEFORE=1 AFTER=2 */ + if ($3 == 2) { + gen_perform_thru($1,$2); + } + } + condition + { + unsigned long lbl; + lbl=gen_orstart(); + /* BEFORE=1 AFTER=2 */ + if ($3 == 1) { + gen_perform_thru($1,$2); + } + gen_jmplabel($5); + gen_dstlabel(lbl); + } + | label perform_thru_opt gname TIMES + { + unsigned long lbl; + gen_push_int($3); + lbl = gen_marklabel(); + gen_perform_test_counter(lbl); + gen_perform_thru($1,$2); + gen_perform_times(lbl); + } + | label perform_thru_opt with_test_opt VARYING name + FROM gname by_opt gname UNTIL + { + /* + Check if initailization of the 'VARYING identifier' is required. + Initailization of the 'VARYING identifier' is not neccessary if + it is the same as the 'FROM identifier'. + */ + if ($7->litflag == '1') { + gen_move($7,$5); + } + else { + if(strcmp($7->name, $5->name) != 0) { + gen_move($7,$5); + } + } + if ($3 == 2) { + $$.lb2=gen_passlabel(); + } + $$.lb1 = gen_marklabel(); + } + condition + { + $$ = gen_orstart(); + /* BEFORE=1 AFTER=2 */ + if ($3 == 2) { + gen_add($9,$5, 0); + gen_dstlabel($11.lb2); + } + } + perform_after_opt + { + int i; + struct perf_info *rf; + /*struct perform_info *rpi;*/ + char *vn = NULL; + + /* Check for duplicate varaibles in VARYING/AFTER */ + if ($14 != NULL) { + if ((vn = check_perform_variables($5, $14)) != NULL) { + yyerror("Duplicate variable '%s' in VARYING/AFTER clause", vn); + } + } + gen_perform_thru($1,$2); + /* BEFORE=1 AFTER=2 */ + if ($3 == 2) { + if ($14 != NULL) { + for (i=5; i>=0; i--) { + rf = $14->pf[i]; + if (rf != NULL) { + gen_jmplabel(rf->ljmp); + gen_dstlabel(rf->lend); + } + } + } + gen_jmplabel($11); + gen_dstlabel($13); + } + else { + if ($14 != NULL) { + for (i=5; i>=0; i--) { + rf = $14->pf[i]; + if (rf != NULL) { + gen_add(rf->pname1, rf->pname2, 0); + gen_jmplabel(rf->ljmp); + gen_dstlabel(rf->lend); + } + } + } + gen_add($9,$5,0); + gen_jmplabel($11); + gen_dstlabel($13); + } + $$ = NULL; + } + ; + +perform_thru_opt: + /* nothing */ { $$ = NULL; } + | THRU label { $$ = $2;} + ; +with_test_opt: { $$=1; perform_after_sw=1; } + | with_opt TEST before_after + { + $$=$3; + perform_after_sw=$3; + } + ; +perform_after_opt: /* nothing */ { $$=NULL; } + | AFTER perform_after + { + $$=create_perform_info(); + $$->pf[0] = $2; + $$=$$; + } + | AFTER perform_after AFTER perform_after + { + $$=create_perform_info(); + $$->pf[0] = $2; + $$->pf[1] = $4; + $$=$$; + } + | AFTER perform_after AFTER perform_after + AFTER perform_after + { + $$=create_perform_info(); + $$->pf[0] = $2; + $$->pf[1] = $4; + $$->pf[2] = $6; + $$=$$; + } + | AFTER perform_after AFTER perform_after + AFTER perform_after AFTER perform_after + { + $$=create_perform_info(); + $$->pf[0] = $2; + $$->pf[1] = $4; + $$->pf[2] = $6; + $$->pf[3] = $8; + $$=$$; + } + | AFTER perform_after AFTER perform_after AFTER perform_after + AFTER perform_after AFTER perform_after + { + $$=create_perform_info(); + $$->pf[0] = $2; + $$->pf[1] = $4; + $$->pf[2] = $6; + $$->pf[3] = $8; + $$->pf[4] = $10; + $$=$$; + } + | AFTER perform_after AFTER perform_after AFTER perform_after + AFTER perform_after AFTER perform_after AFTER perform_after + { + $$=create_perform_info(); + $$->pf[0] = $2; + $$->pf[1] = $4; + $$->pf[2] = $6; + $$->pf[3] = $8; + $$->pf[4] = $10; + $$->pf[5] = $12; + $$=$$; + } + ; +perform_after: name FROM gname + by_opt gname UNTIL + { + /* + Check if initailization of the 'VARYING identifier' is required. + Initailization of the 'VARYING identifier' is not neccessary if + it is the same as the 'FROM identifier'. + */ + if ($3->litflag == '1') { + gen_move($3,$1); + } + else { + if(strcmp($3->name, $1->name) != 0) { + gen_move($3,$1); + } + } + /* BEFORE=1 AFTER=2 */ + if (perform_after_sw == 2) { + $$.lb2=gen_passlabel(); + } + $$.lb1 = gen_marklabel(); + } + condition + { + unsigned long lbl; + lbl=gen_orstart(); + /* BEFORE=1 AFTER=2 */ + if (perform_after_sw == 2) { + gen_add($5,$1,0); + gen_dstlabel($7.lb2); + $$ = create_perf_info($5, $1, $7.lb1, lbl); + } + else { + $$ = create_perf_info($5, $1, $7.lb1, lbl); + } + } + ; +perform_statements: {stabs_line();} statement_list +/* + | { stabs_line(); } CONTINUE +*/ + ; +before_after: + BEFORE { $$=1; } + | AFTER { $$=2; } + ; +condition: + expr extended_cond_op + { + if ($2 & COND_UNARY) { + if ($2 & COND_CLASS) { + gen_class_check($1,$2); + } + else { + struct sym *sy = (struct sym *)save_special_literal('0','9', "%ZEROS%"); + gen_compare($1,$2&~COND_UNARY,sy); + } + } + } + expr_opt + { + if ($2 & COND_UNARY) { + if ((int)$4 != -1) { + yyerror("class or sign conditions are unary"); + } + } + else { + if ((int)$4 == -1) { + yyerror("expression expected in a binary condition"); + } + else { + gen_compare($1,$2,$4); + } + } + $$.sy=$1; /* for implied operands */ + $$.oper=$2; + } + | NOT condition { gen_not(); $$=$2; } + | condition + AND + { $$=gen_andstart(); } + implied_op_condition + { gen_dstlabel($3); $$=$4; } + | condition + OR + { $$=gen_orstart(); } + implied_op_condition + { gen_dstlabel($3); $$=$4; } + | '(' condition ')' { $$ = $2; } + | cond_name + { + /*if ($1->level != 88) + yyerror("condition unknown");*/ + gen_condition($1); + $$.sy=NULL; + $$.oper=0; + } + ; +implied_op_condition: + condition { $$ = $1; } + | cond_op expr + { + if ($-2.sy == NULL) { + yyerror("invalid implied condition"); + } + else { + gen_compare($-2.sy,$1,$2); + } + $$.sy = $-2.sy; + $$.oper = $1; + } + | expr + { /* implied both the first operand and the operator */ + if (($-2.sy == NULL)|| + ($-2.oper & COND_UNARY)) { + yyerror("invalid implied condition"); + } + else { + gen_compare($-2.sy,$-2.oper,$1); + } + $$.sy = $-2.sy; + $$.oper = $-2.oper; + } + ; +sign_condition: + POSITIVE { $$=GREATER; } + | NEGATIVE { $$=LESS; } + | ZERO { $$=EQUAL; } + ; +class_condition: + NUMERIC { $$=CLASS_NUMERIC; } + | ALPHABETIC { $$=CLASS_ALPHABETIC; } + | ALPHABETIC_LOWER { $$=CLASS_ALPHABETIC_LOWER; } + | ALPHABETIC_UPPER { $$=CLASS_ALPHABETIC_UPPER; } + ; +extended_cond_op: + IS ext_cond { $$ = $2; } + | IS NOT ext_cond { $$ = $3 ^ 7; } + | IS ext_cond OR ext_cond { $$ = $2 | $4; } + | ext_cond { $$ = $1; } + | NOT is_opt ext_cond { $$ = $3 ^ 7; } + | ext_cond OR ext_cond { $$ = $1 | $3; } + ; +ext_cond: + conditional { $$ = $1; } + | class_condition { $$ = $1 | COND_UNARY | COND_CLASS; } + | sign_condition { $$ = $1 | COND_UNARY; } + ; +cond_op: + conditional { $$ = $1; } + | NOT conditional { $$ = $2 ^ 7; } + | conditional OR conditional { $$ = $1 | $3; } + ; +conditional: + CONDITIONAL than_to_opt { $$ = $1; } + ; +comma_opt: /* nothing */ + | ',' + ; +sep_opt: + /* nothing */ + | LISTSEP + ; +/* this token doesn't really exists, but forces look ahead + to keep line numbers synchronized with our position + because we need to generate correct debug stabs */ +/* +dummy_opt: + / nothing / + | TOKDUMMY + ; +*/ +key_opt: + /* nothing */ + | KEY + ; +advancing_opt: + /* nothing */ + | ADVANCING + ; +than_to_opt: + /* nothing */ + | TO { } + | THAN { } + ; +record_opt: + /* nothing */ + | RECORD + ; +at_opt: /* nothing */ + | AT + ; +in_opt: /* nothing */ + | IN + ; +in_of: + IN + | OF + ; +by_opt: /* nothing */ + | BY + ; +with_opt: + /* nothing */ + | WITH + ; +on_opt: + /* nothing */ + | ON + ; +gname_opt: + gname { $$ = $1; } + | /* nothing */ { $$ = NULL; } + ; +to_opt: /* nothing */ + | TO { } + ; +name_var_list: + name_var { $$ = gvar_list_append(NULL, $1, source_lineno); } + | name_var_list sep_opt name_var + { $$ = gvar_list_append($1, $3, source_lineno); } + ; +gname_list: + gname { $$ = gvar_list_append(NULL, $1, source_lineno); } + | gname_list sep_opt gname + { $$ = gvar_list_append($1, $3, source_lineno); } + ; +gname: name { + /*if (!is_variable($1)) { + yyerror("The symbol \"%s\" is not an allowed argument here", $1->name); + }*/ + $$ = $1; } + | gliteral { $$ = (struct sym *)$1;} + | FUNCTION LABELSTR '(' { + $2->type = 'f'; /* function type */ + $$=CALL; + } + intrinsic_parm_list ')' { + $$ = gen_intrinsic_call((struct sym *)$2); + } + | FUNCTION LABELSTR { + $2->type = 'f'; /* function type */ + $$=CALL; + $$ = gen_intrinsic_call((struct sym *)$2); + } + ; +name_or_lit: + name { $$ = $1; } + | literal { $$ = (struct sym *)$1; } + ; +noallname: + name { $$ = $1; } + | without_all_literal { $$ = (struct sym *)$1; } + ; +gliteral: + without_all_literal + | all_literal + ; +without_all_literal: + literal { $$=$1; } + | special_literal { $$=$1; } + ; +all_literal: + ALL literal { $2->all=1; $$=$2; } + | ALL special_literal { $$=$2; } + ; +special_literal: + SPACES { $$=spe_lit_SP; } + | ZERO { $$=spe_lit_ZE; } + | QUOTES { $$=spe_lit_QU; } + | HIGHVALUES { $$=spe_lit_HV; } + | LOWVALUES { $$=spe_lit_LV; } + ; +var_or_nliteral: + variable { $$ = $1; } + | nliteral { $$ = (struct sym *)$1; } + ; +nliteral: + signed_nliteral { save_literal($1,'9'); $1->all = 0; $$=$1; } + ; +literal: + signed_nliteral { save_literal($1,'9'); $1->all=0; $$=$1; } + | CLITERAL { save_literal($1,'X'); $1->all=0; $$=$1; } + ; +signed_nliteral: + NLITERAL { check_decimal_point($1); $$=$1; } + | '+' NLITERAL { check_decimal_point($2); $$=$2; } + | '-' NLITERAL + { + check_decimal_point($2); + invert_literal_sign( $2 ); + $$=$2; + } + ; +def_name_opt: + def_name { $$ = $1; } + | /* nothing */ { $$ = NULL; } + ; +def_name: + STRING + { + if ($1->defined) + yyerror("variable redefined, %s",$1->name); + $1->defined=1; + $$=$1; + } + | FILLER { $$=alloc_filler(); } + ; +variable_indexed: + SUBSCVAR + { + if ($1->occurs_flg == 0 && !in_occurs($1)) // walter + yyerror("\"%s\" is not an indexed variable ", $1->name); + $$=$1; + } + ; + +/*variable: + VARIABLE { $$=$1; } + | VARIABLE in_of subs_var { + struct sym *v; + v=lookup_variable($1,$3); + if ($$==NULL) + yyerror("\"%s\" is not child of \"%s\"",$1,$3); + if ($3->litflag==2) { + ((struct vref *)$3)->sym = v; + $$ = $3; + } + else { + $$ = v; + } + } + | LABELSTR { yyerror("%s is not a defined variable",$1->name); } + ; */ +filename: + literal { $$=(struct sym *)$1; } + | STRING {$$=$1; } + ; +data_name: + literal { $$=(struct sym *)$1; } + | STRING {$$=$1; } + ; +cond_name: + VARCOND '(' { curr_division = CDIV_SUBSCRIPTS; } + subscripts ')' { + curr_division = CDIV_PROC; + $$ = (struct sym *)create_subscripted_var( $1, $4 ); + /*check_subscripts($$);*/ + } + | VARCOND { $$=$1; } + ; +name: + variable '(' gname ':' gname_opt ')' { + $$=(struct sym *)create_refmoded_var($1, $3, $5); check_refmods((struct sym *)$$); + is_var=1; + } + | variable { is_var=1; } + | LABELSTR { yyerror("Invalid argument expecting variable"); is_var=2; } + ; +name_var: + gname { + if (!is_var) + yyerror("Invalid argument expecting variable"); + is_var=0; + } + ; +/*subs_var: + variable + | subscripted_variable + ; +subscripted_variable: + SUBSCVAR '(' { curr_division = CDIV_SUBSCRIPTS; } + subscripts ')' { + curr_division = CDIV_PROC; + $$ = (struct sym *)create_subscripted_var( $1, $4 ); + check_subscripts($$); + } + | SUBSCVAR in_of subs_var '(' { curr_division = CDIV_SUBSCRIPTS; } + subscripts ')' { + curr_division = CDIV_PROC; + $$ = (struct sym *)create_subscripted_var( + lookup_variable($1,$3), $6 ); + check_subscripts($$); + } + ; +*/ +variable: + qualified_var + { + $$=$1; + if (need_subscripts && $1->occurs_flg == 0) { +/* verify if the variable is present in the same area of occurs clause */ + if(!in_occurs($1)) { + yyerror("this variable \'%s\' must be subscripted or indexed", $1->name); + need_subscripts=0; + } + } + } + | qualified_var LPAR + { curr_division = CDIV_SUBSCRIPTS; } + subscripts ')' + { + curr_division = CDIV_PROC; + $$ = (struct sym *)create_subscripted_var( $1, $4 ); + check_subscripts($$); + } + ; +qualified_var: + unqualified_var + { + $$=$1; + if ($1->clone != 0) + yyerror("this variable \'%s\' must be qualified", $1->name); + } + | unqualified_var in_of qualified_var + { + $$=lookup_parent($1,$3); + if ($$ == NULL) { + yyerror("this variable \'%s\' is not defined in '%s'", $1->name, $3->name); + $$=$1; + } + } + ; +unqualified_var: + VARIABLE + { + if (($1->defined == 0) && ($1->type == 0)) + { + yyerror("Undefined variable \'%s\' found", $1->name); + } + $$=$1; + } + | SUBSCVAR { need_subscripts=1; $$=$1; } + ; +subscripts: + subscript { $$ = $1; } + | subscripts comma_opt subscript { $$ = add_subscript( $1, $3 ); } + ; +subscript: + gname { $$ = create_subscript( $1 ); } + | subscript '+' gname { $$ = add_subscript_item( $1, '+', $3 ); } + | subscript '-' gname { $$ = add_subscript_item( $1, '-', $3 ); } + ; +integer: + signed_nliteral + { + char *s; + $$=0; + s=$1->name; + while (isdigit(*s)) + $$ = $$ * 10 + *s++ - '0'; + if (*s) + yyerror("only integers accepted here"); + } + ; +label: + LABELSTR in_of LABELSTR + { + struct sym *lab=$1; + struct sym *sec=$3; + if (sec->defined == 0) { + sec->defined = 2; + sec->parent = NULL; + } else { + if ((sec=lookup_label($3,NULL))==NULL) { + sec = install($3->name,SYTB_LAB,2); + sec->defined=2; + sec->parent = NULL; + } + } + + if (lab->defined == 0) { + lab->defined = 2; + lab->parent = $3; + } else { + if ((lab=lookup_label($1,$3))==NULL) { + lab = install($1->name,SYTB_LAB,2); + lab->defined=2; + lab->parent = $3; + } + } + $$ = lab; + } + | LABELSTR + { + struct sym *lab=$1; + if (lab->defined == 0) { + lab->defined = 2; + lab->parent = curr_section; + } + else { + if ((lab=lookup_label(lab,curr_section))==NULL) { + lab = install($1->name,SYTB_LAB,2); + lab->defined=2; + lab->parent = curr_section; + } + } + $$ = lab; + } + | NLITERAL {$$=define_label((struct sym *)$1,1,NULL,0);} + | NLITERAL in_of NLITERAL {$$=define_label((struct sym *)$1,1,(struct sym *)$3,1);} + | NLITERAL in_of LABELSTR {$$=define_label((struct sym *)$1,1,$3,0);} + ; +anystring: + STRING + | LABELSTR + ; +%% + +/* +** Yacc auxiliary routines +*/ + +/* *********************************************** + * hterror is called where yyerror is normally * + * called within the parser, but it also passes* + * an error number and severity. The error * + * number identifies the longer description of * + * the error message in the compiler document- * + * ation. The severity is used to set the * + * return code that the compiler will return. * + ***********************************************/ +void hterror(int erno, int severity, char *s,...) +{ +HTG_temporary_error_code = erno; +HTG_temporary_severity = severity; + +yyerror(s); + +HTG_temporary_error_code = 256; +HTG_temporary_severity = 8; +return; +} + +void yywarn(char *s,...) +{ + va_list ap; + va_start (ap, s); + HTG_temporary_severity = 4; + yyerror(s, ap); + va_end(ap); + HTG_temporary_severity = 8; +} + + +extern FILE *o_lst; + +void yyerror(char *s,...) +{ + char buff1[BUFSIZ], buff2[BUFSIZ]; + const char *label; + va_list argptr; + int slen=0; + + /* Determine the type of the error */ + switch (HTG_temporary_severity) + { + case TCOB_SEVERITY_INFO: + label = "info: "; + break; + + case TCOB_SEVERITY_WARN: + label = "warning: "; + if (HTG_RETURN_CODE < 4) + HTG_RETURN_CODE = 4; + wrncnt++; + break; + + case TCOB_SEVERITY_ERROR: + label = "error: "; + if (HTG_RETURN_CODE < 8) + HTG_RETURN_CODE = 8; + errcnt++; + break; + + default: + label = "error: "; + if (HTG_RETURN_CODE < HTG_temporary_severity) + HTG_RETURN_CODE = HTG_temporary_severity; + errcnt++; + break; + } + /* Build the error message */ + va_start(argptr,s); + vsprintf (buff1, s, argptr); + va_end (argptr); + + /* Display the error */ + slen = strlen(yytext); + if (slen != 0) { + sprintf (buff2, "%s:%6d: %s%s, on or before \'%s\'\n", + source_filename, source_lineno, label, buff1, yytext); + } + else { + sprintf (buff2, "%s:%6d: %s%s\n", + source_filename, source_lineno, label, buff1); + } + fputs (buff2, stderr); + if (HTG_list_flag) + fputs (buff2, o_lst); + +} + +static void +assert_numeric_sy (struct sym *sy) +{ + if (!is_numeric_sy(sy)) + yyerror("invalid (non numeric) variable or literal \'%s\' used in arithmetic verb", sy->name); +} + +static void +assert_numeric_dest_sy (struct sym *sy) +{ + if (!is_numeric_dest_sy(sy)) + yyerror("invalid destination variable \'%s\' used in arithmetic verb", sy->name); +} diff --git a/compiler/htcobolrc b/compiler/htcobolrc new file mode 100644 index 0000000..b14cf39 --- /dev/null +++ b/compiler/htcobolrc @@ -0,0 +1,144 @@ +# TinyCOBOL resource file +# Set the default compiler options +# + +# COPYEXT: Specify copy file extension +# Obsolete - Use COPYBOOK_SUFFIXES +# +# Specify copybook file suffixes (extensions) used in search sequence +#COPYBOOK_SUFFIXES: .cpy:.CPY:.inc:.INC:.cob:.COB:.cbl:.CBL:: +#COPYBOOK_SUFFIXES: .cpy;.CPY;.inc;.INC;.cob;.COB;.cbl;.CBL;; +# COPYBOOK_SUFFIXES - not implemented + +# COPYLIBR - Specify location of copy files +# Obsolete - Use COPYBOOKS_PATH +# +# Specify copybook file locations paths used in search sequence +# (compiler default=NULL) +#COPYBOOK_PATH: /usr/local/share/htcobol/copybooks:: +#COPYBOOK_PATH: /usr/local/share/htcobol/copybooks;; +COPYBOOK_PATH: C:/TinyCOBOL/copys + +# Specify COBOL program file suffixes (extensions) used in search sequence +# (compiler default=.cob:.COB:.cbl:.CBL:) +#PGM_SUFFIXES: .cob:.COB:.cbl:.CBL: +PGM_SUFFIXES: .cob;.COB;.cbl;.CBL; + +# Specify COBOL program default input format +# free format -> PGM_FORMAT_FREE +# fixed format -> PGM_FORMAT_FIXED +# (compiler default=free format) +PGM_FORMAT_FREE +#PGM_FORMAT_FIXED + +# Specify the default main program (entry point) action +# +# auto - Use the first encountered 'STOP RUN' statement, +# and if found, generate a program entry point. +# +# first - Use the first encountered 'PROGRAM-ID' statement, +# and if found, generate a program entry point. +# +# none - Do not generate any program entry point. +# +PGM_ENTRY_POINT_AUTO +#PGM_ENTRY_POINT_NONE +#PGM_ENTRY_POINT_FIRST + +# Specify the compiler default action +# P - preprocess +# PC - preprocess,compile +# PCA - preprocess,compile,assemble +# PCAL - preprocess,compile,assemble,link to executable +# PCALX - preprocess,compile,assemble,link to executable +# PCALS - Preprocess, compile, assemble, link to static library +# PCALM - Preprocess, compile, assemble, link to shared library +# (compiler default=PCAL) +COMPILE_DEFAULT: PCAL +#COMPILE_DEFAULT: PCAS +#COMPILE_DEFAULT: PCAM +# + +# List contents of copybook files - not implemented +# COPYLIST=yes NOCOPYLIST=no +#COPYLIST +#NOCOPYLIST + +# Include source debugging lines +# DEBUG_LINES=yes NODEBUG_LINES=no +# (compiler default= NODEBUG_LINES) +NODEBUG_LINES +#DEBUG_LINES + +# Generate program listing +# LIST=yes NOLIST=no +# (compiler default=NOLIST) +#LIST +NOLIST +# +# Default program listing suffix +# (compiler default=.lis) +#PGMLIST_SUFFIX: .listing.txt +PGMLIST_SUFFIX: .lis + +# Generate symbolic cross-refrence listing +# XREF=yes NOXREF=no +# (compiler default=NOXREF) +XREF +#NOXREF + +# Set Assembler command name +# +ASX_CMD: as.exe +#ASX_CMD: as +#ASX_CMD: as + +# Set C compiler command name +# +CCX_CMD: gcc.exe +#CCX_CMD: gcc +#CCX_CMD: gcc + +# +# Set static library archiver command names +# +#ARX_CMD: ar.exe +ARX_CMD: ar +#ARX_CMD: ar +RANLIBX_CMD: ranlib.exe +#RANLIBX_CMD: ranlib +#RANLIBX_CMD: ranlib + +# +# Set shared library name default (prefix$suffix) +# +#SHLIB_NAME_DEFAULT: lib$.so +SHLIB_NAME_DEFAULT: $.dll + +# Library paths to pass to link step +# LD_PATH: +# +#LD_PATH: -L/usr/lib -L/opt/cobol/lib +#LD_PATH: -L/usr/lib +#LD_PATH: -L../../../lib -L../../lib +#LD_PATH: +LD_PATH: -LC:/TinyCOBOL + +# Libraries to pass to the link step +# LD_LIBS: Obsolete - Use variables below +# +LD_HT1_LIBS: -lhtcobol +#LD_HT2_LIBS: -lhtcobol2 +LD_MATH_LIBS: -lm +LD_READLINE_LIBS: -lreadline +LD_EXTRA_LIBS: +#LD_DCALL_LIBS: -ldl +LD_DCALL_LIBS: +#LD_DLOAD_LIBS: -lltdl +#LD_TERM_LIBS: -lncurses +LD_TERM_LIBS: -lcurses +LD_IO_LIBS: -ldb +# +#LD_FLAGS: +LD_FLAGS: -Wl,--enable-auto-import +# diff --git a/compiler/htcobolrc.in b/compiler/htcobolrc.in new file mode 100644 index 0000000..5e76f0f --- /dev/null +++ b/compiler/htcobolrc.in @@ -0,0 +1,146 @@ +# TinyCOBOL resource file +# Set the default compiler options +# + +# COPYEXT: Specify copy file extension +# Obsolete - Use COPYBOOK_SUFFIXES +# +# Specify copybook file suffixes (extensions) used in search sequence +#COPYBOOK_SUFFIXES: .cpy:.CPY:.inc:.INC:.cob:.COB:.cbl:.CBL:: +#COPYBOOK_SUFFIXES: .cpy;.CPY;.inc;.INC;.cob;.COB;.cbl;.CBL;; +# COPYBOOK_SUFFIXES - not implemented + +# COPYLIBR - Specify location of copy files +# Obsolete - Use COPYBOOKS_PATH +# +# Specify copybook file locations paths used in search sequence +# (compiler default=NULL) +#COPYBOOK_PATH: /usr/local/share/htcobol/copybooks:: +#COPYBOOK_PATH: /usr/local/share/htcobol/copybooks;; +#COPYBOOK_PATH: $GPFONTES + +# Specify COBOL program file suffixes (extensions) used in search sequence +# (compiler default=.cob:.COB:.cbl:.CBL:) +PGM_SUFFIXES: .cob:.COB:.cbl:.CBL: +#PGM_SUFFIXES: .cob;.COB;.cbl;.CBL; + +# Specify COBOL program default input format +# free format -> PGM_FORMAT_FREE +# fixed format -> PGM_FORMAT_FIXED +# (compiler default=free format) +#PGM_FORMAT_FREE +PGM_FORMAT_FIXED + +# Specify the default main program (entry point) action +# +# auto - Use the first encountered 'STOP RUN' statement, +# and if found, generate a program entry point. +# +# first - Use the first encountered 'PROGRAM-ID' statement, +# and if found, generate a program entry point. +# +# none - Do not generate any program entry point. +# +PGM_ENTRY_POINT_AUTO +#PGM_ENTRY_POINT_NONE +#PGM_ENTRY_POINT_FIRST + +# Specify the compiler default action +# P - preprocess +# PC - preprocess,compile +# PCA - preprocess,compile,assemble +# PCAL - preprocess,compile,assemble,link to executable +# PCAX - preprocess,compile,assemble,link to executable +# PCAS - Preprocess, compile, assemble, link to static library +# PCAM - Preprocess, compile, assemble, link to shared library +# (compiler default=PCAL) +COMPILE_DEFAULT: PCAL +#COMPILE_DEFAULT: PCAS +#COMPILE_DEFAULT: PCAM +# + + +# List contents of copybook files - not implemented +# COPYLIST=yes NOCOPYLIST=no +#COPYLIST +#NOCOPYLIST + +# Include source debugging lines +# DEBUG_LINES=yes NODEBUG_LINES=no +# (compiler default= NODEBUG_LINES) +NODEBUG_LINES +#DEBUG_LINES + +# Generate program listing +# LIST=yes NOLIST=no +# (compiler default=NOLIST) +#LIST +NOLIST +# +# Default program listing suffix +# (compiler default=.lis) +#PGMLIST_SUFFIX: .listing.txt +PGMLIST_SUFFIX: .lis + +# Generate symbolic cross-refrence listing +# XREF=yes NOXREF=no +# (compiler default=NOXREF) +XREF +#NOXREF + +# Set Assembler command name +# +#ASX_CMD: as.exe +ASX_CMD: as +#ASX_CMD: @asx_cmd@ + +# Set C compiler command name +# +#CCX_CMD: gcc.exe +CCX_CMD: gcc +#CCX_CMD: @ccx_cmd@ + +# +# Set static library archiver command names +# +#ARX_CMD: ar.exe +ARX_CMD: ar +#ARX_CMD: @arx_cmd@ +#RANLIBX_CMD: ranlib.exe +RANLIBX_CMD: ranlib +#RANLIBX_CMD: @ranlibx_cmd@ + +# +# Set shared library name default (prefix$suffix) +# +#SHLIB_NAME_DEFAULT: $.dll +SHLIB_NAME_DEFAULT: lib$.so + +# Library paths to pass to link step +# LD_PATH: +# +#LD_PATH: -L/usr/lib -L/opt/cobol/lib +#LD_PATH: -L/usr/lib +LD_PATH: -L../../../lib -L../../lib +#LD_PATH: + +# Libraries to pass to the link step +# LD_LIBS: Obsolete - Use variables below +# +LD_HT1_LIBS: -lhtcobol +#LD_HT2_LIBS: -lhtcobol2 +#LD_MATH_LIBS: -lm +LD_MATH_LIBS: @htg_ld_args_m@ +LD_READLINE_LIBS: -lreadline +LD_EXTRA_LIBS: -ldl +LD_DCALL_LIBS: -ldl +#LD_DLOAD_LIBS: -lltdl +#LD_DLOAD_LIBS: @htg_ld_args_ltdl@ +LD_TERM_LIBS: -lncurses +#LD_TERM_LIBS: -lpdcurses +#LD_IO_LIBS: -ldb +LD_IO_LIBS: @htg_ld_args_db@ +# +LD_FLAGS: +#LD_FLAGS: -Wl,--enable-auto-import +# diff --git a/compiler/htcobolrc.mingw b/compiler/htcobolrc.mingw new file mode 100644 index 0000000..b14cf39 --- /dev/null +++ b/compiler/htcobolrc.mingw @@ -0,0 +1,144 @@ +# TinyCOBOL resource file +# Set the default compiler options +# + +# COPYEXT: Specify copy file extension +# Obsolete - Use COPYBOOK_SUFFIXES +# +# Specify copybook file suffixes (extensions) used in search sequence +#COPYBOOK_SUFFIXES: .cpy:.CPY:.inc:.INC:.cob:.COB:.cbl:.CBL:: +#COPYBOOK_SUFFIXES: .cpy;.CPY;.inc;.INC;.cob;.COB;.cbl;.CBL;; +# COPYBOOK_SUFFIXES - not implemented + +# COPYLIBR - Specify location of copy files +# Obsolete - Use COPYBOOKS_PATH +# +# Specify copybook file locations paths used in search sequence +# (compiler default=NULL) +#COPYBOOK_PATH: /usr/local/share/htcobol/copybooks:: +#COPYBOOK_PATH: /usr/local/share/htcobol/copybooks;; +COPYBOOK_PATH: C:/TinyCOBOL/copys + +# Specify COBOL program file suffixes (extensions) used in search sequence +# (compiler default=.cob:.COB:.cbl:.CBL:) +#PGM_SUFFIXES: .cob:.COB:.cbl:.CBL: +PGM_SUFFIXES: .cob;.COB;.cbl;.CBL; + +# Specify COBOL program default input format +# free format -> PGM_FORMAT_FREE +# fixed format -> PGM_FORMAT_FIXED +# (compiler default=free format) +PGM_FORMAT_FREE +#PGM_FORMAT_FIXED + +# Specify the default main program (entry point) action +# +# auto - Use the first encountered 'STOP RUN' statement, +# and if found, generate a program entry point. +# +# first - Use the first encountered 'PROGRAM-ID' statement, +# and if found, generate a program entry point. +# +# none - Do not generate any program entry point. +# +PGM_ENTRY_POINT_AUTO +#PGM_ENTRY_POINT_NONE +#PGM_ENTRY_POINT_FIRST + +# Specify the compiler default action +# P - preprocess +# PC - preprocess,compile +# PCA - preprocess,compile,assemble +# PCAL - preprocess,compile,assemble,link to executable +# PCALX - preprocess,compile,assemble,link to executable +# PCALS - Preprocess, compile, assemble, link to static library +# PCALM - Preprocess, compile, assemble, link to shared library +# (compiler default=PCAL) +COMPILE_DEFAULT: PCAL +#COMPILE_DEFAULT: PCAS +#COMPILE_DEFAULT: PCAM +# + +# List contents of copybook files - not implemented +# COPYLIST=yes NOCOPYLIST=no +#COPYLIST +#NOCOPYLIST + +# Include source debugging lines +# DEBUG_LINES=yes NODEBUG_LINES=no +# (compiler default= NODEBUG_LINES) +NODEBUG_LINES +#DEBUG_LINES + +# Generate program listing +# LIST=yes NOLIST=no +# (compiler default=NOLIST) +#LIST +NOLIST +# +# Default program listing suffix +# (compiler default=.lis) +#PGMLIST_SUFFIX: .listing.txt +PGMLIST_SUFFIX: .lis + +# Generate symbolic cross-refrence listing +# XREF=yes NOXREF=no +# (compiler default=NOXREF) +XREF +#NOXREF + +# Set Assembler command name +# +ASX_CMD: as.exe +#ASX_CMD: as +#ASX_CMD: as + +# Set C compiler command name +# +CCX_CMD: gcc.exe +#CCX_CMD: gcc +#CCX_CMD: gcc + +# +# Set static library archiver command names +# +#ARX_CMD: ar.exe +ARX_CMD: ar +#ARX_CMD: ar +RANLIBX_CMD: ranlib.exe +#RANLIBX_CMD: ranlib +#RANLIBX_CMD: ranlib + +# +# Set shared library name default (prefix$suffix) +# +#SHLIB_NAME_DEFAULT: lib$.so +SHLIB_NAME_DEFAULT: $.dll + +# Library paths to pass to link step +# LD_PATH: +# +#LD_PATH: -L/usr/lib -L/opt/cobol/lib +#LD_PATH: -L/usr/lib +#LD_PATH: -L../../../lib -L../../lib +#LD_PATH: +LD_PATH: -LC:/TinyCOBOL + +# Libraries to pass to the link step +# LD_LIBS: Obsolete - Use variables below +# +LD_HT1_LIBS: -lhtcobol +#LD_HT2_LIBS: -lhtcobol2 +LD_MATH_LIBS: -lm +LD_READLINE_LIBS: -lreadline +LD_EXTRA_LIBS: +#LD_DCALL_LIBS: -ldl +LD_DCALL_LIBS: +#LD_DLOAD_LIBS: -lltdl +#LD_TERM_LIBS: -lncurses +LD_TERM_LIBS: -lcurses +LD_IO_LIBS: -ldb +# +#LD_FLAGS: +LD_FLAGS: -Wl,--enable-auto-import +# diff --git a/compiler/htcoboly.h b/compiler/htcoboly.h new file mode 100644 index 0000000..da2a0d6 --- /dev/null +++ b/compiler/htcoboly.h @@ -0,0 +1,987 @@ +/* + * Copyright (C) 1999-2003 Rildo Pragana, Jim Noeth, + * David Essex, Glen Colbert. + * Copyright (C) 1993,1991 Rildo Pragana. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA + */ + +#ifndef __HTCOBOL_H +#define __HTCOBOL_H + +#include +#include +#include +#include +#include + + +#define organization decimals +#define fdesc location +#define direction access_mode +#define call_mode access_mode +#define sort_data value2 +#define record pic +#define recordsym redefines +#define filenamevar son +#define alternate brother +#define scrinfo index +#define rec_varying picstr +#define sort_file sign + +/* current division (cobol source) */ +#define CDIV_IDENT 1 +#define CDIV_ENVIR 2 +#define CDIV_DATA 3 +#define CDIV_PROC 4 +#define CDIV_COMMENT 5 +#define CDIV_FD 6 +#define CDIV_REDEF 7 +#define CDIV_SUBSCRIPTS 8 +#define CDIV_COPY 9 +#define CDIV_COPYFILE 10 +#define CDIV_EXCEPTION 11 +#define CDIV_PIC 12 +#define CINITIAL 15 +#define CDIV_COMMENT1 16 + +/* symbol table selector */ +#define SYTB_LIT 1 +#define SYTB_VAR 2 +#define SYTB_LAB 3 + +/* set operations */ +#define SET_TO 1 +#define SET_UP_BY 2 +#define SET_DOWN_BY 3 + +/* call modes */ +#define CM_REF 1 +#define CM_VAL 2 +#define CM_CONT 3 +#define CM_DESC 4 +#define CM_CHAIN 5 + +/* asm sections or pseudo-sections */ +#define SEC_CODE 1 +#define SEC_CONST 2 +#define SEC_DATA 3 +#define SEC_STACK 4 +#define SEC_ARGS 5 +#define SEC_TEMPS 6 +#define SEC_WORKING SEC_DATA +#define SEC_RETURN_CODE SEC_DATA +#define SEC_FIRST_NAMED 7 + +/* selection subject types (evaluate statement) */ +#define SSUBJ_FALSE 0 +#define SSUBJ_TRUE 1 +#define SSUBJ_EXPR 2 +#define SSUBJ_COND 3 +#define SSUBJ_STR 4 + +/* selection object types (evaluate statement) */ +#define SOBJ_FALSE 0 +#define SOBJ_TRUE 1 +#define SOBJ_ANY 2 +#define SOBJ_EXPR 3 +#define SOBJ_NEGEXPR 4 +#define SOBJ_RANGE 5 +#define SOBJ_NEGRANGE 6 +#define SOBJ_COND 7 +#define SOBJ_NEGCOND 8 +#define SOBJ_NEGSTR 9 +#define SOBJ_STR 10 + +#define FLD_DESC_SIZE0 8 +#define FLD_DESC_SIZE1 FLD_DESC_SIZE0 + 4 +#define CFLD_DESC_SIZE0 12 +#define CFLD_DESC_SIZE1 CFLD_DESC_SIZE0 + 8 + +/* math verb options */ +#define MATH_OPT_ON_SIZE_ERROR 2 + +/* Severity codes dor hterror & yyerror */ +#define TCOB_SEVERITY_INFO 0 +#define TCOB_SEVERITY_WARN 4 +#define TCOB_SEVERITY_ERROR 8 + +/* + * expression nodes + */ +struct expr { + char litflag; /* 5 for expr */ + char op; + struct expr *left; + struct expr *right; +}; + +/* + * Storage for subscripted variable references. + * First node is the variable, other are subscripts as + * variable/literals with operations. + * For instance: VAR ( SUB1 - 5, SUB2 + 3 ) is represented as + * 5 nodes: (sy,op) = (VAR,0) (SUB1,'-') (5,',') (SUB2,'+') (3,',') + * where the numbers are (struct lit *) pointers and the variables + * are (struct sym *) pointers. + */ +struct vref { + char litflag; /* ',' = end of subscript, + '+','-' = subscript arith */ + struct vref *next; /* link to next in list or NULL */ + void *sym; /* variable/literal at this node */ +}; + +/* Node for refmod's */ +struct refmod { + char litflag; /* 4 = refmod */ + struct sym *off; /* offset from normal start address */ + struct sym *sym; /* pointer to original var: must be at the same relative offset as sym in vref */ + struct sym *len; /* corrected length */ + short slot; /* slot in the data section */ +}; + +/* + * compile-time list for value ranges of 88-level variables. + * the first range is stored at the "struct sym", with sym->vr + * being a pointer to the remaining "struct vrange" nodes. + */ +struct vrange { + struct vrange *next; /* pointer to next range of values (88 var) */ + struct lit *value; /* pointer to literal with initial value */ + struct lit *value2; /* pointer to first/next key (sort files) */ +}; + +/* + * Node for external data (named sections). + */ +struct named_sect { + struct named_sect *next; /* pointer to next named section */ + short sec_no; /* key: section id */ + char *os_name; /* name of 01 or 77 data as known by OS */ +}; + +struct lit { + char litflag; /* 1 for literals */ + struct lit *next; /* next in literals list */ + char *name; /* name (value) of literal */ + char type; + int decimals; + unsigned location; /* data area for literal @lit+n */ + unsigned descriptor; /* descriptor @lit+n */ + short sec_no; /* asm section number */ + unsigned char all; + char *nick; + int access_mode; /* ie call_mode */ + int len; /* length of (possibly including NULLs) string */ +}; +/* note: "sym" and "lit" must share the same structure */ + +struct sym { + char litflag; /* 1 for literals, 2 for variables */ + struct sym *next; /* pointer to next symbol with same hash */ + char *name; /* symbol (variable) name */ + char type; /* label or elementary item or group item + 9,A,X,B,C=elem; + G=group; + F=file; + R=record; + S=screen */ + int decimals; /* decimal places + or organization (files ) */ + unsigned location; /* offset of variable in stack area */ + /* or offset file descriptor in data area */ + unsigned descriptor; /* field descriptor offset in data seg */ + /* or index field descriptor (files) */ + short sec_no; /* asm section number */ + struct sym *clone; /* NULL if this symbol is unique + otherwise, it must be further qualified */ + int times; /* occurs times */ + char *picstr; /* pointer to picture string saved or + pointer to rec_varying (files) */ + struct sym *parent; /* pointer to parent node (level) + pointer to STATUS var (files) */ + struct sym *son; /* used in field hierarchy + for files this is the assign + variable (filename) */ + struct sym *brother; /* field variable at the same level or + alternate key list pointer (for indexed files) */ + struct sym *ix_desc; /* key variable (in file descriptor) + pointer to fdesc (in record) */ + struct scr_info *scr; /* screen info in screen items */ + struct report_info *ri; /* report info in report items */ + struct lit *value; /* pointer to literal with initial value */ + struct lit *value2; /* pointer to first/next key (sort files) */ + union { + struct vrange *vr; /* pointer to next range of values (88 var) */ + struct refmod *rfm; /* offset and length of refmod */ + struct sym *declarative;/* declarative section */ + } refmod_redef; + int level; /* level of field + or ASSIGN TO DISK/PRINTER (files) */ + int access_mode; /* access mode (files) */ + /* or direction (sort files data ) or call_mode for variables */ + int sign; /* sign type (0=no sign,1=trailing) or sort file */ + int len; /* length of item */ + char defined; /* first time defined? */ + unsigned pic; /* picture offset in data segment */ + /* or record offset in stack (files) */ + int occurs_flg; + int linkage_flg; + struct sym *redefines; /* points to a redefined field + or record symbol (files) */ + struct { + unsigned int just_r:1; + unsigned int is_pointer:1; + unsigned int blank:1; + unsigned int spec_value:1; + unsigned int value:1; + unsigned int sync:1; + unsigned int in_redefinition:1; + unsigned int separate_sign:1; + unsigned int leading_sign:1; + unsigned int optional:1; + unsigned int external:1; + unsigned int reserved:5; + }flags; + unsigned char slack; /* slack bytes inserted */ + struct xref { /* xrefrence line number structure */ + unsigned short size; /* array size */ + unsigned short pos; /* current free array position */ + unsigned int *lineno; /* line numbers array */ + }xrefs; + struct occurs *occurs; /* for DEPENDING ON or null if fixed table */ + char pscale; /* number of 'P's in picture */ + char stype; /* subtype for type 'B': 5, X, B */ +}; + +/* this (struct rd) is aliased with (struct sym), so tail data is garbage! */ +struct rd { + char litflag; + struct rd *next; + char *name; + char type; /* 'W' for report (RD) */ + struct sym *file; /* file for writing this report */ + struct list *controls; /* list of controls (listing breaks) */ + struct list *items; /* list of all report items */ + int page_limit; + int heading; + int footing; + int first_detail; + int last_detail; +}; + +/* additional information for report items */ +struct report_info { + int line; + int line_offset; /* PLUS given */ + int column; + int value_source; /* SUM, SOURCE (from a variable), literal */ + /* the actual source symbol is in (struct sym *)->value */ +}; + +/* varying record range and actual size */ +struct rec_varying { + struct lit *lmin; + struct lit *lmax; + struct sym *reclen; +}; + +/* selection subject set (evaluate statement) */ +struct selsubject { + struct selsubject *next; + struct sym *var; /* non-numeric variables */ + int type; +}; + +/* sort file list for using/giving clauses*/ +struct sortfile_node { + struct sortfile_node *next; + struct sym *sy; +}; + +/* information required by the 'perform ... varying ... after' statements */ +struct perf_info { + struct sym *pname1; /* symbol name */ + struct sym *pname2; /* symbol name */ + unsigned long ljmp; /* jump label */ + unsigned long lend; /* end label */ +}; + +struct perform_info { + struct perf_info *pf[6]; +}; + +/* information required by the math verbs statements */ +struct math_var { + struct sym *sname; /* symbol name */ +/* unsigned int rounded; rounded option: 0=false, 1=true */ + unsigned int opts; /* options: 0=none, 1=rounded, 2=on_size_error, 3=both */ + struct math_var *next; +}; + +/* information required by the math ON SIZE ERROR statement */ +struct math_ose { + unsigned long ose; /* 1=on_size, 2=not_on_size, 3=both */ + unsigned long lbl1; /* call label name 1 - on_size */ + unsigned long lbl2; /* call label name 2 - not_on_size */ + unsigned long lbl4; /* bypass label name */ +}; + +/* generic information container used by the [NOT] AT END cluases */ +struct ginfo { + unsigned long sel; /* 1=true, 2=not true, 3=both */ + unsigned long lbl1; /* call label name 1 - true */ + unsigned long lbl2; /* call label name 2 - not true */ + unsigned long lbl3; /* retrun 1 label name */ + unsigned long lbl4; /* retrun 2 label name */ + unsigned long lbl5; /* test bypass label name */ +}; + +/* information required by [NOT] INVALID KEY clauses */ +struct invalid_key_element { + unsigned long lbl1; /* skip label */ + unsigned long lbl2; /* start label */ + unsigned long lbl3; /* finish label */ +}; + +struct invalid_keys { + struct invalid_key_element *invalid_key; + struct invalid_key_element *not_invalid_key; +}; + +/******* supplemental information for screen items **********/ +/* this is linked at the sym->index (aliased scrinfo) */ +struct scr_info { + int attr; + int line; + int column; + struct sym *foreground; + struct sym *background; + struct sym *from; + struct sym *to; + int label; + struct sym *line_var; + struct sym *column_var; + short int line_sign; + short int column_sign; + struct sym *foreground_var; + struct sym *background_var; + struct sym *color; + struct sym *size; +}; + +struct converting_struct { + struct sym *fromvar; + struct sym *tovar; + struct inspect_before_after *before_after; +}; + +struct tallying_list { + struct tallying_list *next; + struct tallying_for_list *tflist; + struct sym *count; +}; + +struct tallying_for_list { + struct tallying_for_list *next; + int options; + struct sym *forvar; + struct inspect_before_after *before_after; +}; + +struct replacing_list { + struct replacing_list *next; + int options; + struct sym *byvar; + struct replacing_by_list *replbylist; + struct inspect_before_after *before_after; +}; + +struct replacing_by_list { + struct replacing_by_list *next; + struct sym *replvar; + struct sym *byvar; + struct inspect_before_after *before_after; +}; + +struct inspect_before_after { + struct sym *before; + struct sym *after; +}; + + +struct alternate_list { + struct alternate_list *next; + struct sym *key; + int duplicates; +}; + +struct unstring_delimited { + struct unstring_delimited *next; + short int all; + struct sym *var; +}; + +struct unstring_destinations { + struct unstring_destinations *next; + struct sym *var; + struct sym *delim; + struct sym *count; +}; + +struct string_from { + struct string_from *next; + struct sym *var; + struct sym *delim; +}; + +struct parm_list { + struct parm_list *next; + void *var; + unsigned location; + short sec_no; +}; + +struct coord_pair { + int lin; + int col; +}; + +struct index_to_table_list { + struct index_to_table_list *next; + char *idxname; + char *tablename; + char *keyname; + char seq; /* '0' = none, '1' = ASCENDING, '2' = DESCENDING */ +}; + +union label_def { + struct { + unsigned n:15; + unsigned defined:1; + unsigned off; + }l; + unsigned long x; +}; + +struct condition { + struct sym *sy; /* implied first operand */ + int oper; /* operator */ +}; + +struct init_str { /* structure to hold initialization sequence */ + struct sym *sy; /* pointer on symbol */ + char type; /* type of symbol */ + int len; /* size of symbol */ + unsigned location; /* location of occurence of symbol */ + struct lit *value; /* original value of symbol */ +}; +struct init_str_tab { + struct init_str ent[1]; +}; + +struct list { + struct list *next; + void *var; +}; + +/* Generic variable list for literals, identifiers */ +struct gvar_list { + union gvar { + struct gvar_list *gvar; + struct sym *sym; /* name variable */ + void *var; + }u; + unsigned int attribute; /* attribute */ + struct gvar_list *next; +}; + +/* OCCURS ... DEPENDING ON info */ +struct occurs { + struct sym *depend; + int min,max; +}; + +/* standard field classes */ +#define CLASS_NUMERIC 0 +#define CLASS_ALPHABETIC 1 +#define CLASS_ALPHABETIC_LOWER 2 +#define CLASS_ALPHABETIC_UPPER 3 + +/* extended condition flags */ +#define COND_UNARY 0x10 +#define COND_CLASS 0x20 + +/* minor token numbers */ + +/* USAGETOK - USAGENUM */ + +#define USAGE_COMP 0 +#define USAGE_COMP1 1 +#define USAGE_COMP2 2 +#define USAGE_COMP3 3 +#define USAGE_INDEX 4 +#define USAGE_BINARY_CHAR 5 +#define USAGE_BINARY_SHORT 6 +#define USAGE_BINARY_LONG 7 +#define USAGE_BINARY_DOUBLE 8 +#define USAGE_DISPLAY 9 +#define USAGE_POINTER 10 +#define USAGE_COMP5 11 +#define USAGE_COMPX 12 + +/* DISPLAY e' um token independente deste grupo */ + +/* DATE-TIME */ +#define DATE 0 +#define TIME 1 +#define DAY 2 +#define DAY_OF_WEEK 3 + +/* OPENMD */ +/* +#define INPUT 1 +#define I_O 2 +#define OUTPUT 3 +#define EXTEND 4 +*/ +/* ZERONUM */ +/* +#define ZERO 0 +#define ZEROS 1 +#define ZEROES 2 +*/ +/* DIVISNUM */ +/* +#define IDENTIFICATION 0 +#define ENVIRONMENT 1 +#define DATA 2 +#define PROCEDURE 3 +*/ +/* CONDITIONAL */ + +#define EQUAL 1 +#define LESS 2 +#define GREATER 4 +#define GEQ 5 +#define LEQ 3 +#define NEQ 6 + +/* COMMENTING */ +/* +#define SOURCE_COMPUTER 1 +#define OBJECT_COMPUTER 2 +#define AUTHOR 3 +#define DATE_WRITTEN 4 +#define DATE_COMPILED 5 +#define INSTALLATION 6 +#define SECURITY 7 +*/ + +/* DIRECTION */ + +#define ASCENDING 1 +#define DESCENDING 2 + +/* SPECIAL VARIABLES */ + +#define SVAR_RETURN_CODE "RETURN-CODE" + +/* htcobgen.c */ +extern int hash(char *s); +extern char *savename(char *s); +extern char *upcase(char *s, char *buf); +extern void update_xreflist(struct sym *as); +extern struct sym *lookup(char *s, int tab); +extern struct sym *install(char *name, int tab, int cloning); +extern struct lit *install_lit(char *name, int length, int all); +extern struct sym *lookup_label(struct sym *sy, struct sym *parent); +extern struct sym *lookup_variable(struct sym *sy, struct sym *parent); +extern struct sym *lookup_parent(struct sym *sy, struct sym *parent); +extern struct sym *lookup_for_redefines(struct sym *sy); +extern void clear_symtab(void); +extern void clear_offsets(void); +extern char sign_to_char(int digit); +extern void invert_literal_sign(struct lit *sy); +extern void check_decimal_point(struct lit *lit); +extern char *sch_convert(char *s); +extern int is_variable(struct sym *sy); +extern int is_subscripted(struct sym *sy); +extern void emit_lit(char *s, int len); +extern void emit_lit_fill(int c, int len); +extern void gen_init_value(struct lit *sy, int var_len); +extern void stabs_line(void); +extern void stabs_block(int end); +extern int gen_main_rtn(void); +extern int pgm_header(char *id); +extern void data_trail(void); +extern int adjust_linkage_vars(int start_offset); +extern void do_init_val(void); +extern void proc_header(int using); +extern void proc_trail(int using); +extern void dump_working(void); +extern void save_field_in_list(struct sym *sy); +extern void save_literal(struct lit *v, int type); +extern void save_named_sect(struct sym *sy); +extern struct lit *save_special_literal(char val, char picc, char *nick); +extern void define_switch_field(struct sym *sy, struct sym *sy2); +extern struct lit *define_num_lit(int value); +extern void save_switch_value(struct sym *sy, int value); +extern void put_disp_list(struct sym *sy); +extern char *memref(struct sym *sy); +extern char *memrefat(struct sym *sy); +extern char *memrefd(struct sym *sy); +extern void push_immed(int i); +extern void push_eax(void); +extern void push_edx(void); +extern void pop_eax(void); +extern void push_ebx(void); +extern void push_at_ebx(struct sym *sy); +extern void push_at_eax(struct sym *sy); +extern void load_at_eax(struct sym *sy); +extern void cleanup_rt_stack(void); +extern void asm_call(char *s); +extern void asm_call1(char *s); +extern void emt_cobrtl_call(char *s, char *prefix); +extern int pic_digits(struct sym *sy, char target); +extern int get_max_edt_len(struct sym *sy); +extern int query_comp_len(struct sym *sy); +extern int symlen(struct sym *sy); +extern int sym_min_pic(struct sym *sy); +extern int varsize_ch(struct sym *sy); +extern void gen_call_scr_process(struct sym *sy); +extern void add_alternate_key(struct sym *sy, int duplicates); +extern struct list *insert_list(struct list *l, void *item); +extern void free_list(struct list *l); +extern void mark_decl_list(struct list *l); +extern struct scr_info *alloc_scr_info(void); +extern struct inspect_before_after *alloc_inspect_before_after(struct inspect_before_after *ba, int before_after, struct sym *var); +extern struct converting_struct *alloc_converting_struct(struct sym *fromvar, struct sym *tovar, struct inspect_before_after *ba); +extern struct tallying_list *alloc_tallying_list(struct tallying_list *tl, struct sym *count, struct tallying_for_list *tfl); +extern struct tallying_for_list *alloc_tallying_for_list(struct tallying_for_list *tfl, int options, struct sym *forvar, struct inspect_before_after *ba); +extern struct replacing_list *alloc_replacing_list(struct replacing_list *rl, int options, struct replacing_by_list *rbl, struct sym *byvar, struct inspect_before_after *ba); +extern struct replacing_by_list *alloc_replacing_by_list(struct replacing_by_list *rbl, struct sym *replvar, struct sym *byvar, struct inspect_before_after *ba); +extern struct unstring_delimited *alloc_unstring_delimited(short int all, struct sym *var); +extern struct unstring_destinations *alloc_unstring_dest(struct sym *var, struct sym *delim, struct sym *count); +extern struct string_from *alloc_string_from(struct sym *var, struct sym *delim); +extern void gen_unstring(struct sym *var, struct unstring_delimited *delim, struct unstring_destinations *dest, struct sym *ptr, struct sym *tally); +extern void gen_stringcmd(struct string_from *sf, struct sym *sy, struct sym *ptr); +/*walter acrescentei color*/ +extern void gen_display_screen(int nl, int color); +extern void gen_display_line(int dupon, int nl, int color); +extern void gen_gotoxy_expr(void); +/*walter acrescentei color*/ +extern void gen_accept(struct sym *sy, int echo, int main, int color); +extern void gen_accept_from_chron(struct sym *sy, int date_fmt, int is_yyyy); +extern void gen_accept_from_inkey(struct sym *sy); +extern void gen_accept_from_cmdline(struct sym *sy); +/* walter */ +extern void gen_accept_from_escapekey(struct sym *sy); +extern void gen_accept_env_var(struct sym *sy, struct lit *v); +extern struct perf_info *create_perf_info(struct sym *sy1, struct sym *sy2, unsigned long lj, unsigned long le); +extern struct perform_info *create_perform_info(void); +extern char *check_perform_variables(struct sym *sy1, struct perform_info *pi1); +extern struct expr *create_expr(char op, struct expr *left, struct expr *right); +extern void free_expr(struct expr *e); +extern void free_expr_list(void); +extern struct math_var *create_mathvar_info(struct math_var *mv, struct sym *sy, unsigned int opt); +extern void delete_mathvar_info(struct math_var *mv); +extern struct math_ose *math_on_size_error0(void); +extern struct math_ose *math_on_size_error1(struct math_ose *v); +extern void math_on_size_error2(struct math_ose *v); +extern void math_on_size_error3(struct math_ose *v); +extern struct math_ose *math_on_size_error4(struct math_ose *v, unsigned long ty); +extern void math_on_size_error5(struct math_ose *v); +extern void gen_add(struct sym *s1, struct sym *s2, int rnd); +extern void gen_subtract(struct sym *s1, struct sym *s2, int rnd); +extern void gen_multiply(struct sym *s1, struct sym *s2, struct sym *s3, int rnd); +extern void gen_compute1(struct math_var *vl1, struct sym *sy1); +extern void gen_compute2(struct math_var *vl1, struct sym *sy1, struct math_ose *v1); +extern void gen_add1(struct math_var *vl0, struct math_var *vl2, struct math_ose *v1); +extern void gen_add2(struct math_var *vl1, struct math_var *vl2, struct sym *sy1, struct math_ose *v1); +extern void gen_add3(struct math_var *vl1, struct math_var *vl2, struct math_ose *v1); +extern void gen_subtract1(struct math_var *vl0, struct math_var *vl2, struct math_ose *v1); +extern void gen_subtract2(struct math_var *vl1, struct math_var *vl2, struct sym *sy1, struct math_ose *v1); +extern void gen_subtract3(struct math_var *vl1, struct math_var *vl2, struct math_ose *v1); +extern void gen_multiply1(struct math_var *vl1, struct sym *sy1, struct math_ose *v1); +extern void gen_multiply2(struct math_var *vl1, struct sym *sy1, struct sym *sy2, struct math_ose *v1); +extern void gen_divide1(struct math_var *vl1, struct sym *sy1, struct math_ose *v1); +extern void gen_divide2(struct math_var *vl1, struct sym *sy1, struct sym *sy2, struct math_ose *v1); +extern void gen_divide4(struct sym *s1, struct sym *s2, struct sym *s3, struct sym *s4, int rnd, struct math_ose *v1); +extern struct vref *create_subscripted_var(struct sym *sy, struct vref *subs); +extern struct vref *create_subscript(struct sym *sy); +extern struct vref *add_subscript_item(struct vref *subs, char op, struct sym *item); +extern struct vref *add_subscript(struct vref *ref, struct vref *subs); +extern int check_subscripts(struct sym *subs); +extern void create_occurs_info(int min, int max, struct sym *depend); +extern struct refmod *create_refmoded_var(struct sym *sy, struct sym *syoff, struct sym *sylen); +extern int check_refmods(struct sym *var); +extern void gen_subscripted(struct vref *subs); +extern struct sym *get_variable_item(struct sym *sy); +extern void gen_temp_storage(int size); +extern void adjust_desc_length(struct sym *sy); +extern void value_to_eax(struct sym *sy); +extern void load_address(struct sym *var); +extern void load_location(struct sym *var, char *cpureg); +extern void loadloc_to_eax(struct sym *sy_p); +extern void gen_loadloc(struct sym *sy_p); +extern void set_ptr(struct sym *sy); +extern void gen_loaddesc1(struct sym *sy, int variable_length); +extern void gen_loaddesc(struct sym *sy); +extern void gen_loadvar(struct sym *sy); +extern void gen_loadval(struct sym *sy); +extern void gen_pushval(struct sym *sy); +extern void gen_store_fnres(struct sym *sy); +extern int is_numeric_sy(struct sym *sy); +extern int is_numeric_dest_sy(struct sym *sy); +extern void gen_class_check(struct sym *sy, int class); +extern void gen_inspect(struct sym *var, void *list, int operation); +extern void gen_tcob_proto1(struct sym *sy); +extern void gen_tcob_proto2(struct sym *sy1, struct sym *sy2); +extern void gen_move(struct sym *sy_src, struct sym *sy_dst); +extern void gen_moves(struct sym *sy_src, struct gvar_list *gsylst); +extern struct gvar_list *gvar_list_append(struct gvar_list *l, struct sym *item, int linenum); +extern void gen_save_chainings(struct gvar_list *gsylst); +extern void gen_save_chaining(struct sym *sy); +extern void gen_save_usings(struct gvar_list *gsylst); +extern void gen_initialize(struct sym *sy_start, int from_initializes); // walter 13-12-05 +extern void gen_initializes(struct gvar_list *gsylst); +extern struct gvar_list *sort_key_list_create (struct gvar_list *item, int atrbt); +extern struct gvar_list *sort_keys_list_append (struct gvar_list *l, struct gvar_list *item); +extern void gen_movelength(struct sym *sy1, struct sym *sy2); +extern void gen_move_init(struct sym *sy_src, struct sym *sy_dst); +extern void init_field_val(struct sym *sy); +extern int check_fields(struct sym *sy); +extern void def_field_storage(struct sym *sy, int fld_len); +extern struct sym *define_label(struct sym *sy, int lab_type, struct sym + *parent, int parent_type); +extern void gen_movecorr(struct sym *sy1, struct sym *sy2); +extern void gen_addcorr(struct sym *sy1, struct sym *sy2, int rnd); +extern void gen_addcorr1(struct math_var *mv1, struct math_var *mv2, int rnd, struct math_ose *v1); +extern void gen_subtractcorr(struct sym *sy1, struct sym *sy2, int rnd); +extern void gen_subtractcorr1(struct math_var *mv1, struct math_var *mv2, int rnd, struct math_ose *v1); +extern void gen_set_complex( struct sym *idx, int which, struct sym * var); +extern void gen_set(struct sym *idx, int which, struct sym *var, int adrof_idx, int adrof_var); +extern int gen_evaluate_start(void); +extern int subject_set_size(struct selsubject *ssbj); +extern int selection_object_size(int type); +extern int push_selection_subject_copy(int level, struct selsubject *ssbj, int stkadd, int objtype); +extern int selection_subject_type(int level, struct selsubject *ssbj); +extern void gen_when_check(int level, struct selsubject *ssbj, int type, int endcase, struct sym *var); +extern void gen_bypass_when_case(int bypass); +extern int gen_end_when(int n, int endcase, int sentence); +extern void push_condition(void); +extern void gen_goto_depending(struct list *l, struct sym *sy); +extern void gen_goto(struct list *l); +extern int gen_check_zero(void); +extern unsigned long gen_at_end(int status); +extern unsigned long gen_testif(void); +extern void gen_not(void); +extern unsigned long gen_andstart(void); +extern unsigned long gen_orstart(void); +extern void gen_dstlabel(unsigned long lbl); +extern unsigned long gen_passlabel(void); +extern unsigned long gen_marklabel(void); +extern void gen_jmplabel(unsigned long lbl); +extern void gen_push_int(struct sym *sy); +extern void gen_perform_test_counter(unsigned long lbl); +extern void gen_perform_times(unsigned long lbl); +extern void gen_perform_thru(struct sym *s1, struct sym *s2); +extern void gen_perform(struct sym *sy); +extern void set_usage(struct sym *sy, int usage); +extern void gen_picture(void); +extern int save_pic_char(char c, int i); +extern void gen_SearchLoopCheck(unsigned long lbl5, struct sym *syidx, struct sym *sytbl); +extern void gen_SearchAllLoopCheck(unsigned long lbl3, struct sym *syidx, struct sym *sytbl, struct sym *syvar, unsigned long lstart, unsigned long lend); +extern void define_special_fields(void); +extern struct sym *define_temp_field(char desired_type, int desired_len); +extern int define_implicit_field(struct sym *sy, struct sym *sykey, int idxlen); +extern void Initialize_SearchAll_Boundaries(struct sym *sy, struct sym *syidx); +extern struct sym *determine_table_index_name(struct sym *sy); +extern void define_field(int level, struct sym *sy); +extern struct sym *alloc_filler(void); +extern struct selsubject *save_sel_subject(int type, struct selsubject *ssubj, struct sym *sy); +extern void release_sel_subject(int label, struct selsubject *ssbj); +extern void compute_subject_set_size(struct selsubject *ssbj); +extern int set_field_value_sw(struct sym *sy, int times); +extern int set_field_length(struct sym *sy, int times); +extern unsigned field_alignment(struct sym *sy, unsigned location); +extern void set_field_location(struct sym *sy, unsigned location); +extern void scr_set_column(struct scr_info *si, struct sym *sy, int plus_minus); +extern void scr_set_line(struct scr_info *si, struct sym *sy, int plus_minus); +extern void save_report(struct sym *rep, struct sym *file); +extern void update_report_field(struct sym *sy); +extern void update_screen_field(struct sym *sy, struct scr_info *si); +extern void update_renames_field(struct sym *sy1, struct sym *sy2); +extern void update_field(struct sym *sy); +extern void close_fields(void); +extern void resolve_labels(void); +extern void open_section(struct sym *sect); +extern void close_section(void); +extern char *label_name(struct sym *lab); +extern char *var_name(struct sym *sy); +extern void close_paragr(void); +extern void open_paragr(struct sym *paragr); +extern void gen_stoprun(void); +extern void gen_exit(int code); +extern void set_variable_values(struct lit *v1, struct lit *v2); +extern void gen_condition(struct sym *sy); +extern void gen_compare_exp(int value); +extern void gen_compare(struct sym *s1, int value, struct sym *s2); +extern void assign_expr(struct sym *sy, int opt, char end); +extern int push_expr(struct sym *sy); +extern int push_subexpr(struct sym *sy); +extern void add_expr(void); +extern void subtract_expr(void); +extern void multiply_expr(void); +extern void divide_expr(void); +extern void pow_expr(void); +extern void gen_save_filedesc(struct sym *f); +extern void alloc_file_entry(struct sym *f); +extern void dump_alternate_keys(struct sym *r, struct alternate_list *alt); +extern void dump_fdesc(void); +extern void gen_fdesc(struct sym *f, struct sym *r); +extern void gen_status(struct sym *f); +extern void gen_perform_decl(struct sym *f); +extern struct sortfile_node *alloc_sortfile_node(struct sym *sy); +extern struct sym *create_status_register(char *name); +extern void gen_sort_using(struct sym *f, struct sortfile_node *sn); +extern void gen_sort_giving(struct sym *f, struct sortfile_node *sn); +extern void gen_sort(struct sym *f); +extern void gen_save_filevar(struct sym *f, struct sym *buf); +extern void gen_save_sort_fields( struct sym *f, struct sym *buf ); +extern void gen_open(int mode, struct sym *f); +extern void gen_close_sort(struct sym *f); +extern void gen_close(struct sym *f); +extern int gen_reads(struct sym *f, struct sym *buf, struct sym *key, + int next_prev, int sel, int withlock ); +extern void gen_return_stmt(struct sym *f, struct sym *buf); +extern void gen_read(struct sym *f, struct sym *buf, struct sym *key, + int withlock); +extern void gen_read_next(struct sym *f, struct sym *buf, int next_prev, + int withlock); +extern void gen_release(struct sym *r, struct sym *buf); +extern void gen_write(struct sym *r, struct sym *advar, struct sym *buf, int opt); +extern void gen_rewrite(struct sym *r, struct sym *buf); +extern void gen_start(struct sym *f, int cond, struct sym *key); +extern void gen_delete(struct sym *f); +extern void set_rec_varying_info(struct sym *f, struct lit *lmin, struct lit *lmax, struct sym *reclen); +extern void gen_check_varying(struct sym *f); +extern void gen_get_switches(); +extern void gen_set_switch(struct sym *var, struct sym *sy); +extern struct list *chain_var(struct sym *sy); +extern void gen_push_using(struct sym *sy); +extern void gen_save_using(struct sym *sy); + +extern void gen_enter_runelement(); + +extern unsigned long int emt_call(struct lit *v, int stack_size, int exceplabel, int notexceplabel,struct sym *ret); +extern unsigned long int emt_call_loadlib(struct lit *v); +extern int begin_on_except(void); +extern void check_call_except(int excep, int notexcep, int exceplabel, int notexceplabel, int endlabel); +/*extern void gen_inline_intrinsic(struct sym *v, short name_len, struct sym *temporary);*/ +extern struct sym *gen_intrinsic_call(struct sym *v); +extern short get_std_val(struct sym *sy); +extern int get_nb_fields(struct sym *sy, int sw_val); +extern int build_init_str(struct sym *sy, int nb_fields); +extern void gen_from_init_str(int nb_fields); +extern void gen_init_str(struct sym *sy, char init_ctype, int len); +extern void mark_actives(int first, int last); +extern void dump_symbols(void); +extern void chg_underline(char *s); +extern struct ginfo *ginfo_container0(void); +extern struct ginfo *ginfo_container1(struct ginfo *v); +extern void ginfo_container2(struct ginfo *v, unsigned long ty); +extern struct ginfo *ginfo_container3(struct ginfo *v, unsigned long ty); +extern void ginfo_container4(struct ginfo *v); +extern struct invalid_key_element * gen_before_invalid_key (); +extern struct invalid_key_element * gen_after_invalid_key (struct invalid_key_element *p); +extern struct invalid_keys * gen_invalid_keys (struct invalid_key_element *p1, struct invalid_key_element *p2); +extern void gen_test_invalid_keys (struct invalid_keys *p, struct sym *f, int fs); +extern int sort_exref_compare(const void *z1, const void *z2); +extern int main(int argc, char *argv[]); + +/* htcobol.c */ +extern void opt_is(int i); +extern void hterror(int erno, int severity, char *s, ...); +extern void yywarn(char *s, ...); +extern void yyerror(char *s, ...); +extern int yyparse(void); + +/* pp_parser.tab.c */ +extern void pp_yyerror(char *s, ...); +extern int pp_yyparse(void); + +/* htglobals.c */ +extern int process_command_line(int argc, char *argv[]); +extern void do_file_cleanup(void); +extern int process_assemble(void); +extern int process_ld(void); +extern int process_shlib_ld(void); +extern int process_lib_ld(void); +extern int read_compiler_options(void); +extern int check_option(char *option_in, char *arg); +extern void turn_on_list_mode(void); +extern void turn_off_list_mode(void); +extern void turn_on_xref(void); +extern void turn_off_xref(void); +extern void pass_options (char *optlst); +extern int pexec(char *cmdstr); +extern void process_verbose_options (int ac, char *av[]); +extern int find_copybook_file(char *fname, char *lname); + +/* scan.c */ +extern int yylex(void); +extern void yyrestart(FILE *input_file); +extern int is_integer_token(char *tok); +extern int is_valid_identifier(char *tok); +extern int lex_fgets(char *buf, int maxsize); +extern void dcs(void); +extern char *copy_strip_spaces(char *s); +extern void add_copy_replacement(char *orig_value, char *replacement); +extern void copy_do_replacements(char *buffer); +extern void copy_switch(char *filename); +extern struct reserved_sym *lookup_reserved(char *s); +extern void install_reserved(void); +extern int reserved(char *s); +extern struct intrinsic_sym *lookup_intrinsic(char *s); +extern void scdebug(char *fmt, ...); +extern int yywrap(void); + +/* reswords.c */ +/* Enumerate the types of intrinsic functions */ +enum { + ITYPE_FLOAT, + ITYPE_INT, + ITYPE_DATE, + ITYPE_DATETIME, + ITYPE_JULIANDATE, + ITYPE_YEAR, + ITYPE_ALPHA, + ITYPE_INLINE +}; + +struct intrinsic_function { + char *name; + char function_type; + short args; +}; +struct intrinsic_function *lookup_intrinsic_function( char *s ); + +#define ANY_NUMBER 32767 + +#endif diff --git a/compiler/htglobals.c b/compiler/htglobals.c new file mode 100644 index 0000000..fec7e3f --- /dev/null +++ b/compiler/htglobals.c @@ -0,0 +1,2404 @@ +/* + * Copyright (C) 1999 - 2004 Glen Colbert, David Essex, Bernard Giroud, + * Rildo Pragana. + * Copyright (C) 1993, 1991 Rildo Pragana. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA + */ + + +/* + + This portion of the compiler processes the + compiler options files, compiler environment + variables, and processes the command line for + flags and options used to determine the + compiler behavior. + + This file was formated using indent -gnu -blp + + + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "htconfig.h" +#include "htcoboly.h" +#include "htversion.h" +#include "hthelp.h" +#include "htglobals.h" +#include "mwindows.h" + +#if defined(__MINGW32__) +/* #include */ +#include +#else +#include +#endif + +/* #define DEBUG_COBPP_PP 1 */ + +#ifdef DEBUG_COBPP_PP + +char errppbuf[1024*8]; + +void debug_pp_rtn (const char *s1, const char *s2, const char *s3, int w1, int cw); + +#define DEBUG_PPRTN_STR1(msg1) debug_pp_rtn (msg1, NULL, NULL, 0, 1); +#define DEBUG_PPRTN_STR3(msg1, msg2) debug_pp_rtn (msg1, msg2, NULL, 0, 3); +#define DEBUG_PPRTN_STR7(msg1, i1) debug_pp_rtn (msg1, NULL, NULL, i1, 7); +#define DEBUG_PPRTN_STR15(msg1, msg2, msg3) debug_pp_rtn (msg1, msg2, msg3, 0, 15); +#define DEBUG_PPRTN_STR21(msg1, msg2, i1) debug_pp_rtn (msg1, msg2, NULL, i1, 21); +#define DEBUG_PPRTN_STR105(msg1, msg2, msg3, i1) debug_pp_rtn (msg1, msg2, msg3, i1, 105); + +#else + +#define DEBUG_PPRTN_STR1(msg1) +#define DEBUG_PPRTN_STR3(msg1, msg2) +#define DEBUG_PPRTN_STR7(msg1, i1) +#define DEBUG_PPRTN_STR15(msg1, msg2, msg3) +#define DEBUG_PPRTN_STR21(msg1, msg2, i1) +#define DEBUG_PPRTN_STR105(msg1, msg2, msg3, i1) + +#endif + +extern int module_flag; + +int main_flag = 0; /* Specify main entry point action */ +int main_entry_flag = 0; /* Main entry point detected */ +char main_entry_buf[MAXNAMEBUF] = ""; /* main entry point name */ + +/* command line options */ +static char option_list[] = { HTG_CMDOPTION_LIST }; + +struct cobopt_option +{ + char *opt; + int sel; +}; + +struct cobopt_option option[] = +{ +/*{ "COPYEXT", HTG_RESOPT_COPYEXT },*/ +/*{ "COPYLBR", HTG_RESOPT_COPYLBR },*/ + { "COPYLIST", HTG_RESOPT_COPYLIST }, + { "NOCOPYLIST", HTG_RESOPT_NOCOPYLIST }, + { "LIST", HTG_RESOPT_LIST }, + { "NOLIST", HTG_RESOPT_NOLIST }, + { "LD_PATH:", HTG_RESOPT_LD_PATH }, +/*{ "LD_LIBS:", HTG_RESOPT_LD_LIBS },*/ + { "XREF", HTG_RESOPT_XREF }, + { "NOXREF", HTG_RESOPT_NOXREF }, + { "PGM_SUFFIXES:", HTG_RESOPT_PGM_SUFFIXES }, + { "LD_FLAGS:", HTG_RESOPT_LD_FLAGS }, + { "LD_IO_LIBS:", HTG_RESOPT_LD_IO_LIBS }, + { "LD_TERM_LIBS:", HTG_RESOPT_LD_TERM_LIBS }, + { "LD_DCALL_LIBS:", HTG_RESOPT_LD_DCALL_LIBS }, + { "LD_HT1_LIBS:", HTG_RESOPT_LD_HT1_LIBS }, +/*{ "LD_HT2_LIBS:", HTG_RESOPT_LD_HT2_LIBS },*/ + { "LD_EXTRA_LIBS:", HTG_RESOPT_LD_EXTRA_LIBS }, + { "LD_READLINE_LIBS:", HTG_RESOPT_LD_READLINE_LIBS }, + { "PGM_FORMAT_FREE", HTG_RESOPT_PGM_FORMAT_FREE }, + { "PGM_FORMAT_FIXED", HTG_RESOPT_PGM_FORMAT_FIXED }, + { "COPYBOOK_PATH:", HTG_RESOPT_INCLUDE_PATH }, + { "COPYBOOK_SUFFIXES:", HTG_RESOPT_COPYBOOK_SUFFIXES }, + { "CCX_CMD:", HTG_RESOPT_CCX_CMD }, + { "ASX_CMD:", HTG_RESOPT_ASX_CMD }, + { "ARX_CMD:", HTG_RESOPT_ARX_CMD }, + { "RANLIBX_CMD:", HTG_RESOPT_RANLIBX_CMD }, + { "LD_MATH_LIBS:", HTG_RESOPT_LD_MATH_LIBS }, + { "PGMLIST_SUFFIX:", HTG_RESOPT_PGMLIST_SUFFIX }, + { "DEBUG_LINES", HTG_RESOPT_DEBUG_LINES }, + { "NODEBUG_LINES", HTG_RESOPT_NODEBUG_LINES }, + { "COMPILE_DEFAULT:", HTG_RESOPT_COMPILE_DEFAULT }, + { "SHLIB_NAME_DEFAULT:", HTG_RESOPT_SHLIB_NAME_DEFAULT }, + { "PGM_ENTRY_POINT_AUTO", HTG_RESOPT_PGM_ENTRY_POINT_AUTO }, + { "PGM_ENTRY_POINT_FIRST", HTG_RESOPT_PGM_ENTRY_POINT_FIRST }, + { "PGM_ENTRY_POINT_NONE", HTG_RESOPT_PGM_ENTRY_POINT_NONE }, + { NULL, 0 } +}; + +/* ********************************************************************* + * * Define flags and storage for global * + * * compiler options * + * *********************************************************************/ + +int wrncnt = 0; +int errcnt = 0; +unsigned int source_lineno = 0; +unsigned int source_colno = 0; +char *source_filename = NULL; +char *include_filename = NULL; +char input_filename[PATHMAX]; +char working_filename[PATHMAX]; +char output_filename[PATHMAX]; +char list_filename[PATHMAX]; +char sys_buf[300]; + +int HTG_RETURN_CODE = 0; +int HTG_temporary_error_code = 0; +int HTG_temporary_severity = 0; +short HTG_compile_level_flag = 0; +short HTG_compile_level_default = 0; +short HTG_assemble_flag = 0; +short HTG_full_compile_flag = 0; +short HTG_make_object_flag = 0; +short HTG_list_flag = 0; +short HTG_xref_flag = 0; +/* short HTG_sym_flag = 0; */ +short HTG_debug_lines_flag = 0; +short HTG_offset_flag = 0; +short HTG_verbose = 0; +short HTG_verbose_verbose = 0; +short HTG_all_calls_dynamic = 0; +short HTG_retain_symbols = 0; +short HTG_dynamic_flag = 0; +short HTG_shlib_soname_flag = 0; +short HTG_libcob = 0; + +char HTG_COPYDIR[PATHMAX1 + 2] = ""; +char HTG_TMPDIR[PATHMAX]; +char HTG_CCX_CMD[PATHMAX]; +char HTG_ASX_CMD[PATHMAX]; +char HTG_ARX_CMD[PATHMAX]; +char HTG_RANLIBX_CMD[PATHMAX]; + +/* char HTG_ASMLST[PATHMAX]; */ +char HTG_OBJECT[PATHMAX]; +char HTG_EXECUTABLE[PATHMAX]; +char HTG_LIBNAME[PATHMAX]; +char HTG_LD_OPTIONS[120] = ""; +char HTG_LD_PATHS[120] = ""; +/* char HTG_LD_ARGS[120] = ""; */ +char HTG_LD_ARGS[PATHMAX2] = ""; +char HTG_LD_RESOPT_ARGS[PATHMAX2] = ""; +char HTG_LD_CMDLINE_ARGS[PATHMAX2] = ""; +char HTG_LD_DCALL_ARGS[120] = ""; +char HTG_LD_TERM_ARGS[120] = ""; +char HTG_LD_IO_ARGS[120] = ""; +char HTG_LD_HT1_ARGS[120] = ""; +/* char HTG_LD_HT2_ARGS[120] = ""; */ +char HTG_LD_EXTRA_ARGS[120] = ""; +char HTG_LD_MATH_ARGS[120] = ""; +char HTG_LD_READLINE_ARGS[120] = ""; +char HTG_LD_DYNAMIC[10] = ""; + +char HTG_PCAL_RESOPT_ARGS[PATHMAX] = ""; +char HTG_SHLIB_NAME_DEFAULT[120] = ""; + +char HTG_LD_FLAGS[256] = ""; + +char file_path[PATHMAX]; +char file_base[PATHMAX]; +char file_ext[PATHMAX]; +char ofile[PATHMAX]; +char COBFLAGS[64]; +char file_pgmlist_suffix[PATHMAX] = ".lis"; +char lib_prefix[PATHMAX] = "tcob"; +int HTG_grp_desc_len = FLD_DESC_SIZE0; +int HTG_fld_desc_len = FLD_DESC_SIZE1; + +char COBDIR[PATHMAX]; +char COBOPT[PATHMAX]; +char PWD[PATHMAX]; + +#if defined(__MINGW32__ ) +char COBINSTDIR[PATHMAX]; +#endif + +char cmdstr[PATHMAX + PATHMAX1 + 1]; + +char HTG_codeFormat; +char cobpp_flag_E; +char cobpp_tabs[10]; +int HTG_tab2space; +char *cobpp_fpath; +char HTG_process_level; + +char HTG_FNAME_SUFFIX[PATHMAX3] = ""; +char fpath[PATHMAX1 + 2] = ""; +char fsuffix[PATHMAX] = ""; + +FILE *yyin; +FILE *o_src; +FILE *o_lst; + +extern FILE *pp_yyin; +extern FILE *pp_yyout; +extern FILE *pp_yylist; +extern char *pp_filename; + +extern int pp_yyparse(void); + +/* Internal function declarations */ +int check_option (char *, char *); +static void init_env (char *buf, const char *env, const char *def); +void process_verbose_options (int ac, char *av[]); +void process_bind_options (char *arglist); +void initialize_setup (void); +void append_include_path(char *ap); +void setup_filenames(void); +void print_compiler_banner(void); +void print_copybooks_path(void); +void setup_ld_paths(void); +void print_listing_file(void); +int process_pp(void); +int process_compile (void); +void process_select_verify(char compile_level); +int find_source_file(void); +void copytrip (char *sout, char *sin); +void get_compile_level_default(void); +void pass_options_ld (char *s); + +char OPTFILE[PATHMAX]; +char argtmp[PATHMAX]; +char *prg_name; +char pgm_suffixes[PATHMAX] = HTG_PGM_SUFFIXES; + +int HTG_prg_uses_fileio = 0; +int HTG_prg_uses_term = 0; +int HTG_prg_uses_dcall = 0; + +int HTG_norun = 0; + +extern int stabs_on_sw; +extern int read_compiler_options(void); + +int process_command_line (int argc, char *argv[]) +{ + int sw, idx=0; + + +/* ********************************************** + * * Parse the command line, determining what * + * * features have been selected * + * **********************************************/ +/* opterr = 0; */ + while ((sw = getopt (argc, argv, option_list)) != EOF) { +/* printf("switch: %c\n", sw); */ + switch (sw) { + + case HTG_CMDOPT_NIL: + break; + case HTG_CMDOPT_DEBUG_LINES: + HTG_debug_lines_flag = 1; + break; + case HTG_CMDOPT_BIND_MODE: + process_bind_options(optarg); + break; + case HTG_CMDOPT_OUTPUT_NAME: + strcpy (ofile, optarg); + break; + case HTG_CMDOPT_INCLUDE_PATH: + if (idx == 0) { + strcpy (HTG_COPYDIR, ""); + idx = 1; + } + append_include_path(optarg); + break; + case HTG_CMDOPT_DEBUG: + stabs_on_sw = 1; + strcat (HTG_LD_OPTIONS, "-g "); + break; + case HTG_CMDOPT_LISTING: + HTG_list_flag = TRUE; + break; + /* Set entry module to call from main */ +/* + auto (1) - Use the first encountered 'STOP RUN' statement, + and if found, generate a program entry point. + first(2) - Use the first encountered 'PROGRAM-ID' statement, + and if found, generate a program entry point. + none (0) - Do not generate any program entry point. + (3) - Specific program entry point defined using + the '-e' CMD line option. +*/ + /* Specify main entry point name */ + case HTG_CMDOPT_ENTRY_NAME: + main_flag = 3; + strncpy(main_entry_buf, optarg, MAXNAMEBUF); + break; + /* Specify the main entry point action */ + case HTG_CMDOPT_MAIN_ENTRY: + if (main_flag != 3) { + if (strcasecmp(optarg, "NONE") == 0) { + main_flag = 0; + } + else { + if (strcasecmp(optarg, "AUTO") == 0) { + main_flag = 1; + } + else { + if (strcasecmp(optarg, "FIRST") == 0) { + main_flag = 2; + } + else { + fprintf (stdout, "Invalid entry point action option '%s' ... ignoring\n", optarg); + } + } + } + } + break; + /* case HTG_CMDOPT_MODULE: */ + case HTG_CMDOPT_LIB_SHARED: + process_select_verify (HTG_CMDOPT_LIB_SHARED); + module_flag = TRUE; + strcat (HTG_LD_OPTIONS, "-shared "); + main_entry_flag = FALSE; + main_flag = FALSE; + HTG_compile_level_flag = HTG_COMPILE_LEVEL_PCAM; +/* strcpy (HTG_LIBNAME, optarg); */ + break; + case HTG_CMDOPT_LIB_STATIC: + process_select_verify (HTG_CMDOPT_LIB_STATIC); + module_flag = TRUE; + HTG_compile_level_flag = HTG_COMPILE_LEVEL_PCAS; + break; + case HTG_CMDOPT_EXECUTABLE: + process_select_verify (HTG_CMDOPT_EXECUTABLE); +/* HTG_full_compile_flag = TRUE; */ + HTG_compile_level_flag = HTG_COMPILE_LEVEL_PCAL; + break; + case HTG_CMDOPT_SOURCE_OPEN: + HTG_codeFormat = 'x'; + break; + case HTG_CMDOPT_SOURCE_FIXED: + HTG_codeFormat = 'f'; + break; + case HTG_CMDOPT_PREPROCESSOR: + process_select_verify (HTG_CMDOPT_PREPROCESSOR); + HTG_compile_level_flag = HTG_COMPILE_LEVEL_P; + cobpp_flag_E = '1'; + break; + case HTG_CMDOPT_COMPILE: + process_select_verify (HTG_CMDOPT_COMPILE); + HTG_compile_level_flag = HTG_COMPILE_LEVEL_PC; + HTG_assemble_flag = TRUE; + break; + case HTG_CMDOPT_TAB_NUMBER: + strncpy (cobpp_tabs, optarg, 10); + cobpp_tabs[9] = '\0'; + sscanf(cobpp_tabs, "%d", &HTG_tab2space); + break; +#if 0 + case 't': + cobpp_flag_t = '1'; + break; +#endif + case HTG_CMDOPT_ASSEMBLE: + process_select_verify (HTG_CMDOPT_ASSEMBLE); + HTG_make_object_flag = TRUE; + HTG_compile_level_flag = HTG_COMPILE_LEVEL_PCA; + break; + +/* HTG_CMDOPT_INCLUDE_LIB 'l' */ + case HTG_CMDOPT_INCLUDE_LIB: + strcat (HTG_LD_CMDLINE_ARGS, "-l"); + strcat (HTG_LD_CMDLINE_ARGS, optarg); + strcat (HTG_LD_CMDLINE_ARGS, " "); + break; + +/* HTG_CMDOPT_LIB_PATH 'L' */ + case HTG_CMDOPT_LIB_PATH: +// strcat (HTG_LD_CMDLINE_ARGS, "-L"); +// strcat (HTG_LD_CMDLINE_ARGS, optarg); +// strcat (HTG_LD_CMDLINE_ARGS, " "); + strcat (HTG_LD_PATHS, " "); + strcat (HTG_LD_PATHS, "-L"); + strcat (HTG_LD_PATHS, optarg); + strcat (HTG_LD_PATHS, " "); + break; + +/* HTG_CMDOPT_PASS_OPTIONS 'W' */ + case HTG_CMDOPT_PASS_OPTIONS: + if (optarg != NULL) { + if (*optarg != 'l' ) { + fprintf (stderr, "Invalid sub-option \'%c\' selected ... ignoring", *optarg); + } + else { + pass_options_ld (optarg); + } + } + break; + + case HTG_CMDOPT_VERY_VERBOSE: +/* HTG_verbose_verbose = TRUE; */ +/* HTG_verbose = TRUE; */ + break; + case HTG_CMDOPT_VERBOSE: +/* HTG_verbose = TRUE; */ + break; + + case HTG_CMDOPT_TESTMODE: + HTG_retain_symbols = TRUE; + break; + + case HTG_CMDOPT_NORUN: + HTG_norun = TRUE; + HTG_verbose = TRUE; + break; + case HTG_CMDOPT_CALLS_DYNAMIC: + HTG_all_calls_dynamic = TRUE; + break; + case HTG_CMDOPT_LIBCOB: + HTG_libcob = TRUE; + strcpy(lib_prefix, "cob"); + printf("Lib cob option on (%s)!!\n", lib_prefix); + HTG_grp_desc_len = CFLD_DESC_SIZE0; + HTG_fld_desc_len = CFLD_DESC_SIZE1; + break; + case HTG_CMDOPT_VERSION: + fprintf (stdout, "%s - %s\n", HTG_PGM_NAME, TCOB_PGM_VERSION); + fprintf (stdout, "%s", HTG_COPYWR); + exit (0); + break; + case HTG_CMDOPT_HELP: + default: + fprintf (stdout, "Usage: %s [options] file\n%s", argv[0], HTG_OPTIONS); + exit (0); + break; + } + } + + if (HTG_compile_level_flag == HTG_COMPILE_LEVEL) { + if (HTG_compile_level_default == HTG_COMPILE_LEVEL) { + HTG_compile_level_flag = HTG_COMPILE_LEVEL_PCAL; + } + else { + HTG_compile_level_flag = HTG_compile_level_default; + } + } + +/* fprintf (stderr, "debug: process_command_line 9: HTG_compile_level_flag=%d, HTG_compile_level_default=%d;\n", HTG_compile_level_flag, HTG_compile_level_default); */ + + return optind; +} + +/* ********************************************** + * * Clean up working files as needed. * + * **********************************************/ +void do_file_cleanup () +{ + if (HTG_retain_symbols != TRUE) { + switch (HTG_compile_level_flag) { + + case HTG_COMPILE_LEVEL_P: + break; + + case HTG_COMPILE_LEVEL_PC: + remove (working_filename); + break; + + case HTG_COMPILE_LEVEL_PCA: + remove (working_filename); + remove (output_filename); + break; + + case HTG_COMPILE_LEVEL_PCAL: + case HTG_COMPILE_LEVEL_PCAS: + case HTG_COMPILE_LEVEL_PCAM: + remove (working_filename); + remove (output_filename); + remove (HTG_OBJECT); + break; + + } + } +} + +/* ********************************************** + * * Execute assembler to generate object file * + * **********************************************/ +int process_assemble (void) +{ + int rc=0; + + if (stabs_on_sw == 1) { +/* Note: The '--gstabs' will not work properly + * It will generate stabs in the assembler and override the TC ones. + * sprintf (sys_buf, "%s -D --gstabs -o %s %s", HTG_ASX_CMD, HTG_OBJECT, output_filename); + */ + sprintf (sys_buf, "%s -D -o %s %s", HTG_ASX_CMD, HTG_OBJECT, output_filename); + } + else { + sprintf (sys_buf, "%s -o %s %s", HTG_ASX_CMD, HTG_OBJECT, output_filename); + } + + if (HTG_verbose == TRUE) + printf ("%s\n", sys_buf); + + if (HTG_verbose_verbose == TRUE) + printf ("Compiler assembly phase ... "); + + if (HTG_norun == 0) + rc = system (sys_buf); + + if (HTG_verbose_verbose == TRUE ) + printf ("return code = %2d\n", rc); + + if (rc > 0) + return (8); + + return rc; +} + + +/* ************************************************** + * * Execute link edit to generate executable file * + * **************************************************/ +int process_ld (void) +{ + int rc=0; + + sprintf (sys_buf, "%s ", HTG_CCX_CMD); + if (strlen(HTG_LD_OPTIONS) > 0) + strcat(sys_buf, HTG_LD_OPTIONS); + + strcat(sys_buf, "-o "); + strcat(sys_buf, HTG_EXECUTABLE); + strcat(sys_buf, " "); + strcat(sys_buf, HTG_OBJECT); + strcat(sys_buf, " "); + + if (strlen(HTG_LD_DYNAMIC) > 0) { + strcat(sys_buf, HTG_LD_DYNAMIC); +// printf("HTG_LD_DYNAMIC=%s\n",HTG_LD_DYNAMIC); + strcat(sys_buf, " "); + } + + if (strlen(HTG_LD_FLAGS) > 0) { + strcat(sys_buf, HTG_LD_FLAGS); +// printf("HTG_LD_FLAGS=%s\n",HTG_LD_FLAGS); + strcat(sys_buf, " "); + } + + + if (strlen(HTG_LD_CMDLINE_ARGS) > 0) + { + strcat(sys_buf, HTG_LD_CMDLINE_ARGS); +// printf("HTG_LD_CMDLINE_ARGS=%s\n",HTG_LD_CMDLINE_ARGS); + } + + + if (strlen(HTG_LD_RESOPT_ARGS) > 0) { + strcat(sys_buf, HTG_LD_RESOPT_ARGS); +// printf("HTG_LD_RESOPT_ARGS=%s\n",HTG_LD_RESOPT_ARGS); + strcat(sys_buf, " "); + } + + + if (HTG_verbose == TRUE) + printf ("%s\n", sys_buf); + + if (HTG_verbose_verbose == TRUE) + printf ("linking %s ... ", HTG_EXECUTABLE); + + if (HTG_norun == 0) + rc = system (sys_buf); + + if (HTG_verbose_verbose == TRUE) + printf ("return code = %2d\n", rc); + + if (rc > 0) + return (12); + + return rc; +} + +/* ************************************************** + * * Execute link edit to generate shared library * + * **************************************************/ +int process_shlib_ld (void) +{ + int rc=0; + + sprintf (sys_buf, "%s ", HTG_CCX_CMD); + if (strlen(HTG_LD_OPTIONS) > 0) + strcat(sys_buf, HTG_LD_OPTIONS); +/* + ${CCX} -shared -Wl,--out-implib,${lib_name1}.dll.a -o ${SHARED_LIB1} $(OBJD1) ${LIBS} + ${CCX} -shared -Wl,--out-implib,${lib_name2}.dll.a,--output-def,${lib_name2}.def -o ${SHARED_LIB2} $(OBJS2) ${LIBS} + ${CCX} -shared -Wl,-soname,lib${lib_name1}.so.0 -o ${SHARED_LIB1} $(OBJD1) ${LIBS} +*/ + if (HTG_shlib_soname_flag == 0) { +#ifndef WIN32 + strcat(sys_buf, "-Wl,-soname,"); + strcat(sys_buf, HTG_LIBNAME); +#else + strcat(sys_buf, "-Wl,--enable-auto-import,--out-implib,"); + strcat(sys_buf, HTG_LIBNAME); + strcat(sys_buf, ".a,--output-def,"); + strcat(sys_buf, file_base); + strcat(sys_buf, ".def"); +#endif + } + + strcat(sys_buf," -o "); + strcat(sys_buf, HTG_EXECUTABLE); + strcat(sys_buf, " "); + strcat(sys_buf, HTG_OBJECT); + strcat(sys_buf, " "); + strcat(sys_buf, HTG_LD_PATHS); + strcat(sys_buf, " "); + strcat(sys_buf, HTG_LD_HT1_ARGS); + strcat(sys_buf, " "); +/* strcat(HTG_LD_ARGS, HTG_LD_HT2_ARGS); */ +/* strcat(sys_buf, " "); */ + + if (HTG_verbose == TRUE) + printf ("%s\n", sys_buf); + + if (HTG_verbose_verbose == TRUE) + printf ("linking %s ... ", HTG_EXECUTABLE); + + if (HTG_norun == 0) + rc = system (sys_buf); + + if (HTG_verbose_verbose == TRUE) + printf ("return code = %2d\n", rc); + + if (rc > 0) + return (12); + + return rc; +} + +/* ************************************************** + * * Execute link edit to generate static library * + * **************************************************/ +int process_lib_ld (void) +{ + int rc=0; + + sprintf (sys_buf, "%s cr %s %s ", HTG_ARX_CMD, HTG_EXECUTABLE, HTG_OBJECT); + + if (HTG_verbose == TRUE) + printf ("%s\n", sys_buf); + + if (HTG_verbose_verbose == TRUE) + printf ("creating archive %s ... ", HTG_EXECUTABLE); + + if (HTG_norun == 0) + rc = system (sys_buf); + + if (HTG_verbose_verbose == TRUE) + printf ("return code = %2d\n", rc); + + if (rc > 0) + return (12); + + sprintf (sys_buf, "%s %s ", HTG_RANLIBX_CMD, HTG_EXECUTABLE); + + if (HTG_verbose == TRUE) + printf ("%s\n", sys_buf); + + if (HTG_verbose_verbose == TRUE) + printf ("ranlib archive %s ... ", HTG_EXECUTABLE); + + if (HTG_norun == 0) + rc = system (sys_buf); + + if (HTG_verbose_verbose == TRUE) + printf ("return code = %2d\n", rc); + + if (rc > 0) + return (12); + + return rc; +} + +/* ************************************************** + * * Read $COBDIR/htcobolrc for compiler options * + * **************************************************/ +int read_compiler_options (void) +{ + FILE *cobopt; + char optbfr[PATHMAX2 + 1]; + char optstr[PATHMAX2 + 1]; + char optarg[PATHMAX2 + 1]; + int i, j, len, r=0; + + i = 0; + j = 0; + + if ((cobopt = fopen (OPTFILE, "r")) == NULL) { + fprintf (stderr, "Cobol parameter file '%s' not found - using configure defaults\n", OPTFILE); + return (1); + } + + if (HTG_verbose_verbose == TRUE) { + printf ("Processing compiler options file parameters\n"); + } + + i = 0; + j = 0; + optstr[0] = 0; + optarg[0] = 0; + fgets (optbfr, PATHMAX2, cobopt); + while (!feof (cobopt)) { + + len = strlen (optbfr); + if (len > 1 && optbfr[0] != '#') { + + while (optbfr[i] != ' ' && i < len) { + optstr[j] = optbfr[i]; + i++; + j++; + optstr[j] = 0; + } + j = 0; + len = strlen (optbfr); + while (i < len) { + optarg[j] = optbfr[i]; + i++; + j++; + optarg[j] = 0; + } + if (strlen (optarg) == 0) { + optstr[strlen (optstr) - 1] = 0; + } + else { + optarg[strlen (optarg) - 1] = 0; + } +#if 0 + len = strlen (optstr); + if (len > 0 && optstr[0] != '#') { + check_option (optstr, optarg); + } +#endif + r += check_option (optstr, optarg); + + } + i = 0; + j = 0; + optstr[0] = 0; + optarg[0] = 0; + fgets (optbfr, PATHMAX2, cobopt); + } + fclose (cobopt); + return r; +} + + +int check_option (char *option_in, char *arg) +{ + + int i, j, r=0; + + for (i=0, j=0; option[i].opt != NULL; i++) { + if (strcmp (option[i].opt, option_in) == 0) { + j = option[i].sel; + break; + } + } + +/* fprintf (stderr, "debug: check_option 0: i=%d, j=%d, option=%s;\n", i, j, option[i].opt); */ + + switch (j) + { + case HTG_RESOPT_LIST: + HTG_list_flag = TRUE; + break; + case HTG_RESOPT_NOLIST: + HTG_list_flag = FALSE; + break; + case HTG_RESOPT_LD_PATH: + copytrip (HTG_LD_PATHS, arg); + break; +#if 0 + case HTG_RESOPT_LD_LIBS: + strcpy (HTG_LD_ARGS, arg+1); + break; +#endif + case HTG_RESOPT_XREF: + HTG_xref_flag = TRUE; + break; + case HTG_RESOPT_NOXREF: + HTG_xref_flag = FALSE; + break; + case HTG_RESOPT_PGM_SUFFIXES: + copytrip (pgm_suffixes, arg); + break; + case HTG_RESOPT_LD_FLAGS: + copytrip (HTG_LD_FLAGS, arg); + break; + case HTG_RESOPT_LD_IO_LIBS: + copytrip (HTG_LD_IO_ARGS, arg); + break; + case HTG_RESOPT_LD_TERM_LIBS: + copytrip (HTG_LD_TERM_ARGS, arg); + break; + case HTG_RESOPT_LD_DCALL_LIBS: + copytrip (HTG_LD_DCALL_ARGS, arg); + break; + case HTG_RESOPT_LD_HT1_LIBS: + copytrip (HTG_LD_HT1_ARGS, arg); + break; +#if 0 + case HTG_RESOPT_LD_HT2_LIBS: + copytrip (HTG_LD_HT2_ARGS, arg); + break; +#endif + case HTG_RESOPT_LD_EXTRA_LIBS: + copytrip (HTG_LD_EXTRA_ARGS, arg); + break; + case HTG_RESOPT_LD_READLINE_LIBS: + copytrip (HTG_LD_READLINE_ARGS, arg); + break; + case HTG_RESOPT_PGM_FORMAT_FIXED: + HTG_codeFormat = 'f'; + break; + case HTG_RESOPT_PGM_FORMAT_FREE: + HTG_codeFormat = 'x'; + break; + case HTG_RESOPT_INCLUDE_PATH: +/* append_include_path(arg+1); */ + copytrip (HTG_COPYDIR, arg); + break; + +#if 0 + case HTG_RESOPT_COPYBOOK_SUFFIXES: + fprintf (stderr, "debug: check_option 1: HTG_RESOPT_COPYBOOK_SUFFIXES=%d;\n", HTG_CMDOPT_COPYBOOK_SUFFIXES); + break; +#endif + + case HTG_RESOPT_CCX_CMD: + copytrip (HTG_CCX_CMD, arg); + break; + case HTG_RESOPT_ASX_CMD: + copytrip (HTG_ASX_CMD, arg); + break; + + case HTG_RESOPT_ARX_CMD: + copytrip (HTG_ARX_CMD, arg); + break; + + case HTG_RESOPT_RANLIBX_CMD: + copytrip (HTG_RANLIBX_CMD, arg); + break; + + case HTG_RESOPT_LD_MATH_LIBS: + copytrip (HTG_LD_MATH_ARGS, arg); + break; + + case HTG_RESOPT_PGMLIST_SUFFIX: + copytrip (file_pgmlist_suffix, arg); + break; + + case HTG_RESOPT_DEBUG_LINES: + HTG_debug_lines_flag = 1; + break; + + case HTG_RESOPT_NODEBUG_LINES: + HTG_debug_lines_flag = 0; + break; + + case HTG_RESOPT_COMPILE_DEFAULT: + copytrip (HTG_PCAL_RESOPT_ARGS, arg); + get_compile_level_default(); + break; + + case HTG_RESOPT_SHLIB_NAME_DEFAULT: + copytrip (HTG_SHLIB_NAME_DEFAULT, arg); + break; + + case HTG_RESOPT_PGM_ENTRY_POINT_AUTO: + main_flag = 1; + break; + + case HTG_RESOPT_PGM_ENTRY_POINT_FIRST: + main_flag = 2; + break; + + case HTG_RESOPT_PGM_ENTRY_POINT_NONE: + main_flag = FALSE; + break; + + default: + fprintf (stderr, "%s: *** WARNING - Unknown resource file option '%s'. Ignoring.\n", prg_name, option_in); + r = 4; + } + + return r; +} + +void copytrip (char *sout, char *sin) +{ + char *pt1, *pt2; + int len, i; + + pt1=NULL; + pt2=NULL; + +/* fprintf (stderr, "debug: copytrip 0: sin=%s;\n", sin); */ + + len = strlen(sin); + for (i=0; i= 0) { +// if(*pt1 == '$') { // walter garrote: get the environment variable +// pt1 = getenv(pt1 + 1); +// i = strlen(pt1); +// } + strncpy(sout, pt1, i+1); + sout[i+1] = '\0'; + } + } +//printf("saiu %s %s\n", sin, sout); +/* fprintf (stderr, "debug: copytrip 9: sin=%s, sout=%s;\n", sin, sout); */ + +} + +void get_compile_level_default(void) +{ + int i; + char *pt; + struct opt_sel opts_sel[6] = { + { HTG_COMPILE_LEVEL_STR_P, HTG_COMPILE_LEVEL_P }, + { HTG_COMPILE_LEVEL_STR_PC, HTG_COMPILE_LEVEL_PC }, + { HTG_COMPILE_LEVEL_STR_PCA, HTG_COMPILE_LEVEL_PCA }, + { HTG_COMPILE_LEVEL_STR_PCAM, HTG_COMPILE_LEVEL_PCAM }, + { HTG_COMPILE_LEVEL_STR_PCAS, HTG_COMPILE_LEVEL_PCAS }, + { HTG_COMPILE_LEVEL_STR_PCAL, HTG_COMPILE_LEVEL_PCAL } + }; + +/* fprintf (stderr, "debug: get_compile_level_default 0: arg=%s;\n", HTG_PCAL_RESOPT_ARGS); */ + + for (i=5; i>=0; i--) { + pt = opts_sel[i].opt; + if (strcmp (pt, HTG_PCAL_RESOPT_ARGS) == 0) { + HTG_compile_level_default = opts_sel[i].iopt; + i=-1; + } +/* fprintf (stderr, "debug: get_compile_level_default 7: pt=%s, arg=%s;\n", pt, HTG_PCAL_RESOPT_ARGS); */ + } + + if (HTG_compile_level_default == 0) { + fprintf (stderr, "%s: *** WARNING - Invalid resource file option for COMPILE_DEFAULT selected '%s'. Ignoring.\n", prg_name, HTG_PCAL_RESOPT_ARGS); + } + + +/* fprintf (stderr, "debug: get_compile_level_default 9: HTG_compile_level_default=%d;\n", HTG_compile_level_default); */ + +} + +int find_source_file(void) +{ + int rc = 1; + char del[2] = LT_PATHSEP_STR, *pt, fpath[PATHMAX2]; + struct stat sbuf; + + +/* Check using full path file name */ + if (strlen (file_ext) != 0) { + sprintf(input_filename, "%s%s%s", file_path, file_base, file_ext); + if (stat(input_filename, &sbuf) == 0) { + rc = 0; + } + return rc; + } + + strcpy(fpath, pgm_suffixes); + pt = strtok(fpath, del); + while (pt != NULL) { + sprintf(input_filename, "%s%s%s", file_path, file_base, pt); + if (HTG_verbose_verbose == TRUE ) { + printf("Checking for source filename (fullpath) =%s\n", input_filename); + } + if (stat(input_filename, &sbuf) == 0) { + if (HTG_verbose_verbose == TRUE ) { + printf("Found source filename (fullpath) =%s\n", input_filename); + } + strcpy (file_ext, pt); + rc = 0; + pt = NULL; + } + else { + pt = strtok(NULL, del); + } + } + + return rc; +} + +static void +init_env (char *buf, const char *env, const char *def) +{ + char *s = getenv (env); + if (s) + strcpy (buf, s); + else + strcpy (buf, def); +} + +int pexec (char *cmdstr) +{ + + int rc=0, i, pid, argcexe; + char *argvexe[256], *tmpt; + + argcexe = 0; + tmpt = strtok(cmdstr, " "); + while (tmpt != NULL) { + argvexe[argcexe] = malloc(strlen(tmpt)+1); + strcpy(argvexe[argcexe], tmpt); +/* fprintf(stderr, "htglobals debug: argvexe[%d]:%s:\n", argcexe, argvexe[argcexe]); */ + argcexe++; + tmpt = strtok(NULL, " "); + } + argvexe[argcexe] = NULL; + +#ifndef __MINGW32__ + + switch (pid = fork()) + { + case -1: + fprintf(stderr, "fork failed... aborting\n"); + exit(1); + break; + + case 0: + execv(argvexe[0], argvexe); +/* fprintf(stderr, "Cannot spawn \"%s\" execv failed\n", argvexe[0]); */ + fprintf(stderr, "error: Failed to spawn pre-processor \"%s\"\n", argvexe[0]); + exit(12); + break; + } + +/* waitpid(pid, &rc, 0); */ + wait(&rc); +/* fprintf(stderr, "debug: htglobals: exec \'%s\' return status=%d\n", argvexe[0], rc); */ +#else + +// pid = spawnv (1, argvexe[0], argvexe); + pid = spawnl (1, argvexe[0], argvexe[0]); + pid = cwait (&rc, pid, WAIT_CHILD); + +#endif + + for (i = 0; i < argcexe; i++) { + free(argvexe[i]); + } + + return rc; +} + +void process_bind_options (char *arglist) +{ + if (strcmp (arglist, "static") == 0) { + HTG_dynamic_flag = 1; + strcpy (HTG_LD_DYNAMIC, "-static"); + strcat (HTG_LD_DYNAMIC, " "); + } + else { + if (strcmp (arglist, "dynamic") == 0) { + strcpy (HTG_LD_DYNAMIC, "-dynamic"); + strcat (HTG_LD_DYNAMIC, " "); + HTG_dynamic_flag = 2; + } + else { + fprintf (stderr, "Unknown bind option %s specified, (static,dynamic) ignoring\n", arglist); + } + } +} + +void process_verbose_options (int ac, char *av[]) +{ + int i; + char *pt, op; + + for (i=1; i 0 && file_path[i] != LT_DIRSEP_CHAR) + { + i--; + } + if (i > 0) + { + i++; + } + j = 0; + x = strlen (file_path); + while (i < x && i < PATHMAX) + { + file_base[j++] = file_path[i]; + file_path[i++] = 0; + } + file_base[i] = 0; + +/* ******************************************* + * * We have basename, now look for suffix * + * *******************************************/ + + while (i > 0 && file_base[i] != SUFFIX_SEP_CHAR) { + i--; + } + + if (file_base[i - 1] == SUFFIX_SEP_CHAR) + i++; + + j = 0; + x = strlen (file_base); + + while (i < x && i < PATHMAX) { + file_ext[j++] = file_base[i]; + file_base[i++] = 0; + } + + file_ext[i] = 0; + if (strlen (file_base) <= 0) { + strcpy (file_base, file_ext); + file_ext[0] = 0; + } + + if (HTG_verbose_verbose == TRUE) + printf ("GEC=> path: (%s) base (%s) ext: (%s)\n", file_path, file_base, file_ext); + +/* *************************************************** + * * Fumble around for file extension * + * * Force an extension to prevent overwriting exe * + * ***************************************************/ + if (find_source_file() != 0) { + rc=8; + fprintf (stderr, "%s: Could not find input file for '%s%s%s' using search suffixes '%s'. Abort.\n", + prg_name, file_path, file_base, file_ext, pgm_suffixes); + exit(rc); + } + + strcpy (working_filename, file_base); + strcat (working_filename, HTG_FILE_PPOUT_SUFFIX); + + strcpy (list_filename, file_base); + strcat (list_filename, file_pgmlist_suffix); + + strcpy (output_filename, file_base); + strcat (output_filename, HTG_FILE_GAS_SUFFIX); + + strcpy (HTG_OBJECT, file_base); + strcat (HTG_OBJECT, HTG_FILE_OBJECT_SUFFIX); + + switch (HTG_compile_level_flag) + { + + case HTG_COMPILE_LEVEL_PCAS: + if (strlen (ofile) > 0) { + strcpy (HTG_EXECUTABLE, ofile); + } + else { + strcpy(HTG_EXECUTABLE, file_base); + strcat(HTG_EXECUTABLE, HTG_FILE_LIB_SUFFIX); + } + break; + + case HTG_COMPILE_LEVEL_PCAM: + strcpy (HTG_WORK, HTG_SHLIB_NAME_DEFAULT); + strtok(HTG_WORK, SHLIB_SEP_STR); + tp = strtok(NULL, SHLIB_SEP_STR); + if (tp == NULL){ + strcpy(HTG_LIBNAME, file_base); + tp = HTG_WORK; + tp++; + strcat(HTG_LIBNAME, tp); + }else{ + strcpy(HTG_LIBNAME, HTG_WORK); + strcat(HTG_LIBNAME, file_base); + strcat(HTG_LIBNAME, tp); + } + if (strlen (ofile) > 0) { + strcpy (HTG_EXECUTABLE, ofile); + } + else { + strcpy(HTG_EXECUTABLE, HTG_LIBNAME); + } + break; + + default: + if (strlen (ofile) > 0) { + strcpy (HTG_EXECUTABLE, ofile); + } + else { + strcpy(HTG_EXECUTABLE, file_base); + } + break; + } + +/* printf ("debug: htglobals (775): file_base=%s, output_filename=%s\n", file_base, output_filename); */ +/* printf ("debug: htglobals (777): file_base=%s, HTG_SHLIB_NAME_DEFAULT=%s, HTG_LIBNAME=%s\n", file_base, HTG_SHLIB_NAME_DEFAULT, HTG_LIBNAME); */ +} + +void print_compiler_banner(void) +{ + +/* ********************************************** + * * Print compiler banner * + * **********************************************/ + + if (HTG_verbose_verbose == TRUE ) { + fprintf (stdout, "%s - %s\n", HTG_PGM_NAME, TCOB_PGM_VERSION); + fprintf (stdout, "%s", HTG_COPYWR); + } +} + +void print_copybooks_path(void) +{ + if (HTG_verbose_verbose == TRUE ) { + printf ("Processing '%s'\n", input_filename); + printf ("Full include (copybooks) search path '%s'\n", HTG_COPYDIR); + printf ("Output file '%s'\n", output_filename); + } +} + +void setup_ld_paths(void) +{ + int i, cmdline_ld_math_args=0, + cmdline_ld_ht1_args=0, /*cmdline_ld_ht2_args=0,*/ + cmdline_ld_io_args=0, cmdline_ld_term_args=0, + cmdline_ld_readline_args=0, cmdline_ld_dcall=0; + + char *pt=NULL; + char tmp_ld_args[PATHMAX2]; + + strncpy(tmp_ld_args, HTG_LD_CMDLINE_ARGS, PATHMAX2 - 1); + tmp_ld_args[PATHMAX2 - 1] = '\0'; +/* + i = strlen(HTG_LD_ARGS); + fprintf (stderr, "debug: setup_ld_paths 0: HTG_prg_uses_term=%d, HTG_LD_ARGS=%s, i=%d;\n", + HTG_prg_uses_term, HTG_LD_ARGS, i); +*/ + i = 0; + pt = strtok(tmp_ld_args, " "); + while (pt != NULL) { + if (cmdline_ld_ht1_args == 0) { + if ((i=strcmp(HTG_LD_HT1_ARGS, pt)) == 0) { + cmdline_ld_ht1_args = 1; + } + } +#if 0 + if (cmdline_ld_ht2_args == 0) { + if ((i=strcmp(HTG_LD_HT2_ARGS, pt)) == 0) { + cmdline_ld_ht2_args = 1; + } + } +#endif + + if (cmdline_ld_math_args == 0) { + if ((i=strcmp(HTG_LD_MATH_ARGS, pt)) == 0) { + cmdline_ld_math_args = 1; + } + } + + if (cmdline_ld_readline_args == 0) { + if ((i=strcmp(HTG_LD_READLINE_ARGS, pt)) == 0) { + cmdline_ld_readline_args = 1; + } + } + + if (cmdline_ld_dcall == 0) { + if ((i=strcmp(HTG_LD_DCALL_ARGS, pt)) == 0) { + cmdline_ld_dcall = 1; + } + } + + if (cmdline_ld_io_args == 0) { + if ((i=strcmp(HTG_LD_IO_ARGS, pt)) == 0) { + cmdline_ld_io_args = 1; + } + } + + if (cmdline_ld_term_args == 0) { + if ((i=strcmp(HTG_LD_TERM_ARGS, pt)) == 0) { + cmdline_ld_term_args= 1; + } + } + + pt = strtok(NULL, " "); + } + + if (cmdline_ld_ht1_args == 0) { + strcat(HTG_LD_ARGS, " "); + strcat(HTG_LD_ARGS, HTG_LD_HT1_ARGS); + } + +/* gcc -g -o dyntest dyntest.o -rdynamic -L. -lhtcobol -lhtcobol2 -lm -ldl */ + if (HTG_prg_uses_dcall == 1) { +#ifndef __MINGW32__ + strcpy (HTG_LD_DYNAMIC, "-rdynamic"); + strcat (HTG_LD_DYNAMIC, " "); +#endif +#if 0 + if (cmdline_ld_ht2_args == 0) { + strcat(HTG_LD_ARGS, " "); + strcat(HTG_LD_ARGS, HTG_LD_HT2_ARGS); + } +#endif + } + +#ifdef WANT_READLINE + if (cmdline_ld_readline_args == 0) { + strcat(HTG_LD_ARGS, " "); + strcat(HTG_LD_ARGS, HTG_LD_READLINE_ARGS); + } +#endif + + if ((i=strlen(HTG_LD_EXTRA_ARGS)) > 0) { + strcat(HTG_LD_ARGS, " "); + strcat(HTG_LD_ARGS, HTG_LD_EXTRA_ARGS); + } + +/* fprintf (stderr, "debug: setup_ld_paths 1: HTG_prg_uses_term=%d, HTG_LD_ARGS=%s, i=%d;\n", */ +/* HTG_prg_uses_term, HTG_LD_ARGS, i); */ + + if ((HTG_prg_uses_fileio != 0) && (cmdline_ld_io_args == 0) ) { + strcat(HTG_LD_ARGS, " "); + strcat(HTG_LD_ARGS, HTG_LD_IO_ARGS); + } + + if ((HTG_prg_uses_term != 0) && (cmdline_ld_term_args == 0) ) { + strcat(HTG_LD_ARGS, " "); + strcat(HTG_LD_ARGS, HTG_LD_TERM_ARGS); + } + + if (cmdline_ld_math_args == 0) { + strcat(HTG_LD_ARGS, " "); + strcat(HTG_LD_ARGS, HTG_LD_MATH_ARGS); + } + +#ifdef WANT_ALL_DYNAMIC_LIBS + + if (cmdline_ld_dcall == 0) { + strcat(HTG_LD_ARGS, " "); + strcat(HTG_LD_ARGS, HTG_LD_DCALL_ARGS); + } + +#else + + if ((HTG_prg_uses_dcall != 0) || (HTG_dynamic_flag == 2) ) { + if (cmdline_ld_dcall == 0) { + strcat(HTG_LD_ARGS, " "); + strcat(HTG_LD_ARGS, HTG_LD_DCALL_ARGS); + } + } + +#endif + + if (strlen (HTG_LD_PATHS) > 0) { + strcpy (HTG_LD_RESOPT_ARGS, HTG_LD_PATHS); + strcat(HTG_LD_ARGS, " "); + } + strcat (HTG_LD_RESOPT_ARGS, HTG_LD_ARGS); + +/* fprintf (stderr, "debug: setup_ld_paths 9: HTG_LD_ARGS=%s, HTG_prg_uses_dcall=%d, HTG_prg_uses_term=%d, HTG_prg_uses_fileio=%d, i=%d;\n", */ +/* HTG_LD_ARGS, HTG_prg_uses_dcall, HTG_prg_uses_term, HTG_prg_uses_fileio, i); */ + +} + +/* If resource file not avaiable, use configure defaults */ +void setup_ld_paths_defaults(void) +{ + int i, cmdline_ld_math_args=0, + cmdline_ld_ht1_args=0,/* cmdline_ld_ht2_args=0,*/ + cmdline_ld_io_args=0, cmdline_ld_term_args=0, + cmdline_ld_readline_args=0, + cmdline_ld_dcall=0; + + char *pt=NULL; + char tmp_ld_args[PATHMAX2]; + + strncpy(tmp_ld_args, HTG_LD_CMDLINE_ARGS, PATHMAX2 - 1); + tmp_ld_args[PATHMAX2 - 1] = '\0'; +/* i = strlen(HTG_LD_ARGS); */ +/* fprintf (stderr, "debug: setup_ld_paths 0: HTG_prg_uses_term=%d, HTG_LD_ARGS=%s, i=%d;\n", */ +/* HTG_prg_uses_term, HTG_LD_ARGS, i); */ + + i = 0; + pt = strtok(tmp_ld_args, " "); + while (pt != NULL) { + if (cmdline_ld_ht1_args == 0) { + if ((i=strcmp(HTG_LD_ARGS_HT1, pt)) == 0) { + cmdline_ld_ht1_args = 1; + } + } +#if 0 + if (cmdline_ld_ht2_args == 0) { + if ((i=strcmp(HTG_LD_ARGS_HT2, pt)) == 0) { + cmdline_ld_ht2_args = 1; + } + } +#endif + + if (cmdline_ld_math_args == 0) { + if ((i=strcmp(HTG_LD_MATH_ARGS, pt)) == 0) { + cmdline_ld_math_args = 1; + } + } + + if (cmdline_ld_readline_args == 0) { + if ((i=strcmp(HTG_LD_ARGS_READLINE, pt)) == 0) { + cmdline_ld_readline_args = 1; + } + } + + if (cmdline_ld_dcall == 0) { + if ((i=strcmp(HTG_LD_ARGS_DL, pt)) == 0) { + cmdline_ld_dcall = 1; + } + } + + if (cmdline_ld_io_args == 0) { + if ((i=strcmp(HTG_LD_ARGS_DB, pt)) == 0) { + cmdline_ld_io_args = 1; + } + } + + if (cmdline_ld_term_args == 0) { + if ((i=strcmp(HTG_LD_ARGS_CURSES, pt)) == 0) { + cmdline_ld_term_args= 1; + } + } + + pt = strtok(NULL, " "); + } + + if (cmdline_ld_ht1_args == 0) { + strcat(HTG_LD_ARGS, " "); + strcat(HTG_LD_ARGS, HTG_LD_ARGS_HT1); + } + +/* gcc -g -o dyntest dyntest.o -rdynamic -L. -lhtcobol -lhtcobol2 -lm -ldl */ + if (HTG_prg_uses_dcall == 1) { + strcpy (HTG_LD_DYNAMIC, "-rdynamic"); + strcat (HTG_LD_DYNAMIC, " "); +#if 0 + if (cmdline_ld_ht2_args == 0) { + strcat(HTG_LD_ARGS, " "); + strcat(HTG_LD_ARGS, HTG_LD_ARGS_HT2); + } +#endif + } + +#ifdef WANT_READLINE + if (cmdline_ld_readline_args == 0) { + strcat(HTG_LD_ARGS, " "); + strcat(HTG_LD_ARGS, HTG_LD_ARGS_READLINE); + } +#endif + + + if ((HTG_prg_uses_fileio != 0) && (cmdline_ld_io_args == 0) ) { + strcat(HTG_LD_ARGS, " "); + strcat(HTG_LD_ARGS, HTG_LD_ARGS_DB); + } + + if ((HTG_prg_uses_term != 0) && (cmdline_ld_term_args == 0) ) { + strcat(HTG_LD_ARGS, " "); + strcat(HTG_LD_ARGS, HTG_LD_ARGS_CURSES); + } + + if (cmdline_ld_math_args == 0) { + strcat(HTG_LD_ARGS, " "); + strcat(HTG_LD_ARGS, HTG_LD_MATH_ARGS); + } + +#ifdef WANT_ALL_DYNAMIC_LIBS + + if (cmdline_ld_dcall == 0) { + strcat(HTG_LD_ARGS, " "); + strcat(HTG_LD_ARGS, HTG_LD_ARGS_MATH); + } + +#else + + if ((HTG_prg_uses_dcall != 0) || (HTG_dynamic_flag == 2) ) { + if (cmdline_ld_dcall == 0) { + strcat(HTG_LD_ARGS, " "); + strcat(HTG_LD_ARGS, HTG_LD_ARGS_DL); + } + } + +#endif + + + if (strlen (HTG_LD_PATHS) > 0) { + strcpy (HTG_LD_RESOPT_ARGS, HTG_LD_PATHS); + strcat(HTG_LD_ARGS, " "); + } + else { + strcpy (HTG_LD_RESOPT_ARGS, HTG_LD_PATHS_DEFAULT); + strcat(HTG_LD_ARGS, " "); + } + strcat (HTG_LD_RESOPT_ARGS, HTG_LD_ARGS); + +/* fprintf (stderr, "debug: setup_ld_paths 9: HTG_LD_ARGS=%s, HTG_prg_uses_dcall=%d, HTG_prg_uses_term=%d, HTG_prg_uses_fileio=%d, i=%d;\n", */ +/* HTG_LD_ARGS, HTG_prg_uses_dcall, HTG_prg_uses_term, HTG_prg_uses_fileio, i); */ + + strcpy (HTG_CCX_CMD, TCOB_CCX_CMD); + strcpy (HTG_ASX_CMD, TCOB_ASX_CMD); + +} + + +void print_listing_file(void) +{ + if ((o_src = fopen (output_filename, "w")) == NULL) + { + fprintf (stderr, "Output file '%s' could not be opened for writing ... aborting\n", output_filename); + exit (12); + } + + /* o_src = stderr; */ + if (HTG_list_flag) + { + if (HTG_verbose_verbose == TRUE ) + { + printf ("Listing file '%s'\n", list_filename); + } + if ((o_lst = fopen (list_filename, "a")) == NULL) + { + fprintf (stderr, "* WARNING * Listings file %s could not be opened for writing ...\n", list_filename); + HTG_list_flag = FALSE; + HTG_RETURN_CODE = 4; + } + else + { + fprintf (o_lst, "\n\nError(s) listing:\n\n"); + } + } +} + +int process_pp (void) +{ + int rc=0; + +// fprintf (stderr, "htglobals debug 5: process_pp: HTG_verbose=%d, HTG_verbose_verbose=%d\n", +// HTG_verbose, HTG_verbose_verbose); + if (HTG_verbose_verbose == TRUE) + printf("Pre-processing '%s'\n", input_filename); + + /* Open input file */ + pp_filename = strdup (input_filename); + pp_yyin = fopen(input_filename, "r"); + if ( pp_yyin == NULL ) { + fprintf(stderr, "Error opening input file: %s\n", input_filename); + rc = 3; + return rc; + } + + /* Open output file */ + if (cobpp_flag_E == '0') { + pp_yyout = fopen(working_filename, "w"); +// fprintf(stderr,"Pre-processing output file '%s'\n",working_filename); + if ( pp_yyout == NULL ) { + fprintf(stderr, "Error opening output file: %s\n", working_filename); + fclose(pp_yyin); + rc = 9; + return rc; + } + } + else { + if (strlen (ofile) > 0) { + strcpy (working_filename, ofile); + pp_yyout = fopen(working_filename, "w"); + if (pp_yyout == NULL) { + fprintf(stderr, "Error opening output file: %s\n", working_filename); + fclose(pp_yyin); + rc = 9; + return rc; + } + } + else { + pp_yyout = stdout; + } + } + + /* Open listing file */ + if (HTG_list_flag == TRUE) { + pp_yylist = fopen(list_filename, "w"); + if ( pp_yylist == NULL ) { + fprintf(stderr, "Error opening listing file: %s\n", list_filename ); + fclose(pp_yyin); + if (pp_yyout != stdout) { + fclose(pp_yyout); + } + rc = 11; + return rc; + } + } + +// fprintf(stderr,"will pre-process....\n"); + pp_setup_scanner_state(); + + rc = pp_yyparse(); + +/* fprintf(stderr, "process_pp debug: pre-processor return status=%d\n", rc); */ + + if ((pp_yyin != NULL) && (pp_yyin != stdin)) { + fclose(pp_yyin); + pp_yyin = NULL; + } + + if ((pp_yyout != NULL) && (pp_yyout != stdout)) { + fclose(pp_yyout); + pp_yyout = NULL; + } + + if (pp_yylist != NULL) { + fclose(pp_yylist); + pp_yylist = NULL; + } + + return rc; +} + +int process_compile (void) +{ + int rc=0; + + if (HTG_norun != 0) + return rc; + + if ((yyin = fopen (working_filename, "r")) == NULL) { + printf ("Input file '%s' not found or not readable\n", working_filename); +/* exit (12); */ + rc = 12; + return rc; + } + +/* print_compiler_banner(); */ + + print_copybooks_path(); + + print_listing_file(); + + if (rc > 4) { + return rc; + } + + if (HTG_verbose_verbose == TRUE ) + printf("Processing '%s'\n", input_filename); + + install_reserved(); + + if (HTG_verbose_verbose == TRUE ) + printf("Begining compile process ...\n"); + +/* yydebug=1; */ + yyparse(); + rc = HTG_RETURN_CODE; +/* dcs(); */ /* this is to test the copy statement replacements */ + + if (HTG_verbose_verbose == TRUE ) { +#if 0 + printf("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n"); + printf("+ +\n"); + printf("+ COMPILER SUMMARY +\n"); + printf("+ +\n"); + printf("+ Lines compiled : %4d +\n",source_lineno); + printf("+ Number of warnings : %4d +\n",wrncnt); + printf("+ Number of errors found: %4d +\n",errcnt); + printf("+ +\n"); + printf("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n"); + printf("Writing listing tables..."); +#endif + + printf("Compiler summary:\n"); + printf("Lines compiled : %4d\n",source_lineno); + printf("Number of warnings : %4d\n",wrncnt); + printf("Number of errors found: %4d\n",errcnt); + printf("Writing listing tables ... \n"); + } + +/*dump_symbols();*/ + +#if 0 + if (HTG_verbose_verbose == TRUE ) { + printf("(done)\nUsed stack words: %d\n",stack_offset/2); + } +#endif + + if (HTG_list_flag) { + fflush(o_lst); + fclose(o_lst); + } + fflush(o_src); + fclose(o_src); + fclose(yyin); + + if (source_lineno < 1) { + rc = 16; + } + + return rc; +} + + +void process_select_verify (char compile_level) +{ + char compile_level_0; + + if (HTG_compile_level_flag != HTG_COMPILE_LEVEL) { + switch (HTG_compile_level_flag) { + + case HTG_COMPILE_LEVEL_P: + compile_level_0 = 'E'; + break; + + case HTG_COMPILE_LEVEL_PC: + compile_level_0 = 'S'; + break; + + case HTG_COMPILE_LEVEL_PCA: + compile_level_0 = 'c'; + break; + + case HTG_COMPILE_LEVEL_PCAL: + case HTG_COMPILE_LEVEL_PCAX: + compile_level_0 = 'x'; + break; + + case HTG_COMPILE_LEVEL_PCAS: + compile_level_0 = 'a'; + break; + + case HTG_COMPILE_LEVEL_PCAM: + compile_level_0 = 'm'; + break; + + } + fprintf (stderr, "%s: *** Multiple and/or conflicting command line options, '%c' and '%c', selected. Abort.\n", prg_name, compile_level_0, compile_level); + exit (16); + } +} + +void pass_options_ld (char *s) +{ + char *tp = NULL; + + strcat(HTG_LD_OPTIONS, "-W"); + strcat(HTG_LD_OPTIONS, s); + strcat(HTG_LD_OPTIONS, " "); + + tp = strstr(s, SHLIB_SONAME_STR); + if (tp != NULL) { + HTG_shlib_soname_flag = TRUE; + } +/* fprintf (stderr, "debug: pass_options: HTG_CMDOPT_PASS_OPTIONS=%s:\n", s); */ +} + +int find_copybook_file (char *fname, char *lname) +{ + int r = 1, len;//, sw = 0; + char *pt, + tpath[PATHMAX1], + fname1[PATHMAX], + lname1[PATHMAX1]; + +//printf("find_copybook_file entrou fname %s lname %s\n", fname, lname); + if (lname == NULL) { + if ((*fname == CHR_SQUOTE) || (*fname == CHR_DQUOTE)) { + //sw = STATE_FLIT_LNONE; + strcpy(fname1, fname+1); + len = strlen(fname1); + fname1[len - 1] = CHR_EOS; + r = find_filename_literal(fname1, HTG_COPYDIR); + + } + else { + //sw = STATE_FNAME_LNONE; + strcpy(fname1, fname); + strcpy(HTG_FNAME_SUFFIX, STR_SEARCH_SUFFIXES); + r = find_filename_text(fname1, HTG_COPYDIR, HTG_FNAME_SUFFIX); + } + } + else { + if ((*lname == CHR_SQUOTE) || (*lname == CHR_DQUOTE)) { + strcpy(lname1, lname+1); + len = strlen(lname1); + lname1[len - 1] = CHR_EOS; + strcpy(tpath, lname1); + len = strlen(tpath); + if (len > 0) { + if (tpath[len - 1] != CHR_COLEN) { + strcat(tpath, STR_COLEN); + } + } + if ((*fname == CHR_SQUOTE) || (*fname == CHR_DQUOTE)) { + //sw = STATE_FLIT_LLIT; + strcpy(fname1, fname+1); + len = strlen(fname1); + fname1[len - 1] = CHR_EOS; + r = find_filename_literal(fname1, tpath); + } + else { + //sw = STATE_FNAME_LLIT; + strcpy(fname1, fname); + strcpy(HTG_FNAME_SUFFIX, STR_SEARCH_SUFFIXES); + r = find_filename_text(fname1, tpath, HTG_FNAME_SUFFIX); + } + } + else { + if ((*fname == CHR_SQUOTE) || (*fname == CHR_DQUOTE)) { + //sw = STATE_FLIT_LNAME; + strcpy(fname1, fname+1); + len = strlen(fname1); + fname1[len - 1] = CHR_EOS; + strcpy(lname1, lname); + pt = find_env_variable(lname1); + if (pt != NULL) { + strcpy(tpath, pt); + } + else { + strcpy(tpath, ""); + } + len = strlen(tpath); + if (len > 0) { + if (tpath[len - 1] != CHR_COLEN) { + strcat(tpath, STR_COLEN); + } + } + r = find_filename_literal(fname1, tpath); + } + else { + //sw = STATE_FNAME_LNAME; + strcpy(fname1, fname); + strcpy(lname1, lname); + strcpy(HTG_FNAME_SUFFIX, STR_SEARCH_SUFFIXES); + pt = find_env_variable(lname1); + if (pt != NULL) { + strcpy(tpath, pt); + } + else { + strcpy(tpath, ""); + } + len = strlen(tpath); + if (len > 0) { + if (tpath[len - 1] != CHR_COLEN) { + strcat(tpath, STR_COLEN); + } + } + r = find_filename_text(fname1, tpath, HTG_FNAME_SUFFIX); + } + } + } +// printf("vou retornar daqui\n"); + return r; +} + +int find_filename_literal (char *fname, char *fp) +{ + int r = 1, len, sw1=0; + char *pt1; + struct stat sbuf; + +//printf("find_filename_literal entrou fname %s fp %s tamanho %i \n", fname, fp, strlen(fp)); +//printf("fpath antes %s tamanho %i\n", fpath, strlen(fpath)); + strcpy(fpath, fp); +//printf("fpath depois %s tamanho %i\n", fpath, strlen(fpath)); + + len = strlen(fpath); + if (len == 0) { + sprintf(include_full_filename, "%s", fname); + if (stat(include_full_filename, &sbuf) == 0) { + if (S_ISREG(sbuf.st_mode) && + ((S_IRUSR & sbuf.st_mode) || (S_IRGRP & sbuf.st_mode) || (S_IROTH & sbuf.st_mode))) { + r = 0; + if(HTG_verbose == TRUE) { + printf("found copybook name \'%s\'\n", include_full_filename); + } + } + else { + if(HTG_verbose == TRUE) { + printf("copybook file \'%s\' not readable\n", include_full_filename); + } + } + } + else { + if(HTG_verbose == TRUE) { + printf("copybook file \'%s\' not found\n", include_full_filename); + } + } + } + else { + /* If filename is an absolute path ignore library path */ + if (*fname == CHR_SLASH) { + if(HTG_verbose == TRUE) { + printf("warning: ignoring other search path(s) in absolute path copybook name \'%s\'\n", fname); + } + sprintf(include_full_filename, "%s", fname); + if (stat(include_full_filename, &sbuf) == 0) { + if (S_ISREG(sbuf.st_mode) && + ((S_IRUSR & sbuf.st_mode) || (S_IRGRP & sbuf.st_mode) || (S_IROTH & sbuf.st_mode))) { + r = 0; + if(HTG_verbose == TRUE) { + printf("found copybook name \'%s\'\n", include_full_filename); + } + } + else { + if(HTG_verbose == TRUE) { + printf("copybook file \'%s\' not readable\n", include_full_filename); + } + } + } + else { + if(HTG_verbose == TRUE) { + printf("copybook file \'%s\' not found\n", include_full_filename); + } + } + } + else { + sw1 = 0; + strcpy(fpath, fp); + pt1 = find_token(fpath, STR_COLEN, 0); + if (pt1 == NULL) { + pt1 = fpath; + } + while (sw1 == 0) { + sprintf(include_full_filename, "%s", pt1); + if (stat(include_full_filename, &sbuf) == 0) { + if (S_ISDIR(sbuf.st_mode) && + ((S_IRUSR & sbuf.st_mode) || (S_IRGRP & sbuf.st_mode) || (S_IROTH & sbuf.st_mode))) { + if(HTG_verbose == TRUE) { + printf("searching directory path \'%s\'\n", include_full_filename); + } + sprintf(include_full_filename, "%s/%s", pt1, fname); + if (stat(include_full_filename, &sbuf) == 0) { + if (S_ISREG(sbuf.st_mode) && + ((S_IRUSR & sbuf.st_mode) || (S_IRGRP & sbuf.st_mode) || (S_IROTH & sbuf.st_mode))) { + r = 0; + if(HTG_verbose == TRUE) { + printf("found copybook name \'%s\'\n", include_full_filename); + } + sw1 = 1; + } + else { + if(HTG_verbose == TRUE) { + printf("copybook file \'%s\' not readable\n", include_full_filename); + } + } + } + else { + if(HTG_verbose == TRUE) { + printf("copybook file \'%s\' not found\n", include_full_filename); + } + } + } + else { + if(HTG_verbose == TRUE) { + printf("directory path \'%s\' not readable\n", include_full_filename); + } + } + } + else { + if(HTG_verbose == TRUE) { + printf("directory path \'%s\' not found\n", include_full_filename); + } + } + pt1 = find_token(pt1, STR_COLEN, 1); + if (pt1 == NULL) { + sw1 = 1; + } + } + } + } +//printf("saindo literal %i\n",r); + return r; +} + +int find_filename_text (char *fname, char *fp, char *fs) +{ + int r = 1, len, sw1, sw2; + char *pt1, *pt2; + struct stat sbuf; + +//printf("find_filename_text entrou fname %s fp %s fs %s\n", fname, fp, fs); + strcpy(fpath, fp); + strcpy(fsuffix, fs); + + len = strlen(fpath); + if (len == 0) { + sw1 = 0; + pt1 = find_token(fsuffix, STR_COLEN, 0); + if (pt1 == NULL) { + pt1 = fsuffix; + } + while (sw1 == 0) { + sprintf(include_full_filename, "%s%s", fname, pt1); + if (stat(include_full_filename, &sbuf) == 0) { + if (S_ISREG(sbuf.st_mode) && + ((S_IRUSR & sbuf.st_mode) || (S_IRGRP & sbuf.st_mode) || (S_IROTH & sbuf.st_mode))) { + r = 0; + if(HTG_verbose == TRUE) { + printf("found copybook name \'%s\'\n", include_full_filename); + } + sw1 = 1; + } + else { + if(HTG_verbose == TRUE) { + printf("copybook file \'%s\' not readable\n", include_full_filename); + } + } + sw1 = 1; + } + else { + if(HTG_verbose == TRUE) { + printf("copybook file \'%s\' not found\n", include_full_filename); + } + } + pt1 = find_token(pt1, STR_COLEN, 1); + if (pt1 == NULL) { + sw1 = 1; + } + } + } + else { + sw1 = 0; + sw2 = 0; + strcpy(fpath, fp); + strcpy(fsuffix, fs); + + /* FIXME: This shit must include the current directory on the search, despite of the + the directories present of htcobolrc under COPYBOOK_PATH key */ + pt1 = find_token(fpath, STR_COLEN, 0); + if (pt1 == NULL) { + pt1 = fpath; + } + while (sw1 == 0) { + sprintf(include_full_filename, "%s", pt1); + if (stat(include_full_filename, &sbuf) == 0) { + if (S_ISDIR(sbuf.st_mode) && + ((S_IRUSR & sbuf.st_mode) || (S_IRGRP & sbuf.st_mode) || (S_IROTH & sbuf.st_mode))) { + if(HTG_verbose == TRUE) { + printf("searching directory path \'%s\'\n", include_full_filename); + } + strcpy(fsuffix, fs); + sw2 = 0; + pt2 = find_token(fsuffix, STR_COLEN, 0); + while (sw2 == 0) { + sprintf(include_full_filename, "%s/%s%s", pt1, fname, pt2); + if (stat(include_full_filename, &sbuf) == 0) { + if (S_ISREG(sbuf.st_mode) && + ((S_IRUSR & sbuf.st_mode) || (S_IRGRP & sbuf.st_mode) || (S_IROTH & sbuf.st_mode))) { + r = 0; + if(HTG_verbose == TRUE) { + printf("found copybook name \'%s\'\n", include_full_filename); + } + sw1 = 1; + sw2 = 1; + } + else { + if(HTG_verbose == TRUE) { + printf("copybook file \'%s\' not readable\n", include_full_filename); + } + } + sw2 = 1; + } + else { + if(HTG_verbose == TRUE) { + printf("copybook file \'%s\' not found\n", include_full_filename); + } + } + pt2 = find_token(pt2, STR_COLEN, 1); + if (pt2 == NULL) { + sw2 = 1; + } + } + } + else { + if(HTG_verbose == TRUE) { + printf("directory path \'%s\' not readable\n", include_full_filename); + } + } + } + else { + if(HTG_verbose == TRUE) { + printf("directory path \'%s\' not found\n", include_full_filename); + } + } + pt1 = find_token(pt1, STR_COLEN, 1); + if (pt1 == NULL) { + sw1 = 1; + } + } + } + + return r; +} + +char *find_env_variable (char *ev) +{ + char *pt, ev1[PATHMAX]; + int i, len; + + len = strlen(ev); + for (i=0; i Specify output file name (default name a.out)\n + -fpic Generate position independent code, if possible +*/ + +#ifndef _HTHELP_H +#define _HTHELP_H + +//#define TCOB_LANGUAGE_@tcob_lang@ 1 + +#ifdef TCOB_LANGUAGE_en + +#define HTG_OPTIONS "Compiler specific options:\n"\ +" -h Help (display this listing)\n"\ +" -a Create static library; Preprocess, compile, assemble and archive\n"\ +" -B Specify libraries binding mode ( static or dynamic )\n"\ +" -c Preprocess, compile and assemble, but do not link\n"\ +" -e Specify entry point name (first program to execute)\n"\ +" -E Output preprocessor to standard output only; do not compile, assemble or link\n"\ +" -g Generate compiler debugging output\n"\ +" -l Add library name to link step\n"\ +" -L Add directory to library search path\n"\ +" -m Create shared library; Preprocess, compile, assemble and link\n"\ +" -M