/*****************************************************************************
 * MEME > motifs > /motif
 * Make the motif available to the user.
 ****************************************************************************/
void mxml_end_motif(void *ctx) {
  CTX_T *data;
  MOTIF_T *motif;

  data = (CTX_T*)ctx;
  motif = data->mscope.motif;
  linklst_add(motif, data->motif_queue);
  data->mscope.motif = NULL;
  data->current_motif++;
}
Esempio n. 2
0
void dxml_end_motif(void *ctx) {
    CTX_T *data;
    MOTIF_T *motif;

    data = (CTX_T*)ctx;
    motif = data->motif;

    linklst_add(motif, data->motif_queue);
    data->motif = NULL;
}
Esempio n. 3
0
/*
 * Callbacks
 */
void dxml_error(void *ctx, const char *fmt, va_list ap) {
    CTX_T *data = (CTX_T*)ctx;
    int len;
    char dummy[1], *msg;
    va_list ap_copy;
    va_copy(ap_copy, ap);
    len = vsnprintf(dummy, 1, fmt, ap_copy);
    va_end(ap_copy);
    msg = mm_malloc(sizeof(char) * (len + 1));
    vsnprintf(msg, len + 1, fmt, ap);
    linklst_add(msg, data->errors);
}
/*****************************************************************************
 * Stores a parser warning message for return
 ****************************************************************************/
static void local_warning(CTX_T *data, char *format, ...) {
  va_list  argp;
  int len;
  char dummy[1], *msg;
  va_start(argp, format);
  len = vsnprintf(dummy, 1, format, argp);
  va_end(argp);
  msg = mm_malloc(sizeof(char) * (len + 1));
  va_start(argp, format);
  vsnprintf(msg, len + 1, format, argp);
  va_end(argp);
  linklst_add(msg, data->warnings);
}