|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T g
Length: 1962 (0x7aa) Types: TextFile Names: »globs.c«
└─⟦a05ed705a⟧ Bits:30007078 DKUUG GNU 2/12/89 └─⟦df1e72981⟧ »./indent-1.1.tar.Z« └─⟦d08ad2b83⟧ └─⟦this⟧ »dist-indent/globs.c«
/* Copyright (C) 1986, 1989 Free Software Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, * advertising materials, and other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley, the University of Illinois, * Urbana, and Sun Microsystems, Inc. The name of either University * or Sun Microsystems may not be used to endorse or promote products * derived from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ #include "indent_globs.h" /* Like malloc but get error if no storage available. */ char * xmalloc (size) long size; { register char *val = (char *) malloc (size); if (!val) { fprintf (stderr,"indent: Virtual memory exhausted.\n"); exit (1); } return val; } /* Like realloc but get error if no storage available. */ char * xrealloc (ptr, size) char *ptr; long size; { register char *val = (char *) realloc (ptr, size); if (!val) { fprintf (stderr,"indent: Virtual memory exhausted.\n"); exit (1); } return val; } /* Some systems lack memcpy so this does the same thing. If your system-supplied memcpy is more efficient, you might want to put "#define mymemcpy memcpy" in indent_globs.h. Copy LEN bytes starting at SRCADDR to DESTADDR. Result undefined if the source overlaps with the destination. */ char * mymemcpy (destaddr, srcaddr, len) char *destaddr; char *srcaddr; int len; { for (; len; len--) *destaddr++ = *srcaddr++; return destaddr; }