Search Results

Search: Posts Made By: bjhum33
Forum: Programming 04-17-2012
1,204
Posted By bjhum33
Help with bit vector and setting its bits?
void shuffle (card_t cards[], card_t cards2[], char *bitvec)
{
int i;
unsigned char temp, r;
srand(time(NULL));
for (i = 0; i < 52; i++)
{
r = rand() % 52;
temp = bitvec[r/8];
if (!(temp &...
Forum: Programming 04-16-2012
2,072
Posted By bjhum33
help with reading a binary file and fseek
this is my code and no matter what record number the user enters i cant get any of the records fields to read into the structure acct. What am i doing wrong?


#include <stdio.h>
typedef struct...
Forum: Programming 04-16-2012
2,092
Posted By bjhum33
[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...
1,511
Posted By bjhum33
maxdepth isnt working for some reason. any other...
maxdepth isnt working for some reason. any other solutions?
1,511
Posted By bjhum33
using find to go directly into a directory location
is there any other useful command to go into a specific directory and not go into its subdirectories that operates similar to find.? (it will return the full pathname?) or is there any way to make...
1,847
Posted By bjhum33
problems with ksh array and find command
set -A allfiles `find $usrhtml -type f`



i am trying to populate this array with the find command. It works fine when find is looking through a single directory but when i add a new...
24,786
Posted By bjhum33
help with sed adding line to end of file
sed '$a\
hello' books

hi i am trying to use sed to append hello to the end of the file books, but for some reason i can't get it work. It keeps sayin command garbled. Anyone know what I'm doing...
3,003
Posted By bjhum33
help with reading command line into array
set -A title
set -A author
count=1
index=0
while [ $count -le $numarg ]
do
read -A ${title[$index]}?"Booktitle: "
read...
1,803
Posted By bjhum33
need help with ksh script errors
#!/bin/ksh
number1="20"
if [ $1 ]
then
number1=$1
fi
number2="1"
while [[ $number2 -lt $number1 -o $number2 -eq $number1 ]]
do
if [[ let "number2 % 3" -eq 0 -a let "number2 %...
Forum: Programming 02-09-2012
1,822
Posted By bjhum33
c programming system call
newPerm = oldPerm & ~0100;

where oldPerm holds the value of st_mode from the system call stat().
When I try and compile every line where ive attempted to do these operations gives the warning...
1,380
Posted By bjhum33
ok i figured it all out thanks alot i really...
ok i figured it all out thanks alot i really appreciate your help

---------- Post updated at 07:01 PM ---------- Previous update was at 06:14 PM ----------

Hi the newPerm = oldPerm | ####; is...
1,380
Posted By bjhum33
so i could do something like int old_perms =...
so i could do something like int old_perms = stat() to set the old perms is what your saying and simply perform the operations you specified?or do i need to use st_mode and further??sorry if im kinda...
1,380
Posted By bjhum33
getting the full permissions of a file
Hi I was wondering if it would be possible to get the full octal permissions of a file by using something in the stat() system call. Can this be done without going through all of the seperate...
2,952
Posted By bjhum33
System calls in UNIX
Hi i am very new to programming in UNIX and don't understand the difference between a system call and a normal function call. Also can I implement system calls from within a program? If so could...
Showing results 1 to 14 of 14

 
All times are GMT -4. The time now is 05:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy