break.c 389 B

123456789101112131415161718
  1. /*
  2. * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
  3. * See the copyright notice in the ACK home directory, in the file "Copyright".
  4. */
  5. /* $Id$ */
  6. #include "system.h"
  7. #include <unistd.h>
  8. #include <missing_proto.h>
  9. char *sys_break(int incr)
  10. {
  11. char *brk = (char*)sbrk(incr);
  12. if ((brk == (char *) 0) || (brk == (char *)-1))
  13. return ILL_BREAK;
  14. return brk;
  15. }