ERPL.leo 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!-- Created by Leo: http://leoeditor.com/leo_toc.html -->
  3. <leo_file xmlns:leo="http://leoeditor.com/namespaces/leo-python-editor/1.1" >
  4. <leo_header file_format="2"/>
  5. <globals/>
  6. <preferences/>
  7. <find_panel_settings/>
  8. <vnodes>
  9. <v t="knoppix.20191219151124.3"><vh>@path .</vh>
  10. <v t="caminhante.20200303134742.24"><vh>.fslckout</vh></v>
  11. <v t="caminhante.20200303134742.15"><vh>@auto erpl.c</vh></v>
  12. <v t="caminhante.20200303134742.13"><vh>@auto erpl.h</vh></v>
  13. <v t="caminhante.20200303134742.11"><vh>@auto erplb.c</vh></v>
  14. <v t="caminhante.20200303134742.10"><vh>@auto erple.c</vh></v>
  15. <v t="caminhante.20200303134742.9"><vh>@auto erpli.c</vh></v>
  16. <v t="caminhante.20200303134742.8"><vh>@auto erplm.c</vh></v>
  17. <v t="caminhante.20200303134742.7"><vh>@auto erplp.c</vh></v>
  18. <v t="caminhante.20200303134742.6"><vh>@auto erplt.c</vh></v>
  19. <v t="caminhante.20200303134742.20"><vh>@auto LICENSE</vh></v>
  20. <v t="caminhante.20200303134742.19"><vh>@auto Makefile</vh></v>
  21. <v t="caminhante.20200303134742.23"><vh>@auto README.md</vh></v>
  22. <v t="caminhante.20200303134742.1"><vh>@auto test.c</vh></v>
  23. <v t="caminhante.20200303140323.1"><vh>@clean erpl2.h</vh></v>
  24. <v t="caminhante.20200303135444.1"><vh>@clean utils.h</vh></v>
  25. <v t="caminhante.20200303134742.16"><vh>erpl</vh></v>
  26. <v t="caminhante.20200303134742.14"><vh>erpl.fossil</vh></v>
  27. <v t="caminhante.20200303134742.21"><vh>ERPL.leo</vh></v>
  28. <v t="caminhante.20200303134742.5"><vh>fossil.marks</vh></v>
  29. <v t="caminhante.20200303135239.1"><vh>git.marks</vh></v>
  30. <v t="caminhante.20200303134742.3"><vh>senha</vh></v>
  31. <v t="caminhante.20200303134742.2"><vh>test</vh></v>
  32. </v>
  33. <v t="caminhante.20200303134725.1"><vh>@run fossil status</vh></v>
  34. <v t="caminhante.20200303134550.1"><vh>@run sync Git repo</vh></v>
  35. <v t="knoppix.20191219151203.1"><vh>@settings</vh>
  36. <v t="knoppix.20191219151203.2"><vh>@data abbreviations</vh></v>
  37. <v t="knoppix.20191219151203.3"><vh>nodeActions</vh>
  38. <v t="knoppix.20191219151203.4"><vh>@run*</vh></v>
  39. </v>
  40. </v>
  41. </vnodes>
  42. <tnodes>
  43. <t tx="caminhante.20200303134550.1">cd ../ERPL
  44. fossil2git.sh ../lisp4 erpl.fossil</t>
  45. <t tx="caminhante.20200303134725.1">fossil status</t>
  46. <t tx="caminhante.20200303134742.14"></t>
  47. <t tx="caminhante.20200303134742.16"></t>
  48. <t tx="caminhante.20200303134742.2"></t>
  49. <t tx="caminhante.20200303134742.21"></t>
  50. <t tx="caminhante.20200303134742.24"></t>
  51. <t tx="caminhante.20200303134742.3"></t>
  52. <t tx="caminhante.20200303134742.5"></t>
  53. <t tx="caminhante.20200303135239.1"></t>
  54. <t tx="caminhante.20200303135444.1">#ifndef _OBJUTILS_H_
  55. #define _OBJUTILS_H_
  56. // Macros and definitions for immutable states and method-calling-based objects model support.
  57. #define funcptr *const
  58. #define dataptr const*const
  59. #define iterptr const*
  60. #define pointer void dataptr
  61. #define string char dataptr
  62. #define interface struct
  63. #define object const struct
  64. #define class const struct
  65. #define objptr(CLASS) struct CLASS dataptr
  66. #define iterator(CLASS) struct CLASS iterptr
  67. #define me(CLASS) objptr(CLASS) me
  68. #define mutable(CLASS,OBJ) *((CLASS const* *) &amp;OBJ)
  69. #include &lt;ctype.h&gt;
  70. #include &lt;fcntl.h&gt;
  71. #include &lt;stdarg.h&gt;
  72. #include &lt;stdbool.h&gt;
  73. #include &lt;stddef.h&gt;
  74. #include &lt;stdint.h&gt;
  75. #include &lt;stdio.h&gt;
  76. #include &lt;stdlib.h&gt;
  77. #include &lt;string.h&gt;
  78. #include &lt;sys/stat.h&gt;
  79. #include &lt;sys/types.h&gt;
  80. #include &lt;unistd.h&gt;
  81. #endif
  82. </t>
  83. <t tx="caminhante.20200303140323.1"></t>
  84. <t tx="knoppix.20191219151124.3"></t>
  85. <t tx="knoppix.20191219151203.1"></t>
  86. <t tx="knoppix.20191219151203.2"></t>
  87. <t tx="knoppix.20191219151203.3"></t>
  88. <t tx="knoppix.20191219151203.4">@language python
  89. import subprocess
  90. def getpath (p):
  91. dict = c.scanAllDirectives(p)
  92. d = dict.get("path")
  93. if p.isAnyAtFileNode():
  94. filename = p.anyAtFileNodeName()
  95. filename = g.os_path_join(d,filename)
  96. if filename:
  97. d = g.os_path_dirname(filename)
  98. if d is None:
  99. return ""
  100. else:
  101. return g.os_path_normpath(d)
  102. def execute (cmd):
  103. # return subprocess.run(cmd,shell=True,universal_newlines=True,stderr=subprocess.STDOUT,stdout=subprocess.PIPE)
  104. return subprocess.check_output(cmd,shell=True,universal_newlines=True,stderr=subprocess.STDOUT)
  105. path = getpath(c.p)
  106. command = c.p.b
  107. cmdname = c.p.h
  108. g.es('---- '+cmdname+' ----')
  109. g.es(execute('cd "'+path+'";\n'+command))
  110. g.es('---- end ----')</t>
  111. </tnodes>
  112. </leo_file>