[Pkg-virtualbox-commits] [kbuild] 04/05: Imported Upstream version 0.1.9998svn2784+dfsg
Gianfranco Costamagna
locutusofborg-guest at moszumanska.debian.org
Mon Jun 1 08:22:13 UTC 2015
This is an automated email from the git hooks/post-receive script.
locutusofborg-guest pushed a commit to branch master
in repository kbuild.
commit fa1316e28d2dc952ca4911bb02a8d91bbb29cbf6
Author: Gianfranco Costamagna <costamagnagianfranco at yahoo.it>
Date: Mon Jun 1 10:20:50 2015 +0200
Imported Upstream version 0.1.9998svn2784+dfsg
---
{VSlickMacros => SlickEdit}/kdev.e | 0
{VSlickMacros => SlickEdit}/kkeys.e | 0
SlickEdit/uscheme.ini | 257 ++++++++++++++++++++++++
{VSlickMacros => SlickEdit}/user.vlx | 0
{VSlickMacros => SlickEdit}/usrprjtemplates.vpt | 0
{VSlickMacros => SlickEdit}/vusr_beautifier.xml | 0
src/kash/shinstance.c | 81 +++++++-
7 files changed, 329 insertions(+), 9 deletions(-)
diff --git a/VSlickMacros/kdev.e b/SlickEdit/kdev.e
similarity index 100%
rename from VSlickMacros/kdev.e
rename to SlickEdit/kdev.e
diff --git a/VSlickMacros/kkeys.e b/SlickEdit/kkeys.e
similarity index 100%
rename from VSlickMacros/kkeys.e
rename to SlickEdit/kkeys.e
diff --git a/SlickEdit/uscheme.ini b/SlickEdit/uscheme.ini
new file mode 100644
index 0000000..aa904cf
--- /dev/null
+++ b/SlickEdit/uscheme.ini
@@ -0,0 +1,257 @@
+[Solarized Dark]
+VERSION=22
+ASSOCIATED_SYMBOL_SCHEME=(None)
+CFG_SELECTIONfg=0x969483
+CFG_SELECTIONbg=0x423607
+CFG_SELECTIONff=0x0
+CFG_SELECTIONem=0x63510A
+CFG_WINDOW_TEXTfg=0x969483
+CFG_WINDOW_TEXTbg=0x362B00
+CFG_WINDOW_TEXTff=0x0
+CFG_WINDOW_TEXTem=0x1A1400
+CFG_CLINEfg=0xFFFFFF
+CFG_CLINEbg=0x605030
+CFG_CLINEff=0x0
+CFG_CLINEem=0x908060
+CFG_SELECTED_CLINEfg=0xFFFF
+CFG_SELECTED_CLINEbg=0x80C400
+CFG_SELECTED_CLINEff=0x0
+CFG_SELECTED_CLINEem=0x509400
+CFG_MESSAGEfg=0x80000008
+CFG_MESSAGEbg=0x80000005
+CFG_MESSAGEff=0x0
+CFG_STATUSfg=0x80000008
+CFG_STATUSbg=0xFFFFFF
+CFG_STATUSff=0x0
+CFG_CURSORfg=0x0
+CFG_CURSORbg=0xE8E8C0
+CFG_CURSORff=0x0
+CFG_CURSORem=0xB8B890
+CFG_ERRORfg=0x8236D3
+CFG_ERRORbg=0x362B00
+CFG_ERRORff=0x2000
+CFG_ERRORem=0x1A1400
+CFG_MODIFIED_LINEfg=0xFFFFFF
+CFG_MODIFIED_LINEbg=0xFF
+CFG_MODIFIED_LINEff=0x0
+CFG_MODIFIED_LINEem=0xCF
+CFG_INSERTED_LINEfg=0xFFFFFF
+CFG_INSERTED_LINEbg=0x80
+CFG_INSERTED_LINEff=0x0
+CFG_INSERTED_LINEem=0x3030B0
+CFG_KEYWORDfg=0x1689B5
+CFG_KEYWORDbg=0x362B00
+CFG_KEYWORDff=0x2000
+CFG_KEYWORDem=0x1A1400
+CFG_LINENUMfg=0x969483
+CFG_LINENUMbg=0x423607
+CFG_LINENUMff=0x0
+CFG_LINENUMem=0x303030
+CFG_NUMBERfg=0x98A12A
+CFG_NUMBERbg=0x362B00
+CFG_NUMBERff=0x2000
+CFG_NUMBERem=0x1A1400
+CFG_STRINGfg=0x9985
+CFG_STRINGbg=0x362B00
+CFG_STRINGff=0x2000
+CFG_STRINGem=0x1A1400
+CFG_COMMENTfg=0xA100
+CFG_COMMENTbg=0x362B00
+CFG_COMMENTff=0x2000
+CFG_COMMENTem=0x1A1400
+CFG_PPKEYWORDfg=0x164BCB
+CFG_PPKEYWORDbg=0x362B00
+CFG_PPKEYWORDff=0x2001
+CFG_PPKEYWORDem=0x1A1400
+CFG_PUNCTUATIONfg=0x98A12A
+CFG_PUNCTUATIONbg=0x362B00
+CFG_PUNCTUATIONff=0x2000
+CFG_PUNCTUATIONem=0x1A1400
+CFG_LIBRARY_SYMBOLfg=0xC0C000
+CFG_LIBRARY_SYMBOLbg=0x362B00
+CFG_LIBRARY_SYMBOLff=0x2000
+CFG_LIBRARY_SYMBOLem=0x1A1400
+CFG_OPERATORfg=0x2F32DC
+CFG_OPERATORbg=0x362B00
+CFG_OPERATORff=0x2000
+CFG_OPERATORem=0x1A1400
+CFG_USER_DEFINEDfg=0xFF
+CFG_USER_DEFINEDbg=0x362B00
+CFG_USER_DEFINEDff=0x2000
+CFG_USER_DEFINEDem=0x1A1400
+CFG_IMAGINARY_LINEfg=0xFFFFFF
+CFG_IMAGINARY_LINEbg=0xFF0000
+CFG_IMAGINARY_LINEff=0x0
+CFG_IMAGINARY_LINEem=0xCF0000
+CFG_FUNCTIONfg=0xDB8B26
+CFG_FUNCTIONbg=0x362B00
+CFG_FUNCTIONff=0x2001
+CFG_FUNCTIONem=0x1A1400
+CFG_LINEPREFIXAREAfg=0xA1A193
+CFG_LINEPREFIXAREAbg=0x423600
+CFG_LINEPREFIXAREAff=0x1
+CFG_FILENAMEfg=0x0
+CFG_FILENAMEbg=0xFFFF00
+CFG_FILENAMEff=0x0
+CFG_FILENAMEem=0xCFCF00
+CFG_HILIGHTfg=0xFFFFFF
+CFG_HILIGHTbg=0x808000
+CFG_HILIGHTff=0x0
+CFG_HILIGHTem=0x505000
+CFG_ATTRIBUTEfg=0x9985
+CFG_ATTRIBUTEbg=0x362B00
+CFG_ATTRIBUTEff=0x2001
+CFG_ATTRIBUTEem=0x1A1400
+CFG_UNKNOWNXMLELEMENTfg=0x2F32DC
+CFG_UNKNOWNXMLELEMENTbg=0x362B00
+CFG_UNKNOWNXMLELEMENTff=0x2001
+CFG_UNKNOWNXMLELEMENTem=0x1A1400
+CFG_XHTMLELEMENTINXSLfg=0x80FF
+CFG_XHTMLELEMENTINXSLbg=0x362B00
+CFG_XHTMLELEMENTINXSLff=0x2001
+CFG_XHTMLELEMENTINXSLem=0x1A1400
+CFG_SPECIALCHARSfg=0xC0C0C0
+CFG_SPECIALCHARSbg=0xFFFFFF
+CFG_SPECIALCHARSff=0x0
+CFG_SPECIALCHARSem=0xCFCFCF
+CFG_CURRENT_LINE_BOXfg=0xFF8080
+CFG_CURRENT_LINE_BOXbg=0xFF8080
+CFG_CURRENT_LINE_BOXff=0x0
+CFG_VERTICAL_COL_LINEfg=0x164BCB
+CFG_VERTICAL_COL_LINEbg=0x164BCB
+CFG_VERTICAL_COL_LINEff=0x0
+CFG_MARGINS_COL_LINEfg=0x808080
+CFG_MARGINS_COL_LINEbg=0x808080
+CFG_MARGINS_COL_LINEff=0x0
+CFG_TRUNCATION_COL_LINEfg=0xFF
+CFG_TRUNCATION_COL_LINEbg=0xFF
+CFG_TRUNCATION_COL_LINEff=0x0
+CFG_PREFIX_AREA_LINEfg=0x808080
+CFG_PREFIX_AREA_LINEbg=0x808080
+CFG_PREFIX_AREA_LINEff=0x0
+CFG_BLOCK_MATCHINGfg=0xFFFFFF
+CFG_BLOCK_MATCHINGbg=0x837B65
+CFG_BLOCK_MATCHINGff=0x0
+CFG_BLOCK_MATCHINGem=0xCF0000
+CFG_INC_SEARCH_CURRENTfg=0x0
+CFG_INC_SEARCH_CURRENTbg=0xFFFF80
+CFG_INC_SEARCH_CURRENTff=0x0
+CFG_INC_SEARCH_CURRENTem=0xCFCF50
+CFG_INC_SEARCH_MATCHfg=0x0
+CFG_INC_SEARCH_MATCHbg=0x80FFFF
+CFG_INC_SEARCH_MATCHff=0x0
+CFG_INC_SEARCH_MATCHem=0x50CFCF
+CFG_HEX_MODE_COLORfg=0x2F32DC
+CFG_HEX_MODE_COLORbg=0xF0F0F0
+CFG_HEX_MODE_COLORff=0x1
+CFG_HEX_MODE_COLORem=0xC0C0C0
+CFG_SYMBOL_HIGHLIGHTfg=0x98A12A
+CFG_SYMBOL_HIGHLIGHTbg=0x362B00
+CFG_SYMBOL_HIGHLIGHTff=0x2000
+CFG_SYMBOL_HIGHLIGHTem=0x1A1400
+CFG_DOCUMENT_TAB_MODIFIEDfg=0xFF
+CFG_DOCUMENT_TAB_MODIFIEDbg=0xFFFFFF
+CFG_DOCUMENT_TAB_MODIFIEDff=0x0
+CFG_LINE_COMMENTfg=0xA100
+CFG_LINE_COMMENTbg=0x362B00
+CFG_LINE_COMMENTff=0x2000
+CFG_LINE_COMMENTem=0x1A1400
+CFG_DOCUMENTATIONfg=0xA100
+CFG_DOCUMENTATIONbg=0x362B00
+CFG_DOCUMENTATIONff=0x2000
+CFG_DOCUMENTATIONem=0x1A1400
+CFG_DOC_KEYWORDfg=0xA197
+CFG_DOC_KEYWORDbg=0x362B00
+CFG_DOC_KEYWORDff=0x2001
+CFG_DOC_KEYWORDem=0x1A1400
+CFG_DOC_PUNCTUATIONfg=0xA100
+CFG_DOC_PUNCTUATIONbg=0x362B00
+CFG_DOC_PUNCTUATIONff=0x2001
+CFG_DOC_PUNCTUATIONem=0x1A1400
+CFG_DOC_ATTRIBUTEfg=0x97A100
+CFG_DOC_ATTRIBUTEbg=0x362B00
+CFG_DOC_ATTRIBUTEff=0x2001
+CFG_DOC_ATTRIBUTEem=0x1A1400
+CFG_DOC_ATTR_VALUEfg=0x97A100
+CFG_DOC_ATTR_VALUEbg=0x362B00
+CFG_DOC_ATTR_VALUEff=0x2000
+CFG_DOC_ATTR_VALUEem=0x1A1400
+CFG_IDENTIFIERfg=0x969483
+CFG_IDENTIFIERbg=0x362B00
+CFG_IDENTIFIERff=0x2000
+CFG_IDENTIFIERem=0x1A1400
+CFG_FLOATING_NUMBERfg=0x98A12A
+CFG_FLOATING_NUMBERbg=0x362B00
+CFG_FLOATING_NUMBERff=0x2000
+CFG_FLOATING_NUMBERem=0x1A1400
+CFG_HEX_NUMBERfg=0x98A12A
+CFG_HEX_NUMBERbg=0x362B00
+CFG_HEX_NUMBERff=0x2000
+CFG_HEX_NUMBERem=0x1A1400
+CFG_SINGLEQUOTED_STRINGfg=0x9985
+CFG_SINGLEQUOTED_STRINGbg=0x362B00
+CFG_SINGLEQUOTED_STRINGff=0x2000
+CFG_SINGLEQUOTED_STRINGem=0x1A1400
+CFG_BACKQUOTED_STRINGfg=0x9985
+CFG_BACKQUOTED_STRINGbg=0x362B00
+CFG_BACKQUOTED_STRINGff=0x2000
+CFG_BACKQUOTED_STRINGem=0x1A1400
+CFG_UNTERMINATED_STRINGfg=0x9985
+CFG_UNTERMINATED_STRINGbg=0x362B00
+CFG_UNTERMINATED_STRINGff=0x2000
+CFG_UNTERMINATED_STRINGem=0x1A1400
+CFG_INACTIVE_CODEfg=0xA100
+CFG_INACTIVE_CODEbg=0x362B00
+CFG_INACTIVE_CODEff=0x2000
+CFG_INACTIVE_CODEem=0x1A1400
+CFG_INACTIVE_KEYWORDfg=0xA100
+CFG_INACTIVE_KEYWORDbg=0x362B00
+CFG_INACTIVE_KEYWORDff=0x2001
+CFG_INACTIVE_KEYWORDem=0x1A1400
+CFG_IMAGINARY_SPACEfg=0xFFFFFF
+CFG_IMAGINARY_SPACEbg=0xFF0000
+CFG_IMAGINARY_SPACEff=0x0
+CFG_IMAGINARY_SPACEem=0xCF0000
+CFG_INACTIVE_COMMENTfg=0xA100
+CFG_INACTIVE_COMMENTbg=0x362B00
+CFG_INACTIVE_COMMENTff=0x2002
+CFG_INACTIVE_COMMENTem=0x1A1400
+CFG_MODIFIED_ITEMfg=0xFF
+CFG_MODIFIED_ITEMbg=0xFFFFFF
+CFG_MODIFIED_ITEMff=0x0
+CFG_NAVHINTfg=0x80FF
+CFG_NAVHINTbg=0x403010
+CFG_NAVHINTff=0x0
+CFG_XML_CHARACTER_REFfg=0x98A12A
+CFG_XML_CHARACTER_REFbg=0x362B00
+CFG_XML_CHARACTER_REFff=0x2000
+CFG_XML_CHARACTER_REFem=0x1A1400
+CFG_SEARCH_RESULT_TRUNCATEDfg=0x969483
+CFG_SEARCH_RESULT_TRUNCATEDbg=0x362B00
+CFG_SEARCH_RESULT_TRUNCATEDff=0x0
+CFG_MARKDOWN_HEADERfg=0x969483
+CFG_MARKDOWN_HEADERbg=0x362B00
+CFG_MARKDOWN_HEADERff=0x0
+CFG_MARKDOWN_HEADERem=0x1A1400
+CFG_MARKDOWN_CODEfg=0x969483
+CFG_MARKDOWN_CODEbg=0x362B00
+CFG_MARKDOWN_CODEff=0x0
+CFG_MARKDOWN_CODEem=0x1A1400
+CFG_MARKDOWN_BLOCKQUOTEfg=0x969483
+CFG_MARKDOWN_BLOCKQUOTEbg=0x362B00
+CFG_MARKDOWN_BLOCKQUOTEff=0x0
+CFG_MARKDOWN_BLOCKQUOTEem=0x1A1400
+CFG_MARKDOWN_LINKfg=0x969483
+CFG_MARKDOWN_LINKbg=0x362B00
+CFG_MARKDOWN_LINKff=0x0
+CFG_MARKDOWN_LINKem=0x1A1400
+CFG_DOCUMENT_TAB_ACTIVEfg=0x362B00
+CFG_DOCUMENT_TAB_ACTIVEbg=0xA1A193
+CFG_DOCUMENT_TAB_ACTIVEff=0x0
+CFG_DOCUMENT_TAB_SELECTEDfg=0x362B00
+CFG_DOCUMENT_TAB_SELECTEDbg=0x969483
+CFG_DOCUMENT_TAB_SELECTEDff=0x0
+CFG_DOCUMENT_TAB_UNSELECTEDfg=0x969483
+CFG_DOCUMENT_TAB_UNSELECTEDbg=0x362B00
+CFG_DOCUMENT_TAB_UNSELECTEDff=0x0
+
diff --git a/VSlickMacros/user.vlx b/SlickEdit/user.vlx
similarity index 100%
rename from VSlickMacros/user.vlx
rename to SlickEdit/user.vlx
diff --git a/VSlickMacros/usrprjtemplates.vpt b/SlickEdit/usrprjtemplates.vpt
similarity index 100%
rename from VSlickMacros/usrprjtemplates.vpt
rename to SlickEdit/usrprjtemplates.vpt
diff --git a/VSlickMacros/vusr_beautifier.xml b/SlickEdit/vusr_beautifier.xml
similarity index 100%
rename from VSlickMacros/vusr_beautifier.xml
rename to SlickEdit/vusr_beautifier.xml
diff --git a/src/kash/shinstance.c b/src/kash/shinstance.c
index b105130..0cc7da8 100644
--- a/src/kash/shinstance.c
+++ b/src/kash/shinstance.c
@@ -1,4 +1,4 @@
-/* $Id: shinstance.c 2652 2012-09-09 17:21:48Z bird $ */
+/* $Id: shinstance.c 2784 2015-05-24 17:29:04Z bird $ */
/** @file
* The shell instance methods.
*/
@@ -927,13 +927,16 @@ pid_t sh_fork(shinstance *psh)
#endif
- /* child: update the pid */
+ /* child: update the pid and zap the children array */
if (!pid)
+ {
# ifdef _MSC_VER
psh->pid = _getpid();
# else
psh->pid = getpid();
# endif
+ psh->num_children = 0;
+ }
TRACE2((psh, "sh_fork -> %d [%d]\n", pid, errno));
(void)psh;
@@ -979,7 +982,7 @@ pid_t sh_waitpid(shinstance *psh, pid_t pid, int *statusp, int flags)
}
else if (psh->num_children <= MAXIMUM_WAIT_OBJECTS)
{
- HANDLE ahChildren[64];
+ HANDLE ahChildren[MAXIMUM_WAIT_OBJECTS];
for (i = 0; i < psh->num_children; i++)
ahChildren[i] = psh->children[i].hChild;
dwRet = WaitForMultipleObjects(psh->num_children, &ahChildren[0],
@@ -1134,21 +1137,81 @@ int sh_execve(shinstance *psh, const char *exe, const char * const *argv, const
}
*p = '\0';
- /* Create the command line. */
+ /* Figure the size of the command line. Double quotes makes this
+ tedious and we overestimate to simplify. */
cmdline_size = 2;
for (i = 0; argv[i]; i++)
- cmdline_size += strlen(argv[i]) + 3;
+ {
+ const char *arg = argv[i];
+ cmdline_size += strlen(arg) + 3;
+ arg = strchr(arg, '"');
+ if (arg)
+ {
+ do
+ cmdline_size++;
+ while ((arg = strchr(arg + 1, '"')) != NULL);
+ arg = argv[i] - 1;
+ while ((arg = strchr(arg + 1, '\\')) != NULL);
+ cmdline_size++;
+ }
+ }
+
+ /* Create the command line. */
cmdline = p = sh_malloc(psh, cmdline_size);
for (i = 0; argv[i]; i++)
{
- size_t len = strlen(argv[i]);
- int quoted = !!strpbrk(argv[i], " \t"); /** @todo Do this quoting business right. */
+ const char *arg = argv[i];
+ const char *cur = arg;
+ size_t len = strlen(arg);
+ int quoted = 0;
+ char ch;
+ while ((ch = *cur++) != '\0')
+ if (ch <= 0x20 || strchr("&><|%", ch) != NULL)
+ {
+ quoted = 1;
+ break;
+ }
+
if (i != 0)
*(p++) = ' ';
if (quoted)
*(p++) = '"';
- memcpy(p, argv[i], len);
- p += len;
+ if (memchr(arg, '"', len) == NULL)
+ {
+ memcpy(p, arg, len);
+ p += len;
+ }
+ else
+ { /* MS CRT style: double quotes must be escaped; backslashes
+ must be escaped if followed by double quotes. */
+ while ((ch = *arg++) != '\0')
+ if (ch != '\\' && ch != '"')
+ *p++ = ch;
+ else if (ch == '"')
+ {
+ *p++ = '\\';
+ *p++ = '"';
+ }
+ else
+ {
+ unsigned slashes = 1;
+ *p++ = '\\';
+ while (*arg == '\\')
+ {
+ *p++ = '\\';
+ slashes++;
+ arg++;
+ }
+ if (*arg == '"')
+ {
+ while (slashes-- > 0)
+ *p++ = '\\';
+ *p++ = '\\';
+ *p++ = '"';
+ arg++;
+ }
+ }
+ }
if (quoted)
*(p++) = '"';
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-virtualbox/kbuild.git
More information about the Pkg-virtualbox-commits
mailing list