Logo Search packages:      
Sourcecode: csound version File versions  Download package

PUBLIC void csoundInputMessage ( CSOUND *  ,
const char *  message 
)

Input a NULL-terminated string (as if from a console), used for line events.

Definition at line 188 of file linevent.c.

{
    int32  size = (int32) strlen(message);

    if (!csound->lineventGlobals) {
      if (linevent_alloc(csound) != 0)
        return;
    }
    if (!size)
      return;
    if (UNLIKELY((ST(Linep) + size) >= ST(Linebufend))) {
      csoundErrorMsg(csound, Str("LineBuffer Overflow - "
                                 "Input Data has been Lost"));
      return;
    }
    memcpy(ST(Linep), message, size);
    if (ST(Linep)[size - 1] != (char) '\n')
      ST(Linep)[size++] = (char) '\n';
    ST(Linep) += size;
}


Generated by  Doxygen 1.6.0   Back to index