html_hash.c
来自「微型浏览器」· C语言 代码 · 共 37 行
C
37 行
/* * This utility will add a ", NULL" to a hash table (generated * by gperf) to facilitate creating new large tables for htmltokenizer.c * that requires a 3rd pointer param. */#include <stdio.h>int main(int argc, char **argv){ FILE *infile; int c; if(argc < 2) { fprintf(stderr, "Usage: %s <filename>\n", argv[0]); return -1; } infile = fopen(argv[1], "r"); if(!infile) { perror(argv[1]); return -1; } while((c = fgetc(infile)) != EOF) { if(c == '}') printf(", NULL"); fputc(c, stdout); } fclose(infile); return 0;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?