GNU编程风格.docVIP

  • 6
  • 0
  • 约4.09千字
  • 约 5页
  • 2015-07-29 发布于重庆
  • 举报
GNU编程风格.doc

Linux作为GNU家族的一员,上面的源代码数以万计,而在阅读这些源代码时我们会发现,不同的源代码的美观程度和编程风格都不尽一样,有些代码,如glibc的代码: static void release_libc_mem (void) { /* Only call the free function if we still are running in mtrace mode. */ if (mallstream != NULL) __libc_freeres (); } 或者是Linux核心的代码: static int do_linuxrc(void * shell) { static char *argv[] = { linuxrc, NULL, }; close(0);close(1);close(2); setsid(); (void) open(/dev/console,O_RDWR,0); (void) dup(0);

文档评论(0)

1亿VIP精品文档

相关文档