/* Copyright (c) 1997-1999 Miller Puckette. * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. */ #include "m_pd.h" #include <stdio.h> #include <string.h> /* convenience routines for checking and getting values of atoms. There's no "pointer" version since there's nothing safe to return if there's an error. */ t_float atom_getfloat(const t_atom *a) { … } t_int atom_getint(const t_atom *a) { … } t_symbol *atom_getsymbol(const t_atom *a) /* LATER think about this more carefully */ { … } t_symbol *atom_gensym(const t_atom *a) /* this works better for graph labels */ { … } t_float atom_getfloatarg(int which, int argc, const t_atom *argv) { … } t_int atom_getintarg(int which, int argc, const t_atom *argv) { … } t_symbol *atom_getsymbolarg(int which, int argc, const t_atom *argv) { … } /* convert an atom into a string, in the reverse sense of binbuf_text (q.v.) * special attention is paid to symbols containing the special characters * ';', ',', '$', and '\'; these are quoted with a preceding '\', except that * the '$' only gets quoted if followed by a digit. */ void atom_string(const t_atom *a, char *buf, unsigned int bufsize) { … }