2 * Copyright (c) 2000, Red Hat, Inc.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * A copy of the GNU General Public License can be found at
12 * Written by Ron Parker <parkerrd@hotmail.com>
24 fputs ("Insufficient memory.\n", stderr
);
32 int lasterr
= GetLastError ();
34 /* If !lasterr then assume a standard file error happened and was
38 FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER
39 | FORMAT_MESSAGE_FROM_SYSTEM
40 | FORMAT_MESSAGE_IGNORE_INSERTS
, NULL
, lasterr
,
41 MAKELANGID (LANG_NEUTRAL
, SUBLANG_DEFAULT
),
42 (LPTSTR
) & msgbuf
, 0, NULL
);
45 fprintf (stderr
, "%s\n", (char *) msgbuf
);
49 fprintf (stderr
, "Unexpected error #%d\n", lasterr
);