Skip to content

Commit

Permalink
Added getc commadn to import c code as aa_macro
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Williams authored and Ben Williams committed Sep 13, 2017
1 parent ad074dd commit ca30a52
Show file tree
Hide file tree
Showing 8 changed files with 219 additions and 3 deletions.
58 changes: 55 additions & 3 deletions aa_macro.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ class macro(object):
you written your congresscritter about patent and
copyright reform yet?
Incep Date: June 17th, 2015 (for Project)
LastRev: January 31st, 2017 (for Class)
LastDocRev: January 31st, 2017 (for Class)
LastRev: September 13th, 2017 (for Class)
LastDocRev: September 13th, 2017 (for Class)
Tab spacing: 4 (set your editor to this for sane formatting while reading)
Dev Env: OS X 10.6.8, Python 2.6.1 from inception
OS X 10.12, Python 2.7.10 as of Jan 31st, 2017
Expand Down Expand Up @@ -64,7 +64,7 @@ class macro() is for authoring by you, the person who ISN'T trying to
someone who wants to do you wrong. Having said that, see the sanitize()
utility function within this class.
1st-Rel: 1.0.0
Version: 1.0.86 Beta
Version: 1.0.87 Beta
History: (for Class)
See changelog.md
Expand Down Expand Up @@ -166,6 +166,7 @@ class macro() is for authoring by you, the person who ISN'T trying to
[hmap listName] # creates 256-entry list of 1:1 2-digit hex char mappings
[postparse pythoncode] # pretty-prints python (must replace [] {})
[pythparse pythoncode] # pretty-prints python into local loc_pyth
[getc (tabsiz=n,)(tabchar=X,)filename] # c file to aa_macro format
[lsub (ci=1,)(sep=X,)listName,content] # sequenced replacement by list
[dlist (style=X,)(fs=X,)(ls=X,)(parms=X,)(inter=X)(ntl=X)(posts=X,)listName]
# output list elements, can be wrapped with style X
Expand Down Expand Up @@ -3968,6 +3969,56 @@ def hug_fn(self,tag,data):
o = ' !embrace "%s" fail: %s! ' % (data,e)
return o

def getc_fn(self,tag,data):
o = ''
opts,data = self.popts(['tabsiz','tabchar'],data)
tabsiz = 4
tabchar = ' '
for el in opts:
if el[0] == 'tabsiz=':
try:
tabsiz = int(el[1])
except:
pass
if el[0] == 'tabchar=':
if el[1] == 'sp':
tabchar = ' '
else:
tabchar = el[1]
filename = data
try:
fh = open(filename)
except:
o = '--unable to open "%s"--' % (filename)
else:
tr = tabchar * tabsiz
try:
for line in fh:
for c in line:
if c == chr(9):
o += tr
elif c == '<': o += '&lt;'
elif c == '>': o += '&gt;'
elif c == '[': o += '[lb]'
elif c == ']': o += '[rb]'
elif c == '{': o += '[ls]'
elif c == '}': o += '[rs]'
elif c == '"': o += '&quot;'
elif c == '&': o += '&amp;'
else: o += c
except:
try:
fh.close()
except:
pass
o += '--error while reading "%s"--' % (filename)
else:
try:
fh.close()
except:
o += '--error closing "%s"--' % (filename)
return o

def setFuncs(self): # '':self._fn,
self.fns = {
# escape codes
Expand Down Expand Up @@ -4171,6 +4222,7 @@ def setFuncs(self): # '':self._fn,
'pythparse':self.pythparse_fn, # [pythparse text]
'th' : self.th_fn, # [th integer] = st, nd, rd, th
'nd' : self.nd_fn, # [th integer] = 1st, 2nd, 3rd, 4th
'getc' : self.getc_fn, # [getc filename] import c text

# Miscellaneous
# -------------
Expand Down
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ This log reflects changes to the aa_macro.py import library. Other changes
such as to the associated utlitilies and sample files are not tracked here.

### Log
1.0.87
* [getc filename] added, loads c source file and converts to aa_macro

1.0.86
* [load] and [gload] added, new forvariable.txt file in repo for testing

Expand Down
77 changes: 77 additions & 0 deletions expected.html
Original file line number Diff line number Diff line change
Expand Up @@ -663,3 +663,80 @@ <h3>humma humma</h3>
Larry: W3OZ
Marty: KA7GKN
barbeque dolly

// plugin_demo.c
// -------------
// tab stops every 4 spaces

#include &lt;math.h&gt;
#include &lt;string.h&gt;
#include &quot;developer.h&quot;

void pengine(struct plug *p,long start,long finish,struct pkg *(*service)(struct req *p))&nbsp;&nbsp;&nbsp;&nbsp;// sets 64K remap
[ls]
long i,v,b;

&nbsp;&nbsp;&nbsp;&nbsp;b = (p-&gt;f[lb]0[rb] - 100.0f) * 655.35f;&nbsp;&nbsp;&nbsp;&nbsp;// b is now [lb]-65535...65535[rb]
&nbsp;&nbsp;&nbsp;&nbsp;for (i = start; i &lt; finish; i++)&nbsp;&nbsp;&nbsp;&nbsp;// we set this range to [lb]0...65536[rb]
&nbsp;&nbsp;&nbsp;&nbsp;[ls]
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;v = i + b;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// temp brightness adjust;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (v &lt; 0) v = 0;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// now limit remap range...
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (v &gt; 65535) v = 65535;&nbsp;&nbsp;&nbsp;&nbsp;// ...to acceptable bounds
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;p-&gt;lr[lb]i[rb] = v;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// install in remap channel
&nbsp;&nbsp;&nbsp;&nbsp;[rs]
[rs]

void dengine(struct plug *p,long start,long finish,struct pkg *(*service)(struct req *p))&nbsp;&nbsp;&nbsp;&nbsp;// generates output
[ls]
long i;

&nbsp;&nbsp;&nbsp;&nbsp;for (i = start; i &lt; finish; i++) // 1-dimensional pixel processing
&nbsp;&nbsp;&nbsp;&nbsp;[ls]
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;p-&gt;sr[lb]i[rb] = p-&gt;lr[lb]p-&gt;mr[lb]i[rb][rb];&nbsp;&nbsp;&nbsp;&nbsp;// remap pixel brightness
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;p-&gt;sg[lb]i[rb] = p-&gt;lr[lb]p-&gt;mg[lb]i[rb][rb];&nbsp;&nbsp;&nbsp;&nbsp;// ...using 64k table in layer
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;p-&gt;sb[lb]i[rb] = p-&gt;lr[lb]p-&gt;mb[lb]i[rb][rb];&nbsp;&nbsp;&nbsp;&nbsp;// ...
&nbsp;&nbsp;&nbsp;&nbsp;[rs]
[rs]

void setup(struct plugin *p)&nbsp;&nbsp;&nbsp;&nbsp;// NOTE: most struct elements are preset to 0,
[ls]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// if that is the setting you need, it's there.
#include &quot;ak_pu_date.txt&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// this inserts the current date in the plugin

&nbsp;&nbsp;&nbsp;&nbsp;p-&gt;layer_pri&nbsp;&nbsp;&nbsp;&nbsp;= 9500;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// layer priority (posit in fx stack - see developer.h)
&nbsp;&nbsp;&nbsp;&nbsp;strcpy(p-&gt;panel.n,&quot;Brightness&quot;);&nbsp;&nbsp;&nbsp;&nbsp;// name appearing on panel
&nbsp;&nbsp;&nbsp;&nbsp;p-&gt;pthread[lb]0[rb]&nbsp;&nbsp;&nbsp;&nbsp;= 1;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// plugin desires pengine() threading
&nbsp;&nbsp;&nbsp;&nbsp;p-&gt;prange_methods[lb]0[rb]= 2;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// custom range for pengine()
&nbsp;&nbsp;&nbsp;&nbsp;p-&gt;pfinish[lb]0[rb]&nbsp;&nbsp;&nbsp;&nbsp;= 65536;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// end+1 range for pengine() to process
&nbsp;&nbsp;&nbsp;&nbsp;p-&gt;dthread[lb]0[rb]&nbsp;&nbsp;&nbsp;&nbsp;= 1;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// plugin desires dengine() threading
&nbsp;&nbsp;&nbsp;&nbsp;p-&gt;promotable&nbsp;&nbsp;&nbsp;&nbsp;= 1;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// BUT user can add alpha, paint
&nbsp;&nbsp;&nbsp;&nbsp;p-&gt;req_lr&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 65536;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// we'd like 1 layer of this size in lr
&nbsp;&nbsp;&nbsp;&nbsp;p-&gt;slider_req&nbsp;&nbsp;&nbsp;&nbsp;= 1;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// we'd like 1 slider (#0)
&nbsp;&nbsp;&nbsp;&nbsp;strcpy(p-&gt;sliders[lb]0[rb].n,&quot;Intensity&quot;);// legend for slider
&nbsp;&nbsp;&nbsp;&nbsp;p-&gt;forder[lb]0[rb]&nbsp;&nbsp;&nbsp;&nbsp;= 20;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// position on line zero
&nbsp;&nbsp;&nbsp;&nbsp;p-&gt;svalues[lb]0[rb]&nbsp;&nbsp;&nbsp;&nbsp;= 100.0f;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// initial value
&nbsp;&nbsp;&nbsp;&nbsp;p-&gt;zvalues[lb]0[rb]&nbsp;&nbsp;&nbsp;&nbsp;= 200.0f;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// initial hi value (user settable)
&nbsp;&nbsp;&nbsp;&nbsp;p-&gt;ticks[lb]0[rb] = 21;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Ten ticks per hundred
[rs]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// (low values default to 0.0f)

void init(struct plug *pl,struct pkg *(*service)(struct req *p)) // called before pengine() and dengine()
[ls]
struct req r;
struct pkg *p;
char *msg = &quot;demo plugin init&quot;;
&nbsp;&nbsp;&nbsp;&nbsp;// the following just demonstrates using the service function
&nbsp;&nbsp;&nbsp;&nbsp;r.svc = REQ_STATUS;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// request status line message service
&nbsp;&nbsp;&nbsp;&nbsp;r.p1 = msg;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// set up request with proper parameter
&nbsp;&nbsp;&nbsp;&nbsp;p = service(&amp;r);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// send msg to status line, get package back
[rs]

void cleanup(struct plug *pl,struct pkg *(*service)(struct req *p))&nbsp;&nbsp;&nbsp;&nbsp;// called after all pengine() and dengine threads complete
[ls]
struct req r;
struct pkg *p;
char *msg = &quot;demo plugin cleanup&quot;;
&nbsp;&nbsp;&nbsp;&nbsp;// the following just demonstrates using the service function
&nbsp;&nbsp;&nbsp;&nbsp;r.svc = REQ_STATUS;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// request status line message service
&nbsp;&nbsp;&nbsp;&nbsp;r.p1 = msg;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// set up request with proper parameter
&nbsp;&nbsp;&nbsp;&nbsp;p = service(&amp;r);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// send msg to status line, get package back
[rs]

2 changes: 2 additions & 0 deletions mactest.txt
Original file line number Diff line number Diff line change
Expand Up @@ -654,3 +654,5 @@ if 5 >= 6 gte = [ifge 5,6,gte]
[style foo barbeque]
[ifge style=foo,4,5, hello[nl]]
[ifge style=foo,5,4, dolly[nl]]

[getc plugin_demo.c]
75 changes: 75 additions & 0 deletions plugin_demo.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
// plugin_demo.c
// -------------
// tab stops every 4 spaces

#include <math.h>
#include <string.h>
#include "developer.h"

void pengine(struct plug *p,long start,long finish,struct pkg *(*service)(struct req *p)) // sets 64K remap
{
long i,v,b;

b = (p->f[0] - 100.0f) * 655.35f; // b is now [-65535...65535]
for (i = start; i < finish; i++) // we set this range to [0...65536]
{
v = i + b; // temp brightness adjust;
if (v < 0) v = 0; // now limit remap range...
if (v > 65535) v = 65535; // ...to acceptable bounds
p->lr[i] = v; // install in remap channel
}
}

void dengine(struct plug *p,long start,long finish,struct pkg *(*service)(struct req *p)) // generates output
{
long i;

for (i = start; i < finish; i++) // 1-dimensional pixel processing
{
p->sr[i] = p->lr[p->mr[i]]; // remap pixel brightness
p->sg[i] = p->lr[p->mg[i]]; // ...using 64k table in layer
p->sb[i] = p->lr[p->mb[i]]; // ...
}
}

void setup(struct plugin *p) // NOTE: most struct elements are preset to 0,
{ // if that is the setting you need, it's there.
#include "ak_pu_date.txt" // this inserts the current date in the plugin

p->layer_pri = 9500; // layer priority (posit in fx stack - see developer.h)
strcpy(p->panel.n,"Brightness"); // name appearing on panel
p->pthread[0] = 1; // plugin desires pengine() threading
p->prange_methods[0]= 2; // custom range for pengine()
p->pfinish[0] = 65536; // end+1 range for pengine() to process
p->dthread[0] = 1; // plugin desires dengine() threading
p->promotable = 1; // BUT user can add alpha, paint
p->req_lr = 65536; // we'd like 1 layer of this size in lr
p->slider_req = 1; // we'd like 1 slider (#0)
strcpy(p->sliders[0].n,"Intensity");// legend for slider
p->forder[0] = 20; // position on line zero
p->svalues[0] = 100.0f; // initial value
p->zvalues[0] = 200.0f; // initial hi value (user settable)
p->ticks[0] = 21; // Ten ticks per hundred
} // (low values default to 0.0f)

void init(struct plug *pl,struct pkg *(*service)(struct req *p)) // called before pengine() and dengine()
{
struct req r;
struct pkg *p;
char *msg = "demo plugin init";
// the following just demonstrates using the service function
r.svc = REQ_STATUS; // request status line message service
r.p1 = msg; // set up request with proper parameter
p = service(&r); // send msg to status line, get package back
}

void cleanup(struct plug *pl,struct pkg *(*service)(struct req *p)) // called after all pengine() and dengine threads complete
{
struct req r;
struct pkg *p;
char *msg = "demo plugin cleanup";
// the following just demonstrates using the service function
r.svc = REQ_STATUS; // request status line message service
r.p1 = msg; // set up request with proper parameter
p = service(&r); // send msg to status line, get package back
}
3 changes: 3 additions & 0 deletions quickref.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@




<HTML>
<HEADER>
<TITLE>Macro() Quick Reference</TITLE>
Expand Down Expand Up @@ -84,6 +85,7 @@ <h2>Functional Groupings</h2>
<tr bgcolor="#000000"><td><tt><font color="#00FFFF">&#91;</font>translate <b><font color="#FF0000">pre=PRE&#44;</font></b><b><font color="#FF0000">post=POST&#44;</font></b><b><font color="#FF0000">inter=INTER&#44;</font></b><b><font color="#00FF00">listName&#44;</font></b><b><font color="#FFFF00">content</font></b><font color="#00FFFF">&#93;</font></tt></td><td> translate content using character map formatted list</td></tr>
<tr bgcolor="#181818"><td><tt><font color="#00FFFF">&#91;</font>postparse <b><font color="#FFFF00">content</font></b><font color="#00FFFF">&#93;</font></tt></td><td> pretty-print Python 2.7 code (use black background)</td></tr>
<tr bgcolor="#000000"><td><tt><font color="#00FFFF">&#91;</font>pythparse <b><font color="#FFFF00">content</font></b><font color="#00FFFF">&#93;</font></tt></td><td> pretty-print Python 2.7 code (use black background)</td></tr>
<tr bgcolor="#181818"><td><tt><font color="#00FFFF">&#91;</font>getc <b><font color="#FF0000">tabsiz=n&#44;</font></b><b><font color="#FF0000">tabchar=X&#44;</font></b>filename<font color="#00FFFF">&#93;</font></tt></td><td> import c source file as aa_macro</td></tr>
<tr><th colspan=2>&nbsp;</th></tr><tr><th bgcolor="#444444" colspan=2><font color="#00FFFF">Data Dictionaries</font></th></tr>
<tr bgcolor="#000000"><td><tt><font color="#00FFFF">&#91;</font>dict <b><font color="#FF0000">sep=X&#44;</font></b><b><font color="#FF0000">keysep=Y&#44;</font></b><b><font color="#00FF00">dictName&#44;</font></b><b><font color="#00FF00">keyYvalue<b><font color="#FF0000">XkeyYvalue</font></b></font></b><font color="#00FFFF">&#93;</font></tt></td><td> create/replace dictionary</td></tr>
<tr bgcolor="#181818"><td><tt><font color="#00FFFF">&#91;</font>dcopy <b><font color="#00FF00">sourceDictionary&#44;</font></b><b><font color="#00FF00">destinationDictionary</font></b><font color="#00FFFF">&#93;</font></tt></td><td> copy/replace destination with source</td></tr>
Expand Down Expand Up @@ -252,6 +254,7 @@ <h2>Alphabetical Order</h2>
<tr><td><tt><font color="#00FFFF">&#91;</font>flush<font color="#00FFFF">&#93;</font></tt></td><td> delete stack contents</td></tr>
<tr><td><tt><font color="#00FFFF">&#91;</font>for <b><font color="#00FF00">styleName</font></b>&#44;<b><font color="#00FF00">X</font></b>&#44;<b><font color="#00FF00">Y</font></b>&#44;<b><font color="#00FF00">Z</font></b><font color="#00FFFF">&#93;</font></tt></td><td> iterates number to style</td></tr>
<tr><td><tt><font color="#00FFFF">&#91;</font>fref <b><font color="#00FF00">lable</font></b><font color="#00FFFF">&#93;</font></tt></td><td> forward (or backward) reference</td></tr>
<tr><td><tt><font color="#00FFFF">&#91;</font>getc <b><font color="#FF0000">tabsiz=n&#44;</font></b><b><font color="#FF0000">tabchar=X&#44;</font></b>filename<font color="#00FFFF">&#93;</font></tt></td><td> import c source file as aa_macro</td></tr>
<tr><td><tt><font color="#00FFFF">&#91;</font>ghost <b><font color="#FF0000">source=global&#124;local&#44;</font></b><b><font color="#00FF00">stylename</font></b><font color="#00FFFF">&#93;</font></tt></td><td> output style without processing it</td></tr>
<tr><td><tt><font color="#00FFFF">&#91;</font>gload <b><font color="#00FF00">varName</font></b> ? Unknown Style "fileName" ?<font color="#00FFFF">&#93;</font></tt></td><td> load file into global variable</td></tr>
<tr><td><tt><font color="#00FFFF">&#91;</font>global <b><font color="#00FF00">varName</font></b> <b><font color="#FFFF00">varContent</font></b><font color="#00FFFF">&#93;</font></tt></td><td> global variable definition</td></tr>
Expand Down
3 changes: 3 additions & 0 deletions quickref.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@




# Macro() BETA Quick Reference
## Functional Groupings

Expand Down Expand Up @@ -97,6 +98,7 @@ Data Lists | &nbsp;
<tt>&#91;translate \(pre=PRE&#44;\)\(post=POST&#44;\)\(inter=INTER&#44;\)**listName&#44;**content&#93;</tt> | translate content using character map formatted list
<tt>&#91;postparse content&#93;</tt> | pretty-print Python 2.7 code (use black background)
<tt>&#91;pythparse content&#93;</tt> | pretty-print Python 2.7 code (use black background)
<tt>&#91;getc \(tabsiz=n&#44;\)\(tabchar=X&#44;\)filename&#93;</tt> | import c source file as aa_macro

Data Dictionaries | &nbsp;
----------------- | ----
Expand Down Expand Up @@ -284,6 +286,7 @@ Built-in | &nbsp;
<tt>&#91;flush&#93;</tt> | delete stack contents
<tt>&#91;for **styleName**&#44;**X**&#44;**Y**&#44;**Z**&#93;</tt> | iterates number to style
<tt>&#91;fref **lable**&#93;</tt> | forward (or backward) reference
<tt>&#91;getc \(tabsiz=n&#44;\)\(tabchar=X&#44;\)filename&#93;</tt> | import c source file as aa_macro
<tt>&#91;ghost \(source=global&#124;local&#44;\)**stylename**&#93;</tt> | output style without processing it
<tt>&#91;gload **varName** ? Unknown Style "fileName" ?&#93;</tt> | load file into global variable
<tt>&#91;global **varName** varContent&#93;</tt> | global variable definition
Expand Down
1 change: 1 addition & 0 deletions quickref.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ Markdown: aagen -i qr_markdown.txt -f quickref.md quickref.txt
[append bil,translate {o pre=PRE{co}}{o post=POST{co}}{o inter=INTER{co}}{r listName{co}}{c}| translate content using character map formatted list]
[append bil,postparse {c}| pretty-print Python 2.7 code (use black background)]
[append bil,pythparse {c}| pretty-print Python 2.7 code (use black background)]
[append bil,getc {o tabsiz=n{co}}{o tabchar=X{co}}filename| import c source file as aa_macro]

[append bil,dict {o sep=X{co}}{o keysep=Y{co}}{r dictName{co}}{r keyYvalue{o XkeyYvalue}}| create/replace dictionary~Data Dictionaries]
[append bil,dcopy {r sourceDictionary{co}}{r destinationDictionary}| copy/replace destination with source]
Expand Down

0 comments on commit ca30a52

Please sign in to comment.