**********************************************************************
***               Stack functions NSIS plugin v1.0                 ***
**********************************************************************

2005 Shengalts Aleksander aka Instructor (Shengalts@mail.ru)


Functions for working with NSIS stack:

	-Adds an element to the top of the NSIS stack (same as Push "string")

		stack::ns_push_front "string"


	-Removes the element from the top of the NSIS stack and
	 puts it in the variable (same as Pop $0)

		stack::ns_pop_front .r0 .r1

		$0-output
		$1-errorlevel: 0 on success, 1 on empty stack


	-Adds an element to the beginning of the NSIS stack.

		stack::ns_push_back "string"


	-Finds the NSIS element with index and puts it in the variable.

		stack::ns_stack_read .r0 index .r1

		$0-output
		index-number of the element (only positive)
		$1-errorlevel: 0 on success, 1 on empty stack


	-Finds the NSIS element with index and rewrite it.

		stack::ns_stack_write "string" index .r0

		"string"-text to write
		index-number of the element (only positive)
		$0-errorlevel: 0 on success, 1 on empty stack


	-Gets the number of elements in the NSIS stack.

		stack::ns_stack_size .r0

		$0-the number of elements


	-Clears all NSIS stack

		stack::ns_stack_free


Functions for working with private stack (NSIS independent):

	!Required: /NOUNLOAD flag in each call or SetPluginUnload
	otherwise private stack will be lost when the plug-in is unloaded.


	-Adds an element to the top of the private stack.

		stack::dll_push_front "string"


	-Removes the element from the top of the private stack and
	 puts it in the variable.

		stack::dll_pop_front .r0 .r1

		$0-output
		$1-errorlevel: 0 on success, 1 on empty stack


	-Adds an element to the beginning of the private stack.

		stack::dll_push_back "string"


	-Removes the element from the beginning
	 of the private stack and puts it in the variable.

		stack::dll_pop_back .r0 .r1

		$0-output
		$1-errorlevel: 0 on success, 1 on empty stack


	-Finds the private element with index and puts it in the variable.

		stack::dll_stack_read .r0 index .r1

		$0-output
		index-number of the element if positive search
		      from top if negative from beginning
		$1-errorlevel: 0 on success, 1 on empty stack


	-Finds the private element with index and rewrite it.

		stack::dll_stack_write "string" index .r0

		"string"-text to write
		index-number of the element if positive search
		      from top if negative from beginning
		$0-errorlevel: 0 on success, 1 on empty stack


	-Finds the private element with index and
	 inserts new element in it index.

		stack::dll_stack_insert "string" index .r0

		"string"-text to insert
		index-number of the element if positive search
		      from top if negative from beginning
		$0-errorlevel: 0 on success, 1 on empty stack


	-Finds the private element with index, puts it in
	 the variable and removes it.

		stack::dll_stack_delete .r0 index .r1

		$0-output
		index-number of the element if positive search
		      from top if negative from beginning
		$1-errorlevel: 0 on success, 1 on empty stack


	-Gets the number of elements in the private stack.

		stack::dll_stack_size .r0

		$0-the number of elements


	-Clears all private stack

		stack::dll_stack_free
