C problem...se megethos domhs

Aggelos Economopoulos aoiko at cc.ece.ntua.gr
Sun Jan 25 01:52:31 EET 2004


On Sat, 24 Jan 2004 22:36:12 +0200
V13 <v13 at priest.com> wrote:

> On Saturday 24 January 2004 22:18, John Tsiombikas (Nuclear / the Lab)
> wrote:
> > >>Kai genikos anti na kaneis dump ena struct sto disko, einai poly
> > >>kalyteri idea na organoseis kapos ena fileformat. opote to packing
> > >ton>structs kai alla tetoia den einai kan issue.
> > >
> > > To "na organoseis kapos ena fileformat" stereitai periexomenou.
> > > Mhpws mporeis na to diatupwseis kalutera?
> >
> > tora den katalabes ontos ti eipa i exeis oreksi gia koubenta?
> > einai eleino na kaneis memory dump se arxeio, kai profanos mi
> > efarmosimo se polles periptoseis (px an to structure sou exei
> > pointers, dynamically allocated members klp), pio anthropini
> > methodos einai na organoseis ena file structure analoga me ta
> > dedomena sou kai na exeis mia synartisi pou diabazei apo to arxeio,
> > kai mia na grafei sto arxeio.
> 
> Basika, yparxoyn 2 tropoy na grapseis dedomena se arxeio me portable
> tropo (portable == na perneis to arxeio me ta data se ena allo systhma
> kai na doylevei):
> 
> a) text
> b) byte-byte, kathorizontas esy to endianess
> 
> To b (pleon) thoreitai ena apo ta xeirotera eidh mazoxismoy

<nod> (ektos an uparxei sobaros logos na apofugeis to text)

> (ektos an 
> prokeitai gia megalo ogko dedomenon, opoy kai pali einai mazoxismos
> ektos kai an grafeis kapoia dikia soy bash dedomenon)...

an grafeis dikia sou bash dedomenwn, mporeis na xrhsimopoihseis to
convention:

"xrhsimopoiw to native format[0]. an 8elete na xrhsimopoihsete th bash
se allh arxitektonikh, oriste o converter[1] pou 8a xreiasteite[2]" :)

Aggelos

[0] profanws to endianess einai katagegrammeno sth bash
[1] an kaneis xrhsimopoiei baseis dedomenwn panw apo nfs exei
    sobarotera problhmata
[2] pou kata protimish 8a kanei export se text




More information about the Linux-greek-users mailing list