Re: strstr on IRIX 6.4

New Message Reply Date view Thread view Subject view Author view

Max Waterman (max++at++reading.sgi.com)
Wed, 28 May 1997 10:52:43 +0100


Just tried :-

        $ cat test.c
        #include <string.h>
        #include <stdio.h>

        int main( void )
        {
                const char string[] = "max was here";

                printf( "%s\n", strstr( string, "here" ) );

                return 0;
        }

        $ cc test.c
        $ ./a.out
        here

on our :-

        $ hinv
        FPU: MIPS R10010 Floating Point Chip Revision: 0.0
        CPU: MIPS R10000 Processor Chip Revision: 2.6
        12 195 MHZ IP27 Processors
        Main memory size: 1536 Mbytes
        Instruction cache size: 32 Kbytes
        Data cache size: 32 Kbytes
        Secondary unified instruction/data cache size: 4 Mbytes
etc etc...

running :-

        $ uname -R
        6.4 S2MP+OCTANE

and :-

        $ versions -b c_dev
        I = Installed, R = Removed

           Name Date Description
        I c_dev 03/20/97 C, 7.1

which, I'm guessing should be the same (ish) as your machine.

Ie it seems to work OK here.

(Are you sure you're including string.h? Args and return types usually
default to int's, which might be different on 64-bit os's - not sure)

Max.

Mark Lewis wrote:
>
> Hi all,
>
> I recently discovered when building my Performer app on an Onyx2 IR
> running 6.4, that the library function 'strstr' did not work.
>
> man strstr says:
>
> strstr locates the first occurrence in string s1 of the sequence of
> characters (excluding the terminating null character) in string s2.
> strstr returns a pointer to the located string, or a null pointer if the
> string is not found.
>
> .... And this, of course, is usually the case. However on the Onyx2
> machine the function seems to return NULL every time.
>
> Has anyone else experienced this phenonemon ? - If so, are there any
> other functions which don't work as before ?
>
> Thanks.
>
> --
> Mark C Lewis
> Principal Development Engineer
> Equipe Electronics Ltd.
> 13 Liverpool Gardens
> Worthing, W. Sussex
> BN11 1RY
> ENGLAND
>
> Phone +44 (0) 1903 216622
> FAX +44 (0) 1903 216633
>
> markl++at++equipe.ltd.uk
> http://www.equipe.ltd.uk
> =======================================================================
> List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com

-- 
Max Waterman         
John 3:16 Limited,   
19, Marlborough Road,
Yeovil,
Somerset.
BA21 5JN

Work : mailto:max++at++reading.sgi.com +44 1734 257578 Home : mailto:max++at++john316.u-net.com +44 1935 432643 ======================================================================= List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/ Submissions: info-performer++at++sgi.com Admin. requests: info-performer-request++at++sgi.com


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:55:19 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.