C-sparse

 view release on metacpan or  search on metacpan

src/sparse-0.4.4/LICENSE  view on Meta::CPAN

the subject matter hereof. If any provision of this License is held to be 
unenforceable, such provision shall be reformed only to the extent necessary 
to make it enforceable.

14) Definition of "You" in This License. "You" throughout this License, 
whether in upper or lower case, means an individual or a legal entity exercising 
rights under, and complying with all of the terms of, this License. For legal 
entities, "You" includes any entity that controls, is controlled by, or is under 
common control with you. For purposes of this definition, "control" means (i) 
the power, direct or indirect, to cause the direction or management of such 
entity, whether by contract or otherwise, or (ii) ownership of fifty percent 
(50%) or more of the outstanding shares, or (iii) beneficial ownership of such 
entity.

15) Right to Use. You may use the Original Work in all ways not otherwise 
restricted or conditioned by this License or by law, and Licensor promises not 
to interfere with or be responsible for such uses by You.

This license is Copyright (C) 2002 Lawrence E. Rosen. All rights reserved. 
Permission is hereby granted to copy and distribute this license without 
modification. This license may not be modified without the express written 

src/sparse-0.4.4/example.c  view on Meta::CPAN


static void replace_asm_arg(SCTX_ char **dst_p, struct asm_arg *arg)
{
	char *dst = *dst_p;
	int len = strlen(arg->value);

	memcpy(dst, arg->value, len);
	*dst_p = dst + len;
}

static void replace_asm_percent(SCTX_ const char **src_p, char **dst_p, struct asm_arg *args, int nr)
{
	const char *src = *src_p;
	char c;
	int index;

	c = *src++;
	switch (c) {
	case '0' ... '9':
		index = c - '0';
		if (index < nr)

src/sparse-0.4.4/example.c  view on Meta::CPAN

		if (!c)
			return buffer;
		str++;
		switch (c) {
		case '%':
			if (*str == '%') {
				str++;
				p++;
				continue;
			}
			replace_asm_percent(sctx_ &str, &p, args, nr);
			continue;
		case '[':
			replace_asm_named(sctx_ &str, &p, args, nr);
			continue;
		default:
			break;
		}
		p++;
	}
}



( run in 0.423 second using v1.01-cache-2.11-cpan-709fd43a63f )