Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ bzero(3C) — DG/UX 4.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought



                                                                bzero(3C)



        _________________________________________________________________
        bzero                                                    function
        Zero a portion of memory.
        _________________________________________________________________


        Calling Sequence

        int bzero(), length;
        char *ptr;
        bzero(ptr, length);


           where    ptr is a pointer to the area to clear.

                    length is the number of bytes set to zero.


        Description

        The bzero function fills a specified memory area with zeros; this
        function comes from the University of California Berkeley UNIX
        (BSD) system.  This function has the same calling sequence as the
        zero function.


        Returns

        The bzero function returns no value.


        Related Functions

        See also the zero function.


        Example

        /* Program test for the bzero() function */

        #include <stdio.h>

        int bzero();
        char buf[80] = "abcdef";

        main() {
            printf("buf = '%s'\n", buf);
            bzero(buf, sizeof(buf));
            printf("buf = '%s'\n", buf);
            return 0;
        }



        DG/UX 4.00                                                 Page 1
               Licensed material--property of copyright holder(s)





                                                                bzero(3C)



        A call to this program generates the output

        buf = 'abcdef'
        buf = ''


















































        DG/UX 4.00                                                 Page 2
               Licensed material--property of copyright holder(s)



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026