Sponsored Content
Full Discussion: What am I doing wrong!!!
Top Forums Programming What am I doing wrong!!! Post 302203615 by WelshDave on Monday 9th of June 2008 11:10:00 AM
Old 06-09-2008
ok

Yeah I guessed there was some kind of dissconnect between the funtions. So how do I fix it? The variables where declared in function main btw. And I passed them by address so there values where changed in main as they where processed in function prompt(); however, thay are not the variables I am having trouble with. Its the FILE ** that are messing up. Anyhelp please?!

Dave
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

What am I doing wrong

When I execute following shell script I am getting the following error syntax error at line 50 : `<<' unmatched What am I doing wrong :confused: Script begins here ---------------- MPAN_FILE=$1 exec 3<$MPAN_FILE ... (2 Replies)
Discussion started by: guptan
2 Replies

2. UNIX for Dummies Questions & Answers

Please tell me what do I do wrong here!

#!/usr/bin/csh # DAY=`date +%y%m%d` H=`date +%H` M=`date +%M` mailx -s "$H-Myfile" email@email.com</home/mydir/myfile Thanks! (4 Replies)
Discussion started by: bobo
4 Replies

3. Shell Programming and Scripting

Anything wrong with this

Does anyone see anything wrong with this. #getInfraFiles() #{ # cd Infra/$DAY # rm * # /usr/bin/ftp -i -n $LINE << cmd # user "$USER" "$PASSWD" # cd $INFRAPATH # binary # mget * # bye #} besides that its commented out (4 Replies)
Discussion started by: rcunn87
4 Replies

4. UNIX for Dummies Questions & Answers

what is wrong here

Hello, I have a simple script such as ----------------------------- #! /bin/sh YEAR=`date -u +%Y`; MONTH=`date -u +%m`; DAY=`date -u +%d`; DATE=$MONTH$DAY$YEAR LOGFILES=auditTrail-$DATE LOGMATCH=$LOGFILES\* ARGUM='' # find all files and write them to a file find . -name... (7 Replies)
Discussion started by: arushunter
7 Replies

5. UNIX for Dummies Questions & Answers

What am I doing wrong?

I really just mess around in UNIX, for the most part, when I want to get something done. I can usually piece things together by searching for brief how-to's on Google, but the syntax errors in my following .sh file are really confusing me. I've got lots of programming experience in other places, so... (7 Replies)
Discussion started by: demonpants
7 Replies

6. UNIX for Dummies Questions & Answers

what is wrong with this tr -d?

here is my command in bash shell on Mac OS X tiger: history | tr -d emacs here is what I get: hitory | grp "" | tr -d "" hitory | grp "" | tr -d """" hitory | grp "" | tr -d '' hitory | grp "" | tr -d '' hitory | grp "" | tr -d '' hitory | grp "" | tr -d... (3 Replies)
Discussion started by: cleansing_flame
3 Replies

7. Shell Programming and Scripting

what I m doing wrong?

when user select option 2 nothing happen.for testing purpose I put echo command but is not executing . basically when user prompt for option 2,I want to get list of database name from user separeted by space (TEST DEVL) and put into the file seprated by new line TEST DEVL after that stay on... (1 Reply)
Discussion started by: okreporthai
1 Replies

8. UNIX for Dummies Questions & Answers

What is wrong in here ???

]#PATH=/usr/bin:/etc:/bin:/boot/grub:/boot/grup/bin: /boot/solaris/bin:/sbin:/usr/openwin/bin:/usr/5bin://usr/X11/bin:/usr/apache/bin:/usr/apache2/bin:/usr/appserver/bin:... (9 Replies)
Discussion started by: microbot
9 Replies

9. UNIX for Advanced & Expert Users

What am I doing wrong here?

I am working on a simple login ID check shell script that should prompt for a user ID then check to see if this user is logged on. Trying to get the hang of this stuff so I am thinking of my own little projects. #! /bin/sh echo "please enter a user name" read user if user=$user then... (3 Replies)
Discussion started by: jsk319342
3 Replies

10. Shell Programming and Scripting

Why result is wrong here ? whether break statement is wrong ?

Hi ! all I am just trying to check range in my datafile pls tell me why its resulting wrong admin@IEEE:~/Desktop$ cat test.txt 0 28.4 5 28.4 10 28.4 15 28.5 20 28.5 25 28.6 30 28.6 35 28.7 40 28.7 45 28.7 50 28.8 55 28.8 60 28.8 65 28.1... (2 Replies)
Discussion started by: Akshay Hegde
2 Replies
acquire_bitmap(3alleg4) 					  Allegro manual					   acquire_bitmap(3alleg4)

NAME
acquire_bitmap - Locks the bitmap before drawing onto it. Allegro game programming library. SYNOPSIS
#include <allegro.h> void acquire_bitmap(BITMAP *bmp); DESCRIPTION
Acquires the specified video bitmap prior to drawing onto it. You never need to call the function explicitly as it is low level, and will only give you a speed up if you know what you are doing. Using it wrongly may cause slowdown, or even lock up your program. Note: You do never need to use acquire_bitmap on a memory bitmap, i.e. a normal bitmap created with create_bitmap. It will simply do noth- ing in that case. It still can be useful, because e.g. under the current DirectDraw driver of Allegro, most drawing functions need to lock a video bitmap before drawing to it. But doing this is very slow, so you will get much better performance if you acquire the screen just once at the start of your main redraw function, then call multiple drawing operations which need the bitmap locked, and only release it when done. Multiple acquire calls may be nested, but you must make sure to match up the acquire_bitmap and release_bitmap calls. Be warned that DirectX and X11 programs activate a mutex lock whenever a surface is locked, which prevents them from getting any input messages, so you must be sure to release all your bitmaps before using any timer, keyboard, or other non-graphics routines! Note that if you are using hardware accelerated VRAM->VRAM functions, you should not call acquire_bitmap(). Such functions need an unlocked target bitmap under DirectX, so there is now just the opposite case from before - if the bitmap is already locked with acquire_bitmap, the drawing operation has to unlock it. Note: For backwards compatibility, the unlocking behavior of such functions is permanent. That is, if you call acquire_bitmap first, then call e.g. an accelerated blit, the DirectX bitmap will be unlocked internally (it won't affect the nesting counter of acquire/release calls). There is no clear cross-platform way in this Allegro version to know which drawing operations need a locked/unlocked state. For example a normal rectfill most probably is accelerated under DirectX, and therefore needs the screen unlocked, but an XOR rectfill, or one with blending activated, most probably is not, and therefore locks the screen. And while the DirectX driver will do automatic unlocking, there is no such thing under X11, where the function is used to synchronize X11 calls from different threads. Your best bet is to never use acquire_bitmap - changes are you are doing something in the wrong way if you think you need it. Warning: This function can be very dangerous to use, since the whole program may get locked while the bitmap is locked. So the lock should only be held for a short time, and you should not call anything but drawing operations onto the locked video bitmap while a lock is in place. Especially don't call things like show_mouse (or scare_mouse which calls that) or readkey, since it will most likely deadlock your entire program. SEE ALSO
release_bitmap(3alleg4), acquire_screen(3alleg4), release_screen(3alleg4), ex3buf(3alleg4), exaccel(3alleg4), expat(3alleg4), exquat(3alleg4), exscroll(3alleg4), exswitch(3alleg4), exupdate(3alleg4) Allegro version 4.4.2 acquire_bitmap(3alleg4)
All times are GMT -4. The time now is 03:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy