misc.c

来自「Solaris操作系统下的过滤驱动程序, C源码程序.」· C语言 代码 · 共 48 行

C
48
字号
/* * Copyright (c) 1997-2003 Erez Zadok * Copyright (c) 2001-2003 Stony Brook University * Copyright (c) 1997-2000 Columbia University * * For specific licensing information, see the COPYING file distributed with * this package, or get one from ftp://ftp.filesystems.org/pub/fist/COPYING. * * This Copyright notice must be kept intact and distributed with all * fistgen sources INCLUDING sources generated by fistgen. *//* * misc.c: miscellaneous functions * Fistgen sources. */#ifdef HAVE_CONFIG_H# include <config.h>#endif /* HAVE_CONFIG_H *//* lowercase a whole string (in-place) */voidlowercase_string(char *str){  char *cp = str;  if (!str)    return;  do {    *cp = tolower(*cp);  } while (*cp++);}/* uppercase a whole string (in-place) */voiduppercase_string(char *str){  char *cp = str;  if (!str)    return;  do {    *cp = toupper(*cp);  } while (*cp++);}

⌨️ 快捷键说明

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