Sponsored Content
Top Forums Programming C program to display a busy symbol while processing Post 302634949 by Corona688 on Friday 4th of May 2012 03:52:58 AM
Old 05-04-2012
Quote:
Originally Posted by royalibrahim
Hi Corona688, why the variable 'pos' needs to be a char data type?
It doesn't.

I think you didn't make your int static; static locals act like globals, they only get initialized once and keep their values between different function calls. Without static, the variable would be brand-new every time, forgetting its value and starting over at zero.
This User Gave Thanks to Corona688 For This Post:
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Display a Graphic from a Unix program on a Pc – how?

An interesting puzzle. I run character based compiled C-Programs in a Unix environment on PCs in a Window. I want to be able to call up and display in a separate window a picture of a product called by a Unix shell script from within my Unix program. Ideally I would like to have a script that... (4 Replies)
Discussion started by: Barry Staples
4 Replies

2. UNIX for Dummies Questions & Answers

Parallel processing using AWK program

Hi All, could any expert tell me about writing a parallel processing program using AWK program is possible or not? Any example would be much appreciated... With Regards / Mysore Ganapati :confused: (5 Replies)
Discussion started by: ganapati
5 Replies

3. Linux

Reading ELF file Symbol table of C++ program

Folks, I have some program(Test.cpp) as follows, #include<iostream> class Abc { private: int _theVar; public : int printVar(); }; int Abc :: printVar() { _theVar=10; } main() { Abc _t; (0 Replies)
Discussion started by: vinod_chitrali
0 Replies

4. Programming

Reading ELF file Symbol table of C++ program

Folks, I have some program(Test.cpp) as follows, #include<iostream> class Abc { private: int _theVar; public : int printVar(); }; int Abc :: printVar() { _theVar=10; } main() { Abc _t; (2 Replies)
Discussion started by: vinod_chitrali
2 Replies

5. UNIX for Advanced & Expert Users

Filesystem mystery: disks are not busy on one machine, very busy on a similar box

Hi, We have a filesystem mystery on our hands. Given: 2 machines, A and Aa. Machine Aa is the problem machine. Machine A is running Ubuntu, kernel 2.6.22.9 #1 SMP Wed Feb 20 08:46:16 CST 2008 x86_64 GNU/Linux. Machine Aa is running RHEL5.3, kernel 2.6.18-128.el5 #1 SMP Wed Dec 17 11:41:38... (2 Replies)
Discussion started by: mschwage
2 Replies

6. Programming

Symbol table of a C program

Hi, is there any command to see symbol table info. will it show where its allocating memory for varibales golbals & locals and code.(i mean the segments). i read there is a section called read only data segment and this is where initialized data such as strings stores. i have wriiten the... (7 Replies)
Discussion started by: MrUser
7 Replies

7. Solaris

/usr/lib/passwdutil.so.1: symbol __nsl_fgetspent_r: referenced symbol not found

deleteing post (0 Replies)
Discussion started by: dshakey
0 Replies

8. Programming

To display unique lines in a Program

I am new to C programming. I have been trying to display unique lines in a file from past two days. The problem is here, I have a file whose contents are, ras.beamtele.net ras.beamtele.net ras.beamtele.net ras.beamtele.net ras.beamtele.net ras.beamtele.net ras.beamtele.net... (1 Reply)
Discussion started by: Teju88
1 Replies

9. Shell Programming and Scripting

Output Display in a perl program

Hi All, I have created a sample perl program in one of the unix environment as below #!/usr/bin/perl print "Content-type: text/html\n\n"; print "<H1>Hello World</H1>"; When I execute it in unix, I get the below Content-type: text/html <H1>Hello World</H1> However, when I... (1 Reply)
Discussion started by: mr_manii
1 Replies
SXPM(1) 						      General Commands Manual							   SXPM(1)

NAME
sxpm - Show an XPM (X PixMap) file and/or convert XPM 1 or 2 files to XPM 3. SYNOPSIS
sxpm [-d displayname] [-g geometry] [-hints] [-icon filename] [-plaid | filename | -] [-o filename | -o -] [-pcmap] [-closecolors] [-nod] [-nom] [-mono | -grey4 | -grey | -color] [-sc symbol color] [-sp symbol pixel] [-cp color pixel] [-rgb filename] [-v] DESCRIPTION
The sxpm program can be used to view any XPM (version 1, 2, or 3) file and/or to convert a file from XPM1 or XPM2 to XPM version 3. If sxpm is run with any dummy option specified, the usage is displayed. If no geometry is specified, the show window will have the size of the read pixmap. Pressing the key Q in the window will quit the program. OPTIONS
-d display Specifies the display to connect to. -g geom Window geometry (default is pixmap's size). -hints Set ResizeInc for window. -icon filename Set icon to pixmap created from the file filename. -plaid Show the plaid pixmap which is stored as data. filename Read from the file filename and from standard input if filename is '-'. If no input is specified sxpm reads from standard input. -o filename Write to the file filename (overwrite if it already exists) and to standard output if filename is '-'. -mono Use the colors specified for a monochrome visual. -grey4 Use the colors specified for a 4 color greyscale visual. -grey Use the colors specified for a greyscale visual. -color Use the colors specified for a color visual. -pcmap Use a private colormap. -closecolors Try to use "close colors" before reverting to other visuals. -nod Do not display the pixmap in a window. (Useful when using as converter) -nom Do not use the clipmask if there is any. -sc symbol colorname Override default color to symbol to colorname. -sp symbol pixelvalue Override default color to symbol to pixelvalue. -cp colorname pixelvalue Override default color to colorname to pixelvalue. -rgb filename Search color names in the file filename and write them out instead of the rgb values. -v Verbose - to print out extensions (stderr). KNOWN BUGS
Some window managers may not accept a pixmap which is not a bitmap as icon because this does not respect ICCCM, many of the well known ones will accept it though. AUTHOR
Arnaud Le Hors (lehors@sophia.inria.fr) Bull Research France Copyright (C) 1989-95 by Groupe Bull. X Version 11 libXpm 3.5.10 SXPM(1)
All times are GMT -4. The time now is 10:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy