Search Results

Search: Posts Made By: Azrael
27,627
Posted By bakunin
As an AIX SysAdmin for the last ~30 years i can...
As an AIX SysAdmin for the last ~30 years i can tell you: nothing is even "close to AIX". Sorry to say that but to learn AIX you need AIX, nothing else. The best (and cheapest) you may try is to buy...
Forum: Programming 02-20-2019
2,227
Posted By Corona688
main and getopt aren't variadic, they're...
main and getopt aren't variadic, they're array-based.

So one solution could be converting the variadic arguments into an array.

#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
...
579
Posted By Don Cragun
The thread title of this thread has been changed...
The thread title of this thread has been changed from "Listing files ftom Octobre 4th is not accurate" to "Listing files from October 4th is not accurate" hoping to make searches for similar threads...
Forum: What is on Your Mind? 10-08-2018
1,053
Posted By Neo
EdX - Founded by Harvard University and MIT in 2012
Is anyone actively learning, auditing or participating (for credit) at edX (https://www.edx.org/)?




There are some really great science and engineering programs there and they are all free to...
594
Posted By RudiC
Welcome to the forum. Please DON'T hijack...
Welcome to the forum.


Please DON'T hijack others' threads, but open your own for your (new) questions. I did this for you with this post.
Forum: Programming 09-17-2018
1,367
Posted By Corona688
You have to follow the method I showed...
You have to follow the method I showed to-the-letter. (*arr[a][b])[c] is not the same as (*arr)[a][b][c].

void arrbyptr(int (*ptr[2][2])[2]) {
int result, i, j, k;
for ( i = 0; i <...
Forum: Programming 09-16-2018
1,367
Posted By jim mcnamara
Use gdb. We could probably point you to your...
Use gdb. We could probably point you to your problem but you need to learn how to use gdb.
the commands you need are:

compile & debug with
gcc filename.c -Wall -g -o filename
gdb filename...
Forum: Programming 09-12-2018
2,446
Posted By Corona688
Here's how I had to use it: #include...
Here's how I had to use it:

#include <stdio.h>

void arrbyptr(int (*ptr[2][2])[2]) {

printf("[0][0][0]=%d,[0][0][1]=%d,[0][1][0]=%d,[0][1][1]=%d\n",
(*ptr)[0][0][0],...
Forum: Programming 09-03-2018
1,372
Posted By RudiC
Calling random seed repeatedly is sort of...
Calling random seed repeatedly is sort of overdoing it - or, in your case, even counterproductive. Do it once at program startup - if at all necessary as the compiler / interpreter may do it for you....
Forum: Programming 08-21-2018
1,547
Posted By Don Cragun
The POSIX standard requires that type char in the...
The POSIX standard requires that type char in the C language must be an 8-bit type. The C Standard doesn't specify whether type char is signed or unsigned. So the range of values that can be...
Forum: Programming 08-20-2018
1,547
Posted By Corona688
for (j = 0; j < data[INPUT_BUFF]; j++){ This is...
for (j = 0; j < data[INPUT_BUFF]; j++){ This is wrong.

for (j = 0; data[j] != 0; j++){ This is probably what you want.

switch(data[j]){
case 0:
...
case 1:
...
case...
Forum: Programming 08-16-2018
1,513
Posted By Corona688
int * isn't enough information for C to know what...
int * isn't enough information for C to know what kind of array is being pointed to. That assumes a single integer or 1D array.

int *matrix[size][size] does not make pointers to 2d arrays -- it...
Forum: Programming 08-07-2018
3,950
Posted By Corona688
That it compiled without errors only means your...
That it compiled without errors only means your program is correct grammatically, the same way "my hovercraft is full of eels" will pass a grammar check but not help Belgians communicate with...
Forum: Programming 08-07-2018
3,950
Posted By RudiC
Did you consider making c a pointer to int array?
Did you consider making c a pointer to int array?
Forum: Programming 08-26-2016
3,923
Posted By Corona688
I do think you're on the right track, or a right...
I do think you're on the right track, or a right track, there being more than one way to skin a cat.

Sorry, I got turned around. curl handles the outgoing request, not the incoming one. You'd...
Forum: Programming 08-25-2016
3,923
Posted By Corona688
There's no "native" one-liners for HTTP in C. C...
There's no "native" one-liners for HTTP in C. C doesn't handle files natively, let alone HTTP. This lack of dependencies is why you can write kernels in it -- and write entire languages like ruby,...
Forum: Programming 08-23-2016
3,923
Posted By Corona688
You might also consider running a complete proxy...
You might also consider running a complete proxy such as tinyproxy.
Forum: Programming 07-19-2016
3,738
Posted By Corona688
You forgot to include stdio.h for printf, etc,...
You forgot to include stdio.h for printf, etc, which is a crash-causing error in 64-bit programs.

Most major problem:

char *strip;

...

strcpy(strip,buf);

You use strip without giving...
Forum: Programming 07-03-2016
8,057
Posted By Don Cragun
The man page for the regcomp utility (try man 1...
The man page for the regcomp utility (try man 1 regcomp) on your system should tell you everything you need to know. If you get back something similar to:
No entry for regcomp in section 1 of the...
Forum: Programming 07-03-2016
8,057
Posted By Don Cragun
You're very close... In the line: ...
You're very close... In the line:
if(regcomp(&re , newhold, REG_NOMATCH) != 0 ){
REG_NOMATCH is a defined to be a return code for regexec() indicating that it did not find a match; it is not...
Forum: Programming 07-03-2016
8,057
Posted By jim mcnamara
Take the contents of the string variable...
Take the contents of the string variable (newhold) you constructed, print it, and try it as a pattern for grep as a console command. You also need to check the return code from regexec in case...
Forum: Programming 07-03-2016
8,057
Posted By jim mcnamara
You can "statically" pre-compile to a text file:...
You can "statically" pre-compile to a text file: use the regcomp command - not a C call. It creates the compiled buffer you need in a file. I typically use maybe a dozen of ptr-compiles in a simple...
Forum: Programming 07-02-2016
8,057
Posted By RudiC
If you don't need too many different regexes but...
If you don't need too many different regexes but could repeatedly (re)use a handful of them on many different strings, compile each of them once into a new pattern buffer, and run all the...
Forum: Programming 07-01-2016
8,057
Posted By jim mcnamara
There are two basic sets of pattern matching:...
There are two basic sets of pattern matching: files and strings

fnmatch() is used to match wildcards like ? and * in file name patterns.
regcomp(), regexec(), regfree() are called in that order...
Forum: Programming 07-01-2016
8,057
Posted By RudiC
Looking at strstr's man page, I can't see it...
Looking at strstr's man page, I can't see it would accept any wildcard char nor regex. So you might need to build you own grep routine?
Showing results 1 to 25 of 67

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