原创 2006年06月16日 23:26:00

API_EXPORT(char *) ap_cpystrn(char *, const char *, size_t);
int ap_slack(int, int);
int ap_execle(const char *, const char *, ...);
int ap_execve(const char *, const char *argv[], const char *envp[]);

/* small utility macros to make things easier to read */

#ifdef WIN32
#define ap_killpg(x, y)
#ifdef NO_KILLPG
#define ap_killpg(x, y)  (kill (-(x), (y)))
#define ap_killpg(x, y)  (killpg ((x), (y)))
#endif /* WIN32 */

/* ap_vformatter() is a generic printf-style formatting routine
 * with some extensions.  The extensions are:
 * %pA takes a struct in_addr *, and prints it as a.b.c.d
 * %pI takes a struct sockaddr_in * and prints it as a.b.c.d:port
 * %pp  takes a void * and outputs it in hex
 * The %p hacks are to force gcc's printf warning code to skip
 * over a pointer argument without complaining.  This does
 * mean that the ANSI-style %p (output a void * in hex format) won't
 * work as expected at all, but that seems to be a fair trade-off
 * for the increased robustness of having printf-warnings work.
 * Additionally, ap_vformatter allows for arbitrary output methods
 * using the ap_vformatter_buff and flush_func.
 * The ap_vformatter_buff has two elements curpos and endpos.
 * curpos is where ap_vformatter will write the next byte of output.
 * It proceeds writing output to curpos, and updating curpos, until
 * either the end of output is reached, or curpos == endpos (i.e. the
 * buffer is full).
 * If the end of output is reached, ap_vformatter returns the
 * number of bytes written.
 * When the buffer is full, the flush_func is called.  The flush_func
 * can return -1 to indicate that no further output should be attempted,
 * and ap_vformatter will return immediately with -1.  Otherwise
 * the flush_func should flush the buffer in whatever manner is
 * appropriate, re-initialize curpos and endpos, and return 0.
 * Note that flush_func is only invoked as a result of attempting to
 * write another byte at curpos when curpos >= endpos.  So for
 * example, it's possible when the output exactly matches the buffer
 * space available that curpos == endpos will be true when
 * ap_vformatter returns.
 * ap_vformatter does not call out to any other code, it is entirely
 * self-contained.  This allows the callers to do things which are
 * otherwise "unsafe".  For example, ap_psprintf uses the "scratch"
 * space at the unallocated end of a block, and doesn't actually
 * complete the allocation until ap_vformatter returns.  ap_psprintf
 * would be completely broken if ap_vformatter were to call anything
 * that used a pool.  Similarly http_bprintf() uses the "scratch"
 * space at the end of its output buffer, and doesn't actually note
 * that the space is in use until it either has to flush the buffer
 * or until ap_vformatter returns.

typedef struct {
    char *curpos;
    char *endpos;
} ap_vformatter_buff;

API_EXPORT(int) ap_vformatter(int (*flush_func)(ap_vformatter_buff *),
    ap_vformatter_buff *, const char *fmt, va_list ap);

/* These are snprintf implementations based on ap_vformatter().
 * Note that various standards and implementations disagree on the return
 * value of snprintf, and side-effects due to %n in the formatting string.
 * ap_snprintf behaves as follows:
 * Process the format string until the entire string is exhausted, or
 * the buffer fills.  If the buffer fills then stop processing immediately
 * (so no further %n arguments are processed), and return the buffer
 * length.  In all cases the buffer is NUL terminated.
 * In no event does ap_snprintf return a negative number.  It's not possible
 * to distinguish between an output which was truncated, and an output which
 * exactly filled the buffer.
API_EXPORT(int) ap_snprintf(char *buf, size_t len, const char *format,...)
API_EXPORT(int) ap_vsnprintf(char *buf, size_t len, const char *format,
        va_list ap);




iOS 提交审核的时候无法上传 生成的api分析文件太大

估计这是苹果的bug,我修改了version 才成功上传 可以先修改build   如果还不行  就改个version 版本号 再试试...
  • binbin15951
  • binbin15951
  • 2017年12月08日 10:15
  • 167


如果一个系统的执行效率比较低,一个比较好的方法是通过跟踪用户的会话并且使用tkprof工具使用排序功能格式化输出,从而找出有问题的SQL语句。 例如首先从os上利用top命令找到当前占用cpu资源最...
  • boer521314
  • boer521314
  • 2015年09月25日 16:43
  • 2109

上传ipa出现的错误提示“application loader上传出错 生成的API分析文件太大”解决方法

使用Application Loader 上传ipa出现的错误提示“application loader上传出错 生成的API分析文件太大”解决方法 如下图: 解决办法就是修改Xcode里面的因为...
  • 2016年04月13日 18:23
  • 6819


无线Trace的格式 1.老版本的Trace格式 目前,无线模拟的Trace支持使用cmu-trace对象,该对象有三种类型,分别为:CMUTrace/Drop、CMUTrace/Recv和CMU...
  • pengtwelve
  • pengtwelve
  • 2011年10月08日 17:16
  • 4510


前面介绍如如何用WinDBG 生成crash dump 《WinDBG 技巧:如何生成Dump 文件(.dump 命令) 》,但是用户机器上通常不安装WinDBG, 而且多数用户也不知道怎么使用Wi...
  • nui111
  • nui111
  • 2014年06月29日 22:09
  • 2907

关于Application Loader 上传ipa包 生成的API文件太大

关于Application Loader 上传ipa包 生成的API文件太大 解决办法: 1.尝试搜索了网上的解决方案,均没有结果,于是自己想出了一种方案,试了试居然搞定了。 方法为:通...
  • u013320568
  • u013320568
  • 2015年12月14日 15:57
  • 3412

上传ipa出现:生成的 API 分析文件太大。我们无法在交付前验证您的 API 使用信息

解决办法:目前看应该是iOS应用里引用的其他第三方库里带的Info.plist导致的. 但是20日之前还没事,苹果20日更新了就带来了问题.应该说苹果的更新肯定修改了限制规则. 解决办法1 把工...
  • yuhao309
  • yuhao309
  • 2017年01月12日 09:51
  • 2909

linux shell脚本文件执行分析

原创,转载注明出处 一.shell脚本父子进程分析   代码: #!/bin/bash echo $$ ps -ef |grep `echo $$` echo "---------...
  • hittata
  • hittata
  • 2012年09月25日 15:58
  • 6655

STM32 startup.s启动文件分析

;******************** (C) COPYRIGHT 2009 STMicroelectronics ******************** ;* File Name      ...
  • pililong
  • pililong
  • 2014年01月02日 21:42
  • 1773


MSDN蓝屏代码查看:Bug Check Code Reference WinDbg官方下载: https://developer.microsoft.com/en-us/windows/har...
  • greless
  • greless
  • 2017年05月09日 11:47
  • 684