menulib.c

来自「internich公司实现的一个非常非常小的OS」· C语言 代码 · 共 54 行

C
54
字号
/* * FILENAME: menulib.c * * Copyright  2000-2004 By InterNiche Technologies Inc. All rights reserved * Portions Copyright 1993 by NetPort software  * * Misc utility routines for Interniche menuing system * * MODULE: NTF * * ROUTINES: settrapsize() * * PORTABLE: yes */#include "license.h"#include "ipport.h"#include "menu.h"#include "in_utils.h"/* FUNCTION: settrapsize() * * settrapsize() - This sets a value which will cause the memory  * managment monitoring code to trap to a debugger if a malloc is  * attempted for this size. This is usefull when a memory leak is  * occuring of memory buffers on an unusual size, as often happens  * with networking code. It has nothing to do with SNMP traps.  * Returns no meaningfull value; declared as int to make compiler  * happy.  * *  * PARAM1: void * pio   - output stream * * RETURNS: 0 */extern   int   memtrapsize;   /* in memman.c or user heap code */intsettrapsize(void * pio) {   char *   cp;   cp = nextarg(((GEN_IO)pio)->inbuf);   memtrapsize = atoi(cp);   ns_printf(pio,"malloc trap size set to %d\n", memtrapsize);   return 0;}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?