Sponsored Content
Top Forums Programming When to define functions in C? Post 302895239 by fpmurphy on Saturday 29th of March 2014 11:13:30 PM
Old 03-30-2014
In that case, partition your code into a number of source files according to functional area. Create headers (files) corresponding to the functions defined in each source file.

Include the appropriate header in a source file if you need to use a function defined in another source file.
 

8 More Discussions You Might Find Interesting

1. Programming

mysterious #define

in the header file orville.h, outside of the #ifdef #endif , there is the following #define JOB_CONTROL /* support job-control */ As you can see, the JOB_CONTROL macro has no value associated with it. Here is what I go when I ran grep on the entire source code. $ grep -iR... (6 Replies)
Discussion started by: frequency8
6 Replies

2. UNIX for Dummies Questions & Answers

#define in perl

Hi friends, I am not sure if perl questions can be raised here. :rolleyes: But I have a doubt if there is a way to do "#define" in perl, like in C. Does anyone know if it is feasible (without CPAN modules)? Thanks, Srini (7 Replies)
Discussion started by: srinivasan_85
7 Replies

3. Programming

#define

Hello, I would like to conditionaly comment in my code source some fields from arrays. So I use the property ## from the #define definition. my code: ... #define slet /##* #define etsl *##/ ... const T_SVT_ADLL_A653_DESC A_DESC = { { slet qwerty etsl SLICING,... (3 Replies)
Discussion started by: cypleen
3 Replies

4. Programming

help with #define in C

if i do this in C #define NUM 1234512345 then how come i cant print it out using int main(int argc, char **argv) { printf("%d\n", NUM); return 0; } well the result is -1219236538, why isnt it 1234512345 ? (7 Replies)
Discussion started by: omega666
7 Replies

5. Programming

#define in c

Hi, I had a head file, looks like #define MIN_NUM 10 #define MAX_NUM 10 is there any way to get "MAX_NUM" from 10? thanks. peter (9 Replies)
Discussion started by: laopi
9 Replies

6. Shell Programming and Scripting

How to execute functions or initiate functions as command line parameters for below requirement?

I have 7 functions those need to be executed as command line inputs, I tried with below code it’s not executing function. If I run the ./script 2 then fun2 should execute , how to initiate that function I tried case and if else also, how to initiate function from command line if then... (8 Replies)
Discussion started by: saku
8 Replies

7. Shell Programming and Scripting

Define variable from file.

HI I have file A.txt _1A _2A _3A _4A I want define all as different variable. $1A=_1A $2B=_2A $3C=_3A $4D=_4A Now i can use any variable in my script. (3 Replies)
Discussion started by: pareshkp
3 Replies

8. Shell Programming and Scripting

Define Variables

Hi, I just define the variable in script and use those script in another script but the variable not recognize. test1.sh #!/bin/bash DB="test_db" USR="test_user" PWD="test_pwd" HST="24.254.87.12" test2.sh #!/bin/bash ./test1.sh mysql -u $USR -p $PWD -h $HST... (2 Replies)
Discussion started by: fspalero
2 Replies
DwtFetchInterfaceModule(3Dwt)											     DwtFetchInterfaceModule(3Dwt)

Name
       DwtFetchInterfaceModule - Fetches all the widgets defined in an interface module in the UID hierarchy.

Syntax
       #include <X11/DwtAppl.h>
       Cardinal DwtFetchInterfaceModule(hierarchy_id, module_name,
					parent_widget, widget_return)
	    DRMHierarchy hierarchy_id;
	    char *module_name;
	    Widget parent_widget;
	    Widget *widget_return;

Arguments
       hierarchy_id
		 Specifies  the  ID of the UID hierarchy that contains the interface definition.  The hierarchy_id was returned in a previous call
		 to DwtOpenHierarchy.

       module_name
		 Specifies the name of the interface module, which you specified in the UIL module header.  By convention,  this  is  usually  the
		 generic name of the application.

       parent_widget
		 Specifies the parent widget ID for the topmost widgets being fetched from the module.	The topmost widgets are those that have no
		 parents specified in the UIL module.  The parent widget is usually the top-level widget returned by XtInitialize.

       widget_return
		 Returns the widget ID for the last main window widget encountered in the UIL module, or NULL if no main window widget is found.

Description
       The DwtFetchInterfaceModule function fetches all the widgets defined in a UIL module in the UID hierarchy.  Typically, each application has
       one  or	more  modules  that  define  its interface.  Each must be fetched in order to initialize all the widgets the application requires.
       Applications do not need to define all their widgets in a single module.

       If the module defines a main window widget, DwtFetchInterfaceModule returns its widget ID.  If no main window widget is	contained  in  the
       module, DwtFetchInterfaceModule returns NULL and no widgets are realized.

       The application can obtain the IDs of widgets other than the main window widget by using creation callbacks.

Return Values
       This function returns one of these status return constants:

       DRMSuccess	 The   function   executed
			 successfully.
       DRMFailure	 The function failed.
       DRMNotFound	 The interface	module	or
			 topmost widget not found.

														     DwtFetchInterfaceModule(3Dwt)
All times are GMT -4. The time now is 08:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy