source:
trunk/minix/commands/ash/bltin/stalloc.c@
15
Last change on this file since 15 was 9, checked in by , 14 years ago | |
---|---|
File size: 413 bytes |
Rev | Line | |
---|---|---|
[9] | 1 | /* |
2 | * Copyright (C) 1989 by Kenneth Almquist. All rights reserved. | |
3 | * This file is part of ash, which is distributed under the terms specified | |
4 | * by the Ash General Public License. See the file named LICENSE. | |
5 | */ | |
6 | ||
7 | #include "../shell.h" | |
8 | ||
9 | ||
10 | void error(); | |
11 | pointer malloc(); | |
12 | ||
13 | ||
14 | pointer | |
15 | stalloc(nbytes) { | |
16 | register pointer p; | |
17 | ||
18 | if ((p = malloc(nbytes)) == NULL) | |
19 | error("Out of space"); | |
20 | return p; | |
21 | } |
Note:
See TracBrowser
for help on using the repository browser.