Re: Programming question

2010-05-14 Thread Alex Samad
On Fri, 2010-05-14 at 20:32 -0700, Kelly Clowers wrote: > On Fri, May 14, 2010 at 18:34, Alexander Samad wrote: > > Hi > > > > I was wondering if it is possible to decode this javascript from the > > command line > > > > > > var serializer = new Serializer() > > serializer.deserialize('B64ENCe30=

Re: Programming question

2010-05-14 Thread Kelly Clowers
On Fri, May 14, 2010 at 18:34, Alexander Samad wrote: > Hi > > I was wondering if it is possible to decode this javascript from the > command line > > > var serializer = new Serializer() > serializer.deserialize('B64ENCe30=') > > can't find any reference on how serialize works and can't find any >

Re: Programming question

2010-05-14 Thread David Parker
- Original Message - From: Alexander Samad Date: Friday, May 14, 2010 9:35 pm Subject: Programming question To: Debian User List > Hi > > I was wondering if it is possible to decode this javascript from the > command line > > > var serializer = new Serializer() > serializer.deserializ

Re: Programming question: missing braces around initializer

1999-10-05 Thread Joop Stakenborg
On Tue, Oct 05, 1999 at 01:42:14PM +0200, J.H.M. Dassen Ray" wrote: > On Tue, Oct 05, 1999 at 14:23:38 +0200, Joop Stakenborg wrote: > > Morse MorseTable[]= > > { > > ' ',NIL,NIL,NIL,NIL,NIL,NIL,NIL, > > Change to > {' ', {NIL,NIL,NIL,NIL,NIL,NIL,NIL}}, > etc. The outer pair of cu

Re: Programming question: missing braces around initializer

1999-10-05 Thread J.H.M. Dassen \(Ray\)
On Tue, Oct 05, 1999 at 14:23:38 +0200, Joop Stakenborg wrote: > Morse MorseTable[]= > { > ' ',NIL,NIL,NIL,NIL,NIL,NIL,NIL, Change to {' ', {NIL,NIL,NIL,NIL,NIL,NIL,NIL}}, etc. The outer pair of curly braces is because the elements of the array are structs, which aren't atomic; th

Re: Programming question: missing braces around initializer

1999-10-05 Thread Joop Stakenborg
On Tue, Oct 05, 1999 at 12:22:57PM +0200, J.H.M. Dassen Ray" wrote: > On Tue, Oct 05, 1999 at 11:58:23 +0200, Joop Stakenborg wrote: > > morse.c:52: warning: missing braces around initializer > > > Anyone know how to fix? > > Just a guess, perhaps Morse is a 2 or more dimensional array type rathe

Re: Programming question: missing braces around initializer

1999-10-05 Thread J.H.M. Dassen \(Ray\)
On Tue, Oct 05, 1999 at 11:58:23 +0200, Joop Stakenborg wrote: > morse.c:52: warning: missing braces around initializer > Anyone know how to fix? Just a guess, perhaps Morse is a 2 or more dimensional array type rather than a one-dimensional one, and you need to add braces for the rows? Ray --

Re: Programming question: sizeof struct?

1999-07-27 Thread Jonathan Guthrie
On Fri, 9 Jul 1999, Joop Stakenborg wrote: > struct foo { > char text[3]; > int num; > }; > sizeof would return 6 and not 5. So it's obvious that the compiler is > placing a pad byte between text and num to align num. I want it to > stop! That's odd. On most architectures, I would e

Re: Programming question: sizeof struct?

1999-07-27 Thread E.L. Meijer \(Eric\)
Joop Stakenborg writes: > Hi there, > > The upstream maintainer of one of my packages is having problems > with his code. I thought it would be nice to use the debian mailing > lists, to see if we can an answer on this. I will forward any solution > to him. > > --

Re: Programming question: sizeof struct?

1999-07-12 Thread Goswin Brederlow
Carl Mummert <[EMAIL PROTECTED]> writes: > >#pragma pack(1) > >struct {}; > >#pragma pack() > > > >Which forces the layout to be as you specified. > > > >Using a command line option is a Bad Idea (tm) as it may corrupt glibc's > >structures > > To test a resonse to the original message, I made th

Re: Programming question: sizeof struct?

1999-07-12 Thread Goswin Brederlow
Joop Stakenborg <[EMAIL PROTECTED]> writes: > For instance, if the structure were: > > struct foo { > char text[3]; > int num; > }; > > sizeof would return 6 and not 5. So it's obvious that the compiler is > placing a pad byte between text and num to align num. I want it to > stop! A

Re: Programming question: sizeof struct?

1999-07-10 Thread Oleg Krivosheev
On Sun, 11 Jul 1999, Antti-Juhani Kaijanaho wrote: > On Sat, Jul 10, 1999 at 11:26:19PM +1000, Hamish Moffatt wrote: > > Or even 8, since an int is 32 bits. > > int can be anything from 16 bits up. we do not have such architectures, i believe > In fact, I believe we have > architectures where

Re: Programming question: sizeof struct?

1999-07-10 Thread Antti-Juhani Kaijanaho
On Sat, Jul 10, 1999 at 11:26:19PM +1000, Hamish Moffatt wrote: > Or even 8, since an int is 32 bits. int can be anything from 16 bits up. In fact, I believe we have architectures where int is 64 bits. Do *not* depend on the size of int! -- %%% Antti-Juhani Kaijanaho % [EMAIL PROTECTED] % http

Re: Programming question: sizeof struct?

1999-07-10 Thread Hamish Moffatt
On Fri, Jul 09, 1999 at 09:44:06AM -0600, Jason Gunthorpe wrote: > > > struct foo { > > > char text[3]; > > > int num; > > > }; > > > > > > sizeof would return 6 and not 5. > > > > 6? Are you sure you're using Linux/gcc? > > Yes, 6, it will insert a single extra character at the end o

Re: Programming question: sizeof struct?

1999-07-09 Thread Paul D. Smith
%% Jason Gunthorpe <[EMAIL PROTECTED]> writes: >> > For instance, if the structure were: >> > >> > struct foo { >> > char text[3]; >> > int num; >> > }; >> > >> > sizeof would return 6 and not 5. >> >> 6? Are you sure you're using Linux/gcc? jg> Yes, 6, it will

Re: Programming question: sizeof struct?

1999-07-09 Thread Carl Mummert
>#pragma pack(1) >struct {}; >#pragma pack() > >Which forces the layout to be as you specified. > >Using a command line option is a Bad Idea (tm) as it may corrupt glibc's >structures To test a resonse to the original message, I made the follwing c file ( I was not familiar with the attribute flag

Re: Programming question: sizeof struct?

1999-07-09 Thread Oleg Krivosheev
Hi, On Fri, 9 Jul 1999, Jason Gunthorpe wrote: > On Fri, 9 Jul 1999, Oleg Krivosheev wrote: > > > > to not be handled properly. Even though I specify -fpack_struct the > > > generated code does not appear to actually do this. Structure fields > > > are > > > offset and the return from sizeof(

Re: Programming question: sizeof struct?

1999-07-09 Thread Jason Gunthorpe
On Fri, 9 Jul 1999, Oleg Krivosheev wrote: > > to not be handled properly. Even though I specify -fpack_struct the > > generated code does not appear to actually do this. Structure fields > > are > > offset and the return from sizeof() returns a value that is not valid. > > what do you mean it

Re: Programming question: sizeof struct?

1999-07-09 Thread Oleg Krivosheev
Hi, > Hi there, > > The upstream maintainer of one of my packages is having problems > with his code. with his code? > I thought it would be nice to use the debian mailing > lists, to see if we can an answer on this. I will forward any solution > to him. > > --

Re: Programming question: sizeof struct?

1999-07-09 Thread Antti-Juhani Kaijanaho
On Fri, Jul 09, 1999 at 09:09:15AM +0200, Joop Stakenborg wrote: > The reason why I have not released LogConv 1.54 for Linux is that I am > having problems with packed structures that is causing some file formats > to not be handled properly. Reading and writing structs to files is at best unporta