static void ObjWriteError (void)
/* Called on a write error. Will try to close and remove the file, then
- * print a fatal error.
- */
+** print a fatal error.
+*/
{
/* Remember the error */
int Error = errno;
remove (OutFile);
/* Now abort with a fatal error */
- Fatal ("Cannot write to output file `%s': %s", OutFile, strerror (Error));
+ Fatal ("Cannot write to output file '%s': %s", OutFile, strerror (Error));
}
/* Do we have a name for the output file? */
if (OutFile == 0) {
/* We don't have an output name explicitly given, construct one from
- * the name of the input file.
- */
+ ** the name of the input file.
+ */
OutFile = MakeFilename (InFile, OBJ_EXT);
}
/* Create the output file */
F = fopen (OutFile, "w+b");
if (F == 0) {
- Fatal ("Cannot open output file `%s': %s", OutFile, strerror (errno));
+ Fatal ("Cannot open output file '%s': %s", OutFile, strerror (errno));
}
/* Write a dummy header */
/* Write a variable sized value to the file in special encoding */
{
/* We will write the value to the file in 7 bit chunks. If the 8th bit
- * is clear, we're done, if it is set, another chunk follows. This will
- * allow us to encode smaller values with less bytes, at the expense of
- * needing 5 bytes if a 32 bit value is written to file.
- */
+ ** is clear, we're done, if it is set, another chunk follows. This will
+ ** allow us to encode smaller values with less bytes, at the expense of
+ ** needing 5 bytes if a 32 bit value is written to file.
+ */
do {
unsigned char C = (V & 0x7F);
V >>= 7;
unsigned Len = strlen (S);
/* Write the string with the length preceeded (this is easier for
- * the reading routine than the C format since the length is known in
- * advance).
- */
+ ** the reading routine than the C format since the length is known in
+ ** advance).
+ */
ObjWriteVar (Len);
ObjWriteData (S, Len);
}
/* Write a string to the object file */
{
/* Write the string with the length preceeded (this is easier for
- * the reading routine than the C format since the length is known in
- * advance).
- */
+ ** the reading routine than the C format since the length is known in
+ ** advance).
+ */
ObjWriteVar (SB_GetLen (S));
ObjWriteData (SB_GetConstBuf (S), SB_GetLen (S));
}