Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dynamicheart/os-labs
https://github.com/dynamicheart/os-labs
Last synced: 2 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/dynamicheart/os-labs
- Owner: dynamicheart
- Created: 2018-03-07T07:57:44.000Z (over 6 years ago)
- Default Branch: lab1
- Last Pushed: 2018-06-17T07:26:32.000Z (over 6 years ago)
- Last Synced: 2024-08-01T21:44:30.170Z (3 months ago)
- Size: 1.96 MB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-se - dynamicheart-2015
README
# JOS Lab1
**在提供的版本的代码中(老师提供的代码未做修改),目前发现了vprintfmt三个bug**
1. 对于有符号类型的数字,其实就是d类型,负数是先打印负号,再调用printnum函数的,但是printnum函数中包含了打印padding的逻辑,因此右对齐的数字可能会出现如下情况的情况,符号和数字间有空格。
```shell
右对齐的负数:- 1
```2. vprintfmt没有处理格式化字符串中空格的情况。空格只会对有符号类型(d)的数产生影响,而且如果有了+符号,那么空格符号会被忽视。
3. 当左对齐符号'-'出现后,'0'符号会无效。