dev-cpp-users Mailing List for Dev-C++
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(15) |
Oct
(115) |
Nov
(154) |
Dec
(258) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(377) |
Feb
(260) |
Mar
(249) |
Apr
(188) |
May
(152) |
Jun
(150) |
Jul
(195) |
Aug
(202) |
Sep
(200) |
Oct
(286) |
Nov
(242) |
Dec
(165) |
2002 |
Jan
(245) |
Feb
(241) |
Mar
(239) |
Apr
(346) |
May
(406) |
Jun
(369) |
Jul
(418) |
Aug
(357) |
Sep
(362) |
Oct
(597) |
Nov
(455) |
Dec
(344) |
2003 |
Jan
(446) |
Feb
(397) |
Mar
(515) |
Apr
(524) |
May
(377) |
Jun
(387) |
Jul
(532) |
Aug
(364) |
Sep
(294) |
Oct
(352) |
Nov
(295) |
Dec
(327) |
2004 |
Jan
(416) |
Feb
(318) |
Mar
(324) |
Apr
(249) |
May
(259) |
Jun
(218) |
Jul
(212) |
Aug
(259) |
Sep
(158) |
Oct
(162) |
Nov
(214) |
Dec
(169) |
2005 |
Jan
(111) |
Feb
(165) |
Mar
(199) |
Apr
(147) |
May
(131) |
Jun
(163) |
Jul
(235) |
Aug
(136) |
Sep
(84) |
Oct
(88) |
Nov
(113) |
Dec
(100) |
2006 |
Jan
(85) |
Feb
(119) |
Mar
(33) |
Apr
(31) |
May
(56) |
Jun
(68) |
Jul
(18) |
Aug
(62) |
Sep
(33) |
Oct
(55) |
Nov
(19) |
Dec
(40) |
2007 |
Jan
(22) |
Feb
(49) |
Mar
(34) |
Apr
(51) |
May
(66) |
Jun
(43) |
Jul
(116) |
Aug
(57) |
Sep
(70) |
Oct
(69) |
Nov
(97) |
Dec
(86) |
2008 |
Jan
(32) |
Feb
(47) |
Mar
(106) |
Apr
(67) |
May
(28) |
Jun
(39) |
Jul
(31) |
Aug
(25) |
Sep
(18) |
Oct
(25) |
Nov
(5) |
Dec
(21) |
2009 |
Jan
(33) |
Feb
(27) |
Mar
(27) |
Apr
(22) |
May
(22) |
Jun
(10) |
Jul
(17) |
Aug
(9) |
Sep
(21) |
Oct
(13) |
Nov
(4) |
Dec
(11) |
2010 |
Jan
(10) |
Feb
(8) |
Mar
(4) |
Apr
(1) |
May
|
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(8) |
Oct
(26) |
Nov
(9) |
Dec
(1) |
2011 |
Jan
(21) |
Feb
(16) |
Mar
(4) |
Apr
(19) |
May
(26) |
Jun
(9) |
Jul
(6) |
Aug
|
Sep
(4) |
Oct
(3) |
Nov
(2) |
Dec
(1) |
2012 |
Jan
(4) |
Feb
(7) |
Mar
(4) |
Apr
|
May
(1) |
Jun
(10) |
Jul
(1) |
Aug
(1) |
Sep
(18) |
Oct
(3) |
Nov
(1) |
Dec
(1) |
2013 |
Jan
(4) |
Feb
(2) |
Mar
(15) |
Apr
(6) |
May
(1) |
Jun
(3) |
Jul
(1) |
Aug
(2) |
Sep
(4) |
Oct
|
Nov
(9) |
Dec
|
2014 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(5) |
Aug
(4) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
(4) |
2015 |
Jan
(2) |
Feb
(3) |
Mar
(1) |
Apr
(2) |
May
(1) |
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(2) |
Oct
(9) |
Nov
(35) |
Dec
(6) |
2016 |
Jan
(7) |
Feb
(10) |
Mar
(10) |
Apr
(9) |
May
(13) |
Jun
(9) |
Jul
(1) |
Aug
(3) |
Sep
(3) |
Oct
(1) |
Nov
(1) |
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
(1) |
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
1
(4) |
2
(10) |
3
(11) |
4
(8) |
5
(3) |
6
(1) |
7
(7) |
8
(5) |
9
(10) |
10
(4) |
11
(5) |
12
(3) |
13
(4) |
14
(7) |
15
(8) |
16
(11) |
17
(5) |
18
(3) |
19
(4) |
20
(8) |
21
(25) |
22
(9) |
23
(6) |
24
(8) |
25
(13) |
26
(11) |
27
(12) |
28
(3) |
29
(7) |
30
(3) |
|
|
|
From: Paul I. <pi...@ot...> - 2004-06-15 19:23:40
|
Quoting Bruce jjs <per...@ya...>: > I have write a very simple program to test the pointer.The progr= am is > list belove: > /* **************************************** */ > #include <stdio.h> > =20 > int *p; > =20 > =20 > void Func(void) > { > int number; > =20 > number =3D 11; > p =3D &number; > } > =20 > main() > { > Func(); > printf("*p =3D %d\n", *p); > } > /* ***************************** */ > The result is : > *p =3D 11 > The variable "number" is local variable that will be destoryed af= ter > leave the Func( ) and the pointer "p" is pointer to it.Although p is gl= obal > variable,it pointer to a deleted area. To my way of thinking,*p should = be a > ignorance value.Is my understand wrong? > Thanks, > Bruce.J >=20 What do you mean by "*p should be a ignorance value"? This is what the compiler makes out of Func(): __Z4Funcv: LFB1: pushl %ebp ; Stores ebp on the stack LCFI0: movl %esp, %ebp ; copies the stack pointer (esp) to ebp LCFI1: subl $4, %esp ; esp =3D esp - 4 : This makes room for the=20 ; 'number' variable on the stack (since the stack ; is growing towards lower addresses, 'number' won't ; be overwritten when pushing further data on the stack) LCFI2: movl $11, -4(%ebp) ; the 'number' variable is initialized to 11 ; intel syntax is probably clearer: mov [DWORD PTR ebp - 4], 11 ; (move the value 11 to the address pointed to by ; (ebp + 4) ) ; (automatic variables are always accessed via ebp, which=20 ; is the reason it is initialized to esp at the beginning of=20 ; the function. (esp may change during the execution of=20 ; the function body) leal -4(%ebp), %eax ; lea : load effective address ; this intruction loads the address of the 'number' variable ; to register eax. (as can be seen, 'number' hasn't moved...) movl %eax, _p ; the address of 'number' is stored in the variable p ; (renamed to _p by the compiler). p is actually an address: ; .bss ; .align 4 ; _p: ; .space 4 ; meaning that 4 bytes of space is reserved "in the .bss section" leave ; performs cleanup: ; esp=3Debp, pop ebp=20 ; this restores the stack pointer (to the point when it was=20 ; stored in ebp) and then ebp is restored. ret ; return from function As can be seen, no area is "deleted". Nor is anything cleared (that would= cost time). Next time a function is called, the memory area that p points to i= s likely to change. As in this case: #include <stdio.h> =20 int *p; =20 =20 void Func(void) { int number; =20 number =3D 11; p =3D &number; } void Func2(void) { int a; =09 a=3D 5; } =20 =20 main() { Func(); printf("*p =3D %d\n", *p); Func2(); printf("*p =3D %d\n", *p); =20 } When Func2 is called the variable 'a' will be assigned the same address t= hat 'number' occupied... Hope this helps ;-) |
From: Paul I. <pi...@ot...> - 2004-06-15 17:43:42
|
Quoting Bruce jjs <per...@ya...>: > I have used inportb( ) and outportb( ) write a serial communication= ' > program.But this two functions is provided by Borland C 3.1 and they ar= e not > standard C functions.Does ANSI C has some functions can do the similar = jobs > like inportb( ) and outportb( )?In my impression,the standard C doesn't > support functions to direct operate hardware,isn't it? >=20 >=20 >=20 > --------------------------------- > Do You Yahoo!? > =CF=D3=D3=CA=CF=E4=CC=AB=D0=A1=A3=BF=D1=C5=BB=A2=B5=E7=D3=CA=D7=D4=D6=FA= =C0=A9=C8=DD=A3=A1 If you talking about Win32, then you should look at the CreateFile, GetCommState, SetCommState, ReadFile and WriteFile API-functions (unless= you'd rather use some toolkit such as wxWidgets (?)). You may want to explore OVERLAPPED and such to get a more efficient solut= ion than using timers as I did (Never succeded in getting that to work... :-/= =20 This code works for me (with Borland Builder 5). (Pardon the mess ;-): int TForm1::COMInit(void) { if (hCom) {CloseHandle(hCom); hCom =3D 0;} hCom =3D 0; int fSuccess; ErrorForm =3D new TErrorForm(this); SECURITY_ATTRIBUTES sa; sa.nLength =3D sizeof(SECURITY_ATTRIBUTES); sa.bInheritHandle =3D true; sa.lpSecurityDescriptor =3D NULL; hCom =3D CreateFile("COM1", // FileName GENERIC_READ | GENERIC_WRITE, // Des.Access 0, // ShareMode &sa, // lpSecurityAttr OPEN_EXISTING, // dwCreationDistribution 0, //FILE_FLAG_OVERLAPPED, // dwFlagsAndAttributes NULL ); // hTemplateFile if (hCom =3D=3D INVALID_HANDLE_VALUE) { AnsiString Text =3D "Could not open the COM-port"; ErrorForm->FelBesk->Caption =3D Text; ErrorForm->ShowModal(); if (hCom) {CloseHandle(hCom); hCom =3D 0;} return 1; } DCB dcb; fSuccess =3D GetCommState(hCom,&dcb); if (fSuccess =3D=3D 0) { AnsiString Text =3D "Could not get com-state"; ErrorForm->FelBesk->Caption =3D Text; ErrorForm->ShowModal(); if (hCom) {CloseHandle(hCom); hCom =3D 0;} return 2; } dcb.BaudRate =3D 9600; dcb.fParity =3D FALSE; dcb.fRtsControl =3D RTS_CONTROL_HANDSHAKE;// 2; // RTS_CONTROL_ENABLE;= 2!!// ? dcb.ByteSize =3D 8; dcb.StopBits =3D ONESTOPBIT; dcb.fAbortOnError =3D TRUE; //0; // 1 dcb.fOutX =3D 0; dcb.fInX =3D 0; dcb.fErrorChar =3D 0; dcb.fNull =3D 0; dcb.fAbortOnError =3D FALSE; // TRUE (kr=E4ver hantering) dcb.fOutxCtsFlow =3D TRUE; //0; // 1 dcb.fOutxDsrFlow =3D 0; dcb.fDtrControl =3D DTR_CONTROL_ENABLE; dcb.fDsrSensitivity =3D 0; dcb.fTXContinueOnXoff =3D 1; dcb.fOutxCtsFlow =3D 0;//1; // 1 lagsamt utan HW dcb.fBinary =3D 1; dcb.XonLim =3D 2048; dcb.XoffLim =3D 512; dcb.XonChar =3D '\x11'; // Tx and Rx XON character dcb.XoffChar =3D '\x13'; // Tx and Rx XOFF character dcb.ErrorChar =3D '\0'; // error replacement character dcb.EofChar =3D'\0'; // end of input character dcb.EvtChar =3D '\0'; // received event character dcb.Parity =3D 0; // dcb.wReserved =3D 0; // dcb.fDummy2 =3D 0; // dcb.wReserved1 =3D 0; dcb.DCBlength; // sizeof(DCB) 28 dcb.BaudRate; // current baud rate 9600 dcb.fBinary; // binary mode, no EOF check 1 dcb.fParity; // enable parity checking 0 dcb.fOutxCtsFlow; // CTS output flow control 0 dcb.fOutxDsrFlow; // DSR output flow control 0 dcb.fDtrControl; // DTR flow control type 1 dcb.fDsrSensitivity; // DSR sensitivity 0 dcb.fTXContinueOnXoff; // XOFF continues Tx 1 dcb.fOutX; // XON/XOFF out flow control 0 dcb.fInX; // XON/XOFF in flow control 0 dcb.fErrorChar; // enable error replacement 0 dcb.fNull; // enable null stripping 0 dcb.fRtsControl; // RTS flow control 2 dcb.fAbortOnError; // abort reads/writes on error 0 dcb.fDummy2; // reserved 0 //dcb.wReserved; // not currently used 0 dcb.XonLim; // transmit XON threshold 2048 dcb.XoffLim; // transmit XOFF threshold 512 dcb.ByteSize; // number of bits/byte, 4-8 '\b' dcb.Parity; // 0-4=3Dno,odd,even,mark,space '\x02' 0 dcb.StopBits; // 0,1,2 =3D 1, 1.5, 2 0 dcb.XonChar; // Tx and Rx XON character x11 dcb.XoffChar; // Tx and Rx XOFF character x13 dcb.ErrorChar; // error replacement character 0 dcb.EofChar; // end of input character 0 dcb.EvtChar; // received event character 0 dcb.wReserved1; // reserved; do not use 0 dcb.BaudRate =3D 1200; //CBR_57600 dcb.fParity =3D FALSE; dcb.fRtsControl =3D RTS_CONTROL_TOGGLE; // ? dcb.ByteSize =3D 8; dcb.StopBits =3D TWOSTOPBITS; dcb.fAbortOnError =3D 0; dcb.fOutX =3D 0; dcb.fInX =3D0; dcb.fErrorChar =3D 0; dcb.fNull =3D 0; dcb.fAbortOnError =3D 0; // dcb.fOutxCtsFlow =3D 1; dcb.fOutxDsrFlow =3D 0; dcb.fDtrControl =3D DTR_CONTROL_ENABLE; dcb.fDsrSensitivity =3D 0; // dcb.fTXContinueOnXoff fSuccess =3D SetCommState(hCom,&dcb); if (fSuccess =3D=3D 0) { AnsiString Text =3D "SetComState misslyckades!"; ErrorForm->FelBesk->Caption =3D Text; ErrorForm->ShowModal(); if (hCom) {CloseHandle(hCom); hCom =3D 0;}; return 3; } return 0; } Change the above to suit your particular applicationfor your then read/wr= ite with something like this: fStatus =3D WriteFile( hCom, // handle to file to write to val.c_str(), //LPCVOID lpBuffer, // pointer to data to write to file val.Length(), // DWORD nNumberOfBytesToWrite, // number of bytes to = write &written, //LPDWORD lpNumberOfBytesWritten, // pointer to number of = bytes written NULL // &ow //LPOVERLAPPED lpOverlapped // pointer to structure nee= ded for overlapped I/O ); } BOOL fsuccess =3D ReadFile(hCom, // handle of file to read ReadBuffer, // address of buffer that receives data 100, // number of bytes to read &nrBytes, // address of structure for data NULL // OVERLAP ); |
From: Rafael C. <cha...@un...> - 2004-06-15 17:14:38
|
Well, when "Func" ends, its local variables (number) are destroyed, so the result of printf shouldn't be 11 since "number" has been destroyed. I tested your program and result was the same. IMHO what may be happening is that your test program is enough small to not modify the memory and somehow pointer "p" is still pointing to a place where the value is 11. Change "main" as below and see the result. In my test I had "x =3D 1" and "*p =3D 1". main(){ int x =3D 1; Func(); printf("x =3D %d\n", x); printf("*p =3D %d\n", *p); } Maybe some other subscriber of this list could give us a better answer. There are good programmers here! Hope it helps, Rafael Bruce jjs wrote: > I have write a very simple program to test the pointer.The=20 > program is list belove: > /* **************************************** */ > #include <stdio.h> > =20 > int *p; > =20 > =20 > void Func(void) > { > int number; > =20 > number =3D 11; > p =3D &number; > } > =20 > main() > { > Func(); > printf("*p =3D %d\n", *p); > } > /* ***************************** */ > The result is : > *p =3D 11 > The variable "number" is local variable that will be=20 > destoryed after leave the Func( ) and the pointer "p" is pointer=20 > to it.Although p is global variable,it pointer to a deleted area. To my= =20 > way of thinking,*p should be a ignorance value.Is my understand wrong? > Thanks, > Bruce.J >=20 >=20 > -----------------------------------------------------------------------= - > Do You Yahoo!? > =CF=D3=D3=CA=CF=E4=CC=AB=D0=A1=A3=BF=D1=C5=BB=A2=B5=E7=D3=CA=D7=D4=D6=FA= =C0=A9=C8=DD=A3=A1=20 > <http://cn.rd.yahoo.com/mail_cn/tag/10m/*http://cn.mail.yahoo.com/event= /10m.html>=20 >=20 |
From: <sp...@po...> - 2004-06-15 14:10:33
|
Hi, 4.9.9.0 will have full installer with updated mingw. I'll try to fix the installer by then. Marek Guillermo Gutierrez wrote: >will there be an installer version that is a full installer? I ask because I don't seem to have the best of luck with upgrade installers, the last time I used an upgrade installer my dev-cpp install wouldn't compile anything. It would just give the message "unable to run the program" and this new version is doing the same thing. > >-----Original Message----- >From: dev...@li... >[mailto:dev...@li...]On Behalf Of Colin >Laplace >Sent: Thursday, June 10, 2004 1:51 PM >To: dev...@li... >Subject: Re: [Dev-C++] [UPDATE] Dev-C++ 4.9.8.10 version available > > > > >>Is this a full installer or just an upgrade? >>Will it reinstall the compiler as well? >> >> > >This is an update only - it doesn't contain the Mingw compiler system. > >Colin > > > >>-----Original Message----- >>From: dev...@li... >>[mailto:dev...@li...]On Behalf Of Colin >>Laplace >>Sent: Thursday, June 10, 2004 12:30 PM >>To: dev...@li... >>Subject: [Dev-C++] [UPDATE] Dev-C++ 4.9.8.10 version available >> >> >>Hello, >> >>Due to some bugs introduced in version 4.9.8.9, we decided to release a bug >>fix update before going on 4.9.9.0. >>You can download it from http://bloodshed.net/dev/devcpp.html >> >>Greetings, >>Colin Laplace >> >> >> |
From: Guillermo G. <ggu...@ma...> - 2004-06-15 14:04:54
|
will there be an installer version that is a full installer? I ask = because I don't seem to have the best of luck with upgrade installers, = the last time I used an upgrade installer my dev-cpp install wouldn't = compile anything. It would just give the message "unable to run the = program" and this new version is doing the same thing. -----Original Message----- From: dev...@li... [mailto:dev...@li...]On Behalf Of Colin Laplace Sent: Thursday, June 10, 2004 1:51 PM To: dev...@li... Subject: Re: [Dev-C++] [UPDATE] Dev-C++ 4.9.8.10 version available > Is this a full installer or just an upgrade? > Will it reinstall the compiler as well? This is an update only - it doesn't contain the Mingw compiler system. Colin > -----Original Message----- > From: dev...@li... > [mailto:dev...@li...]On Behalf Of Colin > Laplace > Sent: Thursday, June 10, 2004 12:30 PM > To: dev...@li... > Subject: [Dev-C++] [UPDATE] Dev-C++ 4.9.8.10 version available > > > Hello, > > Due to some bugs introduced in version 4.9.8.9, we decided to release = a bug > fix update before going on 4.9.9.0. > You can download it from http://bloodshed.net/dev/devcpp.html > > Greetings, > Colin Laplace > > > ------------------------------------------------------- > This SF.Net email is sponsored by: GNOME Foundation > Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event. > GNOME Users and Developers European Conference, 28-30th June in Norway > http://2004/guadec.org > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users ------------------------------------------------------- This SF.Net email is sponsored by: GNOME Foundation Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event. GNOME Users and Developers European Conference, 28-30th June in Norway http://2004/guadec.org _______________________________________________ Dev-cpp-users mailing list Dev...@li... TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
From: <wer...@zf...> - 2004-06-15 11:10:52
|
Hi, on some other compilers (eg. Borland 3.1 or lccwin32) I can position = the cursor in a word (eg. printf ) in my program. When I press F1 I get a description of the library function. Is this feature als available with devcpp ? I tried to download = http://bloodshed.ygto.com/dev/packages/bin/GlibcHelp.DevPak which might = be such a help, but my browser ended with timeout. Mit freundlichen Gr=FC=DFen / Best regards Werner Sticht mailto:wer...@sa... Tel. (+49) [0] 9721/98-2595 |
From: A. K. <kli...@ad...> - 2004-06-15 08:59:42
|
Bruce jjs wrote: > int *p; > > void Func(void) > { > int number; > > number = 11; > p = &number; > } You assign a new address to that pointer, not a new value, and that new address happens to contain "11" but it resides on the stack of course. You should do *p = number; Then it will work as expected Alex |
From: <per...@ya...> - 2004-06-15 01:37:58
|
I have write a very simple program to test the pointer.The program is list belove: /* **************************************** */ #include <stdio.h> int *p; void Func(void) { int number; number = 11; p = &number; } main() { Func(); printf("*p = %d\n", *p); } /* ***************************** */ The result is : *p = 11 The variable "number" is local variable that will be destoryed after leave the Func( ) and the pointer "p" is pointer to it.Although p is global variable,it pointer to a deleted area. To my way of thinking,*p should be a ignorance value.Is my understand wrong? Thanks, Bruce.J --------------------------------- Do You Yahoo!? 嫌邮箱太小?雅虎电邮自助扩容! |