12-21-2011
My code doesn't print anything at all, actually. What did you actually do? It looks like you're printing your own stack and environment space.
Stuff read raw out of arbitrary memory is very unlikely to be sensibly printable.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Has anyone had any experience with this new processor and its compatability with Linux/Unix? How did it preform comared to regular Athlons and P4's?
I also have one other question. I plan on buying a new dell and fiddling left and right with it. Which type of RAM is better, RDRAM or... (3 Replies)
Discussion started by: KyPeN
3 Replies
2. UNIX for Dummies Questions & Answers
I wish to install Red Hat linux 7.1 on a machine with 16mb of EDO Ram. When I enter the instalation process I am told 'You do not have enough memory'. Is there a way to install RHL with only the 16? Or will I have to upgrade and buy some very expensive EDO.
~ Paul (3 Replies)
Discussion started by: KrazyGuyPaul
3 Replies
3. UNIX for Dummies Questions & Answers
welll, the title quite explains what i want to do
thanks for your time! (4 Replies)
Discussion started by: kfaday
4 Replies
4. Debian
Hello all
i own p100 16ram laptop , i would like to run linux on it
i need it for gcc compilation and shell scripting , no gui.
what version of linux should i install , i dont mind to install old one .
tnx allot (5 Replies)
Discussion started by: umen
5 Replies
5. UNIX for Dummies Questions & Answers
I don't know a lot of the world of Linux, but i want to start with an old machine; did someone knows if i can install Linux in a computer with a processor Pentium (not celeron) @ 133 Mhz, 98Mb in RAM (PC100) and 3Gb Hard Drive?
a friend tell me about Ubuntu and openSUSE, but I don't know if... (5 Replies)
Discussion started by: Omega
5 Replies
6. Shell Programming and Scripting
Hi Gurus,
Can someone let me know how to find the RAM size,ROM size and Number of processors for a linux server.
Version :Linux 2.4.9-e.57smp
Also what does "e.57smp" stands for?
Thanks in advance gurus.....
cheers. (3 Replies)
Discussion started by: navojit dutta
3 Replies
7. Linux
Hi
I am very new to Linux, but very keen to learn it.
I am having a desktop of 300 MHz with 128 MB RAM and 30 GB hard drive with Windows XP.
My first question is - Is there any version/flavour of Linux available that can be installed on above system especially Fedora with less compromise... (6 Replies)
Discussion started by: sanjay1979
6 Replies
8. Red Hat
Hi,
On server 64bit Hw Arch , Linux 5.0(32bit) is installed it is showing only 3gb of ram though physical is 16gb
can u give me idea why? (4 Replies)
Discussion started by: manoj.solaris
4 Replies
9. Linux Benchmarks
CPU/Speed: AMD Phenom(tm) 9950 Quad-Core Processor
Ram: 3.6 GB
Motherboard: Foxconn 7da-s
Bus:
Cache:
Controller:
Disk:
Load:
Kernel: Linux 2.6.26-2-amd64
Kernel ELF?:
pgms:
==============================================================
BYTE UNIX Benchmarks (Version... (0 Replies)
Discussion started by: migracho
0 Replies
10. Linux
How to enable more than 4GB RAM support on Linux 32bit OS?
OS: CentOS release 5.4 (Final)
Kernel version: 2.6.18-53.el5
Arch: 32Bit
I got solution at Innovationframes.com • View topic - How to enable more than 4GB RAM support on Linux 32bit OS? but my question is the steps given... (5 Replies)
Discussion started by: chandranjoy
5 Replies
LEARN ABOUT DEBIAN
strcstr
STRCSTR(3pub) C Programmer's Manual STRCSTR(3pub)
NAME
strcstr - convert memory block to printable C string notation
SYNOPSIS
#include <publib.h>
void strcstr(char *str, size_t max, const void *block, size_t n);
DESCRIPTION
strcstr converts the contents of an arbitrary memory block (which need not be a zero terminated string) into a printable notation using
normal C string literal syntax. This can be used for example to store potentially binary data in a file, or in debugging outputs.
All characters for which there is a simple shorthand escape sequence (', ", ?, , a, , f,
,
, , v) are stored using that nota-
tion. is stored as . All other non-printable characters are stored using a hexadecimal escape sequence. All other printable charac-
ters are stored as is.
The isprint(3) macro is used to determine whether a character is printable (i.e., whether it is printed as is, or using special notation).
Therefore, the output depends on the locale.
RETURN VALUE
strcstr returns nothing.
EXAMPLE
The following code dumps input to the standard output in a guaranteed (modulo locale bugs) printable format. It might be used for debug-
ging.
#include <stdio.h>
#include <publib.h>
int main(void) {
char line[512];
char cstr[512*(CHAR_BIT/4+1+2)+1]; /* +2 for x, +1 for ,
the rest to be able to
store the hex code for
512 chars. */
while (fgets(line, sizeof(line), stdin) != NULL) {
strcstr(cstr, sizeof(cstr), line, strlen(line));
printf("%s0, cstr);
}
return 0;
}
SEE ALSO
publib(3), strins(3)
AUTHOR
Lars Wirzenius (lars.wirzenius@helsinki.fi)
Publib C Programmer's Manual STRCSTR(3pub)