Пример #1
0
int main(int argc, char **argv)
{
    string_test();
		printf("1111111111111\n");
    expr_test();
		printf("1111111111111\n");
    macro_test();
    scope_test();
    forward_test();
    funcptr_test();
    loop_test();
    switch_test();
    goto_test();
    enum_test();
    typedef_test();
    struct_test();
    array_test();
    expr_ptr_test();
    bool_test();
    expr2_test();
    constant_expr_test();
    expr_cmp_test();
    char_short_test();
    init_test();
    compound_literal_test();
    kr_test();
    struct_assign_test();
    cast_test();
    bitfield_test();
    c99_bool_test();
    float_test();
    longlong_test();
    manyarg_test();
    stdarg_test();
    whitespace_test();
    relocation_test();
    old_style_function();
    alloca_test();
    sizeof_test();
    typeof_test();
    statement_expr_test();
    local_label_test();
    asm_test();
    builtin_test();
    return 0; 
}
Пример #2
0
/**
 * @name delete_multimessage:
 */
boolean_t delete_multimessage(gammu_state_t *s,
                              multimessage_t *sms,
                              bitfield_t *bitfield,
                              delete_callback_fn_t callback, void *x) {
  int rv = TRUE;

  for (unsigned int i = 0; i < sms->Number; i++) {

    message_t *m = &sms->SMS[i];

    if (callback) {
      callback(s, m, DELETE_EXAMINING, x);
    }

    if (bitfield && !bitfield_test(bitfield, m->Location)) {
      if (callback) {
        callback(s, m, DELETE_SKIPPED, x);
      }
      continue;
    }

    if (callback) {
      callback(s, m, DELETE_ATTEMPTING, x);
    }

    if ((s->err = GSM_DeleteSMS(s->sm, m)) != ERR_NONE) {
      if (callback) {
        callback(s, m, DELETE_ERROR, x);
      }
      rv = FALSE;
      continue;
    }

    if (callback) {
      callback(s, m, DELETE_SUCCESS, x);
    }
  }

  return rv;
}