summaryrefslogtreecommitdiffstats
path: root/templates/man3/shm_open.3.pot
diff options
context:
space:
mode:
Diffstat (limited to 'templates/man3/shm_open.3.pot')
-rw-r--r--templates/man3/shm_open.3.pot236
1 files changed, 217 insertions, 19 deletions
diff --git a/templates/man3/shm_open.3.pot b/templates/man3/shm_open.3.pot
index ae6ff32c..ce6fea95 100644
--- a/templates/man3/shm_open.3.pot
+++ b/templates/man3/shm_open.3.pot
@@ -7,7 +7,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2024-03-01 17:08+0100\n"
+"POT-Creation-Date: 2024-06-01 06:21+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -24,15 +24,15 @@ msgid "shm_open"
msgstr ""
#. type: TH
-#: archlinux fedora-40 fedora-rawhide mageia-cauldron
+#: archlinux debian-unstable opensuse-tumbleweed
#, no-wrap
-msgid "2023-10-31"
+msgid "2024-05-02"
msgstr ""
#. type: TH
-#: archlinux fedora-40 fedora-rawhide mageia-cauldron
+#: archlinux debian-unstable
#, no-wrap
-msgid "Linux man-pages 6.06"
+msgid "Linux man-pages 6.8"
msgstr ""
#. type: SH
@@ -585,17 +585,16 @@ msgid ""
msgstr ""
#. type: Plain text
-#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron
-#: opensuse-tumbleweed
+#: archlinux debian-unstable opensuse-tumbleweed
#, no-wrap
msgid ""
-"#include E<lt>fcntl.hE<gt>\n"
+"#ifndef PSHM_UCASE_H\n"
+"#define PSHM_UCASE_H\n"
+"\\&\n"
"#include E<lt>semaphore.hE<gt>\n"
+"#include E<lt>stddef.hE<gt>\n"
"#include E<lt>stdio.hE<gt>\n"
"#include E<lt>stdlib.hE<gt>\n"
-"#include E<lt>sys/mman.hE<gt>\n"
-"#include E<lt>sys/stat.hE<gt>\n"
-"#include E<lt>unistd.hE<gt>\n"
"\\&\n"
"#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\e\n"
" } while (0)\n"
@@ -611,6 +610,8 @@ msgid ""
" size_t cnt; /* Number of bytes used in \\[aq]buf\\[aq] */\n"
" char buf[BUF_SIZE]; /* Data being transferred */\n"
"};\n"
+"\\&\n"
+"#endif // include guard\n"
msgstr ""
#. type: SS
@@ -642,8 +643,7 @@ msgid ""
msgstr ""
#. type: Plain text
-#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron
-#: opensuse-tumbleweed
+#: archlinux debian-unstable opensuse-tumbleweed
#, no-wrap
msgid ""
"/* pshm_ucase_bounce.c\n"
@@ -651,6 +651,11 @@ msgid ""
" Licensed under GNU General Public License v2 or later.\n"
"*/\n"
"#include E<lt>ctype.hE<gt>\n"
+"#include E<lt>fcntl.hE<gt>\n"
+"#include E<lt>stdio.hE<gt>\n"
+"#include E<lt>stdlib.hE<gt>\n"
+"#include E<lt>sys/mman.hE<gt>\n"
+"#include E<lt>unistd.hE<gt>\n"
"\\&\n"
"#include \"pshm_ucase.h\"\n"
"\\&\n"
@@ -748,15 +753,20 @@ msgid ""
msgstr ""
#. type: Plain text
-#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron
-#: opensuse-tumbleweed
+#: archlinux debian-unstable opensuse-tumbleweed
#, no-wrap
msgid ""
"/* pshm_ucase_send.c\n"
"\\&\n"
" Licensed under GNU General Public License v2 or later.\n"
"*/\n"
+"#include E<lt>fcntl.hE<gt>\n"
+"#include E<lt>stddef.hE<gt>\n"
+"#include E<lt>stdio.hE<gt>\n"
+"#include E<lt>stdlib.hE<gt>\n"
"#include E<lt>string.hE<gt>\n"
+"#include E<lt>sys/mman.hE<gt>\n"
+"#include E<lt>unistd.hE<gt>\n"
"\\&\n"
"#include \"pshm_ucase.h\"\n"
"\\&\n"
@@ -1218,15 +1228,197 @@ msgid ""
msgstr ""
#. type: TH
-#: debian-unstable opensuse-tumbleweed
+#: fedora-40 fedora-rawhide mageia-cauldron
+#, no-wrap
+msgid "2023-10-31"
+msgstr ""
+
+#. type: TH
+#: fedora-40 mageia-cauldron
+#, no-wrap
+msgid "Linux man-pages 6.06"
+msgstr ""
+
+#. type: Plain text
+#: fedora-40 fedora-rawhide mageia-cauldron
+#, no-wrap
+msgid ""
+"#include E<lt>fcntl.hE<gt>\n"
+"#include E<lt>semaphore.hE<gt>\n"
+"#include E<lt>stdio.hE<gt>\n"
+"#include E<lt>stdlib.hE<gt>\n"
+"#include E<lt>sys/mman.hE<gt>\n"
+"#include E<lt>sys/stat.hE<gt>\n"
+"#include E<lt>unistd.hE<gt>\n"
+"\\&\n"
+"#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\e\n"
+" } while (0)\n"
+"\\&\n"
+"#define BUF_SIZE 1024 /* Maximum size for exchanged string */\n"
+"\\&\n"
+"/* Define a structure that will be imposed on the shared\n"
+" memory object */\n"
+"\\&\n"
+"struct shmbuf {\n"
+" sem_t sem1; /* POSIX unnamed semaphore */\n"
+" sem_t sem2; /* POSIX unnamed semaphore */\n"
+" size_t cnt; /* Number of bytes used in \\[aq]buf\\[aq] */\n"
+" char buf[BUF_SIZE]; /* Data being transferred */\n"
+"};\n"
+msgstr ""
+
+#. type: Plain text
+#: fedora-40 fedora-rawhide mageia-cauldron
+#, no-wrap
+msgid ""
+"/* pshm_ucase_bounce.c\n"
+"\\&\n"
+" Licensed under GNU General Public License v2 or later.\n"
+"*/\n"
+"#include E<lt>ctype.hE<gt>\n"
+"\\&\n"
+"#include \"pshm_ucase.h\"\n"
+"\\&\n"
+"int\n"
+"main(int argc, char *argv[])\n"
+"{\n"
+" int fd;\n"
+" char *shmpath;\n"
+" struct shmbuf *shmp;\n"
+"\\&\n"
+" if (argc != 2) {\n"
+" fprintf(stderr, \"Usage: %s /shm-path\\en\", argv[0]);\n"
+" exit(EXIT_FAILURE);\n"
+" }\n"
+"\\&\n"
+" shmpath = argv[1];\n"
+"\\&\n"
+" /* Create shared memory object and set its size to the size\n"
+" of our structure. */\n"
+"\\&\n"
+" fd = shm_open(shmpath, O_CREAT | O_EXCL | O_RDWR, 0600);\n"
+" if (fd == -1)\n"
+" errExit(\"shm_open\");\n"
+"\\&\n"
+" if (ftruncate(fd, sizeof(struct shmbuf)) == -1)\n"
+" errExit(\"ftruncate\");\n"
+"\\&\n"
+" /* Map the object into the caller\\[aq]s address space. */\n"
+"\\&\n"
+" shmp = mmap(NULL, sizeof(*shmp), PROT_READ | PROT_WRITE,\n"
+" MAP_SHARED, fd, 0);\n"
+" if (shmp == MAP_FAILED)\n"
+" errExit(\"mmap\");\n"
+"\\&\n"
+" /* Initialize semaphores as process-shared, with value 0. */\n"
+"\\&\n"
+" if (sem_init(&shmp-E<gt>sem1, 1, 0) == -1)\n"
+" errExit(\"sem_init-sem1\");\n"
+" if (sem_init(&shmp-E<gt>sem2, 1, 0) == -1)\n"
+" errExit(\"sem_init-sem2\");\n"
+"\\&\n"
+" /* Wait for \\[aq]sem1\\[aq] to be posted by peer before touching\n"
+" shared memory. */\n"
+"\\&\n"
+" if (sem_wait(&shmp-E<gt>sem1) == -1)\n"
+" errExit(\"sem_wait\");\n"
+"\\&\n"
+" /* Convert data in shared memory into upper case. */\n"
+"\\&\n"
+" for (size_t j = 0; j E<lt> shmp-E<gt>cnt; j++)\n"
+" shmp-E<gt>buf[j] = toupper((unsigned char) shmp-E<gt>buf[j]);\n"
+"\\&\n"
+" /* Post \\[aq]sem2\\[aq] to tell the peer that it can now\n"
+" access the modified data in shared memory. */\n"
+"\\&\n"
+" if (sem_post(&shmp-E<gt>sem2) == -1)\n"
+" errExit(\"sem_post\");\n"
+"\\&\n"
+" /* Unlink the shared memory object. Even if the peer process\n"
+" is still using the object, this is okay. The object will\n"
+" be removed only after all open references are closed. */\n"
+"\\&\n"
+" shm_unlink(shmpath);\n"
+"\\&\n"
+" exit(EXIT_SUCCESS);\n"
+"}\n"
+msgstr ""
+
+#. type: Plain text
+#: fedora-40 fedora-rawhide mageia-cauldron
#, no-wrap
-msgid "2023-07-20"
+msgid ""
+"/* pshm_ucase_send.c\n"
+"\\&\n"
+" Licensed under GNU General Public License v2 or later.\n"
+"*/\n"
+"#include E<lt>string.hE<gt>\n"
+"\\&\n"
+"#include \"pshm_ucase.h\"\n"
+"\\&\n"
+"int\n"
+"main(int argc, char *argv[])\n"
+"{\n"
+" int fd;\n"
+" char *shmpath, *string;\n"
+" size_t len;\n"
+" struct shmbuf *shmp;\n"
+"\\&\n"
+" if (argc != 3) {\n"
+" fprintf(stderr, \"Usage: %s /shm-path string\\en\", argv[0]);\n"
+" exit(EXIT_FAILURE);\n"
+" }\n"
+"\\&\n"
+" shmpath = argv[1];\n"
+" string = argv[2];\n"
+" len = strlen(string);\n"
+"\\&\n"
+" if (len E<gt> BUF_SIZE) {\n"
+" fprintf(stderr, \"String is too long\\en\");\n"
+" exit(EXIT_FAILURE);\n"
+" }\n"
+"\\&\n"
+" /* Open the existing shared memory object and map it\n"
+" into the caller\\[aq]s address space. */\n"
+"\\&\n"
+" fd = shm_open(shmpath, O_RDWR, 0);\n"
+" if (fd == -1)\n"
+" errExit(\"shm_open\");\n"
+"\\&\n"
+" shmp = mmap(NULL, sizeof(*shmp), PROT_READ | PROT_WRITE,\n"
+" MAP_SHARED, fd, 0);\n"
+" if (shmp == MAP_FAILED)\n"
+" errExit(\"mmap\");\n"
+"\\&\n"
+" /* Copy data into the shared memory object. */\n"
+"\\&\n"
+" shmp-E<gt>cnt = len;\n"
+" memcpy(&shmp-E<gt>buf, string, len);\n"
+"\\&\n"
+" /* Tell peer that it can now access shared memory. */\n"
+"\\&\n"
+" if (sem_post(&shmp-E<gt>sem1) == -1)\n"
+" errExit(\"sem_post\");\n"
+"\\&\n"
+" /* Wait until peer says that it has finished accessing\n"
+" the shared memory. */\n"
+"\\&\n"
+" if (sem_wait(&shmp-E<gt>sem2) == -1)\n"
+" errExit(\"sem_wait\");\n"
+"\\&\n"
+" /* Write modified data in shared memory to standard output. */\n"
+"\\&\n"
+" write(STDOUT_FILENO, &shmp-E<gt>buf, len);\n"
+" write(STDOUT_FILENO, \"\\en\", 1);\n"
+"\\&\n"
+" exit(EXIT_SUCCESS);\n"
+"}\n"
msgstr ""
#. type: TH
-#: debian-unstable opensuse-tumbleweed
+#: fedora-rawhide
#, no-wrap
-msgid "Linux man-pages 6.05.01"
+msgid "Linux man-pages 6.7"
msgstr ""
#. type: TH
@@ -1240,3 +1432,9 @@ msgstr ""
#, no-wrap
msgid "Linux man-pages 6.04"
msgstr ""
+
+#. type: TH
+#: opensuse-tumbleweed
+#, no-wrap
+msgid "Linux man-pages (unreleased)"
+msgstr ""