[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"><<a href=3D"mailto:jaltman@secure-end=
points.com">jaltman@secure-endpoints.com</a>></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>
> Hello again,<br>
><br>
> Since you said that the MSDN documentation will be the specification,<=
br>
> however I find in their prototypes the use of HRESULT, __in , __out, _=
_inout<br>
> =A0which is a implemented by Microsoft specifically.<br>
><br>
> So in the UNIX/Linux implementation how this be handled?<br>
><br>
> Thanks,<br>
><br>
> Regards,<br>
> Tharidu Fernando<br>
><br>
> On Sat, Mar 27, 2010 at 8:48 AM, Jeffrey Altman<br>
</div><div><div></div><div class=3D"h5">> <<a href=3D"mailto:jaltman@=
secure-endpoints.com">jaltman@secure-endpoints.com</a> <mailto:<a href=
=3D"mailto:jaltman@secure-endpoints.com">jaltman@secure-endpoints.com</a>&g=
t;> wrote:<br>
><br>
> =A0 =A0 On 3/25/2010 1:22 PM, Tharidu Fernando wrote:<br>
> =A0 =A0 > Hi Everybody!<br>
><br>
> =A0 =A0 Welcome to OpenAFS.<br>
><br>
> =A0 =A0 > I'm Tharidu Fernando, a second year undergraduate stu=
dent of<br>
> =A0 =A0 University<br>
> =A0 =A0 > of Colombo School of Computing (Sri Lanka) following the =
Computer<br>
> =A0 =A0 > Science degree.<br>
><br>
> =A0 =A0 Another member of the OpenAFS community, Asanka Herath, is als=
o from<br>
> =A0 =A0 Columbo although he currently resides in the U.S.<br>
><br>
> =A0 =A0 > I'm really interested in the project of implementing =
Microsoft's Safe<br>
> =A0 =A0 > String library for UNIX/Linux which serves as a function =
in OpenAFS.<br>
><br>
> =A0 =A0 Excellent!<br>
><br>
> =A0 =A0 > I love that project idea because as a student im doing lo=
ts of<br>
> =A0 =A0 projects<br>
> =A0 =A0 > in C language(data structures and algorithms , string<br>
> =A0 =A0 manipulation, ..)<br>
> =A0 =A0 > and often face problems with the current C String manipul=
ation<br>
> =A0 =A0 library.<br>
> =A0 =A0 > As to OpenAFS - this will enable safer code and also impr=
ove code<br>
> =A0 =A0 > quality. As i understand this will benefit the Open Sourc=
e Community a<br>
> =A0 =A0 > lot also.<br>
> =A0 =A0 ><br>
> =A0 =A0 > I'm currently studying the Microsoft implementation. =
But I would<br>
> =A0 =A0 like to<br>
> =A0 =A0 > who will be mentoring this project and where to get start=
ed! And also<br>
> =A0 =A0 > code conventions.<br>
><br>
> =A0 =A0 I will be the primary mentor for this project but as with all =
of the<br>
> =A0 =A0 OpenAFS GSoC projects, there will be many members of the commu=
nity<br>
> =A0 =A0 available to assist you.<br>
><br>
> =A0 =A0 The best place to get started is to read the MSDN references w=
ere<br>
> =A0 =A0 listed as part of the project description. =A0Even though Micr=
osoft<br>
> =A0 =A0 provides the source code to their implementation as part of th=
e<br>
> =A0 =A0 Visual Studio C Runtime Library source code, you may not look =
at<br>
> =A0 =A0 their implementation for this project. =A0 It is very importan=
t that<br>
> =A0 =A0 this implementation of the library be implemented only by look=
ing<br>
> =A0 =A0 at the MSDN documentation.<br>
><br>
> =A0 =A0 I believe the MSDN documentation is complete enough to use as =
a<br>
> =A0 =A0 specification. =A0I would start with the single byte character=
<br>
> =A0 =A0 version of the functions and then once those are complete look=
<br>
> =A0 =A0 to implement the Unicode versions.<br>
><br>
> =A0 =A0 There is a coding style guide for OpenAFS at<br>
><br>
> =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>
><br>
> =A0 =A0 Please ask any questions you might have.<br>
><br>
> =A0 =A0 Jeffrey Altman<br>
> =A0 =A0 OpenAFS Gatekeeper<br>
><br>
><br>
<br>
<br>
</div></div></blockquote></div><br></div>
--001636e0b9647bfa3b048323dbc2--