Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Things in tutorials that don't work. Post 302134889 by arungavali on Tuesday 4th of September 2007 07:56:32 AM
Old 09-04-2007
Things in tutorials that don't work.

I am thankful for this site and for the many links provided. I have been going through one of the tutorials, but as I try some things, they don't seem to work.

I am wondering if there is something I need first before being able to use a tutorial (like version number (HP-UX) or how I am getting to it (Exceed))?

Then, are there specific tutorials written for each particular version?

Any help would be greatly appreciated.
 

9 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

How come sigs don't work?

They appear to be turned on, I entered mine in. The check boxes are all checked. And yet, no sigs? (4 Replies)
Discussion started by: l008com
4 Replies

2. Programming

why printf() function don't go work?

I use FreeBSD,and use signal,like follows: signal(SIGHUP,sig_hup); signal(SIGIO,sig_io); when I run call following code,it can run,but I find a puzzled question,it should print some information,such as printf("execute main()") will print execute main(),but in fact,printf fuction print... (2 Replies)
Discussion started by: konvalo
2 Replies

3. Shell Programming and Scripting

Use variable in sed don't work.

Hi all. I have a script as below: cutmth=`TZ=CST+2160 date +%b` export cutmth echo $cutmth >> date.log sed -n "/$cutmth/$p" alert_sbdev1.log > alert_summ.log My purpose is to run through the alert_sbdev1.log and find the 1st occurence of 'Jan' and send everything after that line to... (4 Replies)
Discussion started by: ahSher
4 Replies

4. Programming

why daytime don't work?

Following code is detecting solaris daytime,when I run it,I can't get any result,code is follows: #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #define BUFFSIZE 150 int main(){ ... (2 Replies)
Discussion started by: konvalo
2 Replies

5. Programming

why printf don't work?

I use Solaris 10, I use following code: #include <signal.h> int main(void){ printf("----------testing-----------"); if(signal(SIGUSR1,sig_usr)==SIG_ERR) err_sys("can't catch SIGUSR1"); for(;;) pause(); sig_user(int signo){ ..... } when I run above code,it print nothing... (3 Replies)
Discussion started by: konvalo
3 Replies

6. HP-UX

awk don't work in hp-ux 11.11

Hello all! I have problem in hp-ux 11.11 in awk I want to grep sar -d 2 1 only 3 column, but have error in awk in hp-ux 11.11 Example: #echo 123 234 | awk '{print $2}' 123 234 The situattions in commands bdf | awk {print $5}' some... In hp-ux 11.31 - OK! How resolve problem (15 Replies)
Discussion started by: ostapv
15 Replies

7. Solaris

Open Terminal Don't work

Hi, I installed solaris 10 x86 on my local system. it was working fine. today when i started the system, it started up without any problem. when i tried to open the terminal it didn't open any terminal. Plz help me (0 Replies)
Discussion started by: malikshahid85
0 Replies

8. Programming

Shell copy command don't work

I want copy Files: But cp don't work: shell_exec("cp ".$pfad." ".$genzone); shell_exec("cp ../Chrysanthemum.jpg ../test"); Whats wrong? (3 Replies)
Discussion started by: Linuxmann
3 Replies

9. Shell Programming and Scripting

Equivalence classes don't work

Hello: I can't get equivalence classes to work in globs or when passing them to tr. If I understood correctly, matches e, é, è, ê, etc. But when using them with utilities like tr they don't work. Here's an example found in the POSIX standard: I decided to create the aforementioned files in... (9 Replies)
Discussion started by: Cacializ
9 Replies
common(3x)						   AfterStep X11 window manager 						common(3x)

NAME
common - common functions used in other examples libAfterImage/tutorials/common.h SYNOPSIS
Generic Xlib related functionality, common for all the tutorials. SEE ALSO
libAfterImage, ASView, ASScale, ASTile, ASMerge, ASGrad, ASFlip, ASText libAfterImage/tutorials/_XA_WM_DELETE_WINDOW NAME_XA_WM_DELETE_WINDOW SYNOPSIS
_XA_WM_DELETE_WINDOW - stores value of X Atom "WM_DELETE_WINDOW". DESCRIPTION
In X all client's top level windows are managed by window manager. That includes moving, resizing, decorating, focusing and closing of windows. Interactions between window manager and client window are governed by ICCCM specification. All the parts of this specification are completely optional, but it is recommended that the following minimum set of hints be supplied for any client window: Window's title(WM_NAME), iconified window title(WM_ICON_NAME), class hint (WM_CLASS) and supported protocols (WM_PROTOCOLS). It is recommended also that WM_DELETE_WINDOW protocol be supported, as otherwise there are no way to safely close client window, but to kill it. All of the above mentioned hints are identified by atoms that have standard preset values, except for WM_DELETE_WINDOW. As the result we need to obtain WM_DELETE_WINDOW atoms ID explicitly. We use _XA_WM_DELETE_WINDOW to store the ID of that atom, so it is accessible anywhere from our application. SOURCE
Atom _XA_WM_DELETE_WINDOW = None; libAfterImage/tutorials/create_top_level_window() NAMEcreate_top_level_window() SYNOPSIS
Window create_top_level_window( ASVisual *asv, Window root, int x, int y, unsigned int width, unsigned int height, unsigned int border_width, unsigned long attr_mask, XSetWindowAttributes *attr, char *app_class ); INPUTS
asv - pointer to valid preinitialized ASVisual structure. root - root window of the screen on which to create window. x, y - desired position of the window width, height - desired window size. border_width - desired initial border width of the window (may not have any effect due to Window Manager intervention. attr_mask - mask of the attributes that has to be set on the window attr - values of the attributes to be set. app_class - title of the application to be used as its window Title and resources class. RETURN VALUE
ID of the created window. DESCRIPTION
create_top_level_window() is autyomating process of creating top level application window. It creates window for specified ASVisual, and then sets up basic ICCCM hints for that window, such as WM_NAME, WM_ICON_NAME, WM_CLASS and WM_PROTOCOLS. SOURCE
Window create_top_level_window( ASVisual *asv, Window root, int x, int y, unsigned int width, unsigned int height, unsigned int border_width, unsigned long attr_mask, XSetWindowAttributes *attr, const char *app_class, const char *app_name ) { Window w = None; #ifndef X_DISPLAY_MISSING char *tmp ; XTextProperty name; XClassHint class1; w = create_visual_window(asv, root, x, y, width, height, border_width, InputOutput, attr_mask, attr ); tmp = (app_name==NULL)?(char*)get_application_name():(char*)app_name; XStringListToTextProperty (&tmp, 1, &name); class1.res_name = tmp; /* for future use */ class1.res_class = (char*)app_class; XSetWMProtocols (asv->dpy, w, &_XA_WM_DELETE_WINDOW, 1); XSetWMProperties (asv->dpy, w, &name, &name, NULL, 0, NULL, NULL, &class1); /* final cleanup */ XFree ((char *) name.value); #endif /* X_DISPLAY_MISSING */ return w; } libAfterImage/tutorials/set_window_background_and_free() NAMEset_window_background_and_free() SYNOPSIS
Pixmap set_window_background_and_free( Window w, Pixmap p ); INPUTS
w - ID of the window background of which we need to set. p - Pixmap to set background to. RETURN VALUE
None on success. Pixmap ID of original Pixmap on failure. DESCRIPTION
set_window_background_and_free() will set window's background to specified Pixmap, Then refresh window contents so that background is drawn by the server, flush all the requests to force it to be sent to server to be processed as fast as possible. NOTES
After Window's background has been set to Pixmap - X server makes hidden copy of this Pixmap for later window refreshing. As the result original Pixmap is no longer needed and can be freed to conserve resources. SOURCE
Pixmap set_window_background_and_free( Window w, Pixmap p ) { #ifndef X_DISPLAY_MISSING if( p != None && w != None ) { Display *dpy = get_default_asvisual()->dpy; if (dpy) { XSetWindowBackgroundPixmap( dpy, w, p ); XClearWindow( dpy, w ); XFlush( dpy ); XFreePixmap( dpy, p ); p = None ; } } #endif /* X_DISPLAY_MISSING */ return p ; } libAfterImage/tutorials/wait_closedown() NAMEwait_closedown() SYNOPSIS
void wait_closedown( Window w ); INPUTS
w - ID of the window from which to wait for events. DESCRIPTION
User action requesting window to be closed is generally received first by Window Manager. Window Manager is then handles it down to the window by sending it ClientMessage event with first 32 bit word of data set to the value of WM_DELETE_WINDOW Atom. Accordingly, all client has to do is wait for such event from X server and, when received, it should destroy its window and generally exit. NOTES
It is recommended that XFlush() is issued right after XDestroyWindow() as Window Manager itself may attempt to do something with the window until it receives DestroyNotify event. SEE ALSO
ICCCM, Window SOURCE
void wait_closedown( Window w ) { #ifndef X_DISPLAY_MISSING Display *dpy = get_default_asvisual()->dpy; if(dpy) { if (w) { XSelectInput (dpy, w, ( StructureNotifyMask | ButtonPressMask| ButtonReleaseMask)); while(w != None) { XEvent event ; XNextEvent (dpy, &event); switch(event.type) { case ClientMessage: if ((event.xclient.format != 32) || (event.xclient.data.l[0] != _XA_WM_DELETE_WINDOW)) break ; case ButtonPress: XDestroyWindow( dpy, w ); XFlush( dpy ); w = None ; break ; } } } XCloseDisplay (dpy); } #endif } 3rd Berkeley Distribution AfterStep v.2.2.11 common(3x)
All times are GMT -4. The time now is 03:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy