Renamed dval in C to c_dval to avoid confusion