FreeCalypso > hg > freecalypso-tools
view target-utils/buzplayer/melentry.c @ 661:fd7b447b99e3
libserial rename
The version that was previously named libserial-newlnx is now libserial-linux,
and the version that was previosly named libserial-orig is now libserial-posix.
This new naming is more in line with the objective reality of the difference,
moving away from naming based on our project history.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 05 Mar 2020 19:54:31 +0000 |
parents | eb5960dc258c |
children | 9092ff68e37d |
line wrap: on
line source
#include <sys/types.h> #include <ctype.h> #include <stdlib.h> #include "types.h" #include "melody.h" extern struct melentry *melody_buf_start, *melody_buf_tailptr; void melody_init() { melody_buf_tailptr = melody_buf_start; } void melody_entry(argbulk) char *argbulk; { char *argv[3]; u32 tone, dur; if (parse_args(argbulk, 2, 2, argv, 0) < 0) return; tone = strtoul(argv[0], 0, 0); dur = strtoul(argv[1], 0, 0); if (tone > 255 || dur < 1 || dur > 0xFFFF) { printf("ERROR: argument(s) out of range\n"); return; } melody_buf_tailptr->tone = tone; melody_buf_tailptr->dur = dur; melody_buf_tailptr++; }