[PD-cvs] externals/iem/iemmatrix/src iemmatrix_sources.c, NONE, 1.1 iemmatrix_sources.h, NONE, 1.1 makesource.sh, NONE, 1.1 iemmatrix.c, 1.9, 1.10

IOhannes m zmölnig zmoelnig at users.sourceforge.net
Mon Sep 19 15:14:01 CEST 2005


Update of /cvsroot/pure-data/externals/iem/iemmatrix/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16041

Modified Files:
	iemmatrix.c 
Added Files:
	iemmatrix_sources.c iemmatrix_sources.h makesource.sh 
Log Message:
automatic adding of new source-files to the main setup function


--- NEW FILE: iemmatrix_sources.c ---
/* iemmatrix-setup autogenerated setup-file
 * generated by "./makesource.sh"
 * !! DO NOT MANUALLY EDIT  !!
 */

#include "iemmatrix_sources.h"

void iemmatrix_sources_setup(void)
{
	iemtx_abs_setup(); /* mtx_abs.c */
	iemtx_add_setup(); /* mtx_add.c */
	iemtx_and_setup(); /* mtx_and.c */
	iemtx_binops_setup(); /* mtx_binops.c */
	iemtx_bitand_setup(); /* mtx_bitand.c */
	iemtx_bitleft_setup(); /* mtx_bitleft.c */
	iemtx_bitor_setup(); /* mtx_bitor.c */
	iemtx_bitright_setup(); /* mtx_bitright.c */
	iemtx_check_setup(); /* mtx_check.c */
	iemtx_cholesky_setup(); /* mtx_cholesky.c */
	iemtx_col_setup(); /* mtx_col.c */
	iemtx_cos_setup(); /* mtx_cos.c */
	iemtx_dbtorms_setup(); /* mtx_dbtorms.c */
	iemtx_diag_setup(); /* mtx_diag.c */
	iemtx_diegg_setup(); /* mtx_diegg.c */
	iemtx_distance2_setup(); /* mtx_distance2.c */
	iemtx_egg_setup(); /* mtx_egg.c */
	iemtx_element_setup(); /* mtx_element.c */
	iemtx_eq_setup(); /* mtx_eq.c */
	iemtx_exp_setup(); /* mtx_exp.c */
	iemtx_eye_setup(); /* mtx_eye.c */
	iemtx_gauss_setup(); /* mtx_gauss.c */
	iemtx_ge_setup(); /* mtx_ge.c */
	iemtx_gt_setup(); /* mtx_gt.c */
	iemtx_int_setup(); /* mtx_int.c */
	iemtx_inverse_setup(); /* mtx_inverse.c */
	iemtx_le_setup(); /* mtx_le.c */
	iemtx_log_setup(); /* mtx_log.c */
	iemtx_lt_setup(); /* mtx_lt.c */
	iemtx_matrix_setup(); /* mtx_matrix.c */
	iemtx_mean_setup(); /* mtx_mean.c */
	iemtx_mul_setup(); /* mtx_mul.c */
	iemtx_mul__setup(); /* mtx_mul~.c */
	iemtx_neq_setup(); /* mtx_neq.c */
	iemtx_ones_setup(); /* mtx_ones.c */
	iemtx_or_setup(); /* mtx_or.c */
	iemtx_pivot_setup(); /* mtx_pivot.c */
	iemtx_pow_setup(); /* mtx_pow.c */
	iemtx_print_setup(); /* mtx_print.c */
	iemtx_prod_setup(); /* mtx_prod.c */
	iemtx_rand_setup(); /* mtx_rand.c */
	iemtx_resize_setup(); /* mtx_resize.c */
	iemtx_rmstodb_setup(); /* mtx_rmstodb.c */
	iemtx_roll_setup(); /* mtx_roll.c */
	iemtx_row_setup(); /* mtx_row.c */
	iemtx_scroll_setup(); /* mtx_scroll.c */
	iemtx_sin_setup(); /* mtx_sin.c */
	iemtx_size_setup(); /* mtx_size.c */
	iemtx_sub_setup(); /* mtx_sub.c */
	iemtx_sum_setup(); /* mtx_sum.c */
	iemtx_trace_setup(); /* mtx_trace.c */
	iemtx_transpose_setup(); /* mtx_transpose.c */
	iemtx_zeros_setup(); /* mtx_zeros.c */
}


--- NEW FILE: iemmatrix_sources.h ---
/* iemmatrix-setup autogenerated header-file
 * generated by "./makesource.sh"
 * !! DO NOT MANUALLY EDIT  !!
 */

#ifndef IEMMATRIX_SOURCES_H__
#define IEMMATRIX_SOURCES_H__
void iemtx_abs_setup(void); /* mtx_abs.c */
void iemtx_add_setup(void); /* mtx_add.c */
void iemtx_and_setup(void); /* mtx_and.c */
void iemtx_binops_setup(void); /* mtx_binops.c */
void iemtx_bitand_setup(void); /* mtx_bitand.c */
void iemtx_bitleft_setup(void); /* mtx_bitleft.c */
void iemtx_bitor_setup(void); /* mtx_bitor.c */
void iemtx_bitright_setup(void); /* mtx_bitright.c */
void iemtx_check_setup(void); /* mtx_check.c */
void iemtx_cholesky_setup(void); /* mtx_cholesky.c */
void iemtx_col_setup(void); /* mtx_col.c */
void iemtx_cos_setup(void); /* mtx_cos.c */
void iemtx_dbtorms_setup(void); /* mtx_dbtorms.c */
void iemtx_diag_setup(void); /* mtx_diag.c */
void iemtx_diegg_setup(void); /* mtx_diegg.c */
void iemtx_distance2_setup(void); /* mtx_distance2.c */
void iemtx_egg_setup(void); /* mtx_egg.c */
void iemtx_element_setup(void); /* mtx_element.c */
void iemtx_eq_setup(void); /* mtx_eq.c */
void iemtx_exp_setup(void); /* mtx_exp.c */
void iemtx_eye_setup(void); /* mtx_eye.c */
void iemtx_gauss_setup(void); /* mtx_gauss.c */
void iemtx_ge_setup(void); /* mtx_ge.c */
void iemtx_gt_setup(void); /* mtx_gt.c */
void iemtx_int_setup(void); /* mtx_int.c */
void iemtx_inverse_setup(void); /* mtx_inverse.c */
void iemtx_le_setup(void); /* mtx_le.c */
void iemtx_log_setup(void); /* mtx_log.c */
void iemtx_lt_setup(void); /* mtx_lt.c */
void iemtx_matrix_setup(void); /* mtx_matrix.c */
void iemtx_mean_setup(void); /* mtx_mean.c */
void iemtx_mul_setup(void); /* mtx_mul.c */
void iemtx_mul__setup(void); /* mtx_mul~.c */
void iemtx_neq_setup(void); /* mtx_neq.c */
void iemtx_ones_setup(void); /* mtx_ones.c */
void iemtx_or_setup(void); /* mtx_or.c */
void iemtx_pivot_setup(void); /* mtx_pivot.c */
void iemtx_pow_setup(void); /* mtx_pow.c */
void iemtx_print_setup(void); /* mtx_print.c */
void iemtx_prod_setup(void); /* mtx_prod.c */
void iemtx_rand_setup(void); /* mtx_rand.c */
void iemtx_resize_setup(void); /* mtx_resize.c */
void iemtx_rmstodb_setup(void); /* mtx_rmstodb.c */
void iemtx_roll_setup(void); /* mtx_roll.c */
void iemtx_row_setup(void); /* mtx_row.c */
void iemtx_scroll_setup(void); /* mtx_scroll.c */
void iemtx_sin_setup(void); /* mtx_sin.c */
void iemtx_size_setup(void); /* mtx_size.c */
void iemtx_sub_setup(void); /* mtx_sub.c */
void iemtx_sum_setup(void); /* mtx_sum.c */
void iemtx_trace_setup(void); /* mtx_trace.c */
void iemtx_transpose_setup(void); /* mtx_transpose.c */
void iemtx_zeros_setup(void); /* mtx_zeros.c */
#endif /* IEMMATRIX_SOURCES_H__ */


--- NEW FILE: makesource.sh ---
#!/bin/sh

IEMMATRIX_H=iemmatrix_sources.h
IEMMATRIX_C=iemmatrix_sources.c

EGREP=egrep
SED=sed
LS=ls

#################################
## functions

function head_h() {
 echo "/* iemmatrix-setup autogenerated header-file"
 echo " * generated by \"$0\""
 echo " * !! DO NOT MANUALLY EDIT  !!"
 echo " */"
 echo
 echo "#ifndef IEMMATRIX_SOURCES_H__"
 echo "#define IEMMATRIX_SOURCES_H__"
}

function foot_h() {
 echo "#endif /* IEMMATRIX_SOURCES_H__ */"
 echo ""
}

function head_c() {
 echo "/* iemmatrix-setup autogenerated setup-file"
 echo " * generated by \"$0\""
 echo " * !! DO NOT MANUALLY EDIT  !!"
 echo " */"
 echo 
 echo "#include \"$IEMMATRIX_H\""
 echo
 echo "void iemmatrix_sources_setup(void)"
 echo "{"
}

function foot_c() {
 echo "}"
 echo
}


##################################
## body

head_h > $IEMMATRIX_H
head_c > $IEMMATRIX_C

for i in $(${LS} *.c | ${EGREP} -v "iemmatrix.*\.c")
do
## each c-file in iemmatrix needs to have an ie<file>_setup()-function
## that calls all needed setup-functions
## any non-alpha-numeric-character is replaced by "_"
## e.g. "multiplex~.c" -> "z_multiplex__setup()"
  SETUPNAME=ie$(echo ${i%.c} | ${SED} -e 's/[^[:alnum:]]/_/g')_setup
  echo "void ${SETUPNAME}(void); /* $i */" >> $IEMMATRIX_H
  echo "	${SETUPNAME}(); /* $i */" >> $IEMMATRIX_C
done

foot_h >> $IEMMATRIX_H
foot_c >> $IEMMATRIX_C


Index: iemmatrix.c
===================================================================
RCS file: /cvsroot/pure-data/externals/iem/iemmatrix/src/iemmatrix.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** iemmatrix.c	27 Jun 2005 15:57:49 -0000	1.9
--- iemmatrix.c	19 Sep 2005 13:13:59 -0000	1.10
***************
*** 14,94 ****
  #include "iemmatrix.h"
  
! void mtx_mul_setup();
! void mtx_div_setup();
! void mtx_add_setup();
! void mtx_sub_setup();
! void mtx_pow_setup();
! void mtx_col_setup();
! void mtx_cholesky_setup();
! void mtx_dbtorms_setup();
! void mtx_rmstodb_setup();
! void mtx_diag_setup();
! void mtx_diegg_setup();
! void mtx_distance2_setup();
! void mtx_egg_setup();
! void mtx_element_setup();
! void mtx_exp_setup();
! void mtx_eye_setup();
! void mtx_gauss_setup();
! void mtx_inverse_setup();
! void mtx_log_setup();
! void mtx_matrix_setup();
! void mtx_mean_setup();
! void mtx_check_setup();
! void mtx_print_setup();
! void mtx_prod_setup();
! void mtx_ones_setup();
! void mtx_pivot_setup();
! void mtx_rand_setup();
! void mtx_resize_setup();
! void mtx_roll_setup();
! void mtx_row_setup();
! void mtx_scroll_setup();
! void mtx_size_setup();
! void mtx_sum_setup();
! void mtx_trace_setup();
! void mtx_transpose_setup();
! void mtx_zeros_setup();
! void mtx_mul_tilde_setup();
! 
! void iemtx_setup(){
!   mtx_mul_setup();
!   mtx_div_setup();
!   mtx_add_setup();
!   mtx_sub_setup();
!   mtx_pow_setup();
!   mtx_col_setup();
!   mtx_cholesky_setup();
!   mtx_diag_setup();
!   mtx_diegg_setup();
!   mtx_distance2_setup();
!   mtx_egg_setup();
!   mtx_element_setup();
!   mtx_exp_setup();
!   mtx_eye_setup();
!   mtx_gauss_setup();
!   mtx_inverse_setup();
!   mtx_log_setup();
!   mtx_dbtorms_setup();
!   mtx_rmstodb_setup();  
!   mtx_matrix_setup();
!   mtx_mean_setup();
!   mtx_check_setup();
!   mtx_print_setup();
!   mtx_prod_setup();
!   mtx_ones_setup();
!   mtx_pivot_setup();
!   mtx_rand_setup();
!   mtx_resize_setup();
!   mtx_roll_setup();
!   mtx_row_setup();
!   mtx_scroll_setup();
!   mtx_size_setup();
!   mtx_sum_setup();
!   mtx_trace_setup();
!   mtx_transpose_setup();
!   mtx_zeros_setup();
!   mtx_mul_tilde_setup();
! }
  
  void iemmatrix_setup(){
--- 14,18 ----
  #include "iemmatrix.h"
  
! #include "iemmatrix_sources.c"
  
  void iemmatrix_setup(){
***************
*** 96,103 ****
    post("iemmatrix "VERSION);
    post("\tobjects for manipulating 2d-matrices");
!   post("\t(c) IOhannes m zmölnig, Thomas Musil :: iem, 2001-2005");
    post("\tcompiled "__DATE__" : "__TIME__);
    post("");
  
!   iemtx_setup();
  }
--- 20,27 ----
    post("iemmatrix "VERSION);
    post("\tobjects for manipulating 2d-matrices");
!   post("\t(c) IOhannes m zmölnig, Thomas Musil, Franz Zotter :: iem, 2001-2005");
    post("\tcompiled "__DATE__" : "__TIME__);
    post("");
  
!   iemmatrix_sources_setup();
  }





More information about the Pd-cvs mailing list