[OpenAFS-devel] [GSoC2010] - Implementing Microsoft's Safe String (StrSafe.h) Library for UNIX/Linux

Tharidu Fernando tharidufernando@gmail.com
Thu, 1 Apr 2010 08:15:36 +0530


--001636e0b9647bfa3b048323dbc2
Content-Type: text/plain; charset=ISO-8859-1

Hello,

When talking about i8n Unicode is preferable. However Microsoft have MBCS
(Multibyte Character Set) also. Do I have to implement support for this?

And also talking about 32bit and 64bit implementations what approach must be
taken?
Thank you.

Regards,
Tharidu Fernando

On Sun, Mar 28, 2010 at 11:36 PM, Jeffrey Altman <
jaltman@secure-endpoints.com> wrote:

> HRESULT is defined in the MSDN documentation along with the value result
> codes.  You should define this type for non-Windows systems.
>
> The __in, __out, and __inout tagging of parameters can be initially
> mapped using cpp macros to the empty string and later on mapped to
> an equivalent mechanism based on the compiler being used.
>
> Jeffrey Altman
>
> On 3/28/2010 1:34 PM, Tharidu Fernando wrote:
> > Hello again,
> >
> > Since you said that the MSDN documentation will be the specification,
> > however I find in their prototypes the use of HRESULT, __in , __out,
> __inout
> >  which is a implemented by Microsoft specifically.
> >
> > So in the UNIX/Linux implementation how this be handled?
> >
> > Thanks,
> >
> > Regards,
> > Tharidu Fernando
> >
> > On Sat, Mar 27, 2010 at 8:48 AM, Jeffrey Altman
> > <jaltman@secure-endpoints.com <mailto:jaltman@secure-endpoints.com>>
> wrote:
> >
> >     On 3/25/2010 1:22 PM, Tharidu Fernando wrote:
> >     > Hi Everybody!
> >
> >     Welcome to OpenAFS.
> >
> >     > I'm Tharidu Fernando, a second year undergraduate student of
> >     University
> >     > of Colombo School of Computing (Sri Lanka) following the Computer
> >     > Science degree.
> >
> >     Another member of the OpenAFS community, Asanka Herath, is also from
> >     Columbo although he currently resides in the U.S.
> >
> >     > I'm really interested in the project of implementing Microsoft's
> Safe
> >     > String library for UNIX/Linux which serves as a function in
> OpenAFS.
> >
> >     Excellent!
> >
> >     > I love that project idea because as a student im doing lots of
> >     projects
> >     > in C language(data structures and algorithms , string
> >     manipulation, ..)
> >     > and often face problems with the current C String manipulation
> >     library.
> >     > As to OpenAFS - this will enable safer code and also improve code
> >     > quality. As i understand this will benefit the Open Source
> Community a
> >     > lot also.
> >     >
> >     > I'm currently studying the Microsoft implementation. But I would
> >     like to
> >     > who will be mentoring this project and where to get started! And
> also
> >     > code conventions.
> >
> >     I will be the primary mentor for this project but as with all of the
> >     OpenAFS GSoC projects, there will be many members of the community
> >     available to assist you.
> >
> >     The best place to get started is to read the MSDN references were
> >     listed as part of the project description.  Even though Microsoft
> >     provides the source code to their implementation as part of the
> >     Visual Studio C Runtime Library source code, you may not look at
> >     their implementation for this project.   It is very important that
> >     this implementation of the library be implemented only by looking
> >     at the MSDN documentation.
> >
> >     I believe the MSDN documentation is complete enough to use as a
> >     specification.  I would start with the single byte character
> >     version of the functions and then once those are complete look
> >     to implement the Unicode versions.
> >
> >     There is a coding style guide for OpenAFS at
> >
> >     http://www.dementia.org/twiki/bin/view/AFSLore/CodingStyle
> >
> >     Please ask any questions you might have.
> >
> >     Jeffrey Altman
> >     OpenAFS Gatekeeper
> >
> >
>
>
>

--001636e0b9647bfa3b048323dbc2
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hello,<div><br></div><div>When talking about i8n Unicode is preferable. How=
ever Microsoft have MBCS (Multibyte Character Set) also. Do I have to imple=
ment support for this?</div><div><br>And also talking about 32bit and 64bit=
 implementations what approach must be taken?</div>
<div>Thank you.</div><div><br></div><div>Regards,</div><div>Tharidu Fernand=
o</div><div><br><div class=3D"gmail_quote">On Sun, Mar 28, 2010 at 11:36 PM=
, Jeffrey Altman <span dir=3D"ltr">&lt;<a href=3D"mailto:jaltman@secure-end=
points.com">jaltman@secure-endpoints.com</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex;">HRESULT is defined in the MSDN documentatio=
n along with the value result<br>
codes. =A0You should define this type for non-Windows systems.<br>
<br>
The __in, __out, and __inout tagging of parameters can be initially<br>
mapped using cpp macros to the empty string and later on mapped to<br>
an equivalent mechanism based on the compiler being used.<br>
<font color=3D"#888888"><br>
Jeffrey Altman<br>
</font><div class=3D"im"><br>
On 3/28/2010 1:34 PM, Tharidu Fernando wrote:<br>
&gt; Hello again,<br>
&gt;<br>
&gt; Since you said that the MSDN documentation will be the specification,<=
br>
&gt; however I find in their prototypes the use of HRESULT, __in , __out, _=
_inout<br>
&gt; =A0which is a implemented by Microsoft specifically.<br>
&gt;<br>
&gt; So in the UNIX/Linux implementation how this be handled?<br>
&gt;<br>
&gt; Thanks,<br>
&gt;<br>
&gt; Regards,<br>
&gt; Tharidu Fernando<br>
&gt;<br>
&gt; On Sat, Mar 27, 2010 at 8:48 AM, Jeffrey Altman<br>
</div><div><div></div><div class=3D"h5">&gt; &lt;<a href=3D"mailto:jaltman@=
secure-endpoints.com">jaltman@secure-endpoints.com</a> &lt;mailto:<a href=
=3D"mailto:jaltman@secure-endpoints.com">jaltman@secure-endpoints.com</a>&g=
t;&gt; wrote:<br>

&gt;<br>
&gt; =A0 =A0 On 3/25/2010 1:22 PM, Tharidu Fernando wrote:<br>
&gt; =A0 =A0 &gt; Hi Everybody!<br>
&gt;<br>
&gt; =A0 =A0 Welcome to OpenAFS.<br>
&gt;<br>
&gt; =A0 =A0 &gt; I&#39;m Tharidu Fernando, a second year undergraduate stu=
dent of<br>
&gt; =A0 =A0 University<br>
&gt; =A0 =A0 &gt; of Colombo School of Computing (Sri Lanka) following the =
Computer<br>
&gt; =A0 =A0 &gt; Science degree.<br>
&gt;<br>
&gt; =A0 =A0 Another member of the OpenAFS community, Asanka Herath, is als=
o from<br>
&gt; =A0 =A0 Columbo although he currently resides in the U.S.<br>
&gt;<br>
&gt; =A0 =A0 &gt; I&#39;m really interested in the project of implementing =
Microsoft&#39;s Safe<br>
&gt; =A0 =A0 &gt; String library for UNIX/Linux which serves as a function =
in OpenAFS.<br>
&gt;<br>
&gt; =A0 =A0 Excellent!<br>
&gt;<br>
&gt; =A0 =A0 &gt; I love that project idea because as a student im doing lo=
ts of<br>
&gt; =A0 =A0 projects<br>
&gt; =A0 =A0 &gt; in C language(data structures and algorithms , string<br>
&gt; =A0 =A0 manipulation, ..)<br>
&gt; =A0 =A0 &gt; and often face problems with the current C String manipul=
ation<br>
&gt; =A0 =A0 library.<br>
&gt; =A0 =A0 &gt; As to OpenAFS - this will enable safer code and also impr=
ove code<br>
&gt; =A0 =A0 &gt; quality. As i understand this will benefit the Open Sourc=
e Community a<br>
&gt; =A0 =A0 &gt; lot also.<br>
&gt; =A0 =A0 &gt;<br>
&gt; =A0 =A0 &gt; I&#39;m currently studying the Microsoft implementation. =
But I would<br>
&gt; =A0 =A0 like to<br>
&gt; =A0 =A0 &gt; who will be mentoring this project and where to get start=
ed! And also<br>
&gt; =A0 =A0 &gt; code conventions.<br>
&gt;<br>
&gt; =A0 =A0 I will be the primary mentor for this project but as with all =
of the<br>
&gt; =A0 =A0 OpenAFS GSoC projects, there will be many members of the commu=
nity<br>
&gt; =A0 =A0 available to assist you.<br>
&gt;<br>
&gt; =A0 =A0 The best place to get started is to read the MSDN references w=
ere<br>
&gt; =A0 =A0 listed as part of the project description. =A0Even though Micr=
osoft<br>
&gt; =A0 =A0 provides the source code to their implementation as part of th=
e<br>
&gt; =A0 =A0 Visual Studio C Runtime Library source code, you may not look =
at<br>
&gt; =A0 =A0 their implementation for this project. =A0 It is very importan=
t that<br>
&gt; =A0 =A0 this implementation of the library be implemented only by look=
ing<br>
&gt; =A0 =A0 at the MSDN documentation.<br>
&gt;<br>
&gt; =A0 =A0 I believe the MSDN documentation is complete enough to use as =
a<br>
&gt; =A0 =A0 specification. =A0I would start with the single byte character=
<br>
&gt; =A0 =A0 version of the functions and then once those are complete look=
<br>
&gt; =A0 =A0 to implement the Unicode versions.<br>
&gt;<br>
&gt; =A0 =A0 There is a coding style guide for OpenAFS at<br>
&gt;<br>
&gt; =A0 =A0 <a href=3D"http://www.dementia.org/twiki/bin/view/AFSLore/Codi=
ngStyle" target=3D"_blank">http://www.dementia.org/twiki/bin/view/AFSLore/C=
odingStyle</a><br>
&gt;<br>
&gt; =A0 =A0 Please ask any questions you might have.<br>
&gt;<br>
&gt; =A0 =A0 Jeffrey Altman<br>
&gt; =A0 =A0 OpenAFS Gatekeeper<br>
&gt;<br>
&gt;<br>
<br>
<br>
</div></div></blockquote></div><br></div>

--001636e0b9647bfa3b048323dbc2--