Sat Oct 9 16:50:37 2004 e.s.t
EVENTS
 FREE
SOFTWARE
INSTITUTE

POLITICS
JOBS
MEMBERS'
CORNER

MAILING
LIST

NYLXS Mailing Lists and Archives
NYLXS Members have a lot to say and share but we don't keep many secrets. Join the Hangout Mailing List and say your peice.
2013-06-19 | 2013-05-19 | 2013-04-19 | 2013-03-19 | 2013-02-19 | 2013-01-19 | 2012-12-19 | 2012-11-19 | 2012-10-19 | 2012-09-19 | 2012-08-19 | 2012-07-19 | 2012-06-19 | 2012-05-19 | 2012-04-19 | 2012-03-19 | 2012-02-19 | 2012-01-19 | 2011-12-19 | 2011-11-19 | 2011-10-19 | 2011-09-19 | 2011-08-19 | 2011-07-19 | 2011-06-19 | 2011-05-19 | 2011-04-19 | 2011-03-19 | 2011-02-19 | 2011-01-19 | 2010-12-19 | 2010-11-19 | 2010-10-19 | 2010-09-19 | 2010-08-19 | 2010-07-19 | 2010-06-19 | 2010-05-19 | 2010-04-19 | 2010-03-19 | 2010-02-19 | 2010-01-19 | 2009-12-19 | 2009-11-19 | 2009-10-19 | 2009-09-19 | 2009-08-19 | 2009-07-19 | 2009-06-19 | 2009-05-19 | 2009-04-19 | 2009-03-19 | 2009-02-19 | 2009-01-19 | 2008-12-19 | 2008-11-19 | 2008-10-19 | 2008-09-19 | 2008-08-19 | 2008-07-19 | 2008-06-19 | 2008-05-19 | 2008-04-19 | 2008-03-19 | 2008-02-19 | 2008-01-19 | 2007-12-19 | 2007-11-19 | 2007-10-19 | 2007-09-19 | 2007-08-19 | 2007-07-19 | 2007-06-19 | 2007-05-19 | 2007-04-19 | 2007-03-19 | 2007-02-19 | 2007-01-19 | 2006-12-19 | 2006-11-19 | 2006-10-19 | 2006-09-19 | 2006-08-19 | 2006-07-19 | 2006-06-19 | 2006-05-19 | 2006-04-19 | 2006-03-19 | 2006-02-19 | 2006-01-19 | 2005-12-19 | 2005-11-19 | 2005-10-19 | 2005-09-19 | 2005-08-19 | 2005-07-19 | 2005-06-19 | 2005-05-19 | 2005-04-19 | 2005-03-19 | 2005-02-19 | 2005-01-19 | 2004-12-19 | 2004-11-19 | 2004-10-19 | 2004-09-19 | 2004-08-19 | 2004-07-19 | 2004-06-19 | 2004-05-19 | 2004-04-19 | 2004-03-19 | 2004-02-19 | 2004-01-19 | 2003-12-19 | 2003-11-19 | 2003-10-19 | 2003-09-19 | 2003-08-19 | 2003-07-19 | 2003-06-19 | 2003-05-19 | 2003-04-19 | 2003-03-19 | 2003-02-19 | 2003-01-19 | 2002-12-19 | 2002-11-19 | 2002-10-19 | 2002-09-19 | 2002-08-19 | 2002-07-19 | 2002-06-19 | 2002-05-19 | 2002-04-19 | 2002-03-19 | 2002-02-19 | 2002-01-19 | 2001-12-19 | 2001-11-19 | 2001-10-19 | 2001-09-19 | 2001-08-19 | 2001-07-19 | 2001-06-19 | 2001-05-19 | 2001-04-19 | 2001-03-19 | 2001-02-19 | 2001-01-19 | 2000-12-19 | 2000-11-19 | 2000-10-19 | 2000-09-19 | 2000-08-19 | 2000-07-19 | 2000-06-19 | 2000-05-19 | 2000-04-19 | 2000-03-19 | 2000-02-19 | 2000-01-19 | 1999-12-19

Key: archive Value: 2005-01-01

Key: id Value: 506508

MESSAGE
DATE 2005-01-25
FROM From: "Martin, Jared"
SUBJECT RE: [hangout] Simple C question
From owner-hangouts-destenys-at-mrbrklyn.com Tue Jan 25 16:36:50 2005
X-UIDL: 4`-"!PB?"!O]E"!*2$"!
Received: from www2.mrbrklyn.com (localhost [127.0.0.1])
by mrbrklyn.com (8.12.11/8.11.2/SuSE Linux 8.11.1-0.5) with ESMTP id j0PLanGH008337
for ; Tue, 25 Jan 2005 16:36:49 -0500
Received: (from mdom-at-localhost)
by www2.mrbrklyn.com (8.12.11/8.12.3/Submit) id j0PLanNS008336
for hangouts-destenys; Tue, 25 Jan 2005 16:36:49 -0500
X-Authentication-Warning: www2.mrbrklyn.com: mdom set sender to owner-hangouts-at-www2.mrbrklyn.com using -f
Received: from DGEXCHANGE03.DGLAW.COM (exchange.dglaw.com [216.91.14.105])
by mrbrklyn.com (8.12.11/8.11.2/SuSE Linux 8.11.1-0.5) with ESMTP id j0PLam2o008331
for ; Tue, 25 Jan 2005 16:36:48 -0500
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0
Subject: RE: [hangout] Simple C question
Date: Tue, 25 Jan 2005 16:36:56 -0500
Message-ID: <9A6B8130C7F3BD49AC80282BE493A7DB262C47-at-DGEXCHANGE03.DGLAW.COM>
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
Thread-Topic: [hangout] Simple C question
thread-index: AcUDIYg31hIIhR+/SXmpDESbi2HHkgABElig
From: "Martin, Jared"
To: "Billy"
Cc:
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by mrbrklyn.com id j0PLam2o008331
Sender: owner-hangouts-at-mrbrklyn.com
Precedence: bulk
Reply-To: "Martin, Jared"
List: New Yorker GNU Linux Scene
Admin: To unsubscribe send unsubscribe name-at-domian.com in the body to hangout-request-at-www2.mrbrklyn.com
X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on www2.mrbrklyn.com
X-Spam-Status: No, score=-2.6 required=4.0 tests=BAYES_00 autolearn=ham
version=3.0.0
X-Spam-Level:
X-Keywords:
X-UID: 38534
Status: RO
Content-Length: 1718
Lines: 81


Thanks a lot, I had seen strcpy, but strncpy is what I really needed Thanks.


Sincerely,
*****************************
Jared Martin
IT Desktop Support
Davis & Gilbert LLP
1740 Broadway
New York, NY 10019
Help Desk: 212-237-1500
Office: 212-237-1504
Cell: 646-773-4138
Fax: (212) 974-7023
*************************************




-----Original Message-----
From: Billy [mailto:billy-at-dadadada.net]
Sent: Tuesday, January 25, 2005 4:03 PM
To: Inker, Evan
Cc: Martin, Jared; NYLXS
Subject: Re: [hangout] Simple C question


Inker, Evan wrote:
> Check this out
>
> strcopy.c
>
> /* strcopy.c written by detour-at-metalshell.com
> *
> * example of a string copying function.
> *
> * http://www.metalshell.com/
> *
> */
>
> #include
> #include
>
> void strcopy(const char *, char *);
>
> int main() {
> char string1[] = "This is string1";
> char string2[] = "This is string2";
>
> strcopy(string1, string2);
> printf("String2: %s", string2);
> }
>
> void strcopy(const char * str1, char * str2) {
> int x = 0;
>
> /* change the size of string2 to the size of string1 */
> realloc(str2, sizeof(str1));
>
> do {
> str2[x] = str1[x];
> } while (str1[x++] != '\0');
>
> }


This program is incorrect.
YOU CANNOT overwrite the contents of string2. It is also illegal to
realloc() a pointer which was not obtained by malloc().
also, realloc is free to move the block. you have to use its return
value to update the pointer. There's just so much wrong...

I DON'T RECOMMEND learning from this example.


____________________________
NYLXS: New Yorker Free Software Users Scene
Fair Use -
because it's either fair use or useless....
NYLXS is a trademark of NYLXS, Inc

  1. 2005-01-06 Billy <billy-at-dadadada.net> Re: [hangout] What is available for creating GUI's?
  2. 2005-01-06 From: "P.Robert Marino" <rob-at-concord-hs.org> Subject: [hangout] the contract number for the microsoft contract with the NYC DOE
  3. 2005-01-06 From: "Steve Milo" <slavik914-at-mrbrklyn.com> Subject: [hangout] What is available for creating GUI's?
  4. 2005-01-09 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [hangout] It never ends......
  5. 2005-01-11 Ruben Safir <ruben-at-mrbrklyn.com> Re: [hangout] Staff Development and Organizational Capacity
  6. 2005-01-11 From: "Inker, Evan" <EInker-at-gam.com> RE: [hangout] Staff Development and Organizational Capacity
  7. 2005-01-11 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [hangout] IBM - Software Patents
  8. 2005-01-11 From: "Inker, Evan" <EInker-at-gam.com> Subject: [hangout] NYLXS Needs You !! Call Out for Volunteers
  9. 2005-01-11 From: "Inker, Evan" <EInker-at-gam.com> Subject: [hangout] Staff Development and Organizational Capacity
  10. 2005-01-11 wjc <wjc-at-optonline.net> Subject: [hangout] test
  11. 2005-01-12 Billy <billy-at-dadadada.net> Re: [hangout] More wonderful BS from Columbia University
  12. 2005-01-12 From: "Inker, Evan" <EInker-at-gam.com> RE: [hangout] More wonderful BS from Columbia University
  13. 2005-01-12 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [hangout] Bird Watching
  14. 2005-01-12 From: "Inker, Evan" <EInker-at-gam.com> Subject: [hangout] GNOME Journal, January 2005 Edition
  15. 2005-01-12 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [hangout] More wonderful BS from Columbia University
  16. 2005-01-12 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [hangout] Open Office and Web Publishing
  17. 2005-01-12 dspira-at-att.net Subject: [hangout] Why is he still able to teach!!!
  18. 2005-01-13 Ruben Safir Secretary NYLXS <ruben-at-mrbrklyn.com> Re: [hangout] More wonderful BS from Columbia University
  19. 2005-01-13 Billy <billy-at-dadadada.net> Re: [hangout] More wonderful BS from Columbia University
  20. 2005-01-13 Ruben Safir Secretary NYLXS <ruben-at-mrbrklyn.com> Re: [hangout] More wonderful BS from Columbia University
  21. 2005-01-13 Billy <billy-at-dadadada.net> Re: [hangout] Why is he still able to teach!!!
  22. 2005-01-13 From: "Inker, Evan" <EInker-at-gam.com> Subject: [hangout] Big Brother Bloomberg is watching.
  23. 2005-01-13 From: "Inker, Evan" <EInker-at-gam.com> Subject: [hangout] Linux misperceptions the greatest challenge: Novell
  24. 2005-01-13 From: "Steve Milo" <slavik914-at-mrbrklyn.com> Subject: [hangout] Paging Serge.
  25. 2005-01-13 From: "Inker, Evan" <EInker-at-gam.com> Subject: [hangout] Red Hat tries again with Linux enthusiasts
  26. 2005-01-13 From: "Inker, Evan" <EInker-at-gam.com> Subject: [hangout] Red Hat, SuSE release Linux patches
  27. 2005-01-14 From: "Inker, Evan" <EInker-at-gam.com> Subject: [hangout] FBI may scrap $170 million project
  28. 2005-01-16 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [hangout] Lotus 1-2-3 Free Software
  29. 2005-01-18 From: "Martin, Jared" <JMartin-at-dglaw.com> RE: [hangout] Staff Development and Organizational Capacity
  30. 2005-01-19 From: "Inker, Evan" <EInker-at-gam.com> RE: [hangout] Staff Development and Organizational Capacity
  31. 2005-01-19 Ruben Safir <ruben-at-mrbrklyn.com> RE: [hangout] Staff Development and Organizational Capacity
  32. 2005-01-20 From: "Steve Milo" <slavik914-at-mrbrklyn.com> Re: [hangout] FIX Protocol
  33. 2005-01-20 swd <sderrick-at-optonline.net> RE: [hangout] FIX Protocol
  34. 2005-01-20 From: "Inker, Evan" <EInker-at-gam.com> RE: [hangout] NY Linux Users Grp. 27 Jan. Meeting: Elliotte Rusty
  35. 2005-01-20 From: "Steve Milo" <slavik914-at-mrbrklyn.com> Re: [hangout] NY Linux Users Grp. 27 Jan. Meeting: Elliotte Rusty Harold -on- Extensible Markup Language (XML)
  36. 2005-01-20 From: "Inker, Evan" <EInker-at-gam.com> Subject: [hangout] A Take on the Workstation Market Today
  37. 2005-01-20 From: "Steve Milo" <slavik914-at-mrbrklyn.com> Subject: [hangout] FIX Protocol
  38. 2005-01-20 Ron Guerin <ron-at-vnetworx.net> Subject: [hangout] NY Linux Users Grp. 27 Jan. Meeting: Elliotte Rusty Harold -on-
  39. 2005-01-20 From: "Inker, Evan" <EInker-at-gam.com> Subject: [hangout] OS News of the Day - Jan 20, 2005
  40. 2005-01-21 From: "Steve Milo" <slavik914-at-mrbrklyn.com> Subject: [hangout] Paging serge.
  41. 2005-01-23 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [hangout] Mama - don't let your kids grow up to be programers
  42. 2005-01-24 From: "Inker, Evan" <EInker-at-gam.com> Subject: [hangout] VeriSign breaks silence on domain hijack
  43. 2005-01-25 Ron Guerin <ron-at-vnetworx.net> Re: [hangout] Ron G.
  44. 2005-01-25 From: "Martin, Jared" <JMartin-at-dglaw.com> RE: [hangout] Simple C question
  45. 2005-01-25 Steve Milo <slavik914-at-mrbrklyn.com> Re: [hangout] Simple C question
  46. 2005-01-25 Billy <billy-at-dadadada.net> Re: [hangout] Simple C question
  47. 2005-01-25 Billy <billy-at-dadadada.net> Re: [hangout] Simple C question
  48. 2005-01-25 James Linder <jhl-at-jlinder.com> Re: [hangout] Simple C question
  49. 2005-01-25 From: "Inker, Evan" <EInker-at-gam.com> RE: [hangout] Simple C question
  50. 2005-01-25 From: "Inker, Evan" <EInker-at-gam.com> Subject: [hangout] Flame Wars, Forks and Freedom
  51. 2005-01-25 From: "rc" <ray-pub-at-rcn.com> Subject: [hangout] FOSS Biz Solution Thoughts?
  52. 2005-01-25 From: "Inker, Evan" <EInker-at-gam.com> Subject: [hangout] IBM goes silent on Linux desktop effort
  53. 2005-01-25 From: "Steve Milo" <slavik914-at-mrbrklyn.com> Subject: [hangout] Ron G.
  54. 2005-01-25 From: "Martin, Jared" <JMartin-at-dglaw.com> Subject: [hangout] Simple C question
  55. 2005-01-26 Ruben Safir Secretary NYLXS <ruben-at-mrbrklyn.com> Re: [hangout] Simple C question
  56. 2005-01-26 Billy <billy-at-dadadada.net> Re: [hangout] Simple C question
  57. 2005-01-26 Ruben Safir <ruben-at-mrbrklyn.com> Re: [hangout] Simple C question
  58. 2005-01-26 Ruben Safir <ruben-at-mrbrklyn.com> Re: [hangout] Simple C question
  59. 2005-01-27 From: "Inker, Evan" <EInker-at-gam.com> Subject: [hangout] Concerns mount over Lenovo's IBM deal
  60. 2005-01-27 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [hangout] I've been Robbed - NOT
  61. 2005-01-27 From: "Inker, Evan" <EInker-at-gam.com> Subject: [hangout] MySQL installations targeted by Forbot worm variant
  62. 2005-01-27 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [hangout] New Cold Medication Restrictions will make them Pharmacy only
  63. 2005-01-27 Ruben Safir Secretary NYLXS <ruben-at-mrbrklyn.com> Subject: [hangout] [visham-at-proexam.org: I will like to Register/And I will also like to lern more about this class]
  64. 2005-01-28 From: "Martin, Jared" <JMartin-at-dglaw.com> Fw: [hangout] [visham-at-proexam.org: I will like to Register/And I will also like to lern more about this class]
  65. 2005-01-28 Ruben Safir Secretary NYLXS <ruben-at-mrbrklyn.com> Subject: [hangout] Future might be looking brighter
  66. 2005-01-29 Billy <billy-at-dadadada.net> Re: Fw: [hangout] [visham-at-proexam.org: I will like to Register/And
  67. 2005-01-29 From: "Steve Milo" <slavik914-at-mrbrklyn.com> Re: [hangout] Future might be looking brighter
  68. 2005-01-29 Billy <billy-at-dadadada.net> Re: [hangout] Re: Paid DOE Security Deployment Internship Job Description
  69. 2005-01-30 From: "Steve Milo" <slavik914-at-mrbrklyn.com> Re: [hangout] Future might be looking brighter
  70. 2005-01-30 Ron Guerin <ron-at-vnetworx.net> Re: [hangout] Future might be looking brighter
  71. 2005-01-30 From: "Steve Milo" <slavik914-at-mrbrklyn.com> Re: [hangout] January 30, Sunday, Kings Games. Is anybody or everybody going to be there?
  72. 2005-01-30 From: "P.Robert Marino" <rob-at-concord-hs.org> Re: [hangout] Re: Paid DOE Security Deployment Internship Job Description
  73. 2005-01-30 From: "rc" <ray-pub-at-rcn.com> Subject: [hangout] classes
  74. 2005-01-30 swd <sderrick-at-optonline.net> Subject: [hangout] January 30, Sunday, Kings Games. Is anybody or everybody going to be
  75. 2005-01-30 From: "Steve Milo" <slavik914-at-mrbrklyn.com> Subject: [hangout] Tax that funded the Spano-American war could be extended
  76. 2005-01-30 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [hangout] We should Celebrate!
  77. 2005-01-31 From: "Martin, Jared" <JMartin-at-dglaw.com> Fw: [hangout] [visham-at-proexam.org: I will like to Register/And I will also like to lern more about this class]

NYLXS are Do'ers and the first step of Doing is Joining! Join NYLXS and make a difference in your community today!