Overview
Comment:Fixed input.oct for compatibility with input.m.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 9fa6221d142978a86afdf9ba6683225fea9b6accea2dc9fce2ed73228cf10607
User & Date: geraint@users.sourceforge.net on 2001-04-11 02:13:29.000
Other Links: branch diff | manifest | tags
Context
2001-04-11
07:36:10
Now uses system_cr.h in place of system.h in .c rep -
compatible with older code
check-in: 850ea26ade user: gawthrop@users.sourceforge.net tags: origin/master, trunk
02:13:29
Fixed input.oct for compatibility with input.m. check-in: 9fa6221d14 user: geraint@users.sourceforge.net tags: origin/master, trunk
2001-04-10
13:57:33
Fixed bash/sh compatibility bug check-in: 6c6042c820 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
endfunction
EOF

}


make_cc() {
## Check octave version
case `$MATRIX --version | awk -F\. '{print $2}'` in
    0) vector_value="vector_value";;       	# stable 
    1) vector_value="column_vector_value";;	# development
    *) vector_value="column_vector_value";;
esac

cat > $outfile <<EOF
// -*-c++-*- Put emacs into c++-mode

// 
// System ${Sys}, representation input, language oct; 
// File $Sys_input.oct; 
// Generated by MTT on Thu Apr  5 21:05:08 EDT 2001; 

#ifdef STANDALONE
#include <octave/oct.h>
#include "${Sys}_def.h"

void strip_comments (istream &str)
{







<
<
<
<
<
<
<





|
|







61
62
63
64
65
66
67







68
69
70
71
72
73
74
75
76
77
78
79
80
81
endfunction
EOF

}


make_cc() {







cat > $outfile <<EOF
// -*-c++-*- Put emacs into c++-mode

// 
// System ${Sys}, representation input, language oct; 
// File ${Sys}_input.oct; 
// Generated by MTT on `date`; 

#ifdef STANDALONE
#include <octave/oct.h>
#include "${Sys}_def.h"

void strip_comments (istream &str)
{
122
123
124
125
126
127
128



129











130
131
132
133
134
135
136
  octave_value_list retval;
#endif // ! STANDALONE

  ColumnVector	mttu	(MTTNU);

  // Set up the mttu vector
#ifndef STANDALONE



  mttu	= get_global_value ("MTT_input").${vector_value}();











#else
  double t, u;
  strip_comments (cin);
  cin >> t;
  for (register int i = 0; i < MTTNU; i++)
    {      
      cin >> u;







>
>
>
|
>
>
>
>
>
>
>
>
>
>
>







115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
  octave_value_list retval;
#endif // ! STANDALONE

  ColumnVector	mttu	(MTTNU);

  // Set up the mttu vector
#ifndef STANDALONE
  static int MTT_input_row;
  static int MTT_input_last;

  Matrix MTT_input = get_global_value ("MTT_input").matrix_value();
  mttu = MTT_input.row (MTT_input_row);

  if (0 == MTT_input_row)
    {
      MTT_input_last = (MTT_input.length() / mttu.length()) - 1;
    }
  if (MTT_input_row < MTT_input_last)
    {
      MTT_input_row++;
    }
  
#else
  double t, u;
  strip_comments (cin);
  cin >> t;
  for (register int i = 0; i < MTTNU; i++)
    {      
      cin >> u;

MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]