Commit 8c421f94 authored by Claes Sjofors's avatar Claes Sjofors

Merge branch 'master' of newton:/data1/x0-0-0/pwr

parents 22a50738 dde604cd
ifndef link_rule_mk ifndef link_rule_mk
link_rule_mk := 1 link_rule_mk := 1
ifeq ($(PWRE_CONF_LIBHDF5),1) ifndef pwre_cxx
ldsev = mpic++ ifeq ($(PWRE_CONF_LIBHDF5),1)
ldsev = mpic++
else
ldsev = $(ldxx)
endif
else else
ldsev = $(ldxx) ldsev = $(pwre_cxx)
endif endif
link = $(ldsev) $(elinkflags) $(domap) -o $(export_exe) \ link = $(ldsev) $(elinkflags) $(domap) -o $(export_exe) \
......
...@@ -62,7 +62,7 @@ then ...@@ -62,7 +62,7 @@ then
cinc="-I$pwr_inc -I$pwrp_rttbld" cinc="-I$pwr_inc -I$pwrp_rttbld"
cflags="-DOS_LINUX -DOS=linux -DHW_ARM=1 -DPOSIX_SOURCE -DWall" cflags="-DOS_LINUX -DOS=linux -DHW_ARM=1 -DPOSIX_SOURCE -DWall"
${cc} -c -o $pwrp_obj/${name}.o $pwrp_rttbld/${name}.c ${cinc} ${cflags} ${cc} -c -o $pwrp_obj/${name}.o $pwrp_rttbld/${name}.c ${cinc} ${cflags}
ar rc ${ar_name_pict} $pwrp_obj/${name}.o ar rcU ${ar_name_pict} $pwrp_obj/${name}.o
else else
# echo "Is rttsys" # echo "Is rttsys"
ar_name_pict=${pwr_lib}/libpwr_dtt.a ar_name_pict=${pwr_lib}/libpwr_dtt.a
...@@ -78,7 +78,7 @@ then ...@@ -78,7 +78,7 @@ then
cflags="-DOS_LINUX -DOS=linux -DHW_ARM=1 -DPOSIX_SOURCE -DWall" cflags="-DOS_LINUX -DOS=linux -DHW_ARM=1 -DPOSIX_SOURCE -DWall"
${cc} -c -o ${bld_dir}/${name}.o \ ${cc} -c -o ${bld_dir}/${name}.o \
${bld_dir}/${name}.c ${cinc} ${cflags} ${bld_dir}/${name}.c ${cinc} ${cflags}
ar rc ${ar_name_pict} ${bld_dir}/${name}.o ar rcU ${ar_name_pict} ${bld_dir}/${name}.o
fi fi
else else
echo "Opsys ($opsys) is not linux, not yet supported" echo "Opsys ($opsys) is not linux, not yet supported"
......
...@@ -1189,6 +1189,10 @@ sub copy () ...@@ -1189,6 +1189,10 @@ sub copy ()
my $flavour = $_[1]; my $flavour = $_[1];
if ( $flavour eq "") {
$flavour = "gtk";
}
my($cmd) = "make -f $bindir/import_files.mk" . " " . $_[0] . "_" . $flavour; my($cmd) = "make -f $bindir/import_files.mk" . " " . $_[0] . "_" . $flavour;
system("$cmd"); system("$cmd");
} }
......
...@@ -62,7 +62,7 @@ void CoWowTimer::remove() ...@@ -62,7 +62,7 @@ void CoWowTimer::remove()
{ {
} }
CoWowRecall::CoWowRecall() : m_current_recall_line(0), m_current_size(0) CoWowRecall::CoWowRecall() : m_current_recall_line(0), m_current_size(0), m_tmp_size(0)
{ {
memset(m_recall, 0, sizeof(m_recall)); memset(m_recall, 0, sizeof(m_recall));
} }
...@@ -87,22 +87,33 @@ void CoWowRecall::push(const char* src) ...@@ -87,22 +87,33 @@ void CoWowRecall::push(const char* src)
void CoWowRecall::resetTmp() void CoWowRecall::resetTmp()
{ {
for (int i = 0; i < m_current_size; i++) { for (int i = 0; i < m_recall_size; i++) {
strcpy(tmp[i], m_recall[i]); strcpy(tmp[i], m_recall[i]);
} }
m_current_recall_line = 0; m_current_recall_line = 0;
m_tmp_size = m_current_size;
} }
const char* CoWowRecall::popUp(const char* src) const char* CoWowRecall::popUp(const char* src)
{ {
if (m_current_recall_line == 0 && !streq(src, tmp[0])) { if (m_current_recall_line == 0 && !streq(src, tmp[0])) {
push(src); if (m_tmp_size == 0 || !streq(tmp[0], "")) {
for (int i = m_recall_size - 2; i >= 0; i--) {
strcpy(tmp[i + 1], tmp[i]);
}
m_tmp_size++;
if (m_tmp_size > m_recall_size) {
m_tmp_size = m_recall_size;
}
}
strncpy(tmp[0], src, m_line_size);
tmp[0][m_line_size - 1] = 0;
} else { } else {
strncpy(tmp[m_current_recall_line], src, m_line_size); strncpy(tmp[m_current_recall_line], src, m_line_size);
} }
m_current_recall_line++; m_current_recall_line++;
if (m_current_recall_line > m_current_size - 1) { if (m_current_recall_line > m_tmp_size - 1) {
m_current_recall_line = m_current_size - 1; m_current_recall_line = m_tmp_size - 1;
} }
return tmp[m_current_recall_line]; return tmp[m_current_recall_line];
} }
......
...@@ -93,6 +93,7 @@ public: ...@@ -93,6 +93,7 @@ public:
char m_recall[m_recall_size][m_line_size]; char m_recall[m_recall_size][m_line_size];
int m_current_recall_line; int m_current_recall_line;
int m_current_size; int m_current_size;
int m_tmp_size;
char tmp[m_recall_size][m_line_size]; char tmp[m_recall_size][m_line_size];
void push(const char* src); void push(const char* src);
......
...@@ -311,9 +311,9 @@ public: ...@@ -311,9 +311,9 @@ public:
pwr_tFileName name; pwr_tFileName name;
}; };
int subpalette_cmp(LocalFile p1, LocalFile p2) bool subpalette_cmp(LocalFile p1, LocalFile p2)
{ {
return strcmp(p1.name, p2.name); return strcmp(p1.name, p2.name) < 0;
} }
// //
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment