Woozy_... Δημοσ. 2 Αυγούστου 2001 Δημοσ. 2 Αυγούστου 2001 Epidi ta agglika mou den einai kai poli kala....Mporei na mou metafrasei kapoios auto????????<P><BR>Description of the -listinfo output.<BR>------------------------------------<P>Grammar:<BR>--------<BR> start -> ENTRY*<BR> ENTRY -> ENTRYNAME ENTRYVALUE<BR> ENTRYNAME -> SYMBOL<BR> ENTRYVALUE -> SYMBOL | STRING | ENTRYLIST<BR> ENTRYLIST -> '(' ENTRY* ')'<BR> SYMBOL -> any char except separator, '"', '(', ')'<BR> STRING -> default C string in double quote ""<P>Any space (specifically any char which C function ispace() tells is a<BR>space) is considered a separator and must be ignored.<P><BR>Semantic:<BR>---------<BR>game (...)<BR>Definition of all games emulated.<P>resource (...)<BR>Definition of a resource. Actually the only two resource are<BR>the NeoGeo BIOS roms (named 'neogeo') and the YM-3812 samples<BR>(named 'ym3812').<P><BR>Entries common for 'game' and 'resource'<BR>----------------------------------------<BR>name NAME<BR>Name of the game or resource. This is the only required item.<BR>The specified NAME is unique in all file.<P>description DESCRIPTION<BR>Generic description.<P>manufacturer MANUFACTURER<BR>Manufacturer of the game or resource.<P>year YEAR<BR>Year of the game or resource.<P>romof NAME<BR>The game or resource use rom of another game or resource named NAME.<BR>[Equal to cloneof entry in GameDriver specification.]<P>sampleof NAME<BR>The game or resource use sample of another game or resource named NAME.<BR>[is the first element with starting * in the samplenames array.]<P>rom '(' name NAME size SIZE crc CRC ')'<BR>Rom specification his name, size and crc.<P>sample NAME<BR>Sample specification.<P><BR>Entries specific for 'game'<BR>-------------------------<BR>cloneof NAME<BR>Clone-of relathionship. This is intended to express an abstract<BR>clone-of relathionship. [it's equal to the cloneof entry in gamedriver<BR>specification with the exception of the neogeo game which is not reported<BR>has a parent of any game.]<P>chip '(' type (cpu | audio) [flags audio] name NAME [clock CLOCK] ')'<BR>List of hardware chips which the game use.<BR>[A MAME cpu used for sound has "flags audio"]<P>video '(' (screen raster | vector) [x X y Y] colors NCOLORS freq NFREQ ')'<BR>Many information of the game video hardware.<P>input '(' players NPLAYERS [control TYPE] [buttons NBUTTONS] coins NCOINS ')'<BR>Many information of the game input hardware.<P>driver '(' status (preliminary | good) color (preliminary | imperfect | good)<BR> hiscore (preliminary | good) colordeep NCOLORBITS credits CREDITS ')'<BR>Many information of the MAME driver status and requirements.<P>sound (channels NUMBER)<BR>Number of the sound channels.<P><BR>How to read the file<BR>--------------------<BR>If you have the necessity to read the output of -listinfo option<BR>you must do attention of these issues:<P>1) You can't do any assumption of space indentation.<BR>2) You can't do any assumption of max line length. All output can be<BR> in a very long line.<BR>3) You can't do any assumption of order of the entries.<BR>4) You can't do any assumption of the presence of any entry except the<BR> game.name and resource.name which are mandatory and unique.<BR>5) You must skip entry unknow.<BR>6) Spaces are required only for separing SYMBOL.<BR>7) Lists of entry empty are valid.<P>For example:<P> game(description"Pac Man (Midway)"unknowentry()name pacman rom(size 4096 name pacman.6e crc c1e6ab10))<P>is a valid output.<P>Example<BR>-------<BR>This is a complete module for reading info files.<P>info.h Library header<BR>info.c Library module<BR>test.c Example of use<P>-- info.h --------------------------------------------------------------------<BR>#ifndef __INFO_H<BR>#define __INFO_H<P>#ifdef __cplusplus<BR>extern "C" {<BR>#endif<P>#include <stdio.h><P>enum info_t {<BR> info_error, /* Generic error in reading */<BR> info_eof, /* End of file got at valid position */<BR> info_symbol, /* Symbol */<BR> info_open, /* ( */<BR> info_close, /* ) */<BR> info_string /* C string (automatically converted) */<BR>};<P>void info_init(void);<BR>void info_done(void);<BR>const char* info_text_get(void);<BR>enum info_t info_token_get(FILE* f);<BR>enum info_t info_skip_value(FILE* f);<BR>unsigned info_row_get(void);<BR>unsigned info_col_get(void);<BR>unsigned info_pos_get(void);<P>#ifdef __cplusplus<BR>}<BR>#endif<P>#endif<BR>------------------------------------------------------------------------------<P>-- info.c --------------------------------------------------------------------<BR>#include "info.h"<P>#include <ctype.h><BR>#include <string.h><BR>#include <malloc.h><BR>#include <assert.h><P>/* Start size of buffer */<BR>#define INFO_BUF_MIN 64<P>/* Buffer used for storing last token */<BR>static unsigned info_buf_mac = 0;<BR>static unsigned info_buf_max = 0;<BR>static char* info_buf_map = 0;<P>/* Position in the stream */<BR>static unsigned info_pos = 0; /* Char */<BR>static unsigned info_row = 0; /* Row */<BR>static unsigned info_col = 0; /* Column */<P>/* Inizialize the info reading system */<BR>void info_init(void) {<BR> info_buf_max = 0;<BR> info_buf_map = 0;<BR> info_pos = 0;<BR> info_row = 0;<BR> info_col = 0;<BR>}<P>/* Deinizialize the info reading system */<BR>void info_done(void) {<BR> free(info_buf_map);<BR>}<P>/* Get information of file position */<BR>unsigned info_row_get(void) {<BR> return info_row;<BR>}<P>unsigned info_col_get(void) {<BR> return info_col;<BR>}<P>unsigned info_pos_get(void) {<BR> return info_pos;<BR>}<P>/* Resize the buffer */<BR>static void info_buf_resize(unsigned size) {<BR> if (!info_buf_max)<BR> info_buf_max = INFO_BUF_MIN;<BR> else<BR> info_buf_max *= 2;<BR> if (size > info_buf_max)<BR> info_buf_max = size;<BR> info_buf_map = realloc(info_buf_map, info_buf_max );<BR> assert( info_buf_map );<BR>}<P>/* Add a char to the buffer end */<BR>static inline void info_buf_add(char c) {<BR> if (info_buf_mac >= info_buf_max)<BR> info_buf_resize(info_buf_mac + 1);<BR> info_buf_map[info_buf_mac++] = c;<BR>}<P>/* Reset the buffer */<BR>static void info_buf_reset() {<BR> info_buf_mac = 0;<BR>}<P>/* Return last token text if is a info_symbol or a info_string token */<BR>const char* info_text_get(void) {<BR> /* ensure the buffer end with zero */<BR> if (info_buf_mac==0 || info_buf_map[info_buf_mac-1]!=0)<BR> info_buf_add(0);<BR> return info_buf_map;<BR>}<P>/* Read a char from file */<BR>static int info_getc(FILE* f) {<BR> int c = fgetc(f);<BR> switch © {<BR> case EOF:<BR> break;<BR> case '\n':<BR> info_col = 0;<BR> ++info_row;<BR> ++info_pos;<BR> break;<BR> default:<BR> ++info_col;<BR> ++info_pos;<BR> break;<BR> }<BR> return c;<BR>}<P>/* Unget a char from file */<BR>static void info_ungetc(int c, FILE* f) {<BR> --info_pos;<BR> --info_col;<BR> ungetc(c,f);<BR>}<P>static enum info_t get_symbol(FILE* f,int c) {<BR> while (c!=EOF && !isspace© && c!='(' && c!=')' && c!='\"') {<BR> info_buf_add©;<BR> c = info_getc(f);<BR> }<BR> /* no reason to unget space or EOF */<BR> if (c!=EOF && !isspace©)<BR> info_ungetc(c,f);<BR> return info_symbol;<BR>}<P>static unsigned hexdigit(char c) {<BR> if (isdigit©)<BR> return c - '0';<BR> return toupper© - 'A' + 10;<BR>}<P>static enum info_t get_string(FILE* f) {<BR> int c = info_getc(f);<BR> while (c!=EOF && c!='\"') {<BR> if (c=='\\') {<BR> c = info_getc(f);<BR> switch © {<BR> case 'a' : info_buf_add('\a'); break;<BR> case 'b' : info_buf_add('\b'); break;<BR> case 'f' : info_buf_add('\f'); break;<BR> case 'n' : info_buf_add('\n'); break;<BR> case 'r' : info_buf_add('\r'); break;<BR> case 't' : info_buf_add('\t'); break;<BR> case 'v' : info_buf_add('\v'); break;<BR> case '\\' : info_buf_add('\\'); break;<BR> case '?' : info_buf_add('\?'); break;<BR> case '\'' : info_buf_add('\''); break;<BR> case '\"' : info_buf_add('\"'); break;<BR> case 'x' : {<BR> int d0,d1;<BR> unsigned char cc;<BR> d0 = info_getc(f);<BR> if (!isxdigit(d0))<BR> return info_error;<BR> d1 = info_getc(f);<BR> if (!isxdigit(d1))<BR> return info_error;<BR> cc = hexdigit(d0) * 16 + hexdigit(d1);<BR> info_buf_add(cc);<BR> }<BR> break;<BR> default:<BR> info_buf_add('\\');<BR> info_buf_add©;<BR> break;<BR> }<BR> } else {<BR> info_buf_add©;<BR> }<BR> c = info_getc(f);<BR> }<BR> if (c!='\"')<BR> return info_error;<BR> return info_string;<BR>}<P>/* Extract a token */<BR>enum info_t info_token_get(FILE* f) {<BR> int c = info_getc(f);<BR> /* reset the buffer */<BR> info_buf_reset();<BR> /* skip space */<BR> while (c!=EOF && isspace©) {<BR> c = info_getc(f);<BR> }<BR> /* get token */<BR> switch © {<BR> case EOF:<BR> return info_eof;<BR> case '(':<BR> return info_open;<BR> case ')':<BR> return info_close;<BR> case '\"':<BR> return get_string(f);<BR> default:<BR> return get_symbol(f,c);<BR> }<BR>}<P>/* Skip a value token<BR> * note:<BR> * Skip recusively any info_open and info_close<BR> * return:<BR> * info_error error<BR> * otherwise last token skipped<BR> */<BR>enum info_t info_skip_value(FILE* f) {<BR> /* read value token */<BR> enum info_t t = info_token_get(f);<BR> switch (t) {<BR> case info_open:<BR> t = info_token_get(f);<BR> if (t==info_error)<BR> return info_error;<BR> while (t!=info_close) {<BR> /* first read type as a symbol */<BR> if (t!=info_symbol)<BR> return info_error;<BR> /* second skip the value */<BR> t = info_skip_value(f);<BR> /* two value required */<BR> if (t==info_error)<BR> return info_error;<BR> /* read next token, a type or a info_close */<BR> t = info_token_get(f);<BR> if (t==info_error)<BR> return info_error;<BR> }<BR> break;<BR> case info_symbol:<BR> case info_string:<BR> break;<BR> default:<BR> return info_error;<BR> }<BR> return t;<BR>}<BR>------------------------------------------------------------------------------<P>-- test.c --------------------------------------------------------------------<BR>#include "info.h"<P>#include <stdio.h><BR>#include <stdlib.h><P>#define true 1<BR>#define false 0<P>int info_load(FILE* f) {<BR> enum info_t token = info_token_get(f);<BR> while (token!=info_eof) {<BR> if (token != info_symbol) return false;<BR> if (strcmp(info_text_get(),"game")==0) {<BR> if (info_token_get(f) != info_open) return false;<BR> token = info_token_get(f);<BR> while (token != info_close) {<BR> if (token != info_symbol)<BR> return false;<BR> if (strcmp(info_text_get(),"name")==0) {<BR> if (info_token_get(f) != info_symbol) return false;<BR> printf("name %s\n", info_text_get() );<BR> } else if (strcmp(info_text_get(),"description")==0) {<BR> if (info_token_get(f) != info_string) return false;<BR> printf("description %s\n", info_text_get() );<BR> } else if (strcmp(info_text_get(),"manufacturer")==0) {<BR> if (info_token_get(f) != info_string) return false;<BR> printf("manufacturer %s\n", info_text_get() );<BR> } else if (strcmp(info_text_get(),"year")==0) {<BR> if (info_token_get(f) != info_symbol) return false;<BR> printf("year %s\n", info_text_get() );<BR> } else if (strcmp(info_text_get(),"cloneof")==0) {<BR> if (info_token_get(f) != info_symbol) return false;<BR> printf("cloneof %s\n", info_text_get() );<BR> } else if (strcmp(info_text_get(),"romof")==0) {<BR> if (info_token_get(f) != info_symbol) return false;<BR> printf("romof %s\n", info_text_get() );<BR> } else if (strcmp(info_text_get(),"sampleof")==0) {<BR> if (info_token_get(f) != info_symbol) return false;<BR> printf("sampleof %s\n", info_text_get() );<BR> } else if (strcmp(info_text_get(),"rom")==0) {<BR> if (info_token_get(f) != info_open) return false;<BR> token = info_token_get(f);<BR> while (token != info_close) {<BR> if (token != info_symbol) return false;<BR> if (strcmp(info_text_get(),"name")==0) {<BR> if (info_token_get(f) != info_symbol) return false;<BR> printf("romname %s\n", info_text_get() );<BR> } else if (strcmp(info_text_get(),"size")==0) {<BR> if (info_token_get(f) != info_symbol) return false;<BR> printf("romsize %s\n", info_text_get() );<BR> } else if (strcmp(info_text_get(),"crc")==0) {<BR> if (info_token_get(f) != info_symbol) return false;<BR> printf("romcrc %s\n", info_text_get() );<BR> } else {<BR> if (info_skip_value(f) == info_error) return false;<BR> }<BR> token = info_token_get(f);<BR> }<BR> } else if (strcmp(info_text_get(),"driver")==0) {<BR> if (info_token_get(f) != info_open) return false;<BR> token = info_token_get(f);<BR> while (token != info_close) {<BR> if (token != info_symbol) return false;<BR> if (strcmp(info_text_get(),"status")==0) {<BR> if (info_token_get(f) != info_symbol) return false;<BR> printf("driverstatus %s\n", info_text_get() );<BR> } else {<BR> if (info_skip_value(f) == info_error) return false;<BR> }<BR> token = info_token_get(f);<BR> }<BR> } else if (strcmp(info_text_get(),"sample")==0) {<BR> if (info_token_get(f) != info_symbol) return false;<BR> printf("samplenames %s\n", info_text_get() );<BR> } else {<BR> if (info_skip_value(f) == info_error) return false;<BR> }<BR> token = info_token_get(f);<BR> }<BR> } else {<BR> if (info_skip_value(f) == info_error) return false;<BR> }<BR> token = info_token_get(f);<BR> }<P> return true;<BR>}<P>int main() {<BR> info_init();<P> if (!info_load(stdin)) {<BR> info_done();<BR> fprintf(stderr,"Error reading at row %d column %d\n",info_row_get()+1,info_col_get()+1);<BR> exit(EXIT_FAILURE);<BR> }<P> info_done();<P> return EXIT_SUCCESS;<BR>}<BR>------------------------------------------------------------------------------<P>sas parakalo einai anagki
NeTeD Δημοσ. 2 Αυγούστου 2001 Δημοσ. 2 Αυγούστου 2001 Esy mporeis na mou metafraseis ayto sta ellhnika?<P>0110101001011001100110000010101011010100110100101001010<BR>0011000001010101101010011010010100101011010010101001010<BR>1011011001110001010101011101010010101010111010101010010<BR>1010110010101010101000001111111101010101001001111001011<BR>1101010100111110101010001000000001010111110101010101011<BR>1001000010110101010101101111010100111111101010010100111<BR>0101000101010101101001010111100101011110101010110101010<BR>0101110010100101001001010010010010111100101010101001110<P><p>[ 02-08-2001: Message edited by: NeTeD ]
sh4dow Δημοσ. 2 Αυγούστου 2001 Δημοσ. 2 Αυγούστου 2001 hehe san na einai kapos mikro i mou fenete;<P>loipon pentakosariko i grammi ean thes... allios me ta idia xrimata pas kai perneis kapoio lexiko
mitsoskitsos Δημοσ. 2 Αυγούστου 2001 Δημοσ. 2 Αυγούστου 2001 Λοιπόν κάνω εγώ την αρχή:<P>Οι πρώτες 50 γραμμές όπως μεταφράζονται από το systran (music.gr):<P>Περιγραφή - παραγωγή listinfo. <P>Γραμματική:<BR> έναρξη - > ΕΊΣΟΔΟΣ <BR>ΕΙΣΌΔΩΝ * - > ENTRYNAME ENTRYVALUE <BR>ENTRYNAME - > ΣΎΜΒΟΛΟ <BR>ENTRYVALUE - > ΣΕΙΡʼ | ENTRYLIST <BR>ENTRYLIST ΣΥΜΒΌΛΩΝ | - > "(' ΕΊΣΟΔΟΣ * > )" <BR>ΣΎΜΒΟΛΟ - > οποιοσδήποτε προσροφητικός άνθρακας εκτός από το διαχωριστή, >" ", > (',") > <BR>ΣΕΙΡʼ - > προκαθορίστε τη σειρά γ στο διπλό απόσπασμα "" <P>Οποιοδήποτε διάστημα (συγκεκριμένα οποιοσδήποτε προσροφητικός άνθρακας που η λειτουργία ispace () γ λέει είναι ένα διάστημα) θεωρείται διαχωριστής και πρέπει να αγνοηθεί. <P>Σημασιολογικός:<BR> καθορισμός παιχνιδιών (...) όλων των παιχνιδιών που μιμούνται.<P> καθορισμός των πόρων (...) ενός πόρου. <BR>Πραγματικά ο μόνος πόρος δύο είναι το ΖΩΝΤΑΝΌ ΟΝ NeoGeo roms (ονομασμένος "το neogeo > ) και τα υμ- 3812 δείγματα (που ονομάζονται" ym3812 > ). <P>Καταχωρήσεις κοινές για "το παιχνίδι > και" τον πόρο ><BR> όνομα ΟΝΌΜΑΤΟΣ ονόματος του παιχνιδιού ή του πόρου. <BR>Αυτό είναι το μόνο απαραίτητο στοιχείο. Το διευκρινισμένο ΌΝΟΜΑ είναι μοναδικό σε όλο το αρχείο.<P> γενική περιγραφή ΠΕΡΙΓΡΑΦΉΣ περιγραφής.<BR> <BR>κατασκευαστής ΚΑΤΑΣΚΕΥΑΣΤΏΝ κατασκευαστών του παιχνιδιού ή του πόρου. <P>έτος ΈΤΟΥΣ έτους του παιχνιδιού ή του πόρου.<P> romof το ΌΝΟΜΑ <BR>το ROM χρήσης παιχνιδιών ή των πόρων ενός άλλου παιχνιδιού ή πόρου ονόμασε το ΌΝΟΜΑ. [ ίσος στην είσοδο cloneof στην προδιαγραφή GameDriver.
Γηρυόνης Δημοσ. 2 Αυγούστου 2001 Δημοσ. 2 Αυγούστου 2001 Πόσα δίνεις χιχιχιχιχιχι, πλάκα κάνω. Αυτό για να μεταφραστεί θέλει ώρα. Αυτό που θα μπορούσες να κάνεις είναι να βρεις μία αυτόματη μηχανή μετάφρασης και να το μεταφράσεις. Βέβαια η μετάφραση δε θα είναι τέλεια αλλά θα είναι καλύτερη από το τίποτα.<P> Ελπίζω να βοηθήσει.
Επισκέπτης Δημοσ. 2 Αυγούστου 2001 Δημοσ. 2 Αυγούστου 2001 Mporeis na er8eis <A HREF="http://www.music.gr/systran/index.htm" TARGET=_blank>EDW</A> kai na eisageis opoia leksh h keimeno theleis gia na to metafraseis
Γηρυόνης Δημοσ. 2 Αυγούστου 2001 Δημοσ. 2 Αυγούστου 2001 <BLOCKQUOTE><font size="1" face="Verdana, Helvetica, sans-serif">quote:</font><HR>Originally posted by NeTeD:<BR>Esy mporeis na mou metafraseis ayto sta ellhnika?<P>0110101001011001100110000010101011010100110100101001010<BR>0011000001010101101010011010010100101011010010101001010<BR>1011011001110001010101011101010010101010111010101010010<BR>1010110010101010101000001111111101010101001001111001011<BR>1101010100111110101010001000000001010111110101010101011<BR>1001000010110101010101101111010100111111101010010100111<BR>0101000101010101101001010111100101011110101010110101010<BR>0101110010100101001001010010010010111100101010101001110<BR><HR></BLOCKQUOTE><P> Ναι, αυτό μεταφράζεται ως: Αυτό παθαίνει όποιος πίνει πολλούς μπάφους... χαχαχαχαχαχα, χωρίς παρεξήγηση...<BR> <p>[ 02-08-2001: Message edited by: Γηριόνης ]
tiger3000 Δημοσ. 2 Αυγούστου 2001 Δημοσ. 2 Αυγούστου 2001 EGW MPORW NA SOY METAFRASW TIS PAREN8ESEIS KAI TA +,- AN 8ES...<BR>
darkman Δημοσ. 3 Αυγούστου 2001 Δημοσ. 3 Αυγούστου 2001 kala file dracula eisai apisteftos scrolaro edo kai 30 deyterolepta gia na do tin lista pou eftiaxes xaras to kouragio sou <P>filika darkman
NeTeD Δημοσ. 4 Αυγούστου 2001 Δημοσ. 4 Αυγούστου 2001 Egw akoma den katalava ti tha metafrasete..<P>Ton kwdika??!?!
Jheremias Δημοσ. 4 Αυγούστου 2001 Δημοσ. 4 Αυγούστου 2001 Καλά σας λέει ρε παιδιά ο NeTeD...Τον κώδικα του προγράμματος θα μεταφράσετε; Δηλαδή θέλετε να φτιάξετε κάτι σαν ψευδοκώδικα;
Blackman Δημοσ. 6 Αυγούστου 2001 Δημοσ. 6 Αυγούστου 2001 Oxi ton kwdika re pedia...<P>to komati twn agglikwn odhgiwn thelei to paidi...<BR>apla o kwdikas htan peritos sthn olh fash!
myle Δημοσ. 28 Ιουλίου 2006 Δημοσ. 28 Ιουλίου 2006 Χαμένοι στην μετάφραση. Αυτό θα πει ξέθαμα του τόπικ!!
Προτεινόμενες αναρτήσεις
Αρχειοθετημένο
Αυτό το θέμα έχει αρχειοθετηθεί και είναι κλειστό για περαιτέρω απαντήσεις.