mirror of
https://github.com/sfilippone/psblas3.git
synced 2026-10-07 15:14:57 +00:00
Make.inc.in Makefile cbind cbind/Makefile cbind/base cbind/base/Makefile cbind/base/psb_base_cbind.h cbind/base/psb_base_cbind_mod.f90 cbind/base/psb_base_psblas_cbind_mod.f90 cbind/base/psb_base_string_cbind_mod.f90 cbind/base/psb_base_tools_cbind_mod.F90 cbind/base/psb_c_base.c cbind/base/psb_c_base.h cbind/base/psb_c_dbase.c cbind/base/psb_c_dbase.h cbind/base/psb_cpenv_mod.f90 cbind/base/psb_d_psblas_cbind_mod.f90 cbind/base/psb_d_serial_cbind_mod.F90 cbind/base/psb_d_tools_cbind_mod.F90 cbind/base/psb_objhandle_mod.f90 Branch for C bindings.
40 lines
729 B
C
40 lines
729 B
C
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
#include "psb_c_base.h"
|
|
|
|
psb_c_descriptor* psb_c_new_descriptor()
|
|
{
|
|
psb_c_descriptor* temp;
|
|
|
|
temp=(psb_c_descriptor *) malloc(sizeof(psb_c_descriptor));
|
|
temp->descriptor=NULL;
|
|
return(temp);
|
|
}
|
|
|
|
|
|
void psb_c_print_errmsg()
|
|
{
|
|
char *mesg;
|
|
|
|
for (mesg = psb_c_pop_errmsg(); mesg != NULL; mesg = psb_c_pop_errmsg()) {
|
|
fprintf(stderr,"%s\n",mesg);
|
|
free(mesg);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
#define PSB_MAX_ERRLINE_LEN 132
|
|
#define PSB_MAX_ERR_LINES 4
|
|
static int maxlen=PSB_MAX_ERR_LINES*(PSB_MAX_ERRLINE_LEN+2);
|
|
char *psb_c_pop_errmsg()
|
|
{
|
|
char *tmp;
|
|
tmp = (char*) malloc(maxlen*sizeof(char));
|
|
if (psb_c_f2c_errmsg(tmp,maxlen)<=0) {
|
|
free(tmp); tmp = NULL;
|
|
}
|
|
return(tmp);
|
|
}
|
|
|