#define LISTING_WORD_SIZE 4
#endif
#ifndef LISTING_LHS_WIDTH
-#define LISTING_LHS_WIDTH 1
+#define LISTING_LHS_WIDTH ((LISTING_WORD_SIZE) > 4 ? 1 : 4 / (LISTING_WORD_SIZE))
#endif
#ifndef LISTING_LHS_WIDTH_SECOND
-#define LISTING_LHS_WIDTH_SECOND 1
+#define LISTING_LHS_WIDTH_SECOND LISTING_LHS_WIDTH
#endif
#ifndef LISTING_RHS_WIDTH
#define LISTING_RHS_WIDTH 100
unsigned int lines;
unsigned int octet_in_word = 0;
char *src = data_buffer;
- int end = strlen(src);
int cur;
/* Print the stuff on the first line */
while (src[cur] && idx < nchars)
{
int offset;
-#if TARGET_BYTES_BIG_ENDIAN != 0
offset = cur;
fprintf (list_file, "%c%c", src[offset], src[offset+1]);
-#else
- offset = (cur & ~(LISTING_WORD_SIZE * 2 - 1))
- + (LISTING_WORD_SIZE - octet_in_word - 1) * 2;
- if (offset < end)
- fprintf (list_file, "%c%c", src[offset], src[offset+1]);
-#endif
cur += 2;
octet_in_word++;
while (src[cur] && idx < nchars)
{
int offset;
-#if TARGET_BYTES_BIG_ENDIAN != 0
offset = cur;
fprintf (list_file, "%c%c", src[offset], src[offset+1]);
-#else
- offset = (cur & ~(LISTING_WORD_SIZE * 2 - 1))
- + (LISTING_WORD_SIZE - octet_in_word - 1) * 2;
- if (offset < end)
- fprintf (list_file, "%c%c", src[offset], src[offset+1]);
-#endif
cur += 2;
idx += 2;
octet_in_word++;