|
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 s
Length: 587 (0x24b) Types: TextFile Names: »strsave.c«
└─⟦52210d11f⟧ Bits:30007239 EUUGD2: TeX 3 1992-12 └─⟦af5ba6c8e⟧ »unix3.0/DVIWARE.tar.Z« └─⟦ca79c7339⟧ └─⟦this⟧ »DVIware/laser-setters/mctex/lib/strsave.c«
/* * Copyright (c) 1987, 1989 University of Maryland * Department of Computer Science. All rights reserved. * Permission to copy for any purpose is hereby granted * so long as this copyright notice remains intact. */ /* * Save a string in managed memory. */ char *malloc(), *realloc(); extern int errno; #include "types.h" /* for bcopy */ #include "error.h" char * strsave(s) register char *s; { register int l = strlen(s) + 1; register char *p = malloc((unsigned) l); if (p == 0) error(1, errno, "no room for %d bytes of string", l); bcopy(s, p, l); return (p); }