Sponsored Content
Full Discussion: Segment Violation
Top Forums Programming Segment Violation Post 302425549 by daniel.gbaena on Friday 28th of May 2010 11:31:59 AM
Old 05-28-2010
The code thats calls this function is quite simple.

Code:
typedef struct node {

    char caracter;
    struct node *nextNode;
} NodeTipe;

int main(int argc, char argv[]) {
NodeTipe *pList; insertAtEnd(pList);
}

 

9 More Discussions You Might Find Interesting

1. Programming

Segment Fault

When run it, segment fault. What is wrong? #include <stdio.h> #include <stdlib.h> const int max =20; //**************************************************** // Input Matrix //**************************************************** void inMatrixAA(int *AA, int row, int col)... (9 Replies)
Discussion started by: zhshqzyc
9 Replies

2. Shell Programming and Scripting

extract segment

Hey all, could someone please direct me on how to extract a segment from a file between two tags? Thanks! (1 Reply)
Discussion started by: mpang_
1 Replies

3. Shell Programming and Scripting

Cutting segment of a string

Hi, I am using bash. My question concerns cutting out segments of a string. Given the following filename: S2002254132542.L1A_MLAC.x.hdf I have been able to successfully separate the string at the periods (.): $ L1A_FILE=S2002254132542.L1A_MLAC.x.hdf $ BASE=$(echo $L1A_FILE | awk -F.... (5 Replies)
Discussion started by: msb65
5 Replies

4. UNIX for Dummies Questions & Answers

code segment

how do i close a do code segment? od? (1 Reply)
Discussion started by: trob
1 Replies

5. Shell Programming and Scripting

How to change a segment in a particular position

I need help in removing a leading zero in a particular position. For eg.: XYZ*04567472*0099*020091231*0123*0.12 In the above line, I want to replace "*0123" with "123" and "0.12" with ".12". I want to remove the leading zero only in position number 4 and 5 (the bolded segments) I was able... (10 Replies)
Discussion started by: ananthmm
10 Replies

6. Programming

How can I know where the segment of memory is all Zero?

I mean, I malloc a segment of memory, maybe 1k maybe 20bytes.. assume the pointer is pMem How can I know the content pMem refered is all Zero or \0 . I know memcmp but the second parameter should another memory address... thanx (4 Replies)
Discussion started by: macroideal
4 Replies

7. Programming

Data segment or Text segment

Hi, Whether the following piece of code is placed in the read-only memory of code (text) segment or data segment? char *a = "Hello"; I am getting two different answers while searching in google :( that's why the confusion is (7 Replies)
Discussion started by: royalibrahim
7 Replies

8. Programming

why segment fault,

I always get segment fault, why? can sb help me and modify it, I have spend on much time on #include <pthread.h> #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <string.h> #define MAX 10 pthread_t thread; void *thread1() { int *a; int i, n; ... (1 Reply)
Discussion started by: yanglei_fage
1 Replies

9. Shell Programming and Scripting

[Solved] Trimming out segment

I have a file with a combination of binary characters and words, and need to trim out the segment i.e. SleeperThreadAborting {{username::RAB2002}} {{scriptname::scs_get_pending_by_loc}} and put the lists into a text file. Luckily, the segment I am looking for i.e. has readable words ... (8 Replies)
Discussion started by: Daniel Gate
8 Replies
types(5)							File Formats Manual							  types(5)

Name
       types - primitive system data types

Syntax
       #include <sys/types.h>

Description
       The data defined in the include file are used in UNIX system code.  Some data of these are accessible to user code:
       #ifndef _TYPES_
       #define _TYPES_

       /* major part of a device */
       #define major(x)        ((int)(((unsigned)(x)>>8)&0377))

       /* minor part of a device */
       #define minor(x)        ((int)((x)&0377))

       /* make a device number */
       #define makedev(x,y)    ((dev_t)(((x)<<8) | (y)))

       typedef unsigned char   u_char;
       typedef unsigned short  u_short;
       typedef unsigned int    u_int;
       typedef unsigned long   u_long;
       typedef unsigned short  ushort;	       /* sys III compat */

       #ifdef mips
       typedef struct  _physadr { int r[1]; } *physadr;
       typedef struct  label_t {
	       int     val[12];
       } label_t;
       #endif
       typedef struct  _quad { long val[2]; } quad;
       typedef long    daddr_t;
       typedef char *  caddr_t;
       typedef u_long  ino_t;
       typedef long    swblk_t;
       typedef int     size_t;
       typedef int     time_t;
       typedef short   dev_t;
       typedef int     off_t;

       typedef struct  fd_set { int fds_bits[1]; } fd_set;
       #endif

       The  form  daddr_t is used for disk addresses except in an i-node on disk.  For further information, see Times are encoded in seconds since
       00:00:00 GMT, January 1, 1970.  The major and minor parts of a device code specify kind and unit number of a device and	are  installation-
       dependent.   Offsets  are measured in bytes from the beginning of a file.  The label_t variables are used to save the processor state while
       another process is running.

See Also
       dbx(1), lseek(2), time(3), fs(5)

								       RISC								  types(5)
All times are GMT -4. The time now is 01:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy