Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch cli-char-width Excluding Merge-Ins
This is equivalent to a diff from 4bee8295 to b1a9e291
2015-02-26
| ||
16:32 | Fix a real bug (in test code) that was introduced while trying to eliminate harmless compiler warnings from OpenBSD (see check-in [10321910990195878c]). (check-in: a62ba58c user: drh tags: trunk) | |
14:27 | In the command-line shell, change the units on the ".width" directive from bytes to characters. (Leaf check-in: b1a9e291 user: drh tags: cli-char-width) | |
02:33 | Simplifications to the description of the nByte parameter to sqlite3_prepare() and friends. (check-in: 4bee8295 user: drh tags: trunk) | |
2015-02-25
| ||
14:25 | Make sure the sqlite3_mutex.id field is initialized in the Win32 mutex implementation, even when SQLITE_DEBUG is turned off. (check-in: 6d132e7a user: drh tags: trunk) | |
Changes to src/shell.c.
︙ | |||
783 784 785 786 787 788 789 790 791 792 793 794 795 796 | 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | static void interrupt_handler(int NotUsed){ UNUSED_PARAMETER(NotUsed); seenInterrupt++; if( seenInterrupt>2 ) exit(1); if( db ) sqlite3_interrupt(db); } #endif /* ** Return the length of a string in characters. Multibyte UTF8 characters ** count as a single character. */ static int strlenChar(const char *z){ int n = 0; while( *z ){ if( (0xc0&*(z++))!=0x80 ) n++; } return n; } /* ** Print abs(w) characters of string "z" on FILE "out". ** ** w is in units of characters, not bytes! ** ** The output is always exactly abs(w) characters wide. If z contains ** more than abs(w) characters, it is truncated. If z contains fewer ** than abs(w) characters it is padded with spaces. Spaces are added ** on the right if w>0 (left justification) or on the left if w<0 ** (right justification). */ static void outputFixedWidth(FILE *out, int w, const char *z){ int n = strlenChar(z); int absw = w<0 ? -w : w; int i; if( n<=absw ){ if( w<0 ) for(i=absw-n; i>0; i--) putc(' ', out); fputs(z, out); if( w>0 ) for(i=absw-n; i>0; i--) putc(' ', out); }else{ for(i=n=0; z[i]; i++){ if( (z[i]&0xc0)==0x80 ) continue; if( n==absw ) break; n++; } fwrite(z, 1, i, out); } } /* ** This is the callback routine that the shell ** invokes for each row of a query result. */ static int shell_callback( void *pArg, |
︙ | |||
824 825 826 827 828 829 830 | 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 | - + - + - - - + + - - - - | int w, n; if( i<ArraySize(p->colWidth) ){ w = p->colWidth[i]; }else{ w = 0; } if( w==0 ){ |
︙ | |||
866 867 868 869 870 871 872 | 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 | - + - - - - + + - - - - - | int w; if( i<ArraySize(p->actualWidth) ){ w = p->actualWidth[i]; }else{ w = 10; } if( p->mode==MODE_Explain && azArg[i] && strlen30(azArg[i])>w ){ |
︙ |