123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- <?xml version="1.0" encoding="utf-8"?>
- <!-- Created by Leo: http://leoeditor.com/leo_toc.html -->
- <leo_file xmlns:leo="http://leoeditor.com/namespaces/leo-python-editor/1.1" >
- <leo_header file_format="2"/>
- <globals/>
- <preferences/>
- <find_panel_settings/>
- <vnodes>
- <v t="knoppix.20191219151124.3"><vh>@path .</vh>
- <v t="caminhante.20200303134742.24"><vh>.fslckout</vh></v>
- <v t="caminhante.20200303134742.15"><vh>@auto erpl.c</vh></v>
- <v t="caminhante.20200303134742.13"><vh>@auto erpl.h</vh></v>
- <v t="caminhante.20200303134742.11"><vh>@auto erplb.c</vh></v>
- <v t="caminhante.20200303134742.10"><vh>@auto erple.c</vh></v>
- <v t="caminhante.20200303134742.9"><vh>@auto erpli.c</vh></v>
- <v t="caminhante.20200303134742.8"><vh>@auto erplm.c</vh></v>
- <v t="caminhante.20200303134742.7"><vh>@auto erplp.c</vh></v>
- <v t="caminhante.20200303134742.6"><vh>@auto erplt.c</vh></v>
- <v t="caminhante.20200303134742.20"><vh>@auto LICENSE</vh></v>
- <v t="caminhante.20200303134742.19"><vh>@auto Makefile</vh></v>
- <v t="caminhante.20200303134742.23"><vh>@auto README.md</vh></v>
- <v t="caminhante.20200303134742.1"><vh>@auto test.c</vh></v>
- <v t="caminhante.20200303140323.1"><vh>@clean erpl2.h</vh></v>
- <v t="caminhante.20200303135444.1"><vh>@clean utils.h</vh></v>
- <v t="caminhante.20200303134742.16"><vh>erpl</vh></v>
- <v t="caminhante.20200303134742.14"><vh>erpl.fossil</vh></v>
- <v t="caminhante.20200303134742.21"><vh>ERPL.leo</vh></v>
- <v t="caminhante.20200303134742.5"><vh>fossil.marks</vh></v>
- <v t="caminhante.20200303135239.1"><vh>git.marks</vh></v>
- <v t="caminhante.20200303134742.3"><vh>senha</vh></v>
- <v t="caminhante.20200303134742.2"><vh>test</vh></v>
- </v>
- <v t="caminhante.20200303134725.1"><vh>@run fossil status</vh></v>
- <v t="caminhante.20200303134550.1"><vh>@run sync Git repo</vh></v>
- <v t="knoppix.20191219151203.1"><vh>@settings</vh>
- <v t="knoppix.20191219151203.2"><vh>@data abbreviations</vh></v>
- <v t="knoppix.20191219151203.3"><vh>nodeActions</vh>
- <v t="knoppix.20191219151203.4"><vh>@run*</vh></v>
- </v>
- </v>
- </vnodes>
- <tnodes>
- <t tx="caminhante.20200303134550.1">cd ../ERPL
- fossil2git.sh ../lisp4 erpl.fossil</t>
- <t tx="caminhante.20200303134725.1">fossil status</t>
- <t tx="caminhante.20200303134742.14"></t>
- <t tx="caminhante.20200303134742.16"></t>
- <t tx="caminhante.20200303134742.2"></t>
- <t tx="caminhante.20200303134742.21"></t>
- <t tx="caminhante.20200303134742.24"></t>
- <t tx="caminhante.20200303134742.3"></t>
- <t tx="caminhante.20200303134742.5"></t>
- <t tx="caminhante.20200303135239.1"></t>
- <t tx="caminhante.20200303135444.1">#ifndef _OBJUTILS_H_
- #define _OBJUTILS_H_
- // Macros and definitions for immutable states and method-calling-based objects model support.
- #define funcptr *const
- #define dataptr const*const
- #define iterptr const*
- #define pointer void dataptr
- #define string char dataptr
- #define interface struct
- #define object const struct
- #define class const struct
- #define objptr(CLASS) struct CLASS dataptr
- #define iterator(CLASS) struct CLASS iterptr
- #define me(CLASS) objptr(CLASS) me
- #define mutable(CLASS,OBJ) *((CLASS const* *) &OBJ)
- #include <ctype.h>
- #include <fcntl.h>
- #include <stdarg.h>
- #include <stdbool.h>
- #include <stddef.h>
- #include <stdint.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <sys/stat.h>
- #include <sys/types.h>
- #include <unistd.h>
- #endif
- </t>
- <t tx="caminhante.20200303140323.1"></t>
- <t tx="knoppix.20191219151124.3"></t>
- <t tx="knoppix.20191219151203.1"></t>
- <t tx="knoppix.20191219151203.2"></t>
- <t tx="knoppix.20191219151203.3"></t>
- <t tx="knoppix.20191219151203.4">@language python
- import subprocess
- def getpath (p):
- dict = c.scanAllDirectives(p)
- d = dict.get("path")
- if p.isAnyAtFileNode():
- filename = p.anyAtFileNodeName()
- filename = g.os_path_join(d,filename)
- if filename:
- d = g.os_path_dirname(filename)
- if d is None:
- return ""
- else:
- return g.os_path_normpath(d)
- def execute (cmd):
- # return subprocess.run(cmd,shell=True,universal_newlines=True,stderr=subprocess.STDOUT,stdout=subprocess.PIPE)
- return subprocess.check_output(cmd,shell=True,universal_newlines=True,stderr=subprocess.STDOUT)
- path = getpath(c.p)
- command = c.p.b
- cmdname = c.p.h
- g.es('---- '+cmdname+' ----')
- g.es(execute('cd "'+path+'";\n'+command))
- g.es('---- end ----')</t>
- </tnodes>
- </leo_file>
|