*/
#include "as.h"
+
#include <obstack.h>
#include "input-file.h"
#include "targ-cpu.h"
+char *malloc();
+
#ifndef NO_LISTING
#ifndef LISTING_HEADER
#define LISTING_HEADER "GAS LISTING"
char *message)
{
unsigned int l = strlen(name) + strlen(message)+1;
- char *n = malloc(l);
+ char *n = (char*)malloc(l);
strcpy(n,name);
strcat(n,message);
if(listing_tail != (list_info_type *)NULL)
p->linenum = 0;
p->end_pending = 0;
- p->file = fopen(p->filename,"r");
+ p->file = fopen(p->filename,"rb");
+if (p->file) fgetc(p->file);
+
+
+
return p;
}
if (file->end_pending == 10) {
*p ++ = '\n';
- rewind(file->file);
+ fseek(file->file, 0,0 );
file->linenum = 0;
file->end_pending = 0;
}
c = fgetc(file->file);
+
+
size -= 1; /* leave room for null */
while (c != EOF && c != '\n')
count++;
c= fgetc(file->file);
+
}
if (c == EOF)
{
file->end_pending ++;
- *p++ = 'E';
- *p++ = 'O';
- *p++ = 'F';
+ *p++ = '.';
+ *p++ = '.';
+ *p++ = '.';
}
file->linenum++;
*p++ = 0;
{
if (ptr->sy_frag->line)
{
+ if (S_GET_NAME(ptr))
+ {
+
if (strlen(S_GET_NAME(ptr)))
{
printf("%20s:%-5d %2d:%08x %s \n",
S_GET_SEGMENT(ptr),
S_GET_VALUE(ptr),
S_GET_NAME(ptr));
+ }
+
+ else
+ {
+ printf("%20s:%-5d %2d:%08x\n",
+ ptr->sy_frag->line->file->filename,
+ ptr->sy_frag->line->line,
+ S_GET_SEGMENT(ptr),
+ S_GET_VALUE(ptr));
+
+ }
+
on_page++;
listing_page(0);
}
for (ptr = symbol_rootP; ptr != (symbolS*)NULL; ptr = symbol_next(ptr))
{
- if (ptr && strlen(S_GET_NAME(ptr)) != 0)
+ if (S_GET_NAME(ptr) && strlen(S_GET_NAME(ptr)) != 0)
{
if (ptr->sy_frag->line == 0)
{
if (paper_height < 0 || paper_height > 1000)
{
paper_height = 0;
- as_warn("strantge paper height, set to no form");
+ as_warn("strange paper height, set to no form");
}
if (*input_line_pointer == ',')
{