JM プロジェクトは、主に Linux 関連のマニュアルページの日本語ページを翻訳・公開しています。
... ent-delimiters-on-blank-lines 空行にコメント区切り文字を置く。 「 コメント 」セクションを参照すること。 -cdw , --cuddle-do-while do {} while; の while とその前の `}' を並べる。 「 コメント 」セクションを参照すること。 -ce , --cuddle-else else とその前 ... ters-on-blank-lines 空行にコメント区切り文字を置かない。 「 コメント 」セクションを参照すること。 -ncdw , --dont-cuddle-do-while do {} while; の } と while を同じ行に並べない。 「 文 」セクションを参照すること。 -nce , --dont-cuddle-else } と else を同 ... すること。 -nsai , --no-space-after-if if の後に空白を置かない。 「 文 」セクションを参照すること。 -nsaw , --no-space-after-while while の後に空白を置かない。 「 文 」セクションを参照すること。 -nsc , --dont-star-comments `*' 文字をコメントの左に置かな ... ... ります。関係が偽の時 0、 真の時 1 になります。関係演算は、演算式のどこでも使う事ができます。 (POSIX bcでは、関係演算は、if, while, for 文の中だけで、しかも 1 つの関係式しか使用できません。) 関係演算子は以下の通りです。 expr1 < expr2 expr1 が expr2 より ... t1 が実行されます。 statement2 が存在し、expression の値が 0 ならば、statement2 が実行されます。 (else 節は拡張機能です。) while ( expression ) statement while 文は expression が 0 でない間、繰り返し statement を実行します。 statement の実行前に毎回 e ... のは拡張機能です。 POSIX bc では、3 つの expression はどれも省略できません。) 以下は for 文と等価なコードです: expression1; while (expression2) { statement; expression3; } break それを含む最も内側の while もしくは for 文による繰り返しを強制的に中断しま ... ... opt, errfnd; /* The "-c" command-line option can be used to specify that the list is circular */ errfnd = 0; circular = 0; while ((opt = getopt(argc, argv, "c")) != -1) { switch (opt) { case 'c': circular = 1; break; default: errfnd = 1; break; } } if ... ard = elem; insque(elem, elem); } else { insque(elem, NULL); } /* Add remaining command-line arguments as list elements */ while (++optind < argc) { prev = elem; elem = new_element(); elem->name = argv[optind]; insque(elem, prev); } /* Traverse the li ... t names */ printf("Traversing completed list:\n"); elem = first; do { printf(" %s\n", elem->name); elem = elem->forward; } while (elem != NULL && elem != first); if (elem == first) printf("That was a circular list\n"); exit(EXIT_SUCCESS); } SEE ALSO q ... ... opt, errfnd; /* The "-c" command-line option can be used to specify that the list is circular */ errfnd = 0; circular = 0; while ((opt = getopt(argc, argv, "c")) != -1) { switch (opt) { case 'c': circular = 1; break; default: errfnd = 1; break; } } if ... ard = elem; insque(elem, elem); } else { insque(elem, NULL); } /* Add remaining command-line arguments as list elements */ while (++optind < argc) { prev = elem; elem = new_element(); elem->name = argv[optind]; insque(elem, prev); } /* Traverse the li ... t names */ printf("Traversing completed list:\n"); elem = first; do { printf(" %s\n", elem->name); elem = elem->forward; } while (elem != NULL && elem != first); if (elem == first) printf("That was a circular list\n"); exit(EXIT_SUCCESS); } SEE ALSO q ... ... < stdlib.h > #include < unistd.h > #define handle_error_en(en, msg) \ do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0) static void * thread_func(void *ignored_argument) { int s; /* Disable cancellation for a while, so that we don't immed ... 0) handle_error_en(s, "pthread_setcancelstate"); /* sleep() is a cancellation point */ sleep(1000); /* Should get canceled while we sleep */ /* Should never get here */ printf("thread_func(): not canceled!\n"); return NULL; } int main(void) { pthread_ ... ... ss group leader from calling setsid () prevents the possibility that a process group leader places itself in a new session while other processes in the process group remain in the original session; such a scenario would break the strict two-level hier ... sessions and process groups. In order to be sure that setsid () will succeed, call fork (2) and have the parent _exit (2), while the child (which by definition can't be a process group leader) calls setsid (). セッションが制御端末を持っていて、その端末 ... ... } /* Add requests for specified hostnames */ static void add_requests(void) { int nreqs_base = nreqs; char *host; int ret; while ((host = strtok(NULL, " "))) { nreqs++; reqs = realloc(reqs, sizeof(reqs[0]) * nreqs); reqs[nreqs - 1] = calloc(1, sizeof( ... , n; struct gaicb const **wait_reqs = calloc(nreqs, sizeof(*wait_reqs)); /* NULL elements are ignored by gai_suspend(). */ while ((id = strtok(NULL, " ")) != NULL) { n = atoi(id); if (n >= nreqs) { printf("Bad request number: %s\n", id); return; } wai ... ished" : gai_strerror(ret)); } } /* Cancel specified requests */ static void cancel_requests(void) { char *id; int ret, n; while ((id = strtok(NULL, " ")) != NULL) { n = atoi(id); if (n >= nreqs) { printf("Bad request number: %s\n", id); return; } ret ... ... } /* Add requests for specified hostnames */ static void add_requests(void) { int nreqs_base = nreqs; char *host; int ret; while ((host = strtok(NULL, " "))) { nreqs++; reqs = realloc(reqs, sizeof(reqs[0]) * nreqs); reqs[nreqs - 1] = calloc(1, sizeof( ... , n; struct gaicb const **wait_reqs = calloc(nreqs, sizeof(*wait_reqs)); /* NULL elements are ignored by gai_suspend(). */ while ((id = strtok(NULL, " ")) != NULL) { n = atoi(id); if (n >= nreqs) { printf("Bad request number: %s\n", id); return; } wai ... ished" : gai_strerror(ret)); } } /* Cancel specified requests */ static void cancel_requests(void) { char *id; int ret, n; while ((id = strtok(NULL, " ")) != NULL) { n = atoi(id); if (n >= nreqs) { printf("Bad request number: %s\n", id); return; } ret ... ... } /* Add requests for specified hostnames */ static void add_requests(void) { int nreqs_base = nreqs; char *host; int ret; while ((host = strtok(NULL, " "))) { nreqs++; reqs = realloc(reqs, sizeof(reqs[0]) * nreqs); reqs[nreqs - 1] = calloc(1, sizeof( ... , n; struct gaicb const **wait_reqs = calloc(nreqs, sizeof(*wait_reqs)); /* NULL elements are ignored by gai_suspend(). */ while ((id = strtok(NULL, " ")) != NULL) { n = atoi(id); if (n >= nreqs) { printf("Bad request number: %s\n", id); return; } wai ... ished" : gai_strerror(ret)); } } /* Cancel specified requests */ static void cancel_requests(void) { char *id; int ret, n; while ((id = strtok(NULL, " ")) != NULL) { n = atoi(id); if (n >= nreqs) { printf("Bad request number: %s\n", id); return; } ret ... ... } /* Add requests for specified hostnames */ static void add_requests(void) { int nreqs_base = nreqs; char *host; int ret; while ((host = strtok(NULL, " "))) { nreqs++; reqs = realloc(reqs, sizeof(reqs[0]) * nreqs); reqs[nreqs - 1] = calloc(1, sizeof( ... , n; struct gaicb const **wait_reqs = calloc(nreqs, sizeof(*wait_reqs)); /* NULL elements are ignored by gai_suspend(). */ while ((id = strtok(NULL, " ")) != NULL) { n = atoi(id); if (n >= nreqs) { printf("Bad request number: %s\n", id); return; } wai ... ished" : gai_strerror(ret)); } } /* Cancel specified requests */ static void cancel_requests(void) { char *id; int ret, n; while ((id = strtok(NULL, " ")) != NULL) { n = atoi(id); if (n >= nreqs) { printf("Bad request number: %s\n", id); return; } ret ... 日本語の文書やマニュアルを配布している個人/プロジェクトへのリンクです。