寻找snprintf()的C源代码

编程入门 行业动态 更新时间:2024-10-09 20:26:59
本文介绍了寻找snprintf()的C源代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我需要将snprintf()移植到另一个不完全支持GLibC的平台上.

I need to port snprintf() to another platform that does not fully support GLibC.

我正在寻找Glibc 2.14源代码中的基础声明.我遵循许多函数调用,但是卡在vfprintf()上.然后,它似乎调用_IO_vfprintf(),但我找不到该定义.可能是宏混淆了事物.

I am looking for the underlying declaration in the Glibc 2.14 source code. I follow many function calls, but get stuck on vfprintf(). It then seems to call _IO_vfprintf(), but I cannot find the definition. Probably a macro is obfuscating things.

我需要看一下真正的C代码,它扫描格式字符串并计算如果输入缓冲区足够大的话它将写入的字节数.

I need to see the real C code that scans the format string and calculates the number of bytes it would write if input buffer was large enough.

我也尝试在newlib 1.19.0中进行查找,但是我被卡在_svfprintf_r()上.我在任何地方都找不到定义.

I also tried looking in newlib 1.19.0, but I got stuck on _svfprintf_r(). I cannot find the definition anywhere.

有人可以将我指向snprintf()的另一个定义吗?

Can someone point me to either definition or another one for snprintf()?

推荐答案

www.ijs他们称.si/software/snprintf/是snprintf的可移植实现,包括vsnprintf.c,asnprintf,vasnprintf,asprintf,vasprintf .也许可以帮上忙.

www.ijs.si/software/snprintf/ has what they claim is a portable implementation of snprintf, including vsnprintf.c, asnprintf, vasnprintf, asprintf, vasprintf. Perhaps it can help.

更多推荐

寻找snprintf()的C源代码

本文发布于:2023-11-13 02:36:45,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1583186.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:源代码   snprintf

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!