| | @@ -12143,10 +12143,19 @@ |
| 12143 | 12143 | EQPGraphRow *pRow; /* Linked list of all rows of the EQP output */ |
| 12144 | 12144 | EQPGraphRow *pLast; /* Last element of the pRow list */ |
| 12145 | 12145 | char zPrefix[100]; /* Graph prefix */ |
| 12146 | 12146 | }; |
| 12147 | 12147 | |
| 12148 | +/* Parameters affecting columnar mode result display (defaulting together) */ |
| 12149 | +typedef struct ColModeOpts { |
| 12150 | + int iWrap; /* In columnar modes, wrap lines reaching this limit */ |
| 12151 | + u8 bQuote; /* Quote results for .mode box and table */ |
| 12152 | + u8 bWordWrap; /* In columnar modes, wrap at word boundaries */ |
| 12153 | +} ColModeOpts; |
| 12154 | +#define ColModeOpts_default { 60, 0, 0 } |
| 12155 | +#define ColModeOpts_default_qbox { 60, 1, 0 } |
| 12156 | + |
| 12148 | 12157 | /* |
| 12149 | 12158 | ** State information about the database connection is contained in an |
| 12150 | 12159 | ** instance of the following structure. |
| 12151 | 12160 | */ |
| 12152 | 12161 | typedef struct ShellState ShellState; |
| | @@ -12161,12 +12170,11 @@ |
| 12161 | 12170 | u8 doXdgOpen; /* Invoke start/open/xdg-open in output_reset() */ |
| 12162 | 12171 | u8 nEqpLevel; /* Depth of the EQP output graph */ |
| 12163 | 12172 | u8 eTraceType; /* SHELL_TRACE_* value for type of trace */ |
| 12164 | 12173 | u8 bSafeMode; /* True to prohibit unsafe operations */ |
| 12165 | 12174 | u8 bSafeModePersist; /* The long-term value of bSafeMode */ |
| 12166 | | - u8 bQuote; /* Quote results for .mode box and table */ |
| 12167 | | - int iWrap; /* Wrap lines this long or longer in some output modes */ |
| 12175 | + ColModeOpts cmOpts; /* Option values affecting columnar mode output */ |
| 12168 | 12176 | unsigned statsOn; /* True to display memory stats before each finalize */ |
| 12169 | 12177 | unsigned mEqpLines; /* Mask of veritical lines in the EQP output graph */ |
| 12170 | 12178 | int inputNesting; /* Track nesting level of .read and other redirects */ |
| 12171 | 12179 | int outCount; /* Revert to stdout when reaching zero */ |
| 12172 | 12180 | int cnt; /* Number of records displayed so far */ |
| | @@ -14250,28 +14258,33 @@ |
| 14250 | 14258 | ** similar tabular formats. z[] might contain control characters such |
| 14251 | 14259 | ** as \n, \t, \f, or \r. |
| 14252 | 14260 | ** |
| 14253 | 14261 | ** Compute characters to display on the first line of z[]. Stop at the |
| 14254 | 14262 | ** first \r, \n, or \f. Expand \t into spaces. Return a copy (obtained |
| 14255 | | -** from malloc()) of that first line. Write anything to display |
| 14256 | | -** on the next line into *pzTail. If this is the last line, write a NULL |
| 14257 | | -** into *pzTail. |
| 14263 | +** from malloc()) of that first line, which caller should free sometime. |
| 14264 | +** Write anything to display on the next line into *pzTail. If this is |
| 14265 | +** the last line, write a NULL into *pzTail. (*pzTail is not allocated.) |
| 14258 | 14266 | */ |
| 14259 | 14267 | static char *translateForDisplayAndDup( |
| 14260 | | - const unsigned char *z, |
| 14261 | | - const unsigned char **pzTail, |
| 14262 | | - int mxWidth |
| 14268 | + const unsigned char *z, /* Input text to be transformed */ |
| 14269 | + const unsigned char **pzTail, /* OUT: Tail of the input for next line */ |
| 14270 | + int mxWidth, /* Max width. 0 means no limit */ |
| 14271 | + u8 bWordWrap /* If true, avoid breaking mid-word */ |
| 14263 | 14272 | ){ |
| 14264 | | - int i, j, n; |
| 14265 | | - unsigned char *zOut; |
| 14273 | + int i; /* Input bytes consumed */ |
| 14274 | + int j; /* Output bytes generated */ |
| 14275 | + int k; /* Input bytes to be displayed */ |
| 14276 | + int n; /* Output column number */ |
| 14277 | + unsigned char *zOut; /* Output text */ |
| 14278 | + |
| 14266 | 14279 | if( z==0 ){ |
| 14267 | 14280 | *pzTail = 0; |
| 14268 | 14281 | return 0; |
| 14269 | 14282 | } |
| 14270 | 14283 | if( mxWidth<0 ) mxWidth = -mxWidth; |
| 14271 | 14284 | if( mxWidth==0 ) mxWidth = 1000000; |
| 14272 | | - i = j= n = 0; |
| 14285 | + i = j = n = 0; |
| 14273 | 14286 | while( n<mxWidth ){ |
| 14274 | 14287 | if( z[i]>=' ' ){ |
| 14275 | 14288 | n++; |
| 14276 | 14289 | do{ i++; j++; }while( (z[i]&0xc0)==0x80 ); |
| 14277 | 14290 | continue; |
| | @@ -14279,16 +14292,33 @@ |
| 14279 | 14292 | if( z[i]=='\t' ){ |
| 14280 | 14293 | do{ |
| 14281 | 14294 | n++; |
| 14282 | 14295 | j++; |
| 14283 | 14296 | }while( (n&7)!=0 && n<mxWidth ); |
| 14284 | | - n += 8; |
| 14285 | | - n &= ~7; |
| 14286 | 14297 | i++; |
| 14287 | 14298 | continue; |
| 14288 | 14299 | } |
| 14289 | 14300 | break; |
| 14301 | + } |
| 14302 | + if( n>=mxWidth && bWordWrap ){ |
| 14303 | + /* Perhaps try to back up to a better place to break the line */ |
| 14304 | + for(k=i; k>i/2; k--){ |
| 14305 | + if( isspace(z[k-1]) ) break; |
| 14306 | + } |
| 14307 | + if( k<=i/2 ){ |
| 14308 | + for(k=i; k>i/2; k--){ |
| 14309 | + if( isalnum(z[k-1])!=isalnum(z[k]) && (z[k]&0xc0)!=0x80 ) break; |
| 14310 | + } |
| 14311 | + } |
| 14312 | + if( k<=i/2 ){ |
| 14313 | + k = i; |
| 14314 | + }else{ |
| 14315 | + i = k; |
| 14316 | + while( z[i]==' ' ) i++; |
| 14317 | + } |
| 14318 | + }else{ |
| 14319 | + k = i; |
| 14290 | 14320 | } |
| 14291 | 14321 | if( n>=mxWidth && z[i]>=' ' ){ |
| 14292 | 14322 | *pzTail = &z[i]; |
| 14293 | 14323 | }else if( z[i]=='\r' && z[i+1]=='\n' ){ |
| 14294 | 14324 | *pzTail = z[i+2] ? &z[i+2] : 0; |
| | @@ -14298,11 +14328,11 @@ |
| 14298 | 14328 | *pzTail = &z[i+1]; |
| 14299 | 14329 | } |
| 14300 | 14330 | zOut = malloc( j+1 ); |
| 14301 | 14331 | shell_check_oom(zOut); |
| 14302 | 14332 | i = j = n = 0; |
| 14303 | | - while( n<mxWidth ){ |
| 14333 | + while( i<k ){ |
| 14304 | 14334 | if( z[i]>=' ' ){ |
| 14305 | 14335 | n++; |
| 14306 | 14336 | do{ zOut[j++] = z[i++]; }while( (z[i]&0xc0)==0x80 ); |
| 14307 | 14337 | continue; |
| 14308 | 14338 | } |
| | @@ -14380,10 +14410,11 @@ |
| 14380 | 14410 | const char *colSep = 0; |
| 14381 | 14411 | const char *rowSep = 0; |
| 14382 | 14412 | const unsigned char **azNextLine = 0; |
| 14383 | 14413 | int bNextLine = 0; |
| 14384 | 14414 | int bMultiLineRowExists = 0; |
| 14415 | + int bw = p->cmOpts.bWordWrap; |
| 14385 | 14416 | |
| 14386 | 14417 | rc = sqlite3_step(pStmt); |
| 14387 | 14418 | if( rc!=SQLITE_ROW ) return; |
| 14388 | 14419 | nColumn = sqlite3_column_count(pStmt); |
| 14389 | 14420 | nAlloc = nColumn*4; |
| | @@ -14391,11 +14422,11 @@ |
| 14391 | 14422 | azData = sqlite3_malloc64( nAlloc*sizeof(char*) ); |
| 14392 | 14423 | shell_check_oom(azData); |
| 14393 | 14424 | azNextLine = sqlite3_malloc64( nColumn*sizeof(char*) ); |
| 14394 | 14425 | shell_check_oom((void*)azNextLine); |
| 14395 | 14426 | memset((void*)azNextLine, 0, nColumn*sizeof(char*) ); |
| 14396 | | - if( p->bQuote ){ |
| 14427 | + if( p->cmOpts.bQuote ){ |
| 14397 | 14428 | azQuoted = sqlite3_malloc64( nColumn*sizeof(char*) ); |
| 14398 | 14429 | shell_check_oom(azQuoted); |
| 14399 | 14430 | memset(azQuoted, 0, nColumn*sizeof(char*) ); |
| 14400 | 14431 | } |
| 14401 | 14432 | abRowDiv = sqlite3_malloc64( nAlloc/nColumn ); |
| | @@ -14412,11 +14443,18 @@ |
| 14412 | 14443 | w = p->colWidth[i]; |
| 14413 | 14444 | if( w<0 ) w = -w; |
| 14414 | 14445 | p->actualWidth[i] = w; |
| 14415 | 14446 | } |
| 14416 | 14447 | for(i=0; i<nColumn; i++){ |
| 14417 | | - azData[i] = strdup(sqlite3_column_name(pStmt,i)); |
| 14448 | + const unsigned char *zNotUsed; |
| 14449 | + int wx = p->colWidth[i]; |
| 14450 | + if( wx==0 ){ |
| 14451 | + wx = p->cmOpts.iWrap; |
| 14452 | + } |
| 14453 | + if( wx<0 ) wx = -wx; |
| 14454 | + uz = (const unsigned char*)sqlite3_column_name(pStmt,i); |
| 14455 | + azData[i] = translateForDisplayAndDup(uz, &zNotUsed, wx, bw); |
| 14418 | 14456 | } |
| 14419 | 14457 | do{ |
| 14420 | 14458 | int useNextLine = bNextLine; |
| 14421 | 14459 | bNextLine = 0; |
| 14422 | 14460 | if( (nRow+2)*nColumn >= nAlloc ){ |
| | @@ -14428,21 +14466,25 @@ |
| 14428 | 14466 | } |
| 14429 | 14467 | abRowDiv[nRow] = 1; |
| 14430 | 14468 | nRow++; |
| 14431 | 14469 | for(i=0; i<nColumn; i++){ |
| 14432 | 14470 | int wx = p->colWidth[i]; |
| 14433 | | - if( wx==0 ) wx = p->iWrap; |
| 14471 | + if( wx==0 ){ |
| 14472 | + wx = p->cmOpts.iWrap; |
| 14473 | + } |
| 14474 | + if( wx<0 ) wx = -wx; |
| 14434 | 14475 | if( useNextLine ){ |
| 14435 | 14476 | uz = azNextLine[i]; |
| 14436 | | - }else if( p->bQuote ){ |
| 14477 | + }else if( p->cmOpts.bQuote ){ |
| 14437 | 14478 | sqlite3_free(azQuoted[i]); |
| 14438 | 14479 | azQuoted[i] = quoted_column(pStmt,i); |
| 14439 | 14480 | uz = (const unsigned char*)azQuoted[i]; |
| 14440 | 14481 | }else{ |
| 14441 | 14482 | uz = (const unsigned char*)sqlite3_column_text(pStmt,i); |
| 14442 | 14483 | } |
| 14443 | | - azData[nRow*nColumn + i] = translateForDisplayAndDup(uz, &azNextLine[i], wx); |
| 14484 | + azData[nRow*nColumn + i] |
| 14485 | + = translateForDisplayAndDup(uz, &azNextLine[i], wx, bw); |
| 14444 | 14486 | if( azNextLine[i] ){ |
| 14445 | 14487 | bNextLine = 1; |
| 14446 | 14488 | abRowDiv[nRow-1] = 0; |
| 14447 | 14489 | bMultiLineRowExists = 1; |
| 14448 | 14490 | } |
| | @@ -14533,10 +14575,12 @@ |
| 14533 | 14575 | if( bMultiLineRowExists && abRowDiv[i/nColumn-1] && i+1<nTotal ){ |
| 14534 | 14576 | if( p->cMode==MODE_Table ){ |
| 14535 | 14577 | print_row_separator(p, nColumn, "+"); |
| 14536 | 14578 | }else if( p->cMode==MODE_Box ){ |
| 14537 | 14579 | print_box_row_separator(p, nColumn, BOX_123, BOX_1234, BOX_134); |
| 14580 | + }else if( p->cMode==MODE_Column ){ |
| 14581 | + raw_printf(p->out, "\n"); |
| 14538 | 14582 | } |
| 14539 | 14583 | } |
| 14540 | 14584 | j = -1; |
| 14541 | 14585 | if( seenInterrupt ) goto columnar_end; |
| 14542 | 14586 | }else{ |
| | @@ -15336,11 +15380,11 @@ |
| 15336 | 15380 | " fkey-indexes Find missing foreign key indexes", |
| 15337 | 15381 | #ifndef SQLITE_OMIT_LOAD_EXTENSION |
| 15338 | 15382 | ".load FILE ?ENTRY? Load an extension library", |
| 15339 | 15383 | #endif |
| 15340 | 15384 | ".log FILE|off Turn logging on or off. FILE can be stderr/stdout", |
| 15341 | | - ".mode MODE ?TABLE? ?OPTIONS? Set output mode", |
| 15385 | + ".mode MODE ?OPTIONS? Set output mode", |
| 15342 | 15386 | " MODE is one of:", |
| 15343 | 15387 | " ascii Columns/rows delimited by 0x1F and 0x1E", |
| 15344 | 15388 | " box Tables using unicode box-drawing characters", |
| 15345 | 15389 | " csv Comma-separated values", |
| 15346 | 15390 | " column Output in columns. (See .width)", |
| | @@ -15353,15 +15397,18 @@ |
| 15353 | 15397 | " qbox Shorthand for \"box --width 60 --quote\"", |
| 15354 | 15398 | " quote Escape answers as for SQL", |
| 15355 | 15399 | " table ASCII-art table", |
| 15356 | 15400 | " tabs Tab-separated values", |
| 15357 | 15401 | " tcl TCL list elements", |
| 15358 | | - " OPTIONS: (value for columnar modes only):", |
| 15359 | | - " --wrap N Wrap output lines longer than N character", |
| 15360 | | - " --quote Quote output text as SQL literals", |
| 15361 | | - " --noquote Do not quote output text", |
| 15362 | | - ".nonce STRING Disable safe mode for one command if the nonce matches", |
| 15402 | + " OPTIONS: (for columnar modes or insert mode):", |
| 15403 | + " --wrap N Wrap output lines to no longer than N characters", |
| 15404 | + " --wordwrap B Wrap or not at word boundaries per B (on/off)", |
| 15405 | + " --ww Shorthand for \"--wordwrap 1\"", |
| 15406 | + " --quote Quote output text as SQL literals", |
| 15407 | + " --noquote Do not quote output text", |
| 15408 | + " TABLE The name of SQL table used for \"insert\" mode", |
| 15409 | + ".nonce STRING Suspend safe mode for one command if nonce matches", |
| 15363 | 15410 | ".nullvalue STRING Use STRING in place of NULL values", |
| 15364 | 15411 | ".once ?OPTIONS? ?FILE? Output for the next SQL command only to FILE", |
| 15365 | 15412 | " If FILE begins with '|' then open as a pipe", |
| 15366 | 15413 | " --bom Put a UTF8 byte-order mark at the beginning", |
| 15367 | 15414 | " -e Send output to the system text editor", |
| | @@ -20140,33 +20187,43 @@ |
| 20140 | 20187 | |
| 20141 | 20188 | if( c=='m' && strncmp(azArg[0], "mode", n)==0 ){ |
| 20142 | 20189 | const char *zMode = 0; |
| 20143 | 20190 | const char *zTabname = 0; |
| 20144 | 20191 | int i, n2; |
| 20145 | | - int bQuoteChng = 0; |
| 20146 | | - int bWrapChng = 0; |
| 20192 | + ColModeOpts cmOpts = ColModeOpts_default; |
| 20147 | 20193 | for(i=1; i<nArg; i++){ |
| 20148 | 20194 | const char *z = azArg[i]; |
| 20149 | 20195 | if( optionMatch(z,"wrap") && i+1<nArg ){ |
| 20150 | | - p->iWrap = integerValue(azArg[++i]); |
| 20151 | | - bWrapChng = 1; |
| 20196 | + cmOpts.iWrap = integerValue(azArg[++i]); |
| 20197 | + }else if( optionMatch(z,"ww") ){ |
| 20198 | + cmOpts.bWordWrap = 1; |
| 20199 | + }else if( optionMatch(z,"wordwrap") && i+1<nArg ){ |
| 20200 | + cmOpts.bWordWrap = (u8)booleanValue(azArg[++i]); |
| 20152 | 20201 | }else if( optionMatch(z,"quote") ){ |
| 20153 | | - p->bQuote = 1; |
| 20154 | | - bQuoteChng = 1; |
| 20202 | + cmOpts.bQuote = 1; |
| 20155 | 20203 | }else if( optionMatch(z,"noquote") ){ |
| 20156 | | - p->bQuote = 0; |
| 20157 | | - bQuoteChng = 1; |
| 20204 | + cmOpts.bQuote = 0; |
| 20158 | 20205 | }else if( zMode==0 ){ |
| 20159 | 20206 | zMode = z; |
| 20207 | + /* Apply defaults for qbox pseudo-mods. If that |
| 20208 | + * overwrites already-set values, user was informed of this. |
| 20209 | + */ |
| 20210 | + if( strcmp(z, "qbox")==0 ){ |
| 20211 | + ColModeOpts cmo = ColModeOpts_default_qbox; |
| 20212 | + zMode = "box"; |
| 20213 | + cmOpts = cmo; |
| 20214 | + } |
| 20160 | 20215 | }else if( zTabname==0 ){ |
| 20161 | 20216 | zTabname = z; |
| 20162 | 20217 | }else if( z[0]=='-' ){ |
| 20163 | 20218 | utf8_printf(stderr, "unknown option: %s\n", z); |
| 20164 | 20219 | utf8_printf(stderr, "options:\n" |
| 20165 | 20220 | " --noquote\n" |
| 20166 | 20221 | " --quote\n" |
| 20167 | | - " --wrap N\n"); |
| 20222 | + " --wordwrap on/off\n" |
| 20223 | + " --wrap N\n" |
| 20224 | + " --ww\n"); |
| 20168 | 20225 | rc = 1; |
| 20169 | 20226 | goto meta_command_exit; |
| 20170 | 20227 | }else{ |
| 20171 | 20228 | utf8_printf(stderr, "extra argument: \"%s\"\n", z); |
| 20172 | 20229 | rc = 1; |
| | @@ -20175,16 +20232,19 @@ |
| 20175 | 20232 | } |
| 20176 | 20233 | if( zMode==0 ){ |
| 20177 | 20234 | if( p->mode==MODE_Column |
| 20178 | 20235 | || (p->mode>=MODE_Markdown && p->mode<=MODE_Box) |
| 20179 | 20236 | ){ |
| 20180 | | - raw_printf(p->out, "current output mode: %s --wrap %d --%squote\n", |
| 20181 | | - modeDescr[p->mode], p->iWrap, p->bQuote ? "" : "no"); |
| 20237 | + raw_printf |
| 20238 | + (p->out, |
| 20239 | + "current output mode: %s --wrap %d --wordwrap %s --%squote\n", |
| 20240 | + modeDescr[p->mode], p->cmOpts.iWrap, |
| 20241 | + p->cmOpts.bWordWrap ? "on" : "off", |
| 20242 | + p->cmOpts.bQuote ? "" : "no"); |
| 20182 | 20243 | }else{ |
| 20183 | 20244 | raw_printf(p->out, "current output mode: %s\n", modeDescr[p->mode]); |
| 20184 | 20245 | } |
| 20185 | | - bWrapChng = bQuoteChng = 1; |
| 20186 | 20246 | zMode = modeDescr[p->mode]; |
| 20187 | 20247 | } |
| 20188 | 20248 | n2 = strlen30(zMode); |
| 20189 | 20249 | if( strncmp(zMode,"lines",n2)==0 ){ |
| 20190 | 20250 | p->mode = MODE_Line; |
| | @@ -20193,12 +20253,11 @@ |
| 20193 | 20253 | p->mode = MODE_Column; |
| 20194 | 20254 | if( (p->shellFlgs & SHFLG_HeaderSet)==0 ){ |
| 20195 | 20255 | p->showHeader = 1; |
| 20196 | 20256 | } |
| 20197 | 20257 | sqlite3_snprintf(sizeof(p->rowSeparator), p->rowSeparator, SEP_Row); |
| 20198 | | - if( !bWrapChng ) p->iWrap = 0; |
| 20199 | | - if( !bQuoteChng ) p->bQuote = 0; |
| 20258 | + p->cmOpts = cmOpts; |
| 20200 | 20259 | }else if( strncmp(zMode,"list",n2)==0 ){ |
| 20201 | 20260 | p->mode = MODE_List; |
| 20202 | 20261 | sqlite3_snprintf(sizeof(p->colSeparator), p->colSeparator, SEP_Column); |
| 20203 | 20262 | sqlite3_snprintf(sizeof(p->rowSeparator), p->rowSeparator, SEP_Row); |
| 20204 | 20263 | }else if( strncmp(zMode,"html",n2)==0 ){ |
| | @@ -20225,24 +20284,17 @@ |
| 20225 | 20284 | p->mode = MODE_Ascii; |
| 20226 | 20285 | sqlite3_snprintf(sizeof(p->colSeparator), p->colSeparator, SEP_Unit); |
| 20227 | 20286 | sqlite3_snprintf(sizeof(p->rowSeparator), p->rowSeparator, SEP_Record); |
| 20228 | 20287 | }else if( strncmp(zMode,"markdown",n2)==0 ){ |
| 20229 | 20288 | p->mode = MODE_Markdown; |
| 20230 | | - if( !bWrapChng ) p->iWrap = 0; |
| 20231 | | - if( !bQuoteChng ) p->bQuote = 0; |
| 20289 | + p->cmOpts = cmOpts; |
| 20232 | 20290 | }else if( strncmp(zMode,"table",n2)==0 ){ |
| 20233 | 20291 | p->mode = MODE_Table; |
| 20234 | | - if( !bWrapChng ) p->iWrap = 0; |
| 20235 | | - if( !bQuoteChng ) p->bQuote = 0; |
| 20292 | + p->cmOpts = cmOpts; |
| 20236 | 20293 | }else if( strncmp(zMode,"box",n2)==0 ){ |
| 20237 | 20294 | p->mode = MODE_Box; |
| 20238 | | - if( !bWrapChng ) p->iWrap = 0; |
| 20239 | | - if( !bQuoteChng ) p->bQuote = 0; |
| 20240 | | - }else if( strcmp(zMode,"qbox")==0 ){ |
| 20241 | | - p->mode = MODE_Box; |
| 20242 | | - if( !bWrapChng ) p->iWrap = 60; |
| 20243 | | - if( !bQuoteChng ) p->bQuote = 1; |
| 20295 | + p->cmOpts = cmOpts; |
| 20244 | 20296 | }else if( strncmp(zMode,"count",n2)==0 ){ |
| 20245 | 20297 | p->mode = MODE_Count; |
| 20246 | 20298 | }else if( strncmp(zMode,"off",n2)==0 ){ |
| 20247 | 20299 | p->mode = MODE_Off; |
| 20248 | 20300 | }else if( strncmp(zMode,"json",n2)==0 ){ |
| | @@ -21399,12 +21451,15 @@ |
| 21399 | 21451 | p->mode==MODE_Explain ? "on" : p->autoExplain ? "auto" : "off"); |
| 21400 | 21452 | utf8_printf(p->out,"%12.12s: %s\n","headers", azBool[p->showHeader!=0]); |
| 21401 | 21453 | if( p->mode==MODE_Column |
| 21402 | 21454 | || (p->mode>=MODE_Markdown && p->mode<=MODE_Box) |
| 21403 | 21455 | ){ |
| 21404 | | - utf8_printf(p->out, "%12.12s: %s --wrap %d --%squote\n", "mode", |
| 21405 | | - modeDescr[p->mode], p->iWrap, p->bQuote ? "" : "no"); |
| 21456 | + utf8_printf |
| 21457 | + (p->out, "%12.12s: %s --wrap %d --wordwrap %s --%squote\n", "mode", |
| 21458 | + modeDescr[p->mode], p->cmOpts.iWrap, |
| 21459 | + p->cmOpts.bWordWrap ? "on" : "off", |
| 21460 | + p->cmOpts.bQuote ? "" : "no"); |
| 21406 | 21461 | }else{ |
| 21407 | 21462 | utf8_printf(p->out, "%12.12s: %s\n","mode", modeDescr[p->mode]); |
| 21408 | 21463 | } |
| 21409 | 21464 | utf8_printf(p->out, "%12.12s: ", "nullvalue"); |
| 21410 | 21465 | output_c_string(p->out, p->nullValue); |
| 21411 | 21466 | |