
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@920 212acab6-be3b-0410-9dea-997c60f758d6
26 lines
573 B
C
26 lines
573 B
C
#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;
|
|
}
|