int bbsinfo_main(void) { if (!loginok) return BBS_ELGNREQ; parse_post_data(); char *type = getparm("type"); xml_header("bbs"); if (*type != '\0') { printf("<bbsinfo "); print_session(); printf(">%s</bbsinfo>", check_info()); } else { printf("<bbsinfo post='%d' login='******' stay='%d' " "since='%s' host='%s' year='%d' month='%d' " "day='%d' gender='%c' ", currentuser.numposts, currentuser.numlogins, currentuser.stay / 60, getdatestring(currentuser.firstlogin, DATE_XML), currentuser.lasthost, currentuser.birthyear, currentuser.birthmonth, currentuser.birthday, currentuser.gender); print_session(); printf(" last='%s'><nick>", getdatestring(currentuser.lastlogin, DATE_XML)); xml_fputs(currentuser.username, stdout); printf("</nick></bbsinfo>"); } return 0; }
static gpointer mono_threads_enter_gc_safe_region_unbalanced_with_info (MonoThreadInfo *info, gpointer *stackdata) { if (!mono_threads_is_coop_enabled ()) return NULL; ++coop_do_blocking_count; check_info (info, "enter", "safe"); copy_stack_data (info, stackdata); retry: ++coop_save_count; mono_threads_get_runtime_callbacks ()->thread_state_init (&info->thread_saved_state [SELF_SUSPEND_STATE_INDEX]); switch (mono_threads_transition_do_blocking (info)) { case DoBlockingContinue: break; case DoBlockingPollAndRetry: mono_threads_state_poll_with_info (info); goto retry; } return info; }
gpointer mono_threads_enter_gc_unsafe_region_unbalanced_with_info (MonoThreadInfo *info, gpointer *stackdata) { if (!mono_threads_is_coop_enabled ()) return NULL; ++coop_reset_blocking_count; check_info (info, "enter", "unsafe"); copy_stack_data (info, stackdata); switch (mono_threads_transition_abort_blocking (info)) { case AbortBlockingIgnore: info->thread_saved_state [SELF_SUSPEND_STATE_INDEX].valid = FALSE; return NULL; case AbortBlockingIgnoreAndPoll: mono_threads_state_poll_with_info (info); return NULL; case AbortBlockingOk: info->thread_saved_state [SELF_SUSPEND_STATE_INDEX].valid = FALSE; break; case AbortBlockingWait: mono_thread_info_wait_for_resume (info); break; default: g_error ("Unknown thread state"); } return info; }
const char INTERNAL *qt_internal_get_env_str(const char *envariable, const char *dflt) { assert(strlen(envariable) < 90); check_info(); return qt_internal_envstr(envariable, dflt); }
int INTERNAL qt_internal_unset_envstr(const char *envariable) { char mod_envariable[100]; const char *str; check_info(); snprintf(mod_envariable, 100, "QT_%s", envariable); str = getenv(mod_envariable); qthread_debug(CORE_BEHAVIOR, "checking envariable %s\n", envariable); if (str && *str) { if (info) { printf("%s = %s\n", mod_envariable, str); } return unsetenv(mod_envariable); } else { snprintf(mod_envariable, 100, "QTHREAD_%s", envariable); str = getenv(mod_envariable); if (str && *str) { if (info) { printf("%s = %s\n", mod_envariable, str); } return unsetenv(mod_envariable); } } if (info) { printf("[QT|QTHREAD]_%s = (unset)\n", envariable); } return 0; }
gpointer mono_threads_enter_gc_unsafe_region_cookie (void) { MonoThreadInfo *info; g_assert (mono_threads_is_coop_enabled ()); info = mono_thread_info_current_unchecked (); check_info (info, "enter (cookie)", "unsafe"); #ifdef ENABLE_CHECKED_BUILD_GC if (mono_check_mode_enabled (MONO_CHECK_MODE_GC)) coop_tls_push (info); #endif return info; }
void MetaEntryVisitor::operator()(std::map<std::string, std::string> & value) const { auto & id = entry.id; if (id == ALT) { check_alt(value); } else if (id == ASSEMBLY) { // TODO May check URL correctness (regexp?) } else if (id == CONTIG) { check_contig(value); } else if (id == FILTER) { check_filter(value); } else if (id == FORMAT) { check_format(value); } else if (id == INFO) { check_info(value); } else if (id == PEDIGREE) { // Nothing to check } else if (id == PEDIGREEDB) { // Nothing to check } else if (id == SAMPLE) { check_sample(value); } }
void mono_threads_exit_gc_safe_region_unbalanced (gpointer cookie, gpointer *stackdata) { MonoThreadInfo *info; if (!mono_threads_is_coop_enabled ()) return; info = (MonoThreadInfo *)cookie; check_info (info, "exit", "safe"); switch (mono_threads_transition_done_blocking (info)) { case DoneBlockingOk: info->thread_saved_state [SELF_SUSPEND_STATE_INDEX].valid = FALSE; break; case DoneBlockingWait: THREADS_SUSPEND_DEBUG ("state polling done, notifying of resume\n"); mono_thread_info_wait_for_resume (info); break; default: g_error ("Unknown thread state"); } }
void init_manager(void) { #ifdef DEBUG printf(DEBUG_ACTIVATED); #endif _GemParBlk.global[0]=0; ap_id = appl_init(); if (!_GemParBlk.global[0]) exit(0); if (ap_id < 0) exit(0); if (!_app) wind_update(BEG_UPDATE); Pdomain(1); check_cookies(); if (_GemParBlk.global[1] != 1) multitask = 1; if ((_GemParBlk.global[0] >= 0x0400) && (multitask)) multitos = 1; allocmode = GLOBAL; if (_app) allocmode |= 3; read_name(); check_info(); if ((!_app) || ((multitos) && (!magix))) { menu_id = menu_register(ap_id,STRING_MENUENTRY); if (menu_id < 0) { if (!_app) wind_update(END_UPDATE); if (multitos) { appl_exit(); exit(0); } else { while (1) evnt_timer(0,1); } } } find_inf(); if (!_app) wind_update(END_UPDATE); Psignal(SIGTERM,sig_handler); Psignal(SIGQUIT,sig_handler); if (!multitask) { char s[256]; strcpy(s,"[0][OLGA v"); strcat(s,OLGAVERSIONSTR); strcat(s," Rev "); strcat(s,OLGAREVISION); strcat(s," ("); strcat(s,OLGADATE); strcat(s,") | |"); strcat(s,MESSAGE_MULTITASKING); form_alert(1,s); if (_app) { #ifdef DEBUG printf(DEBUG_DEACTIVATED); #endif appl_exit(); exit(0); } } if (shutdown) shel_write(9,1,0,NULL,NULL); broadcast_olenew(); }
int bbsinfo_main() { //modify by mintbaggio 20040829 for new www int type; html_header(1); check_msg(); printf("<body>"); if (!loginok || isguest) http_fatal("您尚未登录"); changemode(EDITUFILE); type = atoi(getparm("type")); printf("<div class=rhead>%s -- 用户个人资料</div><hr>\n", BBSNAME); if (type != 0) { check_info(); http_quit(); } printf("<form action=bbsinfo?type=1 method=post>"); printf("您的帐号: %s<br>\n", currentuser.userid); printf ("您的昵称: <input type=text name=nick value='%s' size=24 maxlength=30><br>\n", currentuser.username); printf("发表大作: %d 篇<br>\n", currentuser.numposts); // printf("信件数量: %d 封<br>\n", currentuser.nummails); printf("上站次数: %d 次<br>\n", currentuser.numlogins); printf("上站时间: %ld 分钟<br>\n", currentuser.stay / 60); printf ("真实姓名: <input type=text name=realname value='%s' size=16 maxlength=16><br>\n", currentuser.realname); printf ("居住地址: <input type=text name=address value='%s' size=40 maxlength=40><br>\n", currentuser.address); printf("帐号建立: %s<br>", Ctime(currentuser.firstlogin)); printf("最近光临: %s<br>", Ctime(currentuser.lastlogin)); printf("来源地址: %s<br>", currentuser.lasthost); #ifndef POP_CHECK printf ("电子邮件: <input type=text name=email value='%s' size=32 maxlength=32><br>\n", currentuser.email); #endif #if 0 printf ("出生日期: <input type=text name=year value=%d size=4 maxlength=4>年", currentuser.birthyear + 1900); printf("<input type=text name=month value=%d size=2 maxlength=2>月", currentuser.birthmonth); printf("<input type=text name=day value=%d size=2 maxlength=2>日<br>\n", currentuser.birthday); printf("用户性别: "); printf("男<input type=radio value=M name=gender %s>", currentuser.gender == 'M' ? "checked" : ""); printf("女<input type=radio value=F name=gender %s><br>", currentuser.gender == 'F' ? "checked" : ""); #endif printf ("<input type=submit value=确定> <input type=reset value=复原>\n"); printf("</form>"); printf("<hr>"); printf("</body></html>"); return 0; }