Default end of line on mac osX

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Default end of line on mac osX

Stéphane Ducasse
Hi guys

I'm working on merging the changes 1298 about the guess of default end of line.
And I would like to know on mac os x (compared to Os9) what is the default
character of end of line. I thought it was CR

since the previous code was

((OSPlatform osVersion) beginsWith: 'darwin')
                                ifTrue: [^ self defaultToCR]
                                ifFalse: [^ self defaultToLF]]


but carlo wrote

        Smalltalk isMacOS9 ifTrue: [^ self defaultToCR] ifFalse: [^ self defaultToLF]].

and I have some doubts because 'darwin' should be mac os x

Stef
_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Default end of line on mac osX

Randal L. Schwartz
>>>>> "Stéphane" == Stéphane Ducasse <[hidden email]> writes:

Stéphane> and I have some doubts because 'darwin' should be mac os x

Yes, OSX (darwin) is Unix, with a LF line ending.

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[hidden email]> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Default end of line on mac osX

johnmci
In reply to this post by Stéphane Ducasse
Well actually
Smalltalk isMacOS9
can just  answer false since a Pharo based image will never run on macintosh OS 9 (aka pre os-x)

However which system attribute are you using?
http://isqueak.org/getAttributeIntoLength
what you think might be safe might surprise/bite you....


On 2010-08-03, at 1:38 PM, Stéphane Ducasse wrote:

> Hi guys
>
> I'm working on merging the changes 1298 about the guess of default end of line.
> And I would like to know on mac os x (compared to Os9) what is the default
> character of end of line. I thought it was CR
>
> since the previous code was
>
> ((OSPlatform osVersion) beginsWith: 'darwin')
> ifTrue: [^ self defaultToCR]
> ifFalse: [^ self defaultToLF]]
>
>
> but carlo wrote
>
> Smalltalk isMacOS9 ifTrue: [^ self defaultToCR] ifFalse: [^ self defaultToLF]].
>
> and I have some doubts because 'darwin' should be mac os x
>
> Stef
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
--
===========================================================================
John M. McIntosh <[hidden email]>   Twitter:  squeaker68882
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================





_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Default end of line on mac osX

Stéphane Ducasse
In reply to this post by Randal L. Schwartz
Thanks I did the inverse then.

Stef

On Aug 3, 2010, at 11:02 PM, Randal L. Schwartz wrote:

>>>>>> "Stéphane" == Stéphane Ducasse <[hidden email]> writes:
>
> Stéphane> and I have some doubts because 'darwin' should be mac os x
>
> Yes, OSX (darwin) is Unix, with a LF line ending.
>
> --
> Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
> <[hidden email]> <URL:http://www.stonehenge.com/merlyn/>
> Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
> See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Default end of line on mac osX

Stéphane Ducasse
In reply to this post by johnmci

On Aug 4, 2010, at 12:26 AM, John M McIntosh wrote:

> Well actually
> Smalltalk isMacOS9
> can just  answer false since a Pharo based image will never run on macintosh OS 9 (aka pre os-x)

thanks john.


> However which system attribute are you using?

Smalltalk getSystemAttribute: 1001
        -> Mac OS

osVersion
        "Return the version number string of the platform we're running on"
        "OSPlatform osVersion"

        ^(Smalltalk getSystemAttribute: 1002) asString


> http://isqueak.org/getAttributeIntoLength
> what you think might be safe might surprise/bite you....

:)

vmVersion
        "Return the version number string of the Virtual machine built"
        "OSPlatform vmVersion"

        ^Smalltalk getSystemAttribute: 1004

'Squeak3.8.1 of ''28 Aug 2006'' [latest update: #6747] Squeak VM 4.2.4b1'

You are still using a so old image to build the VMs?

Stef

>
>
> On 2010-08-03, at 1:38 PM, Stéphane Ducasse wrote:
>
>> Hi guys
>>
>> I'm working on merging the changes 1298 about the guess of default end of line.
>> And I would like to know on mac os x (compared to Os9) what is the default
>> character of end of line. I thought it was CR
>>
>> since the previous code was
>>
>> ((OSPlatform osVersion) beginsWith: 'darwin')
>> ifTrue: [^ self defaultToCR]
>> ifFalse: [^ self defaultToLF]]
>>
>>
>> but carlo wrote
>>
>> Smalltalk isMacOS9 ifTrue: [^ self defaultToCR] ifFalse: [^ self defaultToLF]].
>>
>> and I have some doubts because 'darwin' should be mac os x
>>
>> Stef
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
> --
> ===========================================================================
> John M. McIntosh <[hidden email]>   Twitter:  squeaker68882
> Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
> ===========================================================================
>
>
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project