New exec plugin (broke)
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@920 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
8dcb0e237f
commit
a659c508b1
6 changed files with 378 additions and 0 deletions
26
Contrib/nsExec/nsis.c
Normal file
26
Contrib/nsExec/nsis.c
Normal file
|
@ -0,0 +1,26 @@
|
|||
#include <windows.h>
|
||||
#include "nsis.h"
|
||||
|
||||
int popstring(char *str) {
|
||||
stack_t *th;
|
||||
if (!g_stacktop||!*g_stacktop) return 1;
|
||||
th=(*g_stacktop);
|
||||
lstrcpy(str,th->text);
|
||||
*g_stacktop = th->next;
|
||||
GlobalFree((HGLOBAL)th);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void pushstring(char *str) {
|
||||
stack_t *th;
|
||||
if (!g_stacktop) return;
|
||||
th=(stack_t*)GlobalAlloc(GPTR,sizeof(stack_t)+g_stringsize);
|
||||
lstrcpyn(th->text,str,g_stringsize);
|
||||
th->next=*g_stacktop;
|
||||
*g_stacktop=th;
|
||||
}
|
||||
|
||||
char *getuservariable(int varnum) {
|
||||
if (varnum<0||varnum >= __INST_LAST) return NULL;
|
||||
return g_variables+varnum*g_stringsize;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue