🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #2350

Re: pointers to functions, dereferencing, first byte of func

#2350
From: Doug Gwyn
Date: Wed, 30 Jan 1991 20:17
11 lines
885 bytes
In article <1991Jan30.031315.9427@dgbt.doc.ca> don@dgbt.doc.ca (Donald McLachlan) writes:
-char *c;
-extern char func();
-c = func;
-what I had to do to get at the first byte of executable code was ...
-char *c1;
-c1 = &(c[1]);
---c1;		/* should equal c[0] */
-*c1 = char constant.

This seems to me to have nothing to do with Standard C...
Technical Details
Message-ID: <15020@smoke.brl.mil>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!asuvax!ncar!elroy.jpl.nasa.gov!sdd.hp.com!samsung!noose.ecn.purdue.edu!mentor.cc.purdue.edu!purdue!haven!adm!smoke!gwyn
References: <1991Jan30.031315.9427@dgbt.doc.ca>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!asuvax!ncar!elroy.jpl.nasa.gov!sdd.hp.com!samsung!noose.ecn.purdue.edu!mentor.cc.purdue.edu!purdue!haven!adm!smoke!gwyn
From: gwyn@smoke.brl.mil (Doug Gwyn)
Newsgroups: comp.std.c
Subject: Re: pointers to functions, dereferencing, first byte of func
Message-ID: <15020@smoke.brl.mil>
Date: 30 Jan 91 20:17:20 GMT
References: <1991Jan30.031315.9427@dgbt.doc.ca>
Followup-To: comp.lang.c
Organization: U.S. Army Ballistic Research Laboratory, APG, MD.
Lines: 11