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
link_rule_mk := 1
ifeq ($(PWRE_CONF_LIBHDF5),1)
ifndef pwre_cxx
ifeq ($(PWRE_CONF_LIBHDF5),1)
ldsev = mpic++
else
else
ldsev = $(ldxx)
endif
else
ldsev = $(pwre_cxx)
endif
link = $(ldsev) $(elinkflags) $(domap) -o $(export_exe) \
......
......@@ -62,7 +62,7 @@ then
cinc="-I$pwr_inc -I$pwrp_rttbld"
cflags="-DOS_LINUX -DOS=linux -DHW_ARM=1 -DPOSIX_SOURCE -DWall"
${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
# echo "Is rttsys"
ar_name_pict=${pwr_lib}/libpwr_dtt.a
......@@ -78,7 +78,7 @@ then
cflags="-DOS_LINUX -DOS=linux -DHW_ARM=1 -DPOSIX_SOURCE -DWall"
${cc} -c -o ${bld_dir}/${name}.o \
${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
else
echo "Opsys ($opsys) is not linux, not yet supported"
......
......@@ -1189,6 +1189,10 @@ sub copy ()
my $flavour = $_[1];
if ( $flavour eq "") {
$flavour = "gtk";
}
my($cmd) = "make -f $bindir/import_files.mk" . " " . $_[0] . "_" . $flavour;
system("$cmd");
}
......
......@@ -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));
}
......@@ -87,22 +87,33 @@ void CoWowRecall::push(const char* src)
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]);
}
m_current_recall_line = 0;
m_tmp_size = m_current_size;
}
const char* CoWowRecall::popUp(const char* src)
{
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 {
strncpy(tmp[m_current_recall_line], src, m_line_size);
}
m_current_recall_line++;
if (m_current_recall_line > m_current_size - 1) {
m_current_recall_line = m_current_size - 1;
if (m_current_recall_line > m_tmp_size - 1) {
m_current_recall_line = m_tmp_size - 1;
}
return tmp[m_current_recall_line];
}
......
......@@ -93,6 +93,7 @@ public:
char m_recall[m_recall_size][m_line_size];
int m_current_recall_line;
int m_current_size;
int m_tmp_size;
char tmp[m_recall_size][m_line_size];
void push(const char* src);
......
......@@ -311,9 +311,9 @@ public:
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