Changeset f60b417
- Timestamp:
- Jul 20, 2011, 4:42:29 PM (13 years ago)
- Parents:
- d8f22b6 (diff), ac919d96 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
cmd.c
rce68f23 r4d4f0ba 260 260 if (cmd->usage && *cmd->usage) { 261 261 s = cmd->usage; 262 indent = owl_text_indent(s, OWL_TAB );262 indent = owl_text_indent(s, OWL_TAB, true); 263 263 owl_fmtext_append_bold(fm, "\nSYNOPSIS\n"); 264 264 owl_fmtext_append_normal(fm, indent); … … 274 274 if (cmd->description && *cmd->description) { 275 275 s = cmd->description; 276 indent = owl_text_indent(s, OWL_TAB );276 indent = owl_text_indent(s, OWL_TAB, true); 277 277 owl_fmtext_append_bold(fm, "\nDESCRIPTION\n"); 278 278 owl_fmtext_append_normal(fm, indent); -
functions.c
r837bd81 rac919d96 1430 1430 #ifdef HAVE_LIBZEPHYR 1431 1431 if (owl_message_is_direction_in(m)) { 1432 char *tmpbuff ;1432 char *tmpbuff, *tmpbuff2; 1433 1433 int i, fields; 1434 1434 … … 1476 1476 1477 1477 for (i = 0; i < fields; i++) { 1478 tmpbuff = owl_zephyr_get_field_as_utf8(n, i + 1); 1479 1480 g_strdelimit(tmpbuff, "\n", '~'); 1481 g_strdelimit(tmpbuff, "\r", '!'); 1482 1483 owl_fmtext_appendf_normal(&fm, " Field %i : %s\n", i + 1, tmpbuff); 1484 g_free(tmpbuff); 1478 tmpbuff = owl_zephyr_get_field_as_utf8(n, i + 1); 1479 tmpbuff2 = owl_text_indent(tmpbuff, 14, false); 1480 owl_fmtext_appendf_normal(&fm, " Field %i : %s\n", i + 1, tmpbuff2); 1481 g_free(tmpbuff2); 1482 g_free(tmpbuff); 1485 1483 } 1486 owl_fmtext_appendf_normal(&fm, " Default Fm: %s\n", n->z_default_format); 1484 tmpbuff = owl_text_indent(n->z_default_format, 14, false); 1485 owl_fmtext_appendf_normal(&fm, " Default Fm: %s\n", tmpbuff); 1486 g_free(tmpbuff); 1487 1487 } 1488 1488 -
message.c
rdde1b4d rac919d96 125 125 p = m->attributes->pdata[i]; 126 126 127 tmpbuff = g_strdup(owl_pair_get_value(p)); 128 g_strdelimit(tmpbuff, "\n", '~'); 129 g_strdelimit(tmpbuff, "\r", '!'); 130 buff = g_strdup_printf(" %-15.15s: %s\n", owl_pair_get_key(p), tmpbuff); 131 g_free(tmpbuff); 127 buff = g_strdup(owl_pair_get_value(p)); 128 if (buff) { 129 tmpbuff = owl_text_indent(buff, 19, false); 130 g_free(buff); 131 buff = g_strdup_printf(" %-15.15s: %s\n", owl_pair_get_key(p), tmpbuff); 132 g_free(tmpbuff); 133 } 132 134 133 135 if(buff == NULL) { -
style.c
rfa180a3 r4d4f0ba 65 65 66 66 /* indent and ensure ends with a newline */ 67 indent = owl_text_indent(body, OWL_TAB );67 indent = owl_text_indent(body, OWL_TAB, true); 68 68 curlen = strlen(indent); 69 69 if (curlen == 0 || indent[curlen-1] != '\n') { -
text.c
r6829afc r4d4f0ba 7 7 /* Returns a copy of 'in' with each line indented 'n' 8 8 * characters. Result must be freed with g_free. */ 9 CALLER_OWN char *owl_text_indent(const char *in, int n )9 CALLER_OWN char *owl_text_indent(const char *in, int n, bool indent_first_line) 10 10 { 11 11 const char *ptr1, *ptr2, *last; 12 12 GString *out = g_string_new(""); 13 13 int i; 14 bool indent_this_line = indent_first_line; 14 15 15 16 last=in+strlen(in)-1; 16 17 ptr1=in; 17 18 while (ptr1<=last) { 18 for (i=0; i<n; i++) { 19 g_string_append_c(out, ' '); 20 } 19 if (indent_this_line) { 20 for (i = 0; i < n; i++) { 21 g_string_append_c(out, ' '); 22 } 23 } 24 indent_this_line = true; 21 25 ptr2=strchr(ptr1, '\n'); 22 26 if (!ptr2) {
Note: See TracChangeset
for help on using the changeset viewer.