Sponsored Content
Full Discussion: Xlib help - Array of Structs
Homework and Emergencies Homework & Coursework Questions Xlib help - Array of Structs Post 302744463 by Corona688 on Friday 14th of December 2012 10:47:59 AM
Old 12-14-2012
Thank you for completely answering the homework template.

Please use code tags, like [code] stuff [/code] to post code. This preserves indentation in your code, makes it clear where code begins and ends, and prevents random things from turning into smilies.

I see a typo in some of your code. dimy vs dimY. Except for that, your 'assign by value' code actually worked -- so I suspect there's something else wrong in code you didn't post. Please post your complete program.

Also, the only time you can assign whole blocks of memory with { ... } is when the variable is being declared -- so you could do this:

Code:
typedef struct _blocks {
    int X, Y ,dimX, dimY;
} str_blocks;

int main()
{
        str_blocks blocks[3]={
                {50, 50, 150, 20},
                {200, 50, 150, 20},
                {300, 150, 150, 20},
        };

}

 

10 More Discussions You Might Find Interesting

1. Programming

pipes + structs

heya got a small problem here. im trying to pipe eg: 'ls | more'. i have created a command line parser which separates ls and more into two commands. i have also created a struct, each struct has a command name, number of arguments, redirect_in, redirect_out, pipe_in, etc etc.... eg: struct... (0 Replies)
Discussion started by: mile1982
0 Replies

2. UNIX for Advanced & Expert Users

xlib error

Hello! Im running tight VNC on Red Hat Enterprise Linux 4.0. How can I increase the number of X clients that I can run in a VNC session?I need to run aproximately 500 programs in one VNC session, but at this time I can only 236 -> i've tryed to launch 250 xclock's in background and when it... (3 Replies)
Discussion started by: karpoand
3 Replies

3. UNIX and Linux Applications

vncserver xlib error

Hello! Im running tight VNC on Red Hat Enterprise Linux 4.0. How can I increase the number of X clients that I can run in a VNC session?I need to run aproximately 500 programs in one VNC session, but at this time I can only 236 -> i've tryed to launch 250 xclock's in background and when it... (0 Replies)
Discussion started by: karpoand
0 Replies

4. Programming

problems with drawing in x using xlib

Hi all, I'm currently learning xlib and I've encountered a bizarre mistake: function calls such as XDrawPoint, XDrawLine, etc., don't seem to work; a blank window with nothing in is appears. I believe this has something to do with the window manager I use, fluxbox. After checking the code and... (0 Replies)
Discussion started by: hydronium
0 Replies

5. Programming

Xlib simple program.

I don't know if it is right to ask you this. Can someone help me write a simple Xlib program,with button on it,and all that button do is switch 2 messages. I have tried and tried,but never get past Hello World. Can someone help me please? ---------- Post updated at 10:17 PM ---------- Previous... (2 Replies)
Discussion started by: megane16v
2 Replies

6. UNIX for Dummies Questions & Answers

Xlib Errors

Hi, I am handling user issues in my team. Users have their Unix session running on Citrix MFU. Recently, I was suppose to address a user issue which is as below: Gets the below error when tries to open nedit: Xlib: connection to ":165.0" refused by server Xlib: Client is not... (1 Reply)
Discussion started by: mspatil0037
1 Replies

7. Programming

[solved]help passing array of structs to function in c

this is my code to try and prinnt out a deck of cards. the print function worked when used inside main without being a function but now i cant get it to work as a function probably since i dont know how to pass a struct array in c. I gave it a shot but i keep getting an assortment of errors. The... (0 Replies)
Discussion started by: bjhum33
0 Replies

8. UNIX for Advanced & Expert Users

xlib and keyboard events

1. If there's some better place where xlib experts hang out, please tell me. Despite an assiduous search, I could not find an xlib reflector. 2. My actual question: In an xterm, I want to grab and process all keyboard events in a program running inside the xterm. For example, with my program... (5 Replies)
Discussion started by: N7DR
5 Replies

9. Programming

Xlib help - Array of Structs

Hey guys! First of all english is not my main language so sorry for any english mistakes. Second im a total beginner in programming, still i have a school work to do and i found a problem. Probably something easy to solve but it's driving me crazy. So i created a struct, that holds 4 ints: ... (1 Reply)
Discussion started by: Spiritvs
1 Replies

10. Programming

Xlib registering

hey, Im new to the linux world. Lately, I have tried to create a glx window with xlib, making it a popup window(fullscreen) so I set override_redirect to true. Im happy with the removed borders, but apparantly, the application doesnt show up in the left bar in ubuntu, neither when I press alt... (4 Replies)
Discussion started by: thedardanius
4 Replies
g3tolj(1)						       mgetty+sendfax manual							 g3tolj(1)

NAME
g3tolj - converts a Group 3 fax file into a printable HP-PCL file SYNOPSIS
g3tolj [-kludge] [-reversebits] [-scale N] [-aspect N] [-resolution 75|100|150|300] [-compress 0|1|2] [-pagelength N] [-duplength N] [g3file] DESCRIPTION
Reads a Group 3 fax file (raw or digifax) as input. If no filename is given, stdin is used. Produces a printable HP-PCL file as output. OPTIONS
-kludge Tells g3tolj to skip the first lines for synchronisation. -reversebits Tells g3tolj to interpret bits least-significant first, instead of the default most-significant first. Apparently some fax modems do it one way and others do it the other way. If you get a whole bunch of "invalid code" messages, try using this flag. -scale N Scale the output to match the printer resolution and paper size, the default of 1.40 will do in most cases. -aspect N Scale the output to match the printer resolution and paper size, the default of 1.0 will do for high resolution faxes, 2.0 will do for low resolution faxes. -resolution 75|100|150|300 Selects print resolution. The default is 300. -compress 0|1|2 Selects compression method for the print output. 0 = none, 1 = rll, 2 = tiff. The default is 0. -pagelength N Defines the pagelength in inches, the default is 10.95. After this length a pagebreak is generated and the last part of the previous page is duplicated on the next page -duplength N Defines the length in inches that will be duplicated after a pagebreak, The default is 0.7. REFERENCES
The standard for Group 3 fax is defined in CCITT Recommendation T.4. BUGS
Please report bugs to chel@vangennip.nl SEE ALSO
pbmtog3(1), pbm(5), g3cat(1), sendfax(8), mgetty(1) AUTHOR
g3tolj is Copyright (C) 1994 by Chel van Gennip, <chel@vangennip.nl>. Sources of g3topbm and pbmtolj programs in Jef Poskanzers pbmplus package have been used, but al lot of code has been changed or added to simplify its use for printing faxes. Value added: low use of mem- ory, fast scaling, printing of long faxes with page breaks, print file compression (by John Watson) Chel 22 may 94 g3tolj(1)
All times are GMT -4. The time now is 02:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy