Char alignment problem report

Char alignment problem report

Post by Martin Gal » Mon, 03 May 1999 04:00:00



I've noticed an alignment problem on alpha when accessing by -> or . a
char in a structure!  This problem concerns not only 64, 32 and 16 but
8!!!

Any comments?

 
 
 

Char alignment problem report

Post by Juergen Hein » Mon, 03 May 1999 04:00:00



>I've noticed an alignment problem on alpha when accessing by -> or . a
>char in a structure!  This problem concerns not only 64, 32 and 16 but
>8!!!

>Any comments?

Without knowing what the problem is supposed to be nor with a short
example to reproduce it ... no. I guess you had better a second look
at your code though.

Cheers,
Juergen

--
\ Real name     : Jrgen Heinzl                 \       no flames      /


 
 
 

1. char *strcasestr(char *haystack, char *needle) a simple case independent strstr()

Well, I needed it, and so i wrote it.
Sort of fun.

Any 'optimizers' can have a go now :-)

char *strcasestr(char *haystack, char *needle)
{
/* case independent strstr */
char *hptr;
char *nptr;
char *pptr;

/* start at the beginning of haystack */
pptr = haystack;

/* for each position in haystack */
while(1)
        {
        /* starting at this position in haystack */
        hptr = pptr;
        nptr = needle;

        /* test if strings match from here on */
        while(1)
                {
                /* test for end of needle */
                if(*nptr == 0)
                        {
                        /* found match */
                        return pptr;
                        }

                /* test for end of haystack */
                if(*hptr == 0) break;

                /* test for any differences */
                if( toupper(*hptr) != toupper(*nptr) ) break;                

                /* increment positions in strings */
                hptr++;
                nptr++;

                }/* end while all characters in needle */

        /* try next position in haystack */
        pptr++;

        /* test for end of haystack */
        if(*pptr == 0) break;

        }/* end while all positions in haystack */

return 0;

2. Firestarter on RH7.3

3. [2.5] const char* to char* conversion in console.h

4. Can I connect an IBM 5250 terminal to an RS/6000 running AIX?

5. KernelJanitor - Change applicable char *foo to char foo[]

6. How do i take the hot backup using Veritas Netbackup v3.4 on solaris8

7. how to change password length from 6 chars to 4 chars on RH6.1 ??

8. ANNOUNCE : mSQL 1.0.5 available

9. const char* to char* update in console.h

10. ?? Modem sends ~15 chars, wait 30s, 15 chars, wait 30s...??

11. SED / Line / (Need to get data from searched line from specific char to char)

12. Gnu C++ stream.h char* form(const char*, ...)

13. read from $var, char by char