Enlightenment CVS committal

Author  : lok
Project : e17
Module  : proto

Dir     : e17/proto/extrackt/src/bin


Modified Files:
        cddb.c cddev.c command.c command.h conf.c main.c protocol.c 


Log Message:
Everything is fixed. Extrackt runs fine now. And no more warning at build time.

===================================================================
RCS file: /cvs/e/e17/proto/extrackt/src/bin/cddb.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- cddb.c      18 Feb 2006 12:39:21 -0000      1.2
+++ cddb.c      28 Jul 2007 13:07:20 -0000      1.3
@@ -12,11 +12,8 @@
 static int   _ex_cddb_sum(int val);
 static void  _ex_cddb_line_process(char *inbuffer, Ex_Disc_Data *data, int 
numtracks);
 static char *_ex_cddb_line_data_get(char **dataptr);
-static void  _ex_cddb_line_write(char *header, int num, char *data, FILE 
*outfile, char *encoding);
-static char *_ex_cddb_str_encoding_convert(char *str, char *from, char *to, 
int max_len);
 static char *_ex_cddb_uri_make(Ex_Config_Cddb_Server *server, Ex_Cddb_Hello 
*hello, char *cmd);    
 static char *_ex_cddb_request_make(Ex_Config_Cddb_Server *server,Ex_Cddb_Hello 
*hello, char *cmd);
-static int  _ex_cddb_line_count(char *lines);   
 
 static char *discdb_genres[]={"unknown","blues","classical","country",
      "data","folk","jazz","misc","newage",
@@ -544,21 +541,6 @@
      }
    *line = NULL;   
    return data;
-}
-
-static int
-_ex_cddb_line_count(char *lines)
-{
-   char *c;
-   int nlines = 0;
-   
-   for(c = lines; *c; c++)
-     {
-       if(*c == '\n')
-         nlines++;
-
-     }
-   return nlines;
 }
 
 static char *
===================================================================
RCS file: /cvs/e/e17/proto/extrackt/src/bin/cddev.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- cddev.c     18 Feb 2006 12:39:21 -0000      1.2
+++ cddev.c     28 Jul 2007 13:07:20 -0000      1.3
@@ -168,9 +168,11 @@
    struct cd_toc_entry toc_buffer[MAX_TRACKS];
    struct ioc_read_toc_entry cdte;
 #endif
+/* UNUSED
 #ifdef CDROMSUBCHNL
    struct cdrom_subchnl cdsc;
 #endif
+*/
 #ifdef CDROM_READ_SUBCHANNEL
    struct cd_sub_channel sch;
 #endif
===================================================================
RCS file: /cvs/e/e17/proto/extrackt/src/bin/command.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- command.c   18 Feb 2006 12:39:21 -0000      1.2
+++ command.c   28 Jul 2007 13:07:20 -0000      1.3
@@ -8,6 +8,7 @@
 #include <unistd.h>
 #include <signal.h>
 #include <errno.h>
+#include <time.h>
 #include <sys/types.h>
 #include <sys/wait.h>
 #include "Extrackt.h"
===================================================================
RCS file: /cvs/e/e17/proto/extrackt/src/bin/command.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- command.h   7 Feb 2006 01:35:14 -0000       1.1
+++ command.h   28 Jul 2007 13:07:20 -0000      1.2
@@ -26,8 +26,10 @@
 int     ex_command_encode_update(Extrackt *ex);
 int    ex_command_encode_set(Extrackt *ex, char *name);
 void    ex_command_encode_abort(Extrackt *ex);
+void    ex_command_encode_append(Extrackt *ex, int tracknumber);
 
 void    ex_string_file_delete(char *file);
 char   *ex_string_file_extension_get(char *file);
+int     ex_string_file_exists(char *path);
 
 #endif
===================================================================
RCS file: /cvs/e/e17/proto/extrackt/src/bin/conf.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- conf.c      7 Feb 2006 01:35:14 -0000       1.1
+++ conf.c      28 Jul 2007 13:07:20 -0000      1.2
@@ -220,12 +220,15 @@
    /* add default encoders */
      {
        Ex_Config_Exe *ripper;
+       char default_path[PATH_MAX];
        
+       snprintf(default_path, PATH_MAX, "%s/rip/%%e/%%T-%%A/%%t-%%a.wav", 
getenv("HOME"));
+
        ripper = E_NEW(1, Ex_Config_Exe);
        ripper->name = E_STRDUP("cdparanoia");
        ripper->exe = E_STRDUP("cdparanoia");
        ripper->command_line_opts = E_STRDUP("-d %d -w %n %o");
-       ripper->file_format = E_STRDUP("/tmp/music/%e/%T-%A/%t-%a.wav");
+       ripper->file_format = E_STRDUP(default_path);
        ripper->type = EX_CONFIG_EXE_RIPPER;
        ripper->def = 1;
        ex->config.rippers = evas_list_append(ex->config.rippers, ripper);
@@ -234,7 +237,7 @@
        ripper->name = E_STRDUP("cdda2wav");
        ripper->exe = E_STRDUP("cdda2wav");
        ripper->command_line_opts = E_STRDUP("-D %d -t %n -O wav %o");
-       ripper->file_format = E_STRDUP("/tmp/music/%e/%T-%A/%t-%a.wav");
+       ripper->file_format = E_STRDUP(default_path);
        ripper->type = EX_CONFIG_EXE_RIPPER;
        ripper->def = 0;
        ex->config.rippers = evas_list_append(ex->config.rippers, ripper);
@@ -246,21 +249,29 @@
    /* add default encoders */
      {
        Ex_Config_Exe *encoder;
+       char  default_path[PATH_MAX];
+       char *ext;
+       int   length;
        
+       length = snprintf(default_path, PATH_MAX - 4, 
"%s/rip/%%e/%%T-%%A/%%t-%%a.", getenv("HOME"));
+       ext = &(default_path[length]);
+
+       strncpy(ext, "ogg", 4);
        encoder = E_NEW(1, Ex_Config_Exe);
        encoder->name = E_STRDUP("oggenc");
        encoder->exe = E_STRDUP("oggenc");
        encoder->command_line_opts = E_STRDUP("-o %o -q 4 -G %g -a %A -N %n -t 
%t -l %T %i"); 
-       encoder->file_format = E_STRDUP("/tmp/music/%e/%T-%A/%t-%a.ogg");
+       encoder->file_format = E_STRDUP(default_path);
        encoder->type = EX_CONFIG_EXE_ENCODER;
        encoder->def = 0;
        ex->config.encode->encoders = 
evas_list_append(ex->config.encode->encoders, encoder);
        
+       strncpy(ext, "mp3", 4);
        encoder = E_NEW(1, Ex_Config_Exe);
        encoder->name = E_STRDUP("lame");
        encoder->exe = E_STRDUP("lame");
        encoder->command_line_opts = E_STRDUP("--tt %t --ta %a --tl %T --ty %y 
--tn %n --tg %g -h -b 192 %i %o"); 
-       encoder->file_format = E_STRDUP("/tmp/music/%e/%T-%A/%t-%a.mp3");
+       encoder->file_format = E_STRDUP(default_path);
        encoder->type = EX_CONFIG_EXE_ENCODER;
        encoder->def = 1;
        ex->config.encode->encoders = 
evas_list_append(ex->config.encode->encoders, encoder);
===================================================================
RCS file: /cvs/e/e17/proto/extrackt/src/bin/main.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- main.c      18 Feb 2006 10:52:29 -0000      1.2
+++ main.c      28 Jul 2007 13:07:20 -0000      1.3
@@ -1,6 +1,9 @@
 /* vim: set ts=8 sw=3 sts=8 noexpandtab cino=>5n-3f0^-2{2: */
 #include "Extrackt.h"
 
+/* FIXME for now just load the etk fe in this way */
+Extrackt_Frontend *etk_fe_get(void);
+
 /* initialize extrackt */
 Extrackt * 
 extrackt_init(void)
===================================================================
RCS file: /cvs/e/e17/proto/extrackt/src/bin/protocol.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- protocol.c  7 Feb 2006 01:35:14 -0000       1.1
+++ protocol.c  28 Jul 2007 13:07:20 -0000      1.2
@@ -5,6 +5,7 @@
  */
 #include <stdlib.h>
 #include <string.h>
+#include <time.h>
 #include "Extrackt.h"
 
 /* parse a message from the pipe an execute the corresponding 
@@ -87,7 +88,7 @@
               }
             ex->rip.pid = 0;
             if(ex->encode.on)
-              ex_command_encode_append(ex, ex->rip.curr_track);
+              ex_command_encode_append(ex, ex->rip.curr_track.number);
             ex->rip.curr_track.number = -1;
             ex->rip.curr_track.size = -1;
             ex->rip.curr_track.filename = NULL;



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to