Re: [DNG] busybox

2015-12-10 Thread Enrico Weigelt, metux IT consult
On 01.11.2015 14:52, Rainer Weikusat wrote: > It's also strangely schizophrenic as there's no point in zero-filling > the entire structure prior to initializing its members one by one > which implies zero-filling the larger part of the second one[*] > again. That's called "defensive programming"

Re: [DNG] Netman Communication

2015-12-10 Thread Hendrik Boom
On Thu, Dec 10, 2015 at 06:48:16PM -0700, Gregory Nowak wrote: > On Fri, Dec 11, 2015 at 12:47:05AM +0100, Patrick Erdmann wrote: > > would it be possible to use github comments or a seperate mailing list > > for Netman? > > > > Some days it feels like this is the Netman Mailing list and Devuan is

Re: [DNG] Netman Communication

2015-12-10 Thread Gregory Nowak
On Fri, Dec 11, 2015 at 12:47:05AM +0100, Patrick Erdmann wrote: > would it be possible to use github comments or a seperate mailing list > for Netman? > > Some days it feels like this is the Netman Mailing list and Devuan is a > little sub project of Netman. > > I would be very happy if we find

[DNG] Netman Communication

2015-12-10 Thread Patrick Erdmann
Hi, would it be possible to use github comments or a seperate mailing list for Netman? Some days it feels like this is the Netman Mailing list and Devuan is a little sub project of Netman. I would be very happy if we find a solution for this issue. -- Kind regards Patrick Erdmann XMPP/Mail:

Re: [DNG] Debianising my uploaded version of netman.

2015-12-10 Thread Svante Signell
On Thu, 2015-12-10 at 23:07 +0100, Edward Bartolo wrote: > Hi Rainer, > > Thanks for your help. I will have a deeper look at netman/debian > tomorrow. Instead of separating the debianization directory contents , > I can create a debianized netman source tree and an undebianized > source tree. That

Re: [DNG] Debianising my uploaded version of netman.

2015-12-10 Thread Edward Bartolo
A netman-gtk3 is coming..., whereas we must work also in the backend, something is wrong in realloc. Hi Aitor, realloc was failing because I mistakenly passed active_wifis which is a pointer to an integer instead of active_wifi_list which is a pointer to a list of void*. That is why the error re

Re: [DNG] Debianising my uploaded version of netman.

2015-12-10 Thread Edward Bartolo
Hi Rainer, Thanks for your help. I will have a deeper look at netman/debian tomorrow. Instead of separating the debianization directory contents , I can create a debianized netman source tree and an undebianized source tree. That way, users wouldn't need to worry about having to debianize netman.

Re: [DNG] Debianising my uploaded version of netman.

2015-12-10 Thread aitor_czr
No worries, A netman-gtk3 is coming..., whereas we must work also in the backend, something is wrong in realloc. I remember some words of Steve Litt: [...] What happens when a guy moves from a McDonal's to the Piazza Navona [...] Or something similar... Aitor. El 10/12/15 19:57, Edwar

Re: [DNG] Debianising my uploaded version of netman.

2015-12-10 Thread Rainer Weikusat
Edward Bartolo writes: > Forwarded to dng. > > On 10/12/2015, Edward Bartolo wrote: >> I was using -p together with -f. Now, I succeeded to fully run dh_make >> as it created the netman/debian directory. These are the file therein: >> >> edbarx@edbarx-pc:~/netman-0.1.1/debian$ ls -l >> total 112

Re: [DNG] Debianising my uploaded version of netman.

2015-12-10 Thread Edward Bartolo
Forwarded to dng. On 10/12/2015, Edward Bartolo wrote: > I was using -p together with -f. Now, I succeeded to fully run dh_make > as it created the netman/debian directory. These are the file therein: > > edbarx@edbarx-pc:~/netman-0.1.1/debian$ ls -l > total 112 > -rw-r--r-- 1 edbarx edbarx 178

Re: [DNG] Debianising my uploaded version of netman.

2015-12-10 Thread Rainer Weikusat
Edward Bartolo writes: > I am trying to debianize netman but my efforts are still without any > positive results. I tried dh_make to no avail What precisely means "to no avail"? [As I wrote in the past, I maintain about 50 'native' packages most of which were started via dh_make]

Re: [DNG] Debianising my uploaded version of netman.

2015-12-10 Thread Edward Bartolo
Hi, I am trying to debianize netman but my efforts are still without any positive results. I tried dh_make to no avail and tried to manually edit netman/changelog and netman/patches also without success. Edward On 10/12/2015, Svante Signell wrote: > On Thu, 2015-12-10 at 19:40 +0100, Edward Bar

Re: [DNG] Debianising my uploaded version of netman.

2015-12-10 Thread Svante Signell
On Thu, 2015-12-10 at 19:40 +0100, Edward Bartolo wrote: > Hi Aitor et al, > > netman/changelog contains this information: > > netman (0.1.1~468c97d-jessie2) unstable; urgency=medium > >   * New release. Closes: #468c97d >   * Changed debian/netman-backend.postinst >   * Changed debian/rules. T

Re: [DNG] Debianising my uploaded version of netman.

2015-12-10 Thread Edward Bartolo
Hi Aitor et al, netman/changelog contains this information: netman (0.1.1~468c97d-jessie2) unstable; urgency=medium * New release. Closes: #468c97d * Changed debian/netman-backend.postinst * Changed debian/rules. -- Aitor Cuadrado Zubizarreta Wed, 11 Nov 2015 11:21:20 +0100 netman (0.

Re: [DNG] Debianising my uploaded version of netman.

2015-12-10 Thread Edward Bartolo
Hi Aitor et al, I am still thinking what I should do to the netman/debian directory so that dpkg-buildpackage succeeds to spew out the two netman .deb packages. I think, the trouble lies with tracking patches which I don't have and don't want to use for the first properly debianized netman source.

Re: [DNG] Pointer error in the backend of Netman

2015-12-10 Thread KatolaZ
On Thu, Dec 10, 2015 at 05:59:04PM +, Rainer Weikusat wrote: > Edward Bartolo writes: > > [...] > > > Realloc uses two parameters: the first is a pointer whose allocation > > is to be modified/reallocated. The second is the NEW number of bytes > > required. In the function line 240 is: > > a

Re: [DNG] Pointer error in the backend of Netman

2015-12-10 Thread Rainer Weikusat
Edward Bartolo writes: [...] > Realloc uses two parameters: the first is a pointer whose allocation > is to be modified/reallocated. The second is the NEW number of bytes > required. In the function line 240 is: > active_wifi_list = realloc(active_wifi_list, (((z - 1)/2) + > list_delta)*sizeof(v

Re: [DNG] Pointer error in the backend of Netman

2015-12-10 Thread Edward Bartolo
Hi Aitor et al, This is the working code. At least it worked with an initial allocation of 1 structure instead of 10. I am using it with an initial allocation of 10 structures. On this machine the code works and it should also work in your case: The code is attached. Conside lines 236 - 240. Li

Re: [DNG] Pointer error in the backend of Netman

2015-12-10 Thread KatolaZ
On Thu, Dec 10, 2015 at 04:11:27PM +, KatolaZ wrote: [cut] > > with > > $ gcc -std=c99 reference.c > > this is what I obtain: > > reference.c:3:16: error: expected ‘;’, ‘,’ or ‘)’ before ‘&’ token > void myfun(int &a){ > ^ > reference.c: In function ‘main’: > reference.

Re: [DNG] Pointer error in the backend of Netman

2015-12-10 Thread KatolaZ
On Thu, Dec 10, 2015 at 05:00:58PM +0100, aitor_czr wrote: > No, Katolaz, passing by value and passing by reference exist in C, > at least in C99. > Could you please give a pointer to the place where this feature is documented in the ANSI C99 standard? Because it seems that the GCC crew has overl

Re: [DNG] Pointer error in the backend of Netman

2015-12-10 Thread aitor_czr
Hi Katolaz, Can you say me what returns in your system the following command: $ echo $PEDANTIC_MODE Is it set to FALSE? Thanks in advance, Aitor. On 12/10/2015 02:20 PM, KatolaZ wrote: OK, but that's*really* pedantic;) HND KatolaZ ___ Dng

Re: [DNG] Pointer error in the backend of Netman

2015-12-10 Thread aitor_czr
No, Katolaz, passing by value and passing by reference exist in C, at least in C99. Aitor. On 12/10/2015 02:08 PM, KatolaZ wrote: Aitor, sorry for being pedantic on this, but "passing-by-reference" exists only in C++, not in C. ___ Dng mailing l

Re: [DNG] Pointer error in the backend of Netman

2015-12-10 Thread KatolaZ
On Thu, Dec 10, 2015 at 01:13:00PM +, Rainer Weikusat wrote: [cut] > > Hence, there is no way in C in which "p" and "&p" can be "the same > > thing", especially if you have to decide to use either "p" or "&p" as > > a first parameter of realloc... > > There is, but not in a way which would m

Re: [DNG] Pointer error in the backend of Netman

2015-12-10 Thread Rainer Weikusat
KatolaZ writes: > On Thu, Dec 10, 2015 at 01:11:21PM +0100, aitor_czr wrote: >> Hi Katolaz, >> >> In this case active_wifis is an argument passed by reference. So: >> >> active_wifis --> is the address >> *active_wifis --> is the value >> > > Aitor, sorry for being pedantic on this, but "passi

Re: [DNG] Pointer error in the backend of Netman

2015-12-10 Thread KatolaZ
On Thu, Dec 10, 2015 at 01:11:21PM +0100, aitor_czr wrote: > Hi Katolaz, > > In this case active_wifis is an argument passed by reference. So: > > active_wifis --> is the address > *active_wifis --> is the value > Aitor, sorry for being pedantic on this, but "passing-by-reference" exists only

Re: [DNG] Pointer error in the backend of Netman

2015-12-10 Thread KatolaZ
On Thu, Dec 10, 2015 at 01:40:38PM +0100, aitor_czr wrote: > Hi Katolaz, > > (Sorry if i send the same post several times, but many of them are > being undelivered today) > > Try the folling code: > > int x = 5; > int *p,*q; > > p=&x; // This is -> *p=5 > q=p; > > printf(" The values are:

Re: [DNG] Pointer error in the backend of Netman

2015-12-10 Thread aitor_czr
Hi Katolaz, (Sorry if i send the same post several times, but many of them are being undelivered today) Try the folling code: int x = 5; int *p,*q; p=&x; // This is -> *p=5 q=p; printf(" The values are:%d %d ", *p,*q); printf(" The addresses are: %p %p ", p, q); So: 1) active_w

Re: [DNG] Pointer error in the backend of Netman

2015-12-10 Thread aitor_czr
Hi Katolaz, Try the folling code: int x = 5; int *p,*q; p=&x; // This is -> *p=5 q=p; printf(" The values are:%d %d ", *p,*q); printf(" The addresses are: %p %p ", p, q); So: 1) active_wifis is the address 2) *active_wifis is the value Aitor. On 12/10/2015 12:56 PM, KatolaZ wro

Re: [DNG] Pointer error in the backend of Netman

2015-12-10 Thread Rainer Weikusat
aitor_czr writes: > I rectify: > > p = &x; // This is -> *p=5 Considering >> int x = 5; >> int *p, *q; >> >> p = &x; // This is -> p=5 it's not. It's p = &x. Afterwards, *p will return whatever value x happens to have. Prior to the assigned, p was (assuming auto variables) a pointer wi

Re: [DNG] Pointer error in the backend of Netman

2015-12-10 Thread aitor_czr
I rectify: p = &x; // This is -> *p=5 On 12/10/2015 01:11 PM, aitor_czr wrote: Hi Katolaz, In this case active_wifis is an argument passed by reference. So: active_wifis --> is the address *active_wifis --> is the value Try doing: int x = 5; int *p, *q; p = &x; // This is -> p=5 q

Re: [DNG] Pointer error in the backend of Netman

2015-12-10 Thread aitor_czr
Hi Katolaz, In this case active_wifis is an argument passed by reference. So: active_wifis --> is the address *active_wifis --> is the value Try doing: int x = 5; int *p, *q; p = &x; // This is -> p=5 q = p; printf(" The values are: %d %d ", *p, *q); printf(" The addresses are:

[DNG] gitfalls (was: Debianising my uploaded version of, netman.)

2015-12-10 Thread aitor_czr
Hi Steve, Rainer and all, There is an alternative for Dmenu: http://apt-gnuinos.org/pool/main/o/openbox-menu/ Add the following line to your menu config file: label="Aplications"/> You also need to install lxmenu-data. The option " -i " removes the icons (i prefer so). I just need also to

Re: [DNG] Pointer error in the backend of Netman

2015-12-10 Thread KatolaZ
On Thu, Dec 10, 2015 at 11:05:01AM +0100, aitor_czr wrote: > Hi again, > > ... "active_wifis" and "&active_wifis" are the same ... > > So, forget the comment. Sorry for the silly, uninformed, and preposterous comment, which you would probably be better off ignoring altogether, but I can't se

Re: [DNG] Pointer error in the backend of Netman

2015-12-10 Thread aitor_czr
Hi again, ... "active_wifis" and "&active_wifis" are the same ... So, forget the comment. The origin of the pointer error, as Edward said, is in the list of my neighbouring active wifi points. Now, i am in another house: # ./backend 6 ESSID:"Orange-F879" ESSID:"WLAN_74B3" ESSID:"Orange-

Re: [DNG] Pointer error in the backend of Netman

2015-12-10 Thread aitor_czr
Changing from: realloc(active_wifis to: realloc(&active_wifis . the pointer error disappears: # ./backend 10 /sbin/ifup: interface wlan0 already configured :) Aitor. On 12/10/2015 09:58 AM, aitor_czr wrote: Sorry: printf("\nactive_wifis = %i\n\n", *active_wifis); On 12/10/2015 09:

Re: [DNG] Pointer error in the backend of Netman

2015-12-10 Thread aitor_czr
Sorry: printf("\nactive_wifis = %i\n\n", *active_wifis); On 12/10/2015 09:30 AM, aitor_czr wrote: Hi Edward, The value of the integer parameter 'active_wifis', passed by reference to 'getRadiatingWifiList' is lost. I added the following line 232: [] *active_wifis = -1; char* tmp_buffer

Re: [DNG] Pointer error in the backend of Netman

2015-12-10 Thread aitor_czr
Hi Edward, The value of the integer parameter 'active_wifis', passed by reference to 'getRadiatingWifiList' is lost. I added the following line 232: [] *active_wifis = -1; char* tmp_buffer = scan_buffer; printf("\nactive_wifis = %i\n\n", active_wifis); /* ADDED LINE / while((scan