您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ text_error函数代码示例

51自学网 2021-06-03 08:47:03
  C++
这篇教程C++ text_error函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中text_error函数的典型用法代码示例。如果您正苦于以下问题:C++ text_error函数的具体用法?C++ text_error怎么用?C++ text_error使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了text_error函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: vsetBOB

void vsetBOB(int rtparam, int reg){   char            msge[128];    if (!newacq)    {	text_error("Warning: vsetuserap available only on Inova systems./n");	text_error("         vsetuserap ignored./n");	return;    }    switch (reg)    {	case 0:		SetAPAttr(BOBreg0, SET_RTPARAM, (c68int)(rtparam), NULL);		break;	case 1:		SetAPAttr(BOBreg1, SET_RTPARAM, (c68int)(rtparam), NULL);		break;	case 2:		SetAPAttr(BOBreg2, SET_RTPARAM, (c68int)(rtparam), NULL);		break;	case 3:		SetAPAttr(BOBreg3, SET_RTPARAM, (c68int)(rtparam), NULL);		break;	default:		sprintf(msge,"vsetuserap: Invalid register = %d./n",reg);		text_error(msge);        	psg_abort(1);    }}
开发者ID:timburrow,项目名称:ovj3,代码行数:31,


示例2: putstr

/*-----------------------------------------------------------------|	putstr()/2|	Sets a vnmr parmeter to a given string.+------------------------------------------------------------------*/void putstr(char *paramname, char *paramstring){   int stat,expnum;   char	message[STDVAR];   char addr[MAXSTR];   expnum = getExpNum();   stat = -1;   if (getparm("vnmraddr","string",GLOBAL,addr,MAXSTR))   {	sprintf(addr,"putval: cannot get Vnmr address for %s./n",paramname);        text_error(addr);   }   else   {   	sprintf(message,"sysputval(%d,'%s','%s')/n",					expnum,paramname,paramstring);   	stat = deliverMessageSuid(addr,message);	if (stat < 0)	{	   sprintf(addr,"putval: Error in parameter: %s./n",paramname);           text_error(addr);	}   }}
开发者ID:timburrow,项目名称:ovj3,代码行数:30,


示例3: vreadBOB

void vreadBOB(int rtparam, int reg){    int addrreg;    char msge[128];    if (!newacq)    {	text_error("Warning: readuserap available only on Inova systems./n");	text_error("         readuserap ignored./n");	return;    }    addrreg = (BOB_APADDR << 8) | (BOB_REG);    switch (reg)    {	case 0:		vapread(rtparam,addrreg,BOB_READ_SYNC_DELAY);		break;	case 1:		vapread(rtparam,addrreg+1,BOB_READ_SYNC_DELAY);		break;	case 2:		vapread(rtparam,addrreg+2,BOB_READ_SYNC_DELAY);		break;	case 3:		vapread(rtparam,addrreg+3,BOB_READ_SYNC_DELAY);		break;	default:		sprintf(msge,"readuserap: Invalid register = %d./n",reg);		text_error(msge);        	psg_abort(1);    }}
开发者ID:timburrow,项目名称:ovj3,代码行数:33,


示例4: vapread

void vapread(int rtparam, int addrreg, double apsyncdelay){    int ticks,secs;    short *ptr;    if (!newacq)    {	text_error("Warning: vapread available only on Inova systems./n");	text_error("         vapread ignored./n");	return;    }        timerwords(apsyncdelay,&ticks,&secs);    putcode((c68int)IAPREAD);    putcode((c68int)addrreg);    putcode((c68int)rtparam);    ptr = (short *) &secs;    putcode((codeint) *ptr);	/* timerword one */    ptr++;    putcode((codeint) *ptr);	/* timerword one */    ptr = (short *) &ticks;    putcode((codeint) *ptr);	/* timerword one */    ptr++;    putcode((codeint) *ptr);	/* timerword one */	}
开发者ID:timburrow,项目名称:ovj3,代码行数:27,


示例5: vnmrmsg

/*-----------------------------------------------------------------|	vnmrmsg()/1|	Sends normal message to vnmr.+------------------------------------------------------------------*/void vnmrmsg(const char *paramstring){    int stat;    char	message[MAXSTR];    char addr[MAXSTR];    stat = -1;    if (getparm("vnmraddr","string",GLOBAL,addr,MAXSTR))    {        text_error("vnmrmsg: cannot get Vnmr address./n");    }    else if (strcmp(addr,"Autoproc"))    {        int i = 0;        sprintf(message,"write('line3',`%s`,'noReformat')/n",paramstring);        while ( (i<MAXSTR) && (message[i] != '/0') )        {            if (((message[i] < ' ') || (message[i] > '~') ) &&                    (message[i] != '/n') )            {                message[i] = ' ';            }            i++;        }        stat = deliverMessageSuid(addr,message);        if (stat < 0)        {            text_error("vnmrmsg: Error sending msg:%s./n",paramstring);        }    }}
开发者ID:timburrow,项目名称:OpenVnmrJ,代码行数:35,


示例6: signal_acqi_updt_cmplt

/*--------------------------------------------------------------*/void signal_acqi_updt_cmplt(){    if (!newacq)    {	text_error("Warning: signal_acqi_updt_cmplt available only on Inova systems./n");	text_error("         signal_acqi_updt_cmplt ignored./n");	return;    }    putcode((c68int)IACQIUPDTCMPLT);}
开发者ID:timburrow,项目名称:ovj3,代码行数:11,


示例7: start_acqi_updt

/*--------------------------------------------------------------*/void start_acqi_updt(double delaytime){    if (!newacq)    {      text_error("Warning: start_acqi_updt available only on Inova systems./n");      text_error("         start_acqi_updt ignored./n");      return;    }    delay(delaytime);    putcode((c68int)ISTARTACQIUPDT);}
开发者ID:timburrow,项目名称:ovj3,代码行数:12,


示例8: getparm

int getparm(char *varname, char *vartype, int tree,            void *varaddr, int size){    int ret;    char mess[MAXSTR];    if ( (strcmp(vartype,"REAL") == 0) || (strcmp(vartype,"real") == 0) )    {        if ((ret = P_getreal(tree,varname,(double *)varaddr,1)) < 0)        {           if (dowarn)           {             sprintf(mess,"Cannot get parameter: %s/n",varname);             text_error(mess);	     if (bgflag)	         P_err(ret,varname,": ");           }           else           {              dowarn = 1;           }	   return(1);        }    }    else     {	if ( (strcmp(vartype,"STRING") == 0) || 	     (strcmp(vartype,"string") == 0) )        {            if ((ret = P_getstring(tree,varname,(char *)varaddr,1,size)) < 0)            {              if (dowarn)              {                sprintf(mess,"Cannot get parameter: %s/n",varname);                text_error(mess);		if (bgflag)	     	    P_err(ret,varname,": ");              }              else              {                 dowarn=1;              }              return(1);            }	}	else	{   sprintf(mess,"Variable '%s' is neither a 'real' or 'string'./n",			vartype);            text_error(mess);	    return(1);	}      }    return(0);}
开发者ID:timburrow,项目名称:openvnmrj-source,代码行数:54,


示例9: vapset

void vapset(int rtparam, int addrreg){    if (!newacq)    {	text_error("Warning: apset available only on Inova systems./n");	text_error("         apset ignored./n");	return;    }    SetAPAttr(APall,	SET_APADR,		((addrreg >> 8) & 0x0f),	SET_APREG,		(addrreg & 0x0ff),	SET_RTPARAM, 		(c68int)(rtparam),	NULL);}
开发者ID:timburrow,项目名称:ovj3,代码行数:14,


示例10: apsetbyte

void apsetbyte(int value, int addrreg){    if (!newacq)    {	text_error("Warning: apsetbyte available only on Inova systems./n");	text_error("         apsetbyte ignored./n");	return;    }    SetAPAttr(APbyte,	SET_APADR,		((addrreg >> 8) & 0x0f),	SET_APREG,		(addrreg & 0x0ff),	SET_MASK, 		(c68int)(value & 0xff),	SET_VALUE,	NULL);}
开发者ID:timburrow,项目名称:ovj3,代码行数:15,


示例11: insert

/*-------------------------------------------------------| insert(name,size)   Load hash table with the parameter|			 names & indices+-------------------------------------------------------*/static voidinsert(const char *word, int index)		/* enter a word in the hash table */{   int             key;   key = hash(word);	/* calculate hash key */   if (debug > 2)      fprintf(stderr,"hash: word=%s key=%d/n", word, key);   /* Check if hash table slot is free  */   while (htable[key].word)	/* look for next free slot */   {      total_cols++;      if (debug > 1)	 fprintf(stderr,"hash:collision with %s and %s, total: %d/n",		word, htable[key].word, total_cols);      ++key;	/* increment key */      key %= max_hash;	/* increment key */   }   htable[key].index = index;   htable[key].word = word;   if (debug > 1)      fprintf(stderr,"hash: adding word %s  id %d /n", word, index);   if (++hash_entries > max_hash)   {      text_error("hash: ERROR Number of identifiers exceeds hash table/n");      psg_abort(17);   }}
开发者ID:DanIverson,项目名称:OpenVnmrJ,代码行数:32,


示例12: lk_hold

lk_hold(){    static int errorsent = 0;    if (ap_interface!=4)    {        if (!errorsent)        {            text_error("lk_hold is not valid with this hardware configuration/n");            text_error("lk_hold is ignored/n");            errorsent = 1;        }        return;    }    putcode(SMPL_HOLD);    putcode(HOLD);}
开发者ID:timburrow,项目名称:ovj3,代码行数:16,


示例13: starthardloop

/*-------------------------------------------------------------------||	starthardloop()/1 |	index is to v1-v14, number of times to cycle through loop|	This start a hardware loop.|	hwlooping flag is set.|	curfifocount is saved so that the # of fifo words in the|	 hardwarre loop can be calcualted later in 'endhardloop'.|	pointer to the starthardloop Acode is save so that the|	 values can update later by 'endhardloop'|	 1. setICM is inserted in nop, if this loop acquires data|	     and no previous hardware loop did.|	 2. # of fifo words in hardware loop is set.|	 3. enable interrupt is nulled if only one hardware loop|	    exists.|	|				Author Greg Brissey  7/10/86+------------------------------------------------------------------*/void starthardloop(codeint rtindex){    setSSHAdisable();    if(bgflag)	fprintf(stderr,"starthardloop(): v# index: %d /n",rtindex);    if (hwlooping)	/* No nesting of hardware loops */    {	text_error("Missing endhardloop after previous starthardloop/n");	psg_abort(0);    }    hwlooping = TRUE;	/* mark the start of a hardware loop */    starthwfifocnt = curfifocount; /* must know # words in fifo */    fifostarttime = totaltime; /* must know time of loop */    hwloopelements = 0;  /* reset pulse elements in hardware loop to zero */    putcode(0);		/* nop that might be change to a setSTM acode */    hwloop_ptr = (codeint) (Codeptr - Aacode); /* save location for use */    putcode(HWLOOP);	/* hardwareloop Acode */    putcode(0);		/* will be then number of fifo words in loop */    putcode(2);		/* default to enable looping interrupt in acq.  */			/* for multiple hardware loops */    putcode(rtindex);   /* real time variable containing # of cycles of loop */    /* Update time for loop */    hwloopcnt4time = get_acqvar(rtindex); /* get count for this loop	*/}
开发者ID:DanIverson,项目名称:OpenVnmrJ,代码行数:43,


示例14: open_acqpar

/*---------------------------------------------------------------------|       open_acqpar(path)/1||       Position the disk read/write heads to the proper block offset|       for the acqpar file (lc,auto structure parameters.+-------------------------------------------------------------------*/void open_acqpar(char *filename){   int len;   if (bgflag)     fprintf(stderr,"Opening Acqpar file: '%s' /n",filename);   acqfd = open(filename,O_EXCL | O_RDONLY ,0666);   if (acqfd < 0)   { text_error("Cannot open acqpar file: '%s', RA not possible./n",filename);       psg_abort(1);   }   len = read(acqfd,&acqfileheader,sizeof(struct datafilehead));   if (len < 1)   { text_error("Cannot read acqpar file: '%s'/n",filename);       psg_abort(1);   }}
开发者ID:DanIverson,项目名称:OpenVnmrJ,代码行数:23,


示例15: closeFiles

void closeFiles(){    const char  *mess = "ABORT(): could not delete %s/n";    char  tmpPath[MAXPATHL];    /* delete file filexpath and filepath from acqqueue directory */    if (strcmp(filepath,"") != 0)    {        if ( (unlink(filepath) == -1) && (errno != ENOENT) )        {            text_error(mess,filepath);        }    }    if (strcmp(filexpath,"") != 0)    {        if ( (unlink(filexpath) == -1) && (errno != ENOENT) )        {            text_error(mess,filexpath);        }    }    if (strcmp(fileRFpattern,"") != 0)    {        if ( (unlink(fileRFpattern) == -1) && (errno != ENOENT) )        {            text_error(mess,fileRFpattern);        }    }    if (strcmp(filegrad,"") != 0)    {        if ( (unlink(filegrad) == -1) && (errno != ENOENT) )        {            text_error(mess,filegrad);        }    }    if (strcmp(filexpan,"") != 0)    {        if ( (unlink(filexpan) == -1) && (errno != ENOENT) )        {            text_error(mess,filexpan);        }    }    if (strcmp(filexpath,"") != 0)    {        strcpy(tmpPath,filexpath);        strcat(tmpPath,".RTpars");        if ( (unlink(tmpPath) == -1) && (errno != ENOENT) )        {            text_error(mess,tmpPath);        }    }    if (strcmp(filexpath,"") != 0)    {        strcpy(tmpPath,filexpath);        strcat(tmpPath,".Tables");        if ( (unlink(tmpPath) == -1) && (errno != ENOENT) )        {            text_error(mess,tmpPath);        }    }}
开发者ID:timburrow,项目名称:OpenVnmrJ,代码行数:60,


示例16: check_parameters

check_parameters(){/* *  do some error checking on string variables  */   if (p1pat[0] == '/0') {      text_error("p1pat file spec error/n");      exit(2);    }   if (pwpat[0] == '/0') {      text_error("pwpat file spec error/n");      exit(2);    }   if ((ni2 > 1) && (!strcmp(bptype,"slice"))){     text_error("can't do slice selection in 3D experiment/n");     exit(2);   }}
开发者ID:DanIverson,项目名称:OpenVnmrJ,代码行数:18,


示例17: nucleus_gamma

double nucleus_gamma(int device){    double nucgamma = 0.0;    if (B0 <= 0.0) {        text_error("nucleus_gamma: B0 (field) value <= zero/n");        psg_abort(1);    }    if (device == DODEV)        nucgamma=MHZ_HZ*dfrq/B0;    else if (device == TODEV)        nucgamma=MHZ_HZ*sfrq/B0;     else {        text_error("nucleus_gamma: Bad transmitter device/n");        psg_abort(1);    }    return(nucgamma);}
开发者ID:timburrow,项目名称:ovj3,代码行数:20,


示例18: notinhwloop

/*-------------------------------------------------------------------||	notinhwloop() |	set the invalid hardware loop flag |				Author Greg Brissey  7/10/86+------------------------------------------------------------------*/void notinhwloop(char *name){   char mess[80];   if (bgflag)       fprintf(stderr,"notinhwloop('%s'):/n",name);   if (hwlooping)   {       sprintf(mess," '%s' is not valid in a Hardware Loop /n",name);       text_error(mess);       psg_abort(0);		/* abort process */   }}
开发者ID:DanIverson,项目名称:OpenVnmrJ,代码行数:18,


示例19: maxminlimit

/*------------------------------------------------------------------------------||	maxminlimit(tree,name)||	This function returns the max & min limit of the real variable based|				Author: Greg Brissey  8-18-95+----------------------------------------------------------------------------*/int par_maxminstep(int tree, const char *name, double *maxv, double *minv, double *stepv){   int             ret,pindex;   vInfo           varinfo;	/* variable information structure */   char            mess[MAXSTR];   if ( (ret = P_getVarInfo(tree, name, &varinfo)) )   {      sprintf(mess, "Cannot find the variable: %s", name);      text_error(mess);      if (bgflag)	 P_err(ret, name, ": ");      return (-1);   }   if (varinfo.basicType != ST_REAL)   {      sprintf(mess, "The variable '%s' is not a type 'REAL'", name);      text_error(mess);   }   if (varinfo.prot & P_MMS)   {      pindex = (int) (varinfo.minVal+0.1);      if (P_getreal( SYSTEMGLOBAL, "parmin", minv, pindex ))         *minv = -1.0e+30;      pindex = (int) (varinfo.maxVal+0.1);      if (P_getreal( SYSTEMGLOBAL, "parmax", maxv, pindex ))         *maxv = 1.0e+30;      pindex = (int) (varinfo.step+0.1);      if (P_getreal( SYSTEMGLOBAL, "parstep", stepv, pindex ))            *stepv = 0.0;   }   else   {       *maxv = varinfo.maxVal;       *minv = varinfo.minVal;       *stepv = varinfo.step;   }   return (0);}
开发者ID:timburrow,项目名称:ovj3,代码行数:46,


示例20: release_console

/*-----------------------------------------------------------------|	release_console()/1|	Sends release console command to Vnmr+------------------------------------------------------------------*/void release_console(){    int stat;    char	message[STDVAR];    char addr[MAXSTR];    stat = -1;    if (getparm("vnmraddr","string",GLOBAL,addr,MAXSTR))    {        text_error("vnmremsg: cannot get Vnmr address./n");    }    else if (strcmp(addr,"Autoproc"))    {        sprintf(message,"releaseConsole/n");        stat = deliverMessageSuid(addr,message);        if (stat < 0)        {            text_error("vnmremsg: Error sending release console msg./n");        }    }}
开发者ID:timburrow,项目名称:OpenVnmrJ,代码行数:26,


示例21: parmult

/*------------------------------------------------------------------------------||	parmult(tree,name)||	This function returns the multiplier of a real parameter+----------------------------------------------------------------------------*/double parmult(int tree, const char *name){   int             ret;   vInfo           varinfo;	/* variable information structure */   if ( (ret = P_getVarInfo(tree, name, &varinfo)) )   {      text_error("parmult(): cannot find variable %s", name);      if (bgflag)	 P_err(ret, name, ": ");      return (-1.0);   }   return( (varinfo.subtype == ST_PULSE) ? 1e-6 : 1.0);}
开发者ID:timburrow,项目名称:ovj3,代码行数:20,


示例22: noslice_timing

noslice_timing(){/* calculate dx: */   dx = (te/2.0) - 0.5*(p1+pw) - rof1 - rof2;   if (dx < 1.0e-6) {        text_error("cannot fit tpe trise p1 pw into te... ABORT");       exit(2);   }/* calculate dy: */   dy = (te/2.0) - at/2.0 - pw/2.0 - rof2;   if (dy < 1.0e-6) {        dy = 1.0e-6;   }   tix = tr - pi/2.0 - rof2 - trise;}
开发者ID:DanIverson,项目名称:OpenVnmrJ,代码行数:15,


示例23: whattype

/*------------------------------------------------------------------------------||	whattype(tree,name)||	This function returns the address of a real value of a variable based on+----------------------------------------------------------------------------*/int whattype(int tree, const char *name){   int             ret;   vInfo           varinfo;	/* variable information structure */   char            mess[MAXSTR];   if ( (ret = P_getVarInfo(tree, name, &varinfo)) )   {      sprintf(mess, "Cannot find the variable: %s", name);      text_error(mess);      if (bgflag)	 P_err(ret, name, ": ");      return (-1);   }   return (varinfo.basicType);}
开发者ID:timburrow,项目名称:ovj3,代码行数:22,


示例24: write_shr_info

void write_shr_info(double exp_time){    int Infofd;	/* file discriptor Code disk file */    int bytes;    /* --- write parameter out to acqqueue file --- */    if (usertime < 0.0)       ExpInfo.ExpDur = exp_time;    else       ExpInfo.ExpDur = usertime;    /*       BKJ: CAUTION: need to check ExpInfo.NumTables       ExpInfo.NumTables = num_tables;    */    if ( ! AcodeManager_getAcodeStageWriteFlag(0) ) strcpy(ExpInfo.InitCodefile,"/0");    if ( ! AcodeManager_getAcodeStageWriteFlag(1) ) strcpy(ExpInfo.PreCodefile,"/0");    if ( ! AcodeManager_getAcodeStageWriteFlag(2) ) strcpy(ExpInfo.PSCodefile,"/0");    if ( ! AcodeManager_getAcodeStageWriteFlag(3) ) strcpy(ExpInfo.PostCodefile,"/0");    if ( ! AcodeManager_getAcodeStageWriteFlag(4) ) strcpy(ExpInfo.WaveFormFile,"/0");    if (ExpInfo.InteractiveFlag)    {       char tmppath[256];       sprintf(tmppath,"%s.new",infopath);       unlink(tmppath);       Infofd = open(tmppath,O_EXCL | O_WRONLY | O_CREAT,0666);    }    else    {       /* fprintf(stdout,"infopath: '%s'/n", infopath); */       Infofd = open(infopath,O_EXCL | O_WRONLY | O_CREAT,0666);    }    if (Infofd < 0)    {	text_error("Exp info file already exists. PSG Aborted../n");	psg_abort(1);    }    /* fprintf(stdout," [[[[[[[[[-->>writing  RcvrMapStr: '%s'/n",ExpInfo.RvcrMapping); */    bytes = write(Infofd, (const void *) &ExpInfo, sizeof( SHR_EXP_STRUCT ) );    /* fprintf(stdout,"sizeof( SHR_EXP_STRUCT ) = %d/n",sizeof( SHR_EXP_STRUCT )); */    fsync(Infofd);    if (bgflag)      fprintf(stdout,"Bytes written to info file: %d (bytes)./n",bytes);    close(Infofd);}
开发者ID:DanIverson,项目名称:OpenVnmrJ,代码行数:47,


示例25: compare_dutycycle_limits

static void compare_dutycycle_limits(){    Sdac *pd;    int  panic;    if (option_check("danger") ) return;    pd = sdac_values;    panic = 0;    if (coilLimits.xduty < pd[DUTYLIMIT].values[X1_AXIS])  panic=1;    if (coilLimits.zduty < pd[DUTYLIMIT].values[Y1_AXIS])  panic=1;    if (coilLimits.zduty < pd[DUTYLIMIT].values[Z1_AXIS])  panic=1;    if (panic)    {        text_error("Dutycycle limits exceed gradient coil specifications");        psg_abort(3);    }}
开发者ID:DanIverson,项目名称:OpenVnmrJ,代码行数:17,


示例26: create_angle_list

int create_angle_list(char *nm, double* angle_set, int num_sets){   if (gradtype[0] != gradtype[1])       abort_message("error in gradient or pfg configuration parameter gradtype. abort!/n");   if (gradtype[0] != gradtype[2])       abort_message("error in gradient or pfg configuration parameter gradtype. abort!/n");   int listId = -1;   GradientBase  *gC = P2TheConsole->getConfiguredGradient();   listId = gC->create_angle_list(nm, angle_set, num_sets);   if (listId > 0)     return listId;   else     text_error("error in creating rotation list on %s . abort!/n", gC->getName());   return(listId);}
开发者ID:timburrow,项目名称:openvnmrj-source,代码行数:17,


示例27: psg_abort

void psg_abort(int error){    closeFiles();    if (dpsTimer)    {        close_error(1);   /* 1 arg means failure/abort */        exit(1);    }    text_error("P.S.G. Aborted.");    if (newacq)    {        if (!acqiflag && !dps_flag)            release_console();    }    close_error(1);     /* 1 arg means failure/abort */    exit(error);}
开发者ID:timburrow,项目名称:OpenVnmrJ,代码行数:17,


示例28: get_all_sdac_from_file

/* fill in the Sdac sdac_value structure with sdac numbers */static intget_all_sdac_from_file(char *filename){    int i, j;    int rtn = TRUE;    FILE *fd = NULL;    Sdac *pd;    struct stat statbuf;    if (strstr(filename, "/.None")) {        rtn = FALSE;    } else if (stat(filename, &statbuf) == -1               || ! (statbuf.st_mode & S_IFREG)               || ! (fd = fopen(filename, "r") ))    {        text_error("Cannot find /"%s/". Check the sysgcoil parameter", filename);        psg_abort(1);    }    if (!rtn){        /* If no file, just turn off gain for safety */        for (j=0, pd=sdac_values; j<3; j++){            pd[TOTALSCALE].values[j] = 0;        }    }else    {        for (i=0, pd=sdac_values; i<N_SDAC_VALS; pd++, i++){            for (j=0; j<4; j++){                if (i == SLEWLIMIT) {                    pd->values[j] = pd->max_val;                }else{                    pd->values[j] = 0;                }            }            get_one_sdac_setting_from_file(fd, pd->label, pd->values);        }        fclose(fd);    }    return rtn;}
开发者ID:DanIverson,项目名称:OpenVnmrJ,代码行数:43,


示例29: init_hash

/*-------------------------------------------------------| init_hash(size)   Malloc space for hash table and|		    initialize hash table to null+-------------------------------------------------------*/void init_hash(int size)	/* Initialize hash table to null */{   int             i;   max_hash = size * 10;   if (debug > 0)      fprintf(stderr, "Max Hash Table Size : %d /n", max_hash);   htable = (hash_table *) malloc(max_hash * (sizeof(hash_table)));   if (htable == 0L)   {      text_error("insuffient memory for variable pointer allocation!!");      psg_abort(0);   }   for (i = 0; i < max_hash; i++)   {      htable[i].word = NULL;      htable[i].index = -1;   }   hash_entries = 0;}
开发者ID:DanIverson,项目名称:OpenVnmrJ,代码行数:24,



注:本文中的text_error函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ text_height函数代码示例
C++ textToString函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。