宣布修改了ggets [英] ANNOUNCE ggets revised

查看:75
本文介绍了宣布修改了ggets的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我修改了我的ggets实用程序,以简化代码并减少对标准库的要求

。外部动作是完全不变的,所以没有人真正需要升级。

可在以下地址购买:


< ; http://cbfalconer.home.att.net/download/>


-

查克F(cb ******* *@yahoo.com)(cb********@maineline.net)

可用于咨询/临时嵌入式和系统。

< http: //cbfalconer.home.att.net>使用maineline地址!

I have modified my ggets utility, to simplify the code and reduce
the requirements on the standard library. The external action is
totally unchanged, so there is no real need for anyone to upgrade.
Available at:

<http://cbfalconer.home.att.net/download/>

--
Chuck F (cb********@yahoo.com) (cb********@maineline.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE maineline address!

推荐答案

CBFalconer写道:
CBFalconer wrote:

我修改了我的ggets实用程序,以简化代码并减少对标准库的要求。外部动作完全没有变化,所以没有人真正需要升级。
可在以下地址获得:

< http://cbfalconer.home.att.net / download />

I have modified my ggets utility, to simplify the code and reduce
the requirements on the standard library. The external action is
totally unchanged, so there is no real need for anyone to upgrade.
Available at:

<http://cbfalconer.home.att.net/download/>




我讨厌承认它,但是我发布了内存泄漏的东西。

固定。 2006-06-15的zip文件有修复,现在只有在上面链接上找到的




-

Chuck F(cb********@yahoo.com)(cb********@maineline.net)

可用于咨询/临时嵌入式和系统。

< http://cbfalconer.home.att.net>使用maineline地址!



I hate to admit it, but I released something with a memory leak.
Fixed. The zip file dated 2006-06-15 has the fix, and is now the
only one found on the above link.

--
Chuck F (cb********@yahoo.com) (cb********@maineline.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE maineline address!


CBFalconer写道:
CBFalconer wrote:
CBFalconer写道:
CBFalconer wrote:
我修改了我的ggets实用程序,简化代码并减少对标准库的要求。外部动作完全没有变化,所以没有人真正需要升级。
可在以下地址获得:

< http://cbfalconer.home.att.net / download />
I have modified my ggets utility, to simplify the code and reduce
the requirements on the standard library. The external action is
totally unchanged, so there is no real need for anyone to upgrade.
Available at:

<http://cbfalconer.home.att.net/download/>



我讨厌承认,但是我发布了内存泄漏的内容。
修正了。 2006-06-15的zip文件有修复,现在只有在上面的链接上找到的。



I hate to admit it, but I released something with a memory leak.
Fixed. The zip file dated 2006-06-15 has the fix, and is now the
only one found on the above link.



五分钟前是否存在内存泄漏?我想我已经修改了

一个,但我的问题是标题:

#ifndef ggets_h_

#define ggets_h_


#ifdef __cplusplus

externC {

#endif


int fggets(char * * ln,FILE * f);


#define ggets(ln)fggets(ln,stdin)


#ifdef __cplusplus

}

#endif

#endif

/ * END ggets.h * /

ifdef在这里发生了什么?他们似乎正在构建

声明:

externC {int ... #define ...}

? frank


Did the memory leak exist five minutes ago? I think I got the revised
one but my question goes to the header:
#ifndef ggets_h_
# define ggets_h_

# ifdef __cplusplus
extern "C" {
# endif

int fggets(char* *ln, FILE *f);

#define ggets(ln) fggets(ln, stdin)

# ifdef __cplusplus
}
# endif
#endif
/* END ggets.h */
What is happening with the ifdefs here? They would seem to be building
a statement:
extern "C" { int ... #define ...}
? frank


Frank Silvermann schrieb:
Frank Silvermann schrieb:
CBFalconer写道:
< snip>我的问题转到标题:
#ifndef ggets_h_
#define ggets_h_

#ifdef __cplusplus
externC {
#endif

int fggets(char * * ln,FILE * f);

#define ggets(ln)fggets(ln,stdin)

#ifdef __cplusplus
}
#endif
#endif
/ * END ggets.h * /
ifdef在这里发生了什么?他们似乎正在建立一个声明:
externC {int ... #define ...}
CBFalconer wrote: <snip> my question goes to the header:
#ifndef ggets_h_
# define ggets_h_

# ifdef __cplusplus
extern "C" {
# endif

int fggets(char* *ln, FILE *f);

#define ggets(ln) fggets(ln, stdin)

# ifdef __cplusplus
}
# endif
#endif
/* END ggets.h */
What is happening with the ifdefs here? They would seem to be building
a statement:
extern "C" { int ... #define ...}




是的。

您可以假设每个足够新的C实现都

不是#define __cplusplus [*]而C ++实现通常是




所以C版本的代码只给你一个带有

的标题包括保护,其中提供了fggets()的原型和ggets()的宏定义
定义。

C ++版本基本相同,但标记fggets()

作为源自C代码的函数(此信息是链接所需的
)。

[* ] C99明确禁止实现在任何标准库头(6.10.8#5)中预定义

__cplusplus;甚至

不符合这个标准的编译器通常也不会b / b #define __cplusplus。

干杯

Michael

-

电子邮件:我的是/ at / gmx / dot / de地址。



Yep.
You can assume that every sufficiently new C implementation does
not #define __cplusplus[*] whereas a C++ implementation usually
does.

So the C version of the code just gives you a header with
include guards in which a prototype of fggets() and a macro
definition for ggets() are provided.
The C++ version does essentially the same but marks fggets()
as function stemming from C code (this information is
necessary for linking).
[*] C99 explicitly forbids the implementation to predefine
__cplusplus in any standard library header (6.10.8#5); even
compilers not complying to this standard usually do not
#define __cplusplus.
Cheers
Michael
--
E-Mail: Mine is an /at/ gmx /dot/ de address.


这篇关于宣布修改了ggets的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆