All pastes #972900 Raw Edit

Miscellany

public c v1 · immutable
#972900 ·published 2008-04-05 20:18 UTC
rendered paste body
static int callback(void *NotUsed, int argc, char **argv, char **azColName){  int fd = rb->open("/out", O_WRONLY|O_APPEND);  char buf[512];  int i, ret;  for(i=0; i<argc; i++){      //rb->memset(buf, 0, sizeof(buf));      rb->snprintf(buf, sizeof(buf), "%s = %s\n", azColName[i], argv[i] ? argv[i] : "NULL");      ret = rb->write(fd, buf, rb->strlen(buf));  }    //DEBUGF("\n");    rb->close(fd);  return 0;}