# Arabic translation of manpages # This file is distributed under the same license as the manpages-l10n package. # Copyright © of this file: # زايد السعيدي , 2026. msgid "" msgstr "" "Project-Id-Version: manpages-l10n 4.30.2\n" "POT-Creation-Date: 2026-06-05 06:27+0200\n" "PO-Revision-Date: 2026-06-02 19:27+0400\n" "Last-Translator: Zayed Al-Saidi \n" "Language-Team: Arabic \n" "Language: ar\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 " "&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" "X-Generator: Lokalize 23.08.5\n" #. type: TH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "insque" msgstr "insque" #. type: TH #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "2026-02-08" msgstr "8 فبراير 2026" #. type: TH #: archlinux debian-unstable #, no-wrap msgid "Linux man-pages 6.18" msgstr "صفحات دليل لينكس 6.18" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "NAME" msgstr "الاسم" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "insque, remque - insert/remove an item from a queue" msgstr "insque, remque - إدراج/إزالة عنصر من طابور" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "LIBRARY" msgstr "المكتبة" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron #: opensuse-leap-16-1 opensuse-tumbleweed msgid "Standard C library (I,\\ I<-lc>)" msgstr "مكتبة سي المعيارية (I،\\ I<-lc>)" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "SYNOPSIS" msgstr "موجز" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B<#include Esearch.hE>\n" msgstr "B<#include Esearch.hE>\n" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "" "BIB<, void *>IB<);>\n" "BIB<);>\n" msgstr "" "BIB<, void *>IB<);>\n" "BIB<);>\n" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Feature Test Macro Requirements for glibc (see B(7)):" msgstr "" "متطلبات ماكروات اختبار الميزات لـ glibc (انظر B(7)):" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "B(), B():" msgstr "B()، B():" #. || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "" " _XOPEN_SOURCE E= 500\n" " || /* glibc E= 2.19: */ _DEFAULT_SOURCE\n" " || /* glibc E= 2.19: */ _SVID_SOURCE\n" msgstr "" " _XOPEN_SOURCE E= 500\n" " || /* glibc E= 2.19: */ _DEFAULT_SOURCE\n" " || /* glibc E= 2.19: */ _SVID_SOURCE\n" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "DESCRIPTION" msgstr "الوصف" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The B() and B() functions manipulate doubly linked lists. " "Each element in the list is a structure of which the first two elements are " "a forward and a backward pointer. The linked list may be linear (i.e., NULL " "forward pointer at the end of the list and NULL backward pointer at the " "start of the list) or circular." msgstr "" "تتعامل الدالتان B() و B() مع القوائم المرتبطة مزدوجة " "الاتجاه. كل عنصر في القائمة هو بنية يكون أول عنصرين فيها مؤشرًا أماميًا ومؤشرًا " "خلفيًا. قد تكون القائمة المرتبطة خطية (أي مؤشر أمامي NULL في نهاية القائمة " "ومؤشر خلفي NULL في بداية القائمة) أو دائرية." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The B() function inserts the element pointed to by I " "immediately after the element pointed to by I." msgstr "" "تُدرج الدالة B() العنصر المشار إليه بواسطة I مباشرة بعد العنصر " "المشار إليه بواسطة I." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "If the list is linear, then the call I can be used to " "insert the initial list element, and the call sets the forward and backward " "pointers of I to NULL." msgstr "" "إذا كانت القائمة خطية، فيمكن استخدام الاستدعاء I لإدراج " "عنصر القائمة الأولي، ويضبط الاستدعاء المؤشرين الأمامي والخلفي لـ I إلى " "NULL." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "If the list is circular, the caller should ensure that the forward and " "backward pointers of the first element are initialized to point to that " "element, and the I argument of the B() call should also point " "to the element." msgstr "" "إذا كانت القائمة دائرية، يجب على المستدعي التأكد من تهيئة المؤشرين الأمامي " "والخلفي للعنصر الأول للإشارة إلى ذلك العنصر، ويجب أن تشير وسيطة I " "لاستدعاء B() أيضًا إلى العنصر." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The B() function removes the element pointed to by I from the " "doubly linked list." msgstr "" "تزيل الدالة B() العنصر المشار إليه بواسطة I من القائمة " "المرتبطة مزدوجة الاتجاه." #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "ATTRIBUTES" msgstr "السمات" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "For an explanation of the terms used in this section, see B(7)." msgstr "" "للاطلاع على شرح للمصطلحات المستخدمة في هذا القسم، انظر B(7)." #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Interface" msgstr "الواجهة" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Attribute" msgstr "السمة" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Value" msgstr "القيمة" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid ".na\n" msgstr ".na\n" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid ".nh\n" msgstr ".nh\n" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "" "B(),\n" "B()" msgstr "" "B(),\n" "B()" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Thread safety" msgstr "سلامة الخيوط" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "MT-Safe" msgstr "MT-Safe" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "VERSIONS" msgstr "الإصدارات" #. e.g., SunOS, Linux libc4 and libc5 #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "" "On ancient systems, the arguments of these functions were of type I, defined as:" msgstr "" "في الأنظمة القديمة، كانت وسائط هذه الدوال من النوع I، " "المُعرَّف كالتالي:" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "" "struct qelem {\n" " struct qelem *q_forw;\n" " struct qelem *q_back;\n" " char q_data[1];\n" "};\n" msgstr "" "struct qelem {\n" " struct qelem *q_forw;\n" " struct qelem *q_back;\n" " char q_data[1];\n" "};\n" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "This is still what you will get if B<_GNU_SOURCE> is defined before " "including Isearch.hE>." msgstr "" "هذا ما ستحصل عليه إذا عُرِّف B<_GNU_SOURCE> قبل تضمين Isearch.hE>." #. #-#-#-#-# archlinux: insque.3.pot (PACKAGE VERSION) #-#-#-#-# #. Linux libc4 and libc 5 placed them in #. .IR . #. type: Plain text #. #-#-#-#-# debian-trixie: insque.3.pot (PACKAGE VERSION) #-#-#-#-# #. Linux libc4 and libc 5 placed them #. in \fI\fP. #. type: Plain text #. #-#-#-#-# debian-unstable: insque.3.pot (PACKAGE VERSION) #-#-#-#-# #. Linux libc4 and libc 5 placed them in #. .IR . #. type: Plain text #. #-#-#-#-# fedora-44: insque.3.pot (PACKAGE VERSION) #-#-#-#-# #. Linux libc4 and libc 5 placed them #. in \fI\fP. #. type: Plain text #. #-#-#-#-# fedora-rawhide: insque.3.pot (PACKAGE VERSION) #-#-#-#-# #. Linux libc4 and libc 5 placed them #. in \fI\fP. #. type: Plain text #. #-#-#-#-# mageia-cauldron: insque.3.pot (PACKAGE VERSION) #-#-#-#-# #. Linux libc4 and libc 5 placed them in #. .IR . #. type: Plain text #. #-#-#-#-# opensuse-leap-16-1: insque.3.pot (PACKAGE VERSION) #-#-#-#-# #. Linux libc4 and libc 5 placed them in #. .IR . #. type: Plain text #. #-#-#-#-# opensuse-tumbleweed: insque.3.pot (PACKAGE VERSION) #-#-#-#-# #. Linux libc4 and libc 5 placed them in #. .IR . #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The location of the prototypes for these functions differs among several " "versions of UNIX. The above is the POSIX version. Some systems place them " "in Istring.hE>." msgstr "" "يختلف موقع النماذج الأولية لهذه الدوال بين عدة إصدارات من UNIX. ما سبق هو " "إصدار POSIX. تضعها بعض الأنظمة في Istring.hE>." #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "STANDARDS" msgstr "المعايير" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "POSIX.1-2008." msgstr "POSIX.1-2008." #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "HISTORY" msgstr "التاريخ" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "POSIX.1-2001." msgstr "POSIX.1-2001." #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "BUGS" msgstr "العلل" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "In glibc 2.4 and earlier, it was not possible to specify I as NULL. " "Consequently, to build a linear list, the caller had to build a list using " "an initial call that contained the first two elements of the list, with the " "forward and backward pointers in each element suitably initialized." msgstr "" "في glibc 2.4 والإصدارات الأقدم، لم يكن من الممكن تحديد I كـ NULL. " "وبالتالي، لبناء قائمة خطية، كان على المستدعي بناء قائمة باستخدام استدعاء " "أولي يحتوي على أول عنصرين من القائمة، مع تهيئة المؤشرين الأمامي والخلفي في " "كل عنصر بشكل مناسب." #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "EXAMPLES" msgstr "أمثلة" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The program below demonstrates the use of B(). Here is an example " "run of the program:" msgstr "يوضح البرنامج أدناه استخدام B(). إليك مثال لتشغيل البرنامج:" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "" "$ B<./a.out -c a b c>\n" "Traversing completed list:\n" " a\n" " b\n" " c\n" "That was a circular list\n" msgstr "" "$ B<./a.out -c a b c>\n" "Traversing completed list:\n" " a\n" " b\n" " c\n" "That was a circular list\n" #. type: SS #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Program source" msgstr "مصدر البرنامج" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "" "#include Esearch.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Eunistd.hE\n" "\\&\n" "struct element {\n" " struct element *forward;\n" " struct element *backward;\n" " char *name;\n" "};\n" "\\&\n" "static struct element *\n" "new_element(void)\n" "{\n" " struct element *e;\n" "\\&\n" " e = malloc(sizeof(*e));\n" " if (e == NULL) {\n" " fprintf(stderr, \"malloc() failed\\[rs]n\");\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " return e;\n" "}\n" "\\&\n" "int\n" "main(int argc, char *argv[])\n" "{\n" " struct element *first, *elem, *prev;\n" " int circular, opt, errfnd;\n" "\\&\n" " /* The \"-c\" command-line option can be used to specify that the\n" " list is circular. */\n" "\\&\n" " errfnd = 0;\n" " circular = 0;\n" " while ((opt = getopt(argc, argv, \"c\")) != -1) {\n" " switch (opt) {\n" " case \\[aq]c\\[aq]:\n" " circular = 1;\n" " break;\n" " default:\n" " errfnd = 1;\n" " break;\n" " }\n" " }\n" "\\&\n" " if (errfnd || optind E= argc) {\n" " fprintf(stderr, \"Usage: %s [-c] string...\\[rs]n\", argv[0]);\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " /* Create first element and place it in the linked list. */\n" "\\&\n" " elem = new_element();\n" " first = elem;\n" "\\&\n" " elem-Ename = argv[optind];\n" "\\&\n" " if (circular) {\n" " elem-Eforward = elem;\n" " elem-Ebackward = elem;\n" " insque(elem, elem);\n" " } else {\n" " insque(elem, NULL);\n" " }\n" "\\&\n" " /* Add remaining command-line arguments as list elements. */\n" "\\&\n" " while (++optind E argc) {\n" " prev = elem;\n" "\\&\n" " elem = new_element();\n" " elem-Ename = argv[optind];\n" " insque(elem, prev);\n" " }\n" "\\&\n" " /* Traverse the list from the start, printing element names. */\n" "\\&\n" " printf(\"Traversing completed list:\\[rs]n\");\n" " elem = first;\n" " do {\n" " printf(\" %s\\[rs]n\", elem-Ename);\n" " elem = elem-Eforward;\n" " } while (elem != NULL && elem != first);\n" "\\&\n" " if (elem == first)\n" " printf(\"That was a circular list\\[rs]n\");\n" "\\&\n" " exit(EXIT_SUCCESS);\n" "}\n" msgstr "" "#include Esearch.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Eunistd.hE\n" "\\&\n" "struct element {\n" " struct element *forward;\n" " struct element *backward;\n" " char *name;\n" "};\n" "\\&\n" "static struct element *\n" "new_element(void)\n" "{\n" " struct element *e;\n" "\\&\n" " e = malloc(sizeof(*e));\n" " if (e == NULL) {\n" " fprintf(stderr, \"malloc() failed\\[rs]n\");\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " return e;\n" "}\n" "\\&\n" "int\n" "main(int argc, char *argv[])\n" "{\n" " struct element *first, *elem, *prev;\n" " int circular, opt, errfnd;\n" "\\&\n" " /* The \"-c\" command-line option can be used to specify that the\n" " list is circular. */\n" "\\&\n" " errfnd = 0;\n" " circular = 0;\n" " while ((opt = getopt(argc, argv, \"c\")) != -1) {\n" " switch (opt) {\n" " case \\[aq]c\\[aq]:\n" " circular = 1;\n" " break;\n" " default:\n" " errfnd = 1;\n" " break;\n" " }\n" " }\n" "\\&\n" " if (errfnd || optind E= argc) {\n" " fprintf(stderr, \"Usage: %s [-c] string...\\[rs]n\", argv[0]);\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " /* Create first element and place it in the linked list. */\n" "\\&\n" " elem = new_element();\n" " first = elem;\n" "\\&\n" " elem-Ename = argv[optind];\n" "\\&\n" " if (circular) {\n" " elem-Eforward = elem;\n" " elem-Ebackward = elem;\n" " insque(elem, elem);\n" " } else {\n" " insque(elem, NULL);\n" " }\n" "\\&\n" " /* Add remaining command-line arguments as list elements. */\n" "\\&\n" " while (++optind E argc) {\n" " prev = elem;\n" "\\&\n" " elem = new_element();\n" " elem-Ename = argv[optind];\n" " insque(elem, prev);\n" " }\n" "\\&\n" " /* Traverse the list from the start, printing element names. */\n" "\\&\n" " printf(\"Traversing completed list:\\[rs]n\");\n" " elem = first;\n" " do {\n" " printf(\" %s\\[rs]n\", elem-Ename);\n" " elem = elem-Eforward;\n" " } while (elem != NULL && elem != first);\n" "\\&\n" " if (elem == first)\n" " printf(\"That was a circular list\\[rs]n\");\n" "\\&\n" " exit(EXIT_SUCCESS);\n" "}\n" #. SRC END #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "SEE ALSO" msgstr "انظر أيضًا" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "B(7)" msgstr "B(7)" #. type: TH #: debian-trixie #, no-wrap msgid "2024-06-15" msgstr "15 يونيو 2024" #. type: TH #: debian-trixie #, no-wrap msgid "Linux man-pages 6.9.1" msgstr "صفحات دليل لينكس 6.9.1" #. type: Plain text #: debian-trixie msgid "Standard C library (I, I<-lc>)" msgstr "مكتبة سي المعيارية (I، I<-lc>)" #. e.g., SunOS, Linux libc4 and libc5 #. type: Plain text #: debian-trixie fedora-44 fedora-rawhide msgid "" "On ancient systems, the arguments of these functions were of type I, defined as:" msgstr "" "في الأنظمة القديمة، كانت وسائط هذه الدوال من النوع I، المُعرَّف " "كالتالي:" #. type: Plain text #: debian-trixie fedora-44 fedora-rawhide #, no-wrap msgid "" "#include Esearch.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Eunistd.hE\n" "\\&\n" "struct element {\n" " struct element *forward;\n" " struct element *backward;\n" " char *name;\n" "};\n" "\\&\n" "static struct element *\n" "new_element(void)\n" "{\n" " struct element *e;\n" "\\&\n" " e = malloc(sizeof(*e));\n" " if (e == NULL) {\n" " fprintf(stderr, \"malloc() failed\\[rs]n\");\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " return e;\n" "}\n" "\\&\n" "int\n" "main(int argc, char *argv[])\n" "{\n" " struct element *first, *elem, *prev;\n" " int circular, opt, errfnd;\n" "\\&\n" " /* The \"-c\" command-line option can be used to specify that the\n" " list is circular. */\n" "\\&\n" " errfnd = 0;\n" " circular = 0;\n" " while ((opt = getopt(argc, argv, \"c\")) != -1) {\n" " switch (opt) {\n" " case \\[aq]c\\[aq]:\n" " circular = 1;\n" " break;\n" " default:\n" " errfnd = 1;\n" " break;\n" " }\n" " }\n" "\\&\n" " if (errfnd || optind E= argc) {\n" " fprintf(stderr, \"Usage: %s [-c] string...\\[rs]n\", argv[0]);\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " /* Create first element and place it in the linked list. */\n" "\\&\n" " elem = new_element();\n" " first = elem;\n" "\\&\n" " elem-Ename = argv[optind];\n" "\\&\n" " if (circular) {\n" " elem-Eforward = elem;\n" " elem-Ebackward = elem;\n" " insque(elem, elem);\n" " } else {\n" " insque(elem, NULL);\n" " }\n" "\\&\n" " /* Add remaining command-line arguments as list elements. */\n" "\\&\n" " while (++optind E argc) {\n" " prev = elem;\n" "\\&\n" " elem = new_element();\n" " elem-Ename = argv[optind];\n" " insque(elem, prev);\n" " }\n" "\\&\n" " /* Traverse the list from the start, printing element names. */\n" "\\&\n" " printf(\"Traversing completed list:\\[rs]n\");\n" " elem = first;\n" " do {\n" " printf(\" %s\\[rs]n\", elem-Ename);\n" " elem = elem-Eforward;\n" " } while (elem != NULL && elem != first);\n" "\\&\n" " if (elem == first)\n" " printf(\"That was a circular list\\[rs]n\");\n" "\\&\n" " exit(EXIT_SUCCESS);\n" "}\n" msgstr "" "#include Esearch.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Eunistd.hE\n" "\\&\n" "struct element {\n" " struct element *forward;\n" " struct element *backward;\n" " char *name;\n" "};\n" "\\&\n" "static struct element *\n" "new_element(void)\n" "{\n" " struct element *e;\n" "\\&\n" " e = malloc(sizeof(*e));\n" " if (e == NULL) {\n" " fprintf(stderr, \"malloc() failed\\[rs]n\");\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " return e;\n" "}\n" "\\&\n" "int\n" "main(int argc, char *argv[])\n" "{\n" " struct element *first, *elem, *prev;\n" " int circular, opt, errfnd;\n" "\\&\n" " /* The \"-c\" command-line option can be used to specify that the\n" " list is circular. */\n" "\\&\n" " errfnd = 0;\n" " circular = 0;\n" " while ((opt = getopt(argc, argv, \"c\")) != -1) {\n" " switch (opt) {\n" " case \\[aq]c\\[aq]:\n" " circular = 1;\n" " break;\n" " default:\n" " errfnd = 1;\n" " break;\n" " }\n" " }\n" "\\&\n" " if (errfnd || optind E= argc) {\n" " fprintf(stderr, \"Usage: %s [-c] string...\\[rs]n\", argv[0]);\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " /* Create first element and place it in the linked list. */\n" "\\&\n" " elem = new_element();\n" " first = elem;\n" "\\&\n" " elem-Ename = argv[optind];\n" "\\&\n" " if (circular) {\n" " elem-Eforward = elem;\n" " elem-Ebackward = elem;\n" " insque(elem, elem);\n" " } else {\n" " insque(elem, NULL);\n" " }\n" "\\&\n" " /* Add remaining command-line arguments as list elements. */\n" "\\&\n" " while (++optind E argc) {\n" " prev = elem;\n" "\\&\n" " elem = new_element();\n" " elem-Ename = argv[optind];\n" " insque(elem, prev);\n" " }\n" "\\&\n" " /* Traverse the list from the start, printing element names. */\n" "\\&\n" " printf(\"Traversing completed list:\\[rs]n\");\n" " elem = first;\n" " do {\n" " printf(\" %s\\[rs]n\", elem-Ename);\n" " elem = elem-Eforward;\n" " } while (elem != NULL && elem != first);\n" "\\&\n" " if (elem == first)\n" " printf(\"That was a circular list\\[rs]n\");\n" "\\&\n" " exit(EXIT_SUCCESS);\n" "}\n" #. type: TH #: fedora-44 fedora-rawhide #, no-wrap msgid "2024-07-23" msgstr "23 يوليو 2024" #. type: TH #: fedora-44 fedora-rawhide #, no-wrap msgid "Linux man-pages 6.13" msgstr "صفحات دليل لينكس 6.13" #. type: TH #: mageia-cauldron #, no-wrap msgid "Linux man-pages 6.17" msgstr "صفحات دليل لينكس 6.17" #. type: TH #: opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Linux man-pages (unreleased)" msgstr "صفحات دليل لينكس (لم تصدر بعد)"