Home | History | Annotate | Line # | Download | only in ssp
h_raw.c revision 1.4.2.2
      1  1.4.2.2  cherry /* $NetBSD: h_raw.c,v 1.4.2.2 2011/06/23 14:20:39 cherry Exp $ */
      2  1.4.2.2  cherry 
      3  1.4.2.2  cherry /*
      4  1.4.2.2  cherry  * Copyright (c) 2011 The NetBSD Foundation, Inc.
      5  1.4.2.2  cherry  * All rights reserved.
      6  1.4.2.2  cherry  *
      7  1.4.2.2  cherry  * Redistribution and use in source and binary forms, with or without
      8  1.4.2.2  cherry  * modification, are permitted provided that the following conditions
      9  1.4.2.2  cherry  * are met:
     10  1.4.2.2  cherry  * 1. Redistributions of source code must retain the above copyright
     11  1.4.2.2  cherry  *    notice, this list of conditions and the following disclaimer.
     12  1.4.2.2  cherry  * 2. Redistributions in binary form must reproduce the above copyright
     13  1.4.2.2  cherry  *    notice, this list of conditions and the following disclaimer in the
     14  1.4.2.2  cherry  *    documentation and/or other materials provided with the distribution.
     15  1.4.2.2  cherry  *
     16  1.4.2.2  cherry  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     17  1.4.2.2  cherry  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     18  1.4.2.2  cherry  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     19  1.4.2.2  cherry  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     20  1.4.2.2  cherry  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     21  1.4.2.2  cherry  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     22  1.4.2.2  cherry  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     23  1.4.2.2  cherry  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     24  1.4.2.2  cherry  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     25  1.4.2.2  cherry  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     26  1.4.2.2  cherry  * POSSIBILITY OF SUCH DAMAGE.
     27  1.4.2.2  cherry  */
     28  1.4.2.2  cherry 
     29  1.4.2.2  cherry #include <sys/cdefs.h>
     30  1.4.2.2  cherry __COPYRIGHT("@(#) Copyright (c) 2011\
     31  1.4.2.2  cherry  The NetBSD Foundation, inc. All rights reserved.");
     32  1.4.2.2  cherry __RCSID("$NetBSD: h_raw.c,v 1.4.2.2 2011/06/23 14:20:39 cherry Exp $");
     33  1.4.2.2  cherry 
     34  1.4.2.2  cherry #include <stdlib.h>
     35  1.4.2.2  cherry 
     36  1.4.2.2  cherry void poke(int *, size_t);
     37  1.4.2.2  cherry 
     38  1.4.2.2  cherry void
     39  1.4.2.2  cherry poke(int *b, size_t index)
     40  1.4.2.2  cherry {
     41  1.4.2.2  cherry 	b[index] = 42;
     42  1.4.2.2  cherry }
     43  1.4.2.2  cherry 
     44  1.4.2.2  cherry int
     45  1.4.2.2  cherry main(int argc, char *argv[])
     46  1.4.2.2  cherry {
     47  1.4.2.2  cherry 	int b[10];
     48  1.4.2.2  cherry 
     49  1.4.2.2  cherry 	poke(b, atoi(argv[1]));
     50  1.4.2.2  cherry 	return 0;
     51  1.4.2.2  cherry }
     52