資源簡介
flex-2.5.35.tar.gz
下載了wine-1.5.2.tar.bz2
欲安裝到redhat5.4x86 32bit系統(tǒng)上
安裝以下方式安裝,在第6步出錯。
tar.bz2源代碼包安裝方式:
1、找到相應的軟件包,比如soft.tar.bz2,下載到本機某個目錄;
2、打開一個終端,su -成root用戶;
3、cd soft.tar.bz2所在的目錄;
4、tar -xjvf soft.tar.bz2 //一般會生成一個soft目錄
5、cd soft
6、./configure
7、make
8、make install
第6步報錯:提示Your flex version is too old. Please install flex version 2.5.33 or newer.
flex安裝了最新的flex-2.5.4.tar 還是報同樣的錯誤。
無奈,下載flex-2.5.35.tar.gz,再次安裝,第6步通過!!!
代碼片段和文件信息
/*?flex?-?tool?to?generate?fast?lexical?analyzers?*/
/*??Copyright?(c)?1990?The?Regents?of?the?University?of?California.?*/
/*??All?rights?reserved.?*/
/*??This?code?is?derived?from?software?contributed?to?Berkeley?by?*/
/*??Vern?Paxson.?*/
/*??The?United?States?Government?has?rights?in?this?work?pursuant?*/
/*??to?contract?no.?DE-AC03-76SF00098?between?the?United?States?*/
/*??Department?of?Energy?and?the?University?of?California.?*/
/*??This?file?is?part?of?flex.?*/
/*??Redistribution?and?use?in?source?and?binary?forms?with?or?without?*/
/*??modification?are?permitted?provided?that?the?following?conditions?*/
/*??are?met:?*/
/*??1.?Redistributions?of?source?code?must?retain?the?above?copyright?*/
/*?????notice?this?list?of?conditions?and?the?following?disclaimer.?*/
/*??2.?Redistributions?in?binary?form?must?reproduce?the?above?copyright?*/
/*?????notice?this?list?of?conditions?and?the?following?disclaimer?in?the?*/
/*?????documentation?and/or?other?materials?provided?with?the?distribution.?*/
/*??Neither?the?name?of?the?University?nor?the?names?of?its?contributors?*/
/*??may?be?used?to?endorse?or?promote?products?derived?from?this?software?*/
/*??without?specific?prior?written?permission.?*/
/*??THIS?SOFTWARE?IS?PROVIDED?‘‘AS?IS‘‘?AND?WITHOUT?ANY?EXPRESS?OR?*/
/*??IMPLIED?WARRANTIES?INCLUDING?WITHOUT?LIMITATION?THE?IMPLIED?*/
/*??WARRANTIES?OF?MERCHANTABILITY?AND?FITNESS?FOR?A?PARTICULAR?*/
/*??PURPOSE.?*/
#include?“flexdef.h“
/*?Take?note:?The?buffer?object?is?sometimes?used?as?a?String?buffer?(one
?*?continuous?string)?and?sometimes?used?as?a?list?of?strings?usually?line?by
?*?line.
?*?
?*?The?type?is?specified?in?buf_init?by?the?elt_size.?If?the?elt_size?is
?*?sizeof(char)?then?the?buffer?should?be?treated?as?string?buffer.?If?the
?*?elt_size?is?sizeof(char*)?then?the?buffer?should?be?treated?as?a?list?of
?*?strings.
?*
?*?Certain?functions?are?only?appropriate?for?one?type?or?the?other.?
?*/
/*?global?buffers.?*/
struct?Buf?userdef_buf; /**struct?Buf?defs_buf; /**struct?Buf?yydmap_buf; /**struct?Buf?m4defs_buf;??????????/**struct?Buf?top_buf;?????????????/**
struct?Buf?*buf_print_strings(struct?Buf?*?buf?FILE*?out)
{
????int?i;
????if(!buf?||?!out)
????????return?buf;
????for?(i=0;?i?nelts;?i++){
????????const?char?*?s?=?((char**)buf->elts)[i];
????????if(s)
????????????fprintf(out?“%s“?s);
????}
????return?buf;
}
/*?Append?a?“%s“?formatted?string?to?a?string?buffer?*/
struct?Buf?*buf_prints?(struct?Buf?*buf?const?char?*fmt?const?char?*s)
{
char???*t;
????????size_t?tsz;
t?=?flex_alloc?(tsz?=?strlen?(fmt)?+?strlen?(s)?+?1);
snprintf?(t?tsz?fmt?s);
buf?=?buf_strappend?(buf?t);
flex_free?(t);
return?buf;
}
/**?Append?a?line?directive?to?the?string?buffer.
?*?@param?buf?A?
- 上一篇:得到品控手冊
- 下一篇:stm32+DHT21程序代碼
評論
共有 條評論