utils.c File Reference

#include <string.h>
#include <stdlib.h>
#include "global.h"

Include dependency graph for utils.c:

Go to the source code of this file.

Functions

void DisableWindowResize (Widget w)
void bell (int volume)
char * concat (char *s1, char *s2)


Function Documentation

void bell ( int  volume  ) 

Definition at line 64 of file utils.c.

References toplevel.

00066 {
00067     XBell(XtDisplay(toplevel), volume);
00068 }

char* concat ( char *  s1,
char *  s2 
)

Definition at line 72 of file utils.c.

References NULL.

00074 {
00075     if (s2) {
00076         if (s1 == NULL) {
00077             s1 = XtMalloc((Cardinal) (strlen(s2)+1)*sizeof(char));
00078             strcpy(s1, s2);
00079         }
00080         else {
00081             s1 = XtRealloc(s1, (Cardinal) strlen(s1)+strlen(s2)+2);
00082             strcat(s1, s2);
00083         }
00084     }
00085 #if 0   /*(PW)4DEC90 : bug ! if s2 is null, there is no reason to set s1 to 0 */
00086     else
00087         s1 = NULL;
00088 #endif
00089     return (s1);
00090 }

void DisableWindowResize ( Widget  w  ) 

Definition at line 50 of file utils.c.

References args, height, MAXARGS, n, XawPanedAllowResize(), and XawPanedSetMinMax().

00051 {
00052     Arg args[MAXARGS];
00053     Cardinal n;
00054     Dimension height;
00055 
00056     n = 0;
00057     XtSetArg(args[n], XtNheight, &height);                       n++;
00058     XtGetValues(w, args, n);
00059     XawPanedSetMinMax(w,(int) height, (int) height);
00060     XawPanedAllowResize(w, False);
00061 }

Here is the call graph for this function:


Generated on Sun Mar 4 16:05:54 2007 for Scilab [trunk] by  doxygen 1.5.1