flex-2.5.35.tar.gz


flex-2.5.35.tar.gz 下载了wine-1.5.2.tar.bz2 欲安装到redhat5.4x86 32bit系统上 安装以下方式安装,在第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; /**< for user #definitions triggered by cmd-line. */
struct Buf defs_buf; /**< for #define‘s autogenerated. List of strings. */
struct Buf yydmap_buf; /**< string buffer to hold yydmap elements */
struct Buf m4defs_buf;          /**< m4 definitions. List of strings. */
struct Buf top_buf;             /**< contains %top code. String buffer. */

struct Buf *buf_print_strings(struct Buf * buf FILE* out)
{
    int i;

    if(!buf || !out)
        return buf;

    for (i=0; i < buf->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 

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)