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 serial

Programming question

2010-05-14 Thread Alexander Samad
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 cmdline tools to help Alex -- To UNSUBSCRIBE, email to debian-user-r

[Solved] C programming question

2010-04-17 Thread Stephen Powell
Thanks to all who contributed to this thread, especially to Boyd. -- .''`. Stephen Powell : :' : `. `'` `- -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debi

Re: C programming question

2010-04-16 Thread Stephen Powell
On Fri, 16 Apr 2010 14:13:36 -0400 (EDT), Boyd Stephen Smith Jr. wrote: > Stephen Powell wrote: >> I'm going to be filing a bug report against parted for (a) miscalculating >> the starting block of the implicit partition on an ldl (Linux Disk Layout) >> formatted disk on the s390 architecture when

Re: C programming question

2010-04-16 Thread Boyd Stephen Smith Jr.
In <1876691691.55741.1271378240260.javamail.r...@md01.wow.synacor.com>, Stephen Powell wrote: >I'm going to be filing a bug report against parted for (a) miscalculating > the starting block of the implicit partition on an ldl (Linux Disk Layout) > formatted disk on the s390 architecture when the b

Re: C programming question

2010-04-16 Thread Stephen Powell
On Thu, 15 Apr 2010 21:09:43 -0400 (EDT), Stephen Powell wrote: > On Thu, 15 Apr 2010 20:43:21 -0400 (EDT), Ron Johnson wrote: >> On 2010-04-15 19:37, Stephen Powell wrote: >>> >>> I'm going to be filing a bug report against parted for (a) miscalculating >>> the starting block of the implicit part

Re: C programming question

2010-04-15 Thread Stephen Powell
On Thu, 15 Apr 2010 20:43:21 -0400 (EDT), Ron Johnson wrote: > On 2010-04-15 19:37, Stephen Powell wrote: >> >> I'm going to be filing a bug report against parted for (a) miscalculating >> the starting block of the implicit partition on an ldl (Linux Disk Layout) >> formatted disk on the s390 arch

Re: C programming question

2010-04-15 Thread Ron Johnson
On 2010-04-15 19:37, Stephen Powell wrote: [snip] I'm going to be filing a bug report against parted for (a) miscalculating the starting block of the implicit partition on an ldl (Linux Disk Layout) formatted disk on the s390 architecture when the block size is other than 4096, and (b) no supp

Re: C programming question

2010-04-15 Thread Stephen Powell
On Thu, 15 Apr 2010 17:39:42 -0400 (EDT), Boyd Stephen Smith Jr. wrote: > Stephen Powell wrote: >> In short, I need to >> (a) declare "cms_label" as a based structure, > > (above; trimmmed) >> >> (b) >> declare a pointer variable called "cms_ptr" and associate it with the >> "cms_label" structure,

Re: C programming question

2010-04-15 Thread Boyd Stephen Smith Jr.
On Thursday 15 April 2010 13:56:00 Stephen Powell wrote: > On Wed, 14 Apr 2010 23:10:55 -0400 (EDT), Boyd Stephen Smith Jr. wrote: > > On Tuesday 13 April 2010 17:16:03 Stephen Powell wrote: > >> What I need to do is to have two structures overlay each other; so that > >> they occupy the same stor

Re: C programming question

2010-04-15 Thread Stephen Powell
On Wed, 14 Apr 2010 23:10:55 -0400 (EDT), Boyd Stephen Smith Jr. wrote: > On Tuesday 13 April 2010 17:16:03 Stephen Powell wrote: >> What I need to do is to have two structures overlay each other; so that >> they occupy the same storage. To be specific, here is a structure which >> describes the

Re: C programming question

2010-04-14 Thread Boyd Stephen Smith Jr.
On Tuesday 13 April 2010 17:16:03 Stephen Powell wrote: > What I need to do is to have two structures overlay each other; so that > they occupy the same storage. To be specific, here is a structure which > describes the volume label for an OS-formatted disk: > > struct __attribute__ ((packed))

Re: C programming question

2010-04-14 Thread Paul E Condon
On 20100414_123342, Ron Johnson wrote: > On 2010-04-14 09:31, Paul E Condon wrote: > [snip] > > > >non-obvious --- to the point that there was an open contest with > >prizes awarded for the most obfuscated example of C code. The prizes > >went to the code for which the judges were most surprised on

Re: C programming question [OT]

2010-04-14 Thread thib
Ron Johnson wrote: [snip] http://www1.us.ioccc.org/main.html I guess they got bored looking at normal production C code... Sometimes, I find the code there even more impressive: http://underhanded.xcott.com/ It's even more restricted, and not so pointless. Hiding in plain sight, beaut

Re: C programming question

2010-04-14 Thread John Hasler
Ron Johnson writes: > Unions have been in C for at least 20 years; probably since the Early > Days. Unions are in the first edition of K&R. -- John Hasler -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian

Re: C programming question

2010-04-14 Thread Ron Johnson
On 2010-04-14 09:31, Paul E Condon wrote: [snip] non-obvious --- to the point that there was an open contest with prizes awarded for the most obfuscated example of C code. The prizes went to the code for which the judges were most surprised on seeing it run after they read the code and tried to

Re: C programming question

2010-04-14 Thread Hugo Vanwoerkom
Stephen Powell wrote: I realize that this is not a C forum, per se, but this is a Debian-specific C question. I am trying to add support to the parted utility for CMS-formatted disks on the s390 architecture. The source code is written in C, of course. But I am not a C programmer. I can spell

Re: C programming question

2010-04-14 Thread Paul E Condon
On 20100413_193540, Robert Baron wrote: > What a great little learning project. > > My suggestion is to work out a simpler version of what you are trying to do: > > typedef struct { > unsigned short rec_type; > long data; > } type1; > > typedef struct { > unsigned short rec_type; >

Re: C programming question

2010-04-13 Thread Robert Baron
What a great little learning project. My suggestion is to work out a simpler version of what you are trying to do: typedef struct { unsigned short rec_type; long data; } type1; typedef struct { unsigned short rec_type; char data[4]; } type2; . some_type *chunk_of_mem; long

RE: C programming question

2010-04-13 Thread Mike Viau
> Tue, 13 Apr 2010 17:29:51 -0500 wrote: > > On 2010-04-13 17:16, Stephen Powell wrote: > > I realize that this is not a C forum, per se, but this is a Debian-specific > > C question. I am trying to add support to the parted utility for > > CMS-formatted > [snip] > > > > I know how to do this

Re: C programming question

2010-04-13 Thread Ron Johnson
On 2010-04-13 17:16, Stephen Powell wrote: I realize that this is not a C forum, per se, but this is a Debian-specific C question. I am trying to add support to the parted utility for CMS-formatted [snip] I know how to do this in PL/I, but despite having spent the last two hours paging throug

C programming question

2010-04-13 Thread Stephen Powell
I realize that this is not a C forum, per se, but this is a Debian-specific C question. I am trying to add support to the parted utility for CMS-formatted disks on the s390 architecture. The source code is written in C, of course. But I am not a C programmer. I can spell C, but that's about it.

Re: Newbie C programming question - OT

2002-05-01 Thread Shaul Karl
> "Sean 'Shaleh' Perry" <[EMAIL PROTECTED]> writes: > > > > > > > Two questions: > > > 1. Is there a C programming tutor list that's recommended? > > > > I have not seen any good C(++) mailing lists, there were news groups but i > > do > > not know if they still exist (comp.lang.*). > > The co

Re: Newbie C programming question - OT

2002-05-01 Thread craigw
On Tue Apr 30, 2002 at 10:02:27AM -0500, Grant Edwards wrote: > On Tue, Apr 30, 2002 at 08:54:28AM +0100, Patrick Kirk wrote: > > > On Tue, Apr 30, 2002 at 12:01:11AM -0500, Grant Edwards wrote: > > >On Mon, Apr 29, 2002 at 09:10:42PM +0100, Patrick Kirk wrote: > > [..] > > >You're learning C and

Re: Newbie C programming question - OT

2002-04-30 Thread Grant Edwards
On Tue, Apr 30, 2002 at 04:13:13PM -0700, Brian Nelson wrote: > "Sean 'Shaleh' Perry" <[EMAIL PROTECTED]> writes: > > > > > > > Two questions: > > > 1. Is there a C programming tutor list that's recommended? > > > > I have not seen any good C(++) mailing lists, there were news groups but i > >

Re: Newbie C programming question - OT

2002-04-30 Thread Brian Nelson
"Sean 'Shaleh' Perry" <[EMAIL PROTECTED]> writes: > > > > Two questions: > > 1. Is there a C programming tutor list that's recommended? > > I have not seen any good C(++) mailing lists, there were news groups but i do > not know if they still exist (comp.lang.*). The comp.lang.* groups are stil

Re: Newbie C programming question - OT

2002-04-30 Thread Grant Edwards
On Mon, Apr 29, 2002 at 09:53:44PM -0700, Sean 'Shaleh' Perry wrote: > ncurses programs are almost always icky. Consider: mutt, any > of the console web browsers, dselect. > > There is an O'Reilly book on curses. You could start there. I've got the O'Reilly book. I don't recommend it. It's l

Re: Newbie C programming question - OT

2002-04-30 Thread Grant Edwards
On Tue, Apr 30, 2002 at 08:54:28AM +0100, Patrick Kirk wrote: > On Tue, Apr 30, 2002 at 12:01:11AM -0500, Grant Edwards wrote: > >On Mon, Apr 29, 2002 at 09:10:42PM +0100, Patrick Kirk wrote: > [..] > >You're learning C and ypu started with a curses/forms app? > >Curses (and esp the SysV form stuf

Re: Newbie C programming question - OT

2002-04-30 Thread Patrick Kirk
On Tue, Apr 30, 2002 at 12:01:11AM -0500, Grant Edwards wrote: >On Mon, Apr 29, 2002 at 09:10:42PM +0100, Patrick Kirk wrote: [..] >You're learning C and ypu started with a curses/forms app? >Curses (and esp the SysV form stuff) is getting to be pretty >arcane stuff these days. There are a few peop

Re: Newbie C programming question - OT

2002-04-30 Thread Grant Edwards
On Mon, Apr 29, 2002 at 09:10:42PM +0100, Patrick Kirk wrote: > I'm trying to teach myself C and am writing as little PIM to go with > mutt in console mode. > > 1. Is there a C programming tutor list that's recommended? > 2. Does anyone know of a ncurses C program that really uses forms > and is

Re: Newbie C programming question - OT

2002-04-30 Thread Sean 'Shaleh' Perry
> > Two questions: > 1. Is there a C programming tutor list that's recommended? I have not seen any good C(++) mailing lists, there were news groups but i do not know if they still exist (comp.lang.*). > 2. Does anyone know of a ncurses C program that really uses forms > and is well commented?

Re: Newbie C programming question - OT

2002-04-30 Thread Eric G. Miller
On Mon, Apr 29, 2002 at 09:10:42PM +0100, Patrick Kirk wrote: > Hi all, > > I'm trying to teach myself C and am writing as little PIM to go with > mutt in console mode. > > To date, my only programming type experience has been developing > mult-user databases for contact management in VBA. > > I

Newbie C programming question - OT

2002-04-29 Thread Patrick Kirk
Hi all, I'm trying to teach myself C and am writing as little PIM to go with mutt in console mode. To date, my only programming type experience has been developing mult-user databases for contact management in VBA. In VBA, forms have fields and fields have events like OnEnter() and OnExit(). I

Re: Serial programming question

2000-05-26 Thread Felix Natter
"Alex V. Toropov" <[EMAIL PROTECTED]> writes: > Hi all ! > I'm trying to make my first progam, that will read series of bytes from > serial port. > But I have problems opening port. I makeing something like this: > > fd=open("/dev/ttyS0", O_RDWR | O_NOCTTY) > if(fd<0) > {printf("Error opening

Serial programming question

2000-05-09 Thread Alex V. Toropov
Hi all ! I'm trying to make my first progam, that will read series of bytes from serial port. But I have problems opening port. I makeing something like this: fd=open("/dev/ttyS0", O_RDWR | O_NOCTTY) if(fd<0) {printf("Error opening port\n") ; exit(0)} printf("Port opend ( %s )\n", ttyname(fd))

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 --

Programming question: missing braces around initializer

1999-10-05 Thread Joop Stakenborg
I have a bit of source code here with the following bit: Morse MorseTable[]= { ' ',NIL,NIL,NIL,NIL,NIL,NIL,NIL, 'A',DIH,DAH,NIL,NIL,NIL,NIL,NIL, 'B',DAH,DIH,DIH,DIH,NIL,NIL,NIL, [etc...] '/',DAH,DIH,DIH,DAH,DIH,NIL,NIL, 0, NIL,NIL,NIL,NIL,NIL

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

Programming question: sizeof struct?

1999-07-09 Thread Joop Stakenborg
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. -- The

Re: bash programming question

1999-01-22 Thread Jiri Baum
> You could put the find in a separate script: > > find . -print0 | xargs -r0 somestuff.sh If you go that way, you can just find . -exec somestuff.sh {} \; (You might need quotes around the {}.) Jiri

Re: bash programming question

1999-01-21 Thread Carey Evans
Michael Meskes <[EMAIL PROTECTED]> writes: [snip] > However, this does not work if there are blanks in the filename as $file > would be incomplete. I cannot simply use -exec for find either since I call > a function from the same script inside the loop. Finally I need to read some > input during

Re: bash programming question

1999-01-20 Thread Bob Wilkinson
Or just use finds' exec option find . -print -exec "{}" \; Bob :wq P.S. The "{}" expands out to the current file name - Original Message - From: Shaleh <[EMAIL PROTECTED]> To: Michael Meskes <[EMAIL PROTECTED]> Cc: Sent: Tuesday, January 19, 1999

RE: bash programming question

1999-01-19 Thread Shaleh
On 19-Jan-99 Michael Meskes wrote: > Hi, > > I have a small sh script that does essantially the following: > > variable=`find . -print` > > for file in $variable > do > > done > try: for file in `find . -print` do ${file} done The braces should help keep the variable consiste

bash programming question

1999-01-19 Thread Michael Meskes
Hi, I have a small sh script that does essantially the following: variable=`find . -print` for file in $variable do done However, this does not work if there are blanks in the filename as $file would be incomplete. I cannot simply use -exec for find either since I call a function from

Re: c programming question w/ ncurses

1998-08-12 Thread Jens B. Jorgensen
Fix below: Keith wrote: > I am trying to fumble through learning how to do some C programming. > In the book I am using, Beginning Linux Programming they are now trying > to use ncurses. I am getting the following errors when I try to compile > my source. I am compiling with this command: > > $ c

c programming question w/ ncurses

1998-08-12 Thread Keith
I am trying to fumble through learning how to do some C programming. In the book I am using, Beginning Linux Programming they are now trying to use ncurses. I am getting the following errors when I try to compile my source. I am compiling with this command: $ cc -o screenmenu screenmenu.c -lncurs

Re: shell programming question

1998-07-27 Thread Oliver Elphick
Keith wrote: >I was wondering if someone could help me with this shell programming >language question. I am trying to remove some entries from a database >file. >Here is what the database file looks like: > >Joe,Walsh,134 Mockingbird Way,New Orleans,LA,33456,(444)768-1287 >Becky,Walsh

shell programming question

1998-07-26 Thread Keith
I was wondering if someone could help me with this shell programming language question. I am trying to remove some entries from a database file. Here is what the database file looks like: Joe,Walsh,134 Mockingbird Way,New Orleans,LA,33456,(444)768-1287 Becky,Walsh,432 Rodeo Drive Apt C,Hollywood,C