Back to index

courier  0.68.2
removecomments.c
Go to the documentation of this file.
00001 /*
00002 ** Copyright 1998 - 1999 Double Precision, Inc.
00003 ** See COPYING for distribution information.
00004 */
00005 
00006 /* Remove #+comments from file read into memory. */
00007 
00008 void removecomments(char *p)
00009 {
00010 char *q;
00011 
00012        for (q=p; *p; )
00013        {
00014               if (*p == '#')
00015                      while (*p && *p != '\n')
00016                             p++;
00017               *q++= *p;
00018               if (*p)       p++;
00019        }
00020        *q=0;
00021 }