home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.c:12661 comp.unix.questions:10303
- Newsgroups: comp.lang.c,comp.unix.questions
- Path: sparky!uunet!cs.utexas.edu!sdd.hp.com!ux1.cso.uiuc.edu!news.cso.uiuc.edu!murphy!fortony
- From: fortony@sonne.cso.uiuc.edu
- Subject: user-extensible functions under C and UNIX
- Message-ID: <BtErp6.5p3@news.cso.uiuc.edu>
- Originator: fortony@murphy
- Summary: the author wonders how to do something slightly grotesque
- Sender: fortony@sonne.cso.uiuc.edu
- Followup-To: fortony@sonne.cso.uiuc.edu
- Organization: Roue Text and Steel
- Date: Sat, 22 Aug 1992 23:24:40 GMT
- Keywords: unix, ar
- Lines: 35
-
-
- Greets,
-
- I'm trying to write a program which accepts char *functionname
- and then calls the appropriate function, which would be
- contained in blahblah.a. The end result of this would be to
- let users write their own functions, add them to blahblah.a,
- and then call them from within an editor.
-
- Assume that the parameters for all the functions are constant.
- Assume also that the functions can be forced to comply with
- whatever makes this problem easier in terms of naming
- conventions, number per object file, etc.
- Assume also that the editor must not be recompiled or relinked
- with each added function.
-
- Under LISP, this would be reasonably simple. Even under UNIX
- and C, it's reasonably simple iff I write it to be completely
- nonportable (using system() and somesuch). But the trick is
- that I want the solution to be as portably standard-c as possible.
-
- Please don't view this as an attempt to get the net to write
- my code; I'm just wondering if there's a standardly accepted
- way of converting pointer to char into pointer to function
- named by string pointed to by pointer to char.
-
- For the extremely curious, this is part of an attempt to make
- an extensible editor which doesn't rely on an internal language.
-
- Thanks in advance for any posts, e-mails, etc. on the subject.
-
- Felix
- --
- a b c d e f g h i j k l m n o p q r s t u v w x y z
- Felix Sebastian Ortony fortony@murphy.gis.uiuc.edu
-