Sponsored Content
Top Forums Programming Separating template implementation from declaration Post 302769540 by DGPickett on Tuesday 12th of February 2013 03:14:38 PM
Old 02-12-2013
include infinite loop?
 

10 More Discussions You Might Find Interesting

1. Programming

Variable declaration

what does this mean when a variable is declared as register int i; Thanks. :confused: (2 Replies)
Discussion started by: laila63
2 Replies

2. Programming

separating commands

hey there well i have a small problem with my code. when for example : " /bin/sleep 10 & ls -l mila > xyz " is entered, the program is supposed to separate the two commands 1) /bin/sleep 10 & and 2) ls -l mila > xyz. im not sure of how to achieve this. my current program stores both commands... (2 Replies)
Discussion started by: mile1982
2 Replies

3. Shell Programming and Scripting

separating fields

Hi, i have a file as follows: jonathan:bonus1,bonus2 gerald:bonus1 patrick:bonus1,bonus2 My desired output is jonathan:bonus1 jonathan:bonus2 gerald:bonus1 patrick:bonus1 patrick:bonus2 my current code is cat $F | awk -F"" how should i continue the code? Can i do something... (5 Replies)
Discussion started by: new2ss
5 Replies

4. Shell Programming and Scripting

Help with variable declaration

I declared a variable x that gets the count(*) from a table. The table name is also defined as a variable. What's wrong with this statment : X=” select count(*) from ${table_name}“ then y = `${X}${table_name}' echo ${y} It throws an error saying count not found. Please... (1 Reply)
Discussion started by: dsravan
1 Replies

5. Shell Programming and Scripting

variable declaration

Hi Guys, What does this mean actually ? Can somebody give me any explanation ? x=${x:=1} Thanks (2 Replies)
Discussion started by: amit.behera
2 Replies

6. Shell Programming and Scripting

Separating fields

Hi, I have a text file in following format: 2.45 5.67 6.43 I have to cut the values before decimal and store them in a file. So the output file should look like: 2 5 6 . . and so on... Can someone suggest me a sed/awk command for doing this? (2 Replies)
Discussion started by: sajal.bhatia
2 Replies

7. Shell Programming and Scripting

separating folders

I have folder like main. inside main folder there are subfolders & files like main1 main2 main3, file1, file2, file3. I want folders main1 & main2, file1, file2 from main folder. copy them into new folder. Please suggest me how to do it. I am new to shell programming (2 Replies)
Discussion started by: ypremcha
2 Replies

8. Programming

DIR declaration

are you suppose to only use one DIR declarations, for example DIR *dir_ptr; because I'm declaring mine like so: DIR *dir_ptr_src, *dir_ptr_dest; and using it like so: if( ( dir_ptr_src = opendir ( av ) ) != NULL && ( dir_ptr_dest = opendir( av ) ) != NULL ) /* check if... (3 Replies)
Discussion started by: l flipboi l
3 Replies

9. Shell Programming and Scripting

variable declaration

how to check 1. If variable is declared or not 2. If any value if assigned to variable or not. in UNIX shell script (6 Replies)
Discussion started by: ace_friends22
6 Replies

10. Shell Programming and Scripting

awk RS declaration with \n

Hello Team, input text:... (7 Replies)
Discussion started by: chandana.hs
7 Replies
XtAppMainLoop() 														   XtAppMainLoop()

Name
  XtAppMainLoop - continuously process events.

Synopsis
  void XtAppMainLoop(app_context)
	 XtAppContext app_context;

Inputs
  app_context
	    Specifies the application context that identifies the application.

Returns
  XtAppMainLoop() enters an infinite loop and never returns.

Description
  XtAppMainLoop()  enters  an  infinite  loop  which  calls  XtAppNextEvent() to wait for an events on all displays in app_context and XtDis-
  patchEvent() to dispatch that event to the appropriate code.

Usage
  Most applications will call XtAppNextEvent() as the last line of their main() procedure.  Some applications may provide their own  versions
  of  this  loop, however.  A custom event loop might test an application-dependent global flag or other termination condition before looping
  back and calling XtAppNextEvent().  If the number of top-level widgets drops to zero, the application may be able to exit safely, for exam-
  ple.

  Applications that use multiple application contexts or that use internal event loops will have to build their own event loop.

Background
  XtAppNextEvent()  looks  for	X  events in the input queue, and also handles timer events (see XtAppAddTimeOut()) and events from alternate
  input sources (see XtAppAddInput()).	If none of these events are pending and a work	procedure  (see  XtAppAddWorkProc())  is  registered,
  XtAppNextEvent()  invokes  that  work procedure to do background processing, otherwise it blocks waiting for an event.  Note that XtAppNex-
  tEvent() dispatches timer and input events directly, but returns any X events that occur.   Within  XtAppMainLoop(),	these  X  events  are
  always passed to XtDispatchEvent().

  XtDispatchEvent()  dispatches an event to the appropriate event handlers (see XtAddEventHandler()).  Note that the translation manager reg-
  isters an event handler, and that events that are dispatched to the translation manager will be further  dispatched  through	the  transla-
  tions-to-actions mechanism.

Example
  XtAppMainLoop() is implemented as follows:

     void XtAppMainLoop(app)
	     XtAppContext app;
     {
	 XEvent event;

	 for (;;) {
	     XtAppNextEvent(app, &event);
	     XtDispatchEvent(&event);
	 }
     }

See Also
  XtAddEventHandler(1), XtAppAddInput(1), XtAppAddTimeOut(1), XtAppAddWorkProc(1), XtAppNextEvent(1), XtAppProcessEvent(1), XtDis-
  patchEvent(1).

Xt - Event Handling														   XtAppMainLoop()
All times are GMT -4. The time now is 04:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy