Sponsored Content
Top Forums Programming "char" memory layout problem! Post 302688125 by micky.zhou on Friday 17th of August 2012 07:47:27 PM
Old 08-17-2012
Quote:
“Arithmetic in C doesn't use anything smaller than an int.”
Wow,thanks very much. It's very useful for me.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

2. UNIX and Linux Applications

A question/problem about oracle "tns listener" and "enterprise manager"

hi, I have * an IBM P550 machine, * an AIX 5.3 running on it and * an oracle database, already installed on it. The problem (or question of my own) is: Oracle tns listener, "CT_LISTENER", and the enterprise manager (EM) of the instance, which is uniq instance and called... (0 Replies)
Discussion started by: talipk
0 Replies

3. UNIX for Advanced & Expert Users

A question/problem about oracle "tns listener" and "enterprise manager"

hi, I have a problem about the Oracle related components. I'm not able to find any answer yet, and waiting for your responses... Here is the configuration of my system: * an IBM P550 machine, * an AIX 5.3 running on it and * an oracle database, already installed on it. The problem (or... (1 Reply)
Discussion started by: talipk
1 Replies

4. Solaris

significance of "+" char in SunOS "ls -l" output

Hi, I've noticed that the permissions output from "ls -l" under SunOS differs from Linux in that after the "rwxrwxrwx" field, there is an additional "+" character that may or may not be there. What is the significance of this character? Thanks, Suan (6 Replies)
Discussion started by: sayeo
6 Replies

5. AIX

"too big" and "not enough memory" errors in shell script

Hi, This is odd, however here goes. There are several shell scripts that run in our production environment AIX 595 LPAR m/c, which has sufficient memory 14GB (physical memory) and horsepower 5CPUs. However from time to time we get the following errors in these shell scripts. The time when these... (11 Replies)
Discussion started by: jerardfjay
11 Replies

6. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

7. Shell Programming and Scripting

problem with char "%"

hi all i have a problem...when i do the command my output is "n%" where n is a number but i want to delete the charater "%" . how i can delete it Thanks a lot REgards (2 Replies)
Discussion started by: FrancescoIt
2 Replies

8. Programming

Small query regarding function "char * strerror(int errnum)"

As this function returns the address of the string corressponding to the errno value provided to it. Can someone please let me know where, in the memory, it could be (on freeBSD). The MAN page tells under the BUG section that "For unknown error numbers, the strerror() function will return its... (5 Replies)
Discussion started by: Praveen_218
5 Replies

9. Shell Programming and Scripting

Move a line containg "char" above line containing "xchar"

Okay, so I have a rather large text file and will have to process many more and this will save me hours of work. I'm not very good at scripting, so bear with me please. Working on Linux RHEL I've been able to filter and edit and clean up using sed, but I have a problem with moving lines. ... (9 Replies)
Discussion started by: rex007can
9 Replies

10. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
layout.h(3)							       log4c							       layout.h(3)

NAME
layout.h - Interface for user specific layout format of log4c_logging_event events. SYNOPSIS
#include <log4c/defs.h> #include <log4c/logging_event.h> #include <stdio.h> Data Structures struct log4c_layout_type log4c layout type class Defines #define log4c_layout_type_define(a_type) Typedefs typedef struct __log4c_layout log4c_layout_t typedef struct log4c_layout_type log4c_layout_type_t log4c layout type class Functions LOG4C_API const log4c_layout_type_t * log4c_layout_type_get (const char *a_name) LOG4C_API const log4c_layout_type_t * log4c_layout_type_set (const log4c_layout_type_t *a_type) LOG4C_API log4c_layout_t * log4c_layout_get (const char *a_name) LOG4C_API log4c_layout_t * log4c_layout_new (const char *a_name) LOG4C_API void log4c_layout_delete (log4c_layout_t *a_layout) LOG4C_API const char * log4c_layout_get_name (const log4c_layout_t *a_layout) LOG4C_API const log4c_layout_type_t * log4c_layout_get_type (const log4c_layout_t *a_layout) LOG4C_API const log4c_layout_type_t * log4c_layout_set_type (log4c_layout_t *a_layout, const log4c_layout_type_t *a_type) LOG4C_API void * log4c_layout_get_udata (const log4c_layout_t *a_layout) LOG4C_API void * log4c_layout_set_udata (log4c_layout_t *a_layout, void *a_udata) LOG4C_API const char * log4c_layout_format (const log4c_layout_t *a_layout, const log4c_logging_event_t *a_event) LOG4C_API void log4c_layout_print (const log4c_layout_t *a_layout, FILE *a_stream) LOG4C_API void log4c_layout_types_print (FILE *fp) Detailed Description Interface for user specific layout format of log4c_logging_event events. Todo the layout interface needs a better configuration system depending on the layout type. The udata field is a just a trick. Todo a pattern layout would be welcomed !! Define Documentation #define log4c_layout_type_define(a_type) Helper macro to define static layout types. Parameters: a_type the log4c_layout_type_t object to define Warning: needs GCC support: otherwise this macro does nothing Deprecated This macro, and the static initialialization of layouts in general, is deprecated. Use rather the log4c_layout_type_set() function to initialize your appenders before calling log4c_init() Typedef Documentation typedef struct __log4c_layout log4c_layout_t log4c layout class typedef struct log4c_layout_type log4c_layout_type_t log4c layout type class Attributes description: o name layout type name o format Function Documentation LOG4C_API void log4c_layout_delete (log4c_layout_t *a_layout) Destructor for layout. LOG4C_API const char* log4c_layout_format (const log4c_layout_t *a_layout, const log4c_logging_event_t *a_event) format a log4c_logging_event events to a string. Parameters: a_layout the log4c_layout_t object a_event a logging_event_t object Returns: an appendable string. LOG4C_API log4c_layout_t* log4c_layout_get (const char *a_name) Get a pointer to an existing layout. Parameters: a_name the name of the layout to return. Returns: a pointer to an existing layout, or NULL if no layout with the specfied name exists. LOG4C_API const char* log4c_layout_get_name (const log4c_layout_t *a_layout) Parameters: a_layout the log4c_layout_t object Returns: the layout name LOG4C_API const log4c_layout_type_t* log4c_layout_get_type (const log4c_layout_t *a_layout) Parameters: a_layout the log4c_layout_t object Returns: a log4c_layout_type_t object LOG4C_API void* log4c_layout_get_udata (const log4c_layout_t *a_layout) Parameters: a_layout the log4c_layout_t object Returns: the layout user data LOG4C_API log4c_layout_t* log4c_layout_new (const char *a_name) Constructor for layout. LOG4C_API void log4c_layout_print (const log4c_layout_t *a_layout, FILE *a_stream) prints the layout on a stream Parameters: a_layout the log4c_layout_t object a_stream the stream LOG4C_API const log4c_layout_type_t* log4c_layout_set_type (log4c_layout_t *a_layout, const log4c_layout_type_t *a_type) sets the layout type Parameters: a_layout the log4c_layout_t object a_type the new layout type Returns: the previous layout type LOG4C_API void* log4c_layout_set_udata (log4c_layout_t *a_layout, void *a_udata) sets the layout user data Parameters: a_layout the log4c_layout_t object a_udata the new layout user data Returns: the previous layout user data LOG4C_API const log4c_layout_type_t* log4c_layout_type_get (const char *a_name) Get a pointer to an existing layout type. Parameters: a_name the name of the layout type to return. Returns: a pointer to an existing layout type, or NULL if no layout type with the specified name exists. LOG4C_API const log4c_layout_type_t* log4c_layout_type_set (const log4c_layout_type_t *a_type) Use this function to register a layout type with log4c. Once this is done you may refer to this type by name both programatically and in the log4c configuration file. Parameters: a_type a pointer to the new layout type to set. Returns: a pointer to the previous layout type of same name. Example code fragment: const log4c_layout_type_t log4c_layout_type_xml = { 's13_xml', xml_format, }; log4c_layout_type_set(&log4c_layout_type_xml); LOG4C_API void log4c_layout_types_print (FILE *fp) prints all the current registered layout types on a stream Parameters: fp the stream Author Generated automatically by Doxygen for log4c from the source code. Version 1.2.1 Mon May 2 2011 layout.h(3)
All times are GMT -4. The time now is 11:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy