diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..3beecfb7 --- /dev/null +++ b/Makefile @@ -0,0 +1,2 @@ +LIST=OS +include recurse.mk diff --git a/README.md b/README.md new file mode 100644 index 00000000..d4aa8759 --- /dev/null +++ b/README.md @@ -0,0 +1,31 @@ +Сборка проекта в ЗОСРВ "Нейтрино" редакции 2020 +=============================================== + +Для всех архитектур: + +``` +make -j16 install +``` + +Только для x86: + +``` +CPULIST=x86 make -j16 install +``` + +**Порт nano проверен на работоспособность условно и, вероятно, потребует дополнительной адаптации.** + +**Поддержка мыши отключена (требуется более новый ncurses).** + +Зависимости +=========== + +1. В процессе сборки происходит скачивание `gnulib` + +Запуск +=========== + +``` +export TERM=xterm +nano +``` diff --git a/common.mk b/common.mk new file mode 100644 index 00000000..42b465d1 --- /dev/null +++ b/common.mk @@ -0,0 +1,15 @@ +ifndef QCONFIG +QCONFIG=qconfig.mk +endif +include $(QCONFIG) + +CONFIGUREFLAGS += --disable-maintainer-mode +#CONFIGUREFLAGS += --disable-browser +#CONFIGUREFLAGS += --disable-utf8 +CONFIGUREFLAGS += --disable-mouse + +CPPFLAGS += -D_QNX_SOURCE=1 +CFLAGS += -D_QNX_SOURCE=1 + +include $(MKFILES_ROOT)/autotools.mk +include $(MKFILES_ROOT)/qtargets.mk diff --git a/nto/Makefile b/nto/Makefile new file mode 100644 index 00000000..074b0d52 --- /dev/null +++ b/nto/Makefile @@ -0,0 +1,2 @@ +LIST=CPU +include recurse.mk diff --git a/nto/aarch64/Makefile b/nto/aarch64/Makefile new file mode 100644 index 00000000..c95a6664 --- /dev/null +++ b/nto/aarch64/Makefile @@ -0,0 +1,2 @@ +LIST=VARIANT +include recurse.mk diff --git a/nto/aarch64/o.le/Makefile b/nto/aarch64/o.le/Makefile new file mode 100644 index 00000000..0f9d7b9a --- /dev/null +++ b/nto/aarch64/o.le/Makefile @@ -0,0 +1 @@ +include ../../../common.mk diff --git a/nto/arm/Makefile b/nto/arm/Makefile new file mode 100644 index 00000000..c95a6664 --- /dev/null +++ b/nto/arm/Makefile @@ -0,0 +1,2 @@ +LIST=VARIANT +include recurse.mk diff --git a/nto/arm/o.le.v7/Makefile b/nto/arm/o.le.v7/Makefile new file mode 100644 index 00000000..0f9d7b9a --- /dev/null +++ b/nto/arm/o.le.v7/Makefile @@ -0,0 +1 @@ +include ../../../common.mk diff --git a/nto/arm/o.le/Makefile b/nto/arm/o.le/Makefile new file mode 100644 index 00000000..0f9d7b9a --- /dev/null +++ b/nto/arm/o.le/Makefile @@ -0,0 +1 @@ +include ../../../common.mk diff --git a/nto/e2k/Makefile b/nto/e2k/Makefile new file mode 100644 index 00000000..c95a6664 --- /dev/null +++ b/nto/e2k/Makefile @@ -0,0 +1,2 @@ +LIST=VARIANT +include recurse.mk diff --git a/nto/e2k/o.le/Makefile b/nto/e2k/o.le/Makefile new file mode 100644 index 00000000..0f9d7b9a --- /dev/null +++ b/nto/e2k/o.le/Makefile @@ -0,0 +1 @@ +include ../../../common.mk diff --git a/nto/mips/Makefile b/nto/mips/Makefile new file mode 100644 index 00000000..c95a6664 --- /dev/null +++ b/nto/mips/Makefile @@ -0,0 +1,2 @@ +LIST=VARIANT +include recurse.mk diff --git a/nto/mips/o.be/Makefile b/nto/mips/o.be/Makefile new file mode 100644 index 00000000..0f9d7b9a --- /dev/null +++ b/nto/mips/o.be/Makefile @@ -0,0 +1 @@ +include ../../../common.mk diff --git a/nto/mips/o.le.mc/Makefile b/nto/mips/o.le.mc/Makefile new file mode 100644 index 00000000..0f9d7b9a --- /dev/null +++ b/nto/mips/o.le.mc/Makefile @@ -0,0 +1 @@ +include ../../../common.mk diff --git a/nto/mips/o.le/Makefile b/nto/mips/o.le/Makefile new file mode 100644 index 00000000..0f9d7b9a --- /dev/null +++ b/nto/mips/o.le/Makefile @@ -0,0 +1 @@ +include ../../../common.mk diff --git a/nto/ppc/Makefile b/nto/ppc/Makefile new file mode 100644 index 00000000..c95a6664 --- /dev/null +++ b/nto/ppc/Makefile @@ -0,0 +1,2 @@ +LIST=VARIANT +include recurse.mk diff --git a/nto/ppc/o.be.spe/Makefile b/nto/ppc/o.be.spe/Makefile new file mode 100644 index 00000000..0f9d7b9a --- /dev/null +++ b/nto/ppc/o.be.spe/Makefile @@ -0,0 +1 @@ +include ../../../common.mk diff --git a/nto/ppc/o.be/Makefile b/nto/ppc/o.be/Makefile new file mode 100644 index 00000000..0f9d7b9a --- /dev/null +++ b/nto/ppc/o.be/Makefile @@ -0,0 +1 @@ +include ../../../common.mk diff --git a/nto/x86/Makefile b/nto/x86/Makefile new file mode 100644 index 00000000..c95a6664 --- /dev/null +++ b/nto/x86/Makefile @@ -0,0 +1,2 @@ +LIST=VARIANT +include recurse.mk diff --git a/nto/x86/o/Makefile b/nto/x86/o/Makefile new file mode 100644 index 00000000..0f9d7b9a --- /dev/null +++ b/nto/x86/o/Makefile @@ -0,0 +1 @@ +include ../../../common.mk diff --git a/src/text.c b/src/text.c index bb108aae..a9cb8e56 100644 --- a/src/text.c +++ b/src/text.c @@ -2065,8 +2065,12 @@ void treat(char *tempfile_name, char *theprogram, bool spelling) size_t was_x = openfile->current_x; bool was_at_eol = (openfile->current->data[openfile->current_x] == '\0'); struct stat fileinfo; +#ifndef __KPDA__ long timestamp_sec = 0; long timestamp_nsec = 0; +#else /* __KPDA__ */ + time_t timestamp = 0; +#endif /* __KPDA__ */ static char **arguments = NULL; pid_t thepid; int program_status, errornumber; @@ -2085,8 +2089,12 @@ void treat(char *tempfile_name, char *theprogram, bool spelling) return; } +#ifndef __KPDA__ timestamp_sec = (long)fileinfo.st_mtim.tv_sec; timestamp_nsec = (long)fileinfo.st_mtim.tv_nsec; +#else /* __KPDA__ */ + timestamp = (time_t)fileinfo.st_mtime; +#endif /* __KPDA__ */ } /* Exit from curses mode to give the program control of the terminal. */ @@ -2128,9 +2136,14 @@ void treat(char *tempfile_name, char *theprogram, bool spelling) free(arguments[0]); /* When the temporary file wasn't touched, say so and leave. */ +#ifndef __KPDA__ if (timestamp_sec > 0 && stat(tempfile_name, &fileinfo) == 0 && (long)fileinfo.st_mtim.tv_sec == timestamp_sec && (long)fileinfo.st_mtim.tv_nsec == timestamp_nsec) { +#else /* __KPDA__ */ + if (timestamp > 0 && stat(tempfile_name, &fileinfo) == 0 && + (time_t)fileinfo.st_mtime == timestamp) { +#endif /* __KPDA__ */ statusline(REMARK, _("Nothing changed")); return; }