Browse Source

[BUG_FIXED] Fix a bug in Run dialog : the executable file won't be executed even it is between the double quot.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@66 f5eea248-9336-0410-98b8-ebc06183d4e3
pull/343/head^2
donho 17 years ago
parent
commit
97dfcc5948
  1. 2
      PowerEditor/src/Notepad_plus.cpp
  2. 2
      PowerEditor/src/Notepad_plus.rc
  3. 10
      PowerEditor/src/WinControls/StaticDialog/RunDlg/RunDlg.cpp
  4. 2
      PowerEditor/src/langs.xml

2
PowerEditor/src/Notepad_plus.cpp

@ -1359,7 +1359,7 @@ string Notepad_plus::getLangDesc(LangType langType, bool shortDesc)
"TCL", "Tool Command Language file",
"Lisp", "List Processing language file",
"Scheme", "Scheme file",
"Assembler", "Assembler file",
"Assembly", "Assembly language source file",
"Diff", "Diff file",
"Properties file", "Properties file",
"Postscript", "Postscript file",

2
PowerEditor/src/Notepad_plus.rc

@ -403,7 +403,7 @@ BEGIN
MENUITEM "Ada", IDM_LANG_ADA
MENUITEM "ASP", IDM_LANG_ASP
MENUITEM "Assembler", IDM_LANG_ASM
MENUITEM "Assembly", IDM_LANG_ASM
MENUITEM "AutoIt", IDM_LANG_AU3
MENUITEM "Batch", IDM_LANG_BATCH
MENUITEM "C", IDM_LANG_C

10
PowerEditor/src/WinControls/StaticDialog/RunDlg/RunDlg.cpp

@ -27,12 +27,20 @@
void Command::extractArgs(char *cmd2Exec, char *args, const char *cmdEntier)
{
int i = 0;
bool quoted = false;
for ( ; i < int(strlen(cmdEntier)) ; i++)
{
{/*
if (cmdEntier[i] != ' ')
cmd2Exec[i] = cmdEntier[i];
else
break;
*/
if ((cmdEntier[i] == ' ') && (!quoted))
break;
if (cmdEntier[i]=='"')
quoted = !quoted;
cmd2Exec[i] = cmdEntier[i];
}
cmd2Exec[i] = '\0';

2
PowerEditor/src/langs.xml

@ -76,7 +76,7 @@
<Keywords name="instre1">NULL __FILE__ __LINE__ __PACKAGE__ __DATA__ __END__ AUTOLOAD BEGIN CORE DESTROY END EQ GE GT INIT LE LT NE CHECK abs accept alarm and atan2 bind binmode bless caller chdir chmod chomp chop chown chr chroot close closedir cmp connect continue cos crypt dbmclose dbmopen defined delete die do dump each else elsif endgrent endhostent endnetent endprotoent endpwent endservent eof eq eval exec exists exit exp fcntl fileno flock for foreach fork format formline ge getc getgrent getgrgid getgrnam gethostbyaddr gethostbyname gethostent getlogin getnetbyaddr getnetbyname getnetent getpeername getpgrp getppid getpriority getprotobyname getprotobynumber getprotoent getpwent getpwnam getpwuid getservbyname getservbyport getservent getsockname getsockopt glob gmtime goto grep gt hex if index int ioctl join keys kill last lc lcfirst le length link listen local localtime lock log lstat lt m map mkdir msgctl msgget msgrcv msgsnd my ne next no not oct open opendir or ord our pack package pipe pop pos print printf prototype push q qq qr quotemeta qu qw qx rand read readdir readline readlink readpipe recv redo ref rename require reset return reverse rewinddir rindex rmdir s scalar seek seekdir select semctl semget semop send setgrent sethostent setnetent setpgrp setpriority setprotoent setpwent setservent setsockopt shift shmctl shmget shmread shmwrite shutdown sin sleep socket socketpair sort splice split sprintf sqrt srand stat study sub substr symlink syscall sysopen sysread sysseek system syswrite tell telldir tie tied time times tr truncate uc ucfirst umask undef unless unlink unpack unshift untie until use utime values vec wait waitpid wantarray warn while write x xor y</Keywords>
</Language>
<Language name="python" ext="py" commentLine="#">
<Language name="python" ext="py pyw" commentLine="#">
<Keywords name="instre1">and as assert break class continue def del elif else except exec finally for from global if import in is lambda None not or pass print raise return triple try while with yield</Keywords>
</Language>

Loading…
Cancel
Save