Annotation of GNUtools/libg++/libiberty/bzero.c, revision 1.1.1.1

1.1       root        1: /* Portable version of bzero for systems without it.
                      2:    Copyright (C) 1991 Free Software Foundation, Inc.
                      3: 
                      4: This file is part of the libiberty library.
                      5: Libiberty is free software; you can redistribute it and/or
                      6: modify it under the terms of the GNU Library General Public
                      7: License as published by the Free Software Foundation; either
                      8: version 2 of the License, or (at your option) any later version.
                      9: 
                     10: Libiberty is distributed in the hope that it will be useful,
                     11: but WITHOUT ANY WARRANTY; without even the implied warranty of
                     12: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
                     13: Library General Public License for more details.
                     14: 
                     15: You should have received a copy of the GNU Library General Public
                     16: License along with libiberty; see the file COPYING.LIB.  If
                     17: not, write to the Free Software Foundation, Inc., 675 Mass Ave,
                     18: Cambridge, MA 02139, USA.  */
                     19: 
                     20: 
                     21: /*
                     22: 
                     23: NAME
                     24: 
                     25:        bzero -- zero the contents of a specified memory region
                     26: 
                     27: SYNOPSIS
                     28: 
                     29:        void bzero (char *to, int count)
                     30: 
                     31: DESCRIPTION
                     32: 
                     33:        Zero COUNT bytes of memory pointed to by TO.
                     34: 
                     35: BUGS
                     36: 
                     37:        Significant speed enhancements may be made in some environments
                     38:        by zeroing more than a single byte at a time, or by unrolling the
                     39:        loop.
                     40: 
                     41: */
                     42: 
                     43: 
                     44: void
                     45: bzero (to, count)
                     46:   char *to;
                     47:   int count;
                     48: {
                     49:   while (count-- > 0)
                     50:     {
                     51:       *to++ = 0;
                     52:     }
                     53: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.