コード例 #1
0
void display_body(struct body *b)
{
    if (b) {
        display_square(b->part);
        display_body(b->rest);
    }
}
コード例 #2
0
void display(struct square *h, struct body *sb, struct square *f)
{
    clear_screen();
    display_square(h);
    display_body(sb);
    display_square(f);
}
コード例 #3
0
ファイル: message_view.cpp プロジェクト: AleksKots/Manitou
void
message_view::show_html_part()
{
  if (m_parent)
    display_body(m_parent->get_display_prefs(), 2);
  m_headersv->enable_command("to_text", m_has_text_part);
  m_headersv->enable_command("to_html", false);
}
コード例 #4
0
void
message_view::show_text_part()
{
  if (m_parent)
    display_body(m_parent->get_display_prefs(), 1);
  enable_command("to_html", m_has_html_part);
  enable_command("to_text", false);
  display_commands();
}
コード例 #5
0
void
BalanceSheetReport::do_generate()
{
    refresh_map();
    display_body();

    // Don't do "FitInside()", "configure_scrollbars" or that "admin" stuff,
    // as this is done in the Report base class, in Report::generate().
    return;
}
コード例 #6
0
ファイル: grid_display.cpp プロジェクト: brownem/hello-world
int main ()
{

	int g = input();
	
	display_line(g);

	display_body(g);

	display_line(g);

	display_line(g);

	display_body(g);
	
	display_line(g);

	return 0;
}
コード例 #7
0
ファイル: expression.c プロジェクト: masaedw/lisp
static void display_lambda(struct StXLambda *lambda, StObject port)
{
    St_WriteCString("(lambda ", port);
    if (lambda->dotted)
    {
        size_t len = ST_VECTOR_LENGTH(lambda->vars);
        if (len == 1)
        {
            St_Display(ST_VECTOR_DATA(lambda->vars)[0], port);
        }
        else
        {
            St_WriteCString("(", port);
            for (size_t i = 0; i < len - 1; i++) {
                St_Display(ST_VECTOR_DATA(lambda->vars)[i], port);
                St_WriteCString(" ", port);
            }
            St_WriteCString(". ", port);
            St_Display(ST_VECTOR_DATA(lambda->vars)[len], port);
            St_WriteCString(")", port);
        }
    }
    else
    {
        St_WriteCString("(", port);
        display_list(lambda->vars, port);
        St_WriteCString(")", port);
    }

    size_t len = ST_VECTOR_LENGTH(lambda->defvars);
    if (len != 0)
    {
        St_WriteCString(" ", port);
    }

    for (size_t i = 0; i < len; i++) {
        St_WriteCString("(define ", port);
        St_Display(ST_VECTOR_DATA(lambda->defvars)[i], port);
        St_WriteCString(" ", port);
        St_Display(ST_VECTOR_DATA(lambda->defvals)[i], port);
        St_WriteCString(")", port);
        if (i < len - 1)
        {
            St_WriteCString(" ", port);
        }
    }

    if (ST_VECTOR_LENGTH(lambda->body) != 0)
    {
        St_WriteCString(" ", port);
    }

    display_body(lambda->body, port);
    St_WriteCString(")", port);
}
コード例 #8
0
ファイル: sapin2.c プロジェクト: retrobotic/Epitech
int		sapin(int n)
{
  int		max_stars;

  max_stars = my_max_stars(n);
  display_head(max_stars);
  if (n > 1)
    display_body(n, max_stars);
  display_trunk(n, max_stars);
  return (0);
}
コード例 #9
0
/* Replace the whole display by the "fetch on demand" href link or
   toggle back to normal display */
void
message_view::set_show_on_demand(bool b)
{
  DBG_PRINTF(4, "set_show_on_demand(%d)", (int)b);
  if (b) {
    m_bodyv->clear();
    update();
  }
  else {
    if (m_parent)
      display_body(m_parent->get_display_prefs(), 0);    
  }
}
コード例 #10
0
ファイル: message_view.cpp プロジェクト: AleksKots/Manitou
/* Replace the whole display by the "fetch on demand" href link or
   toggle back to normal display */
void
message_view::set_show_on_demand(bool b)
{
  DBG_PRINTF(3, "set_show_on_demand(%d)", (int)b);
  m_headersv->set_show_on_demand(b);
  if (b) {
    m_bodyv->clear();
    m_bodyv->page()->setViewportSize(QSize(m_headersv->width(), 10));
    m_bodyv->clear();
    update();
  }
  else {
    if (m_parent)
      display_body(m_parent->get_display_prefs(), 0);    
  }
}
コード例 #11
0
ファイル: expression.c プロジェクト: masaedw/lisp
static void display_let(const char *sym, struct StXLet *let, StObject port)
{
    St_WriteCString("(", port);
    St_WriteCString(sym, port);
    St_WriteCString(" (", port);
    for (size_t i = 0; i < ST_VECTOR_LENGTH(let->bindings); i++) {
        St_WriteCString("(", port);
        St_Display(ST_CAR(ST_VECTOR_DATA(let->bindings)[i]), port);
        St_WriteCString(" ", port);
        St_Display(ST_CDR(ST_VECTOR_DATA(let->bindings)[i]), port);
        St_WriteCString(")", port);
    }
    St_WriteCString(")", port);

    size_t len = ST_VECTOR_LENGTH(let->defvars);
    if (len != 0)
    {
        St_WriteCString(" ", port);
    }

    for (size_t i = 0; i < len; i++) {
        St_WriteCString("(define ", port);
        St_Display(ST_VECTOR_DATA(let->defvars)[i], port);
        St_WriteCString(" ", port);
        St_Display(ST_VECTOR_DATA(let->defvals)[i], port);
        St_WriteCString(")", port);
        if (i < len - 1)
        {
            St_WriteCString(" ", port);
        }
    }

    if (ST_VECTOR_LENGTH(let->body) != 0)
    {
        St_WriteCString(" ", port);
    }

    display_body(let->body, port);
    St_WriteCString(")", port);
}
コード例 #12
0
ファイル: expression.c プロジェクト: masaedw/lisp
static void display_list(StObject vector, StObject port)
{
    St_WriteCString("(", port);
    display_body(vector, port);
    St_WriteCString(")", port);
}
コード例 #13
0
ファイル: expression.c プロジェクト: masaedw/lisp
static void display(StObject obj, StObject port)
{
    StExpression xobj = ST_EXPRESSION(obj);

    switch (xobj->xtype) {
    case XVALUE:
        St_Display(xobj->value.value, port);
        break;

    case XSYMBOL:
        St_Display(xobj->symbol.value, port);
        break;

    case XQUOTE:
        St_WriteCString("(quote ", port);
        St_Display(xobj->quote.value, port);
        St_WriteCString(")", port);
        break;

    case XLET:
        display_let("let", &xobj->let, port);
        break;

    case XLETSTAR:
        display_let("let*", &xobj->let, port);
        break;

    case XLETREC:
        display_let("letrec", &xobj->let, port);
        break;

    case XLETRECSTAR:
        display_let("letrec*", &xobj->let, port);
        break;

    case XLAMBDA:
        display_lambda(&xobj->lambda, port);
        break;

    case XBEGIN:
        St_WriteCString("(begin ", port);
        display_body(xobj->begin.body, port);
        St_WriteCString(")", port);
        break;

    case XIF:
        St_WriteCString("(if ", port);
        St_Display(xobj->xif.xpred, port);
        St_WriteCString(" ", port);
        St_Display(xobj->xif.xthen, port);
        if (!ST_NULLP(xobj->xif.xelse))
        {
            St_WriteCString(" ", port);
            St_Display(xobj->xif.xelse, port);
        }
        St_WriteCString(")", port);
        break;

    case XSET:
        St_WriteCString("(set! ", port);
        St_Display(xobj->set.symbol, port);
        St_WriteCString(" ", port);
        St_Display(xobj->set.value, port);
        St_WriteCString(")", port);
        break;

    case XCALLCC:
        St_WriteCString("(call/cc ", port);
        St_Display(xobj->callcc.lambda, port);
        St_WriteCString(")", port);
        break;

    case XDEFINE:
        St_WriteCString("(define ", port);
        St_Display(xobj->define.symbol, port);
        St_WriteCString(" ", port);
        St_Display(xobj->define.value, port);
        St_WriteCString(")", port);
        break;

    case XDEFINEMACRO:
        St_WriteCString("(define-macro ", port);
        St_Display(xobj->define_macro.symbol, port);
        St_WriteCString(" ", port);
        St_Display(xobj->define_macro.lambda, port);
        St_WriteCString(")", port);
        break;

    case XAND:
        St_WriteCString("(and ", port);
        display_body(xobj->list.exprs, port);
        St_WriteCString(")", port);
        break;

    case XOR:
        St_WriteCString("(or ", port);
        display_body(xobj->list.exprs, port);
        St_WriteCString(")", port);
        break;

    case XLIST:
        display_list(xobj->list.exprs, port);
        break;
    }
}