drivers/accessibility/speakup/varhandlers.c

Source file repositories/reference/linux-study-clean/drivers/accessibility/speakup/varhandlers.c

File Facts

System
Linux kernel
Corpus path
drivers/accessibility/speakup/varhandlers.c
Extension
.c
Size
8418 bytes
Lines
346
Domain
Driver Families
Bucket
drivers/accessibility
Inferred role
Driver Families: exported/initcall integration point
Status
integration implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

if (mask < PUNC) {
				if (!(spk_chartab[*cp] & PUNC))
					break;
			} else if (spk_chartab[*cp] & B_NUM) {
				break;
			}
		}
		if (*cp)
			return -EINVAL;
		cp = (u_char *)input;
	}
	if (how & 2) {
		for (; *cp; cp++)
			if (*cp > SPACE)
				spk_chartab[*cp] |= mask;
	} else {
		for (; *cp; cp++)
			if (*cp > SPACE)
				spk_chartab[*cp] &= ~mask;
	}
	return 0;
}

char *spk_strlwr(char *s)
{
	char *p;

	if (!s)
		return NULL;

	for (p = s; *p; p++)
		*p = tolower(*p);
	return s;
}

char *spk_s2uchar(char *start, char *dest)
{
	int val;

	/* Do not replace with kstrtoul: here we need start to be updated */
	val = simple_strtoul(skip_spaces(start), &start, 10);
	if (*start == ',')
		start++;
	*dest = (u_char)val;
	return start;
}

Annotation

Implementation Notes