📄 truncfp.c
字号:
/************************************************************* * File: lib/truncfp.c * Purpose: Used to truncate floating-point values * Author: Phil Bunce (pjb@carmel.com) * Revision History: * 980818 Moved here from vsprintf.c */trunc_fp(fmt,p,n)char fmt,*p;int n;{int i;if (*p == '-') p++;p += 2 + n;while (*p != 0 && *p != 'e' && *p != 'E') strdchr(p);if (fmt == 'e') *p = 'e';p += 2;while (*p != 0 && *p == '0') strdchr(p);if (strlen(p) == 0) strichr(p,'0');if (strlen(p) == 1) strichr(p,'0');}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -