Sponsored Content
Full Discussion: pascal and C
Top Forums Programming pascal and C Post 302141642 by porter on Sunday 21st of October 2007 04:38:31 AM
Old 10-21-2007
Not exact as you have some undefined types, but something like..

Code:
void ListInit(TList *L)
{
	L->Act=NULL;
	L->Frst=NUL;
}

void InsertFirst(Tlist *L,TE1 *El)
{
	TUk *UkPomE1=malloc(sizeof(*UkPomEl));
	UkPomEl->Data=El;
	UkPomEl->UkNasl=L->Frst;
	L->Frst=UkPomEl;
}

void First(TList *L)
{
	L->Active=L->First;
}

int Active(TList *L)
{
	return (L->Act != NULL);
}

void PostInsert(Tlist *L,TE1 *El)
{
	if (L->Act)
	{
		Tuk *PomUk=malloc(sizeof(*PomUk));
		PomUk->Data=El;
		PomUk=UkNasl=L->Act->UkNasl;
		L->Act->UkNasl=PomUk;
	}
}

void Copy(Tlist *L,TE1 *El)
{
	(*El)=*(L->Act->Data)
}

void Actualize(Tlist *L, TE1 *El)
{
	if (L->Act)
	{
		*(L->Act->Data)=*El;
	}
}

void PostDelete(Tlist *L)
{
	if (L->Act)
	{
		if (L->Act->UkNas1)
		{
			Tuk *PomUk;
			PomUk=L->Act->UkNasl;
			L->Act->UkNasl=PomUk->UkNasl;
			free(PomUk);
		}
	}
}

there are free Pascal to C convertors available on the net.
 

2 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Traversing Pascal/Delphi code using GVim

Hi, I am using GVim as editor... and i am viewing code of pascal/ delphi.. my problem is its difficult to use GVim as source code browser.... normally ctags helps to traverse in vim for c/c++.. is there anything like that for pascal/ delphi to minimise this complication of each... (0 Replies)
Discussion started by: SankarV
0 Replies

2. Shell Programming and Scripting

need help in writing shell script to generate pascal's triangle

Hi :) I am learning shell scripting, I need help, I would like to have a script that produces pascal's triangle as shown in the picture http://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/Pascal%27s_triangle_5.svg/250px-Pascal%27s_triangle_5.svg.png plz, help it's urgent thanks in... (1 Reply)
Discussion started by: angel1
1 Replies
Types(3)						User Contributed Perl Documentation						  Types(3)

NAME
Mac::Types - Macintosh Toolbox Types and conversions. DESCRIPTION
Access to Inside Macintosh is essential for proper use of these functions. Explanations of terms, processes and procedures are provided there. Any attempt to use these functions without guidance can cause severe errors in your machine, including corruption of data. You have been warned. Functions MacPack [ CONVERTERS ...] CODE, DATA ... Convert a perl value into a Mac toolbox type. Predefined codes are: TEXT Text (an identity operation). enum type keyw A 4-byte string. bool A boolean. shor A short integer. long A long integer. sing A single precision float. doub A double precision float. magn An unsigned long. qdrt A QuickDraw "Rect". 'STR ' A pascal style string. 'STR#' A string list. 'fss ' A file specification record. You can pass further code mappings as hash references. MacUnpack [ CONVERTERS ...] CODE, DATA Convert a Mac toolbox type into a perl value. Predefined codes are as for "MacPack". You can pass further code mappings as hash references. XS Functions Debugger [ MSG ] Break into MacsBug. Don't use this if you don't know what MacsBug is. AUTHOR
Written by Matthias Ulrich Neeracher <neeracher@mac.com>. Currently maintained by Chris Nandor <pudge@pobox.com>. perl v5.18.2 2017-10-06 Types(3)
All times are GMT -4. The time now is 02:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy