c - 在 C 中运行“parsefmt”的头文件?
问题描述
最近我遇到了“ps”Linux 命令的代码,该命令利用“parsefmt”函数来获取 PID、tty 和路径等信息。但是,我不知道如何使用该功能;我已经包含了实际 ps.c 文件(https://opensource.apple.com/source/adv_cmds/adv_cmds-158/ps/ps.c.auto.html)中的所有头函数,但我仍然收到错误:
implicit declaration of function 'parsefmt' is invalid in C99
如果有人可以指导我如何使用此功能,将不胜感激。
解决方案
它在同一目录下的keyword.c中定义,原型在extern.h中
推荐阅读
- python - pySpark:将 Kafka 流放入 parquet 并从远程会话中读取 parquet
- javascript - Mongoose/MongoDB GeoJSON 查询返回空结果
- php - Wordpress:显示与 2 个术语相关的项目
- nearprotocol - Near Explorer block query starts from 9820221
- docker - 在 windows 容器中,如何优雅地关闭 asp.net core 应用程序?
- python - 为什么lambdify永远不会停止?
- jquery - 将选择更改为他的下一个值
- git - 让 git 在不覆盖现有代码的情况下进行更改
- c# - Open XML 删除 MS Word 表行损坏图像
- elasticsearch - 有没有办法使用弹性搜索数据源的当前日期计算时差?