Skip to content
Low-level programming · Higher-level thinking
Login Register
Forum / Source Help

porting op macro to ziron2

A community discussion post from the original code:zIRON forum.

Replies

Colin admin
Posts
928
Threads
49
Location
Bulgaria

Hi Emil, please re-download beta,

I've just re-added this function, it is improved a little. Change your export to:

function onFileEntry(DWord handle; char* strCode; DWord len) {

The function must return true or false. If your plugin makes changes to the code, return true, if the plugin does not make any changes return false.

Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt

Ok , i have another tow questions.

1- what is the equal to this old function Ziron_IsNextLineBreak() ?

2- does the old enum ZirToken in plugin is still the same in ziron2 ,

so can i borrow this form ziron 1

zirParenOpen = 7,			// (
zirParenClose = 8,			// )

http://www.freewebs.com/ogremagic/index.htm

Colin admin
Posts
928
Threads
49
Location
Bulgaria

Hi Emil,

No, they're incompatible. Please see the emit plugin for detecting single characters.

As for the line break, I will add this to top of the list, possibly today, but not sure as I will be away for a while to India.

I will reply shortly.

Colin admin
Posts
928
Threads
49
Location
Bulgaria

OK, I have just re-uploaded beta with several fixes and 2 new plugin apis.

ziron_eol will return true if at end of line.

eax = ziron_eol();

detecting chars:

	eax = ziron_token_next();
	if (eax == TOKEN_SYM) {
		eax = ziron_curtoken_charptr();
		if (char[eax] == ord('(')) {
			break;
		}
	}

you could make a macro to simplify this process.

Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt

thank you Colin.

i will try them sooner.

http://www.freewebs.com/ogremagic/index.htm